1using System.Collections.Generic;
27 public override void SetName(ref
string s)
34 base.WriteNote(n, identified);
36 if (!
row._growth.IsEmpty() &&
row._growth.Length >= 4)
38 if (
row._growth.Length >= 5)
40 num =
row._growth[4].ToInt();
42 n.
AddText(
"isHarvestCrop".lang(num.ToString() ??
""));
44 n.
AddText(
"isConsumeFertility".lang((0.1f * (
float)
row.costSoil).ToString() ??
""));
45 if (
row.tag.Contains(
"flood"))
49 if (
row.growth !=
null &&
row.growth.NeedSunlight)
53 if (
row.growth ==
null || !
row.growth.CanLevelSeed)
79 Thing thing = plant?.seed;
86 if (thing !=
null && obj.growth !=
null && obj.growth.CanLevelSeed)
98 thing2.c_seed = thing.
c_seed;
99 int num = plant?.water ?? 0;
100 int num2 = plant?.fert ?? 0;
113 Msg.
Say(
"seedLvLimit", thing2);
118 int num5 = Mathf.Clamp(
EClass.
rnd(num4) - 5, 1, EClass.player.isAutoFarming ? 3 : 10);
131 if (obj ==
null || obj.growth ==
null || !obj.growth.CanLevelSeed)
135 for (
int i = 0; i < num; i++)
137 if (obj ==
null || obj.objType ==
"crop")
162 if (
row !=
null &&
row.vals.Length != 0)
164 t.idSkin =
row.vals[0].ToInt();
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
void Add(Act a, string s="")
ElementContainerCard elements
bool HasElement(int ele, int req=1)
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
virtual void SetBlessedState(BlessedState s)
bool CanGrow(SourceObj.Row obj, VirtualDate date)
static void AddRandomFoodEnc(Thing t)
static void ModRandomFoodEnc(Thing t)
static int curve(int a, int start, int step, int rate=75)
static SourceManager sources
Dictionary< int, Element > dict
void SetTo(int id, int v)
Element SetBase(string alias, int v, int potential=0)
PlantData AddPlant(Point pos, Thing seed)
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
void SetObj(int id=0, int value=1, int dir=0)
static void SetSeed(int a=-1)
static Thing Create(string id, int idMat=-1, int lv=-1)
static SourceObj.Row GetRandomSeedObj()
override void SetName(ref string s)
override void OnCreate(int lv)
override int InstallBottomPriority
static Thing ApplySeed(Thing t, int refval)
override void WriteNote(UINote n, bool identified)
static Thing MakeSeed(SourceObj.Row obj, PlantData plant=null)
override int DefaultStock
override bool CanChangeHeight
static Thing MakeSeed(string idSource)
override bool CanExtendBuild
static Thing MakeRandomSeed(bool enc=false)
void TrySprout(bool force=false, bool sucker=false, VirtualDate date=null)
static void LevelSeed(Thing t, SourceObj.Row obj, int num)
static List< SourceObj.Row > listSeeds
static Thing MakeSeed(SourceObj.Row obj)
UIItem AddText(string text, FontColor color=FontColor.DontChange)
static List< Thing > Suckers