-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
112 additions
and
7 deletions.
There are no files selected for viewing
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
| ||
using RimWorld; | ||
using Verse; | ||
|
||
|
||
namespace VFEF | ||
{ | ||
[DefOf] | ||
public static class InternalDefOf | ||
{ | ||
public static ThingDef VFE_PlanterBox; | ||
public static ThingDef VFE_PlanterBox_Tilable; | ||
|
||
|
||
static InternalDefOf() | ||
{ | ||
DefOfHelper.EnsureInitializedInCtor(typeof(InternalDefOf)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using HarmonyLib; | ||
using RimWorld; | ||
using System.Reflection; | ||
using Verse; | ||
using System.Reflection.Emit; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using System.Linq; | ||
using System; | ||
using Verse.AI; | ||
using RimWorld.Planet; | ||
|
||
|
||
|
||
namespace VFEF | ||
{ | ||
|
||
public class VFEF : Mod | ||
{ | ||
public VFEF(ModContentPack content) : base(content) | ||
{ | ||
var harmony = new Harmony("com.vanillafarmingexpanded"); | ||
harmony.PatchAll(Assembly.GetExecutingAssembly()); | ||
} | ||
} | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using HarmonyLib; | ||
using RimWorld; | ||
using Verse; | ||
using System.Collections.Generic; | ||
|
||
namespace VFEF | ||
{ | ||
[HarmonyPatch(typeof(PlantUtility), nameof(PlantUtility.CanSowOnGrower))] | ||
static class VFEF_PlantUtility_CanSowOnGrower_Patch | ||
{ | ||
|
||
public static List<ThingDef> plantersList = new List<ThingDef>() { InternalDefOf.VFE_PlanterBox, InternalDefOf.VFE_PlanterBox_Tilable }; | ||
|
||
public static bool Postfix(bool __result, ThingDef plantDef, object obj) | ||
{ | ||
if ((obj is Building_PlantGrower planter) && plantersList.Contains(planter.def)) | ||
{ | ||
if (planter.def.fertility >= 0f && planter.def.fertility < plantDef.plant.fertilityMin) | ||
{ | ||
return false; | ||
} | ||
} | ||
|
||
return __result; | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Lib.Harmony" version="2.2.2" targetFramework="net472" /> | ||
</packages> |