22 public void SetTile(
int tileIdx, params
int[] _tiles)
24 tiles =
new int[_tiles.Length];
25 for (
int i = 0; i <
tiles.Length; i++)
63 public virtual int Step => 5;
123 return "Material/grass";
135 string[] growth = _row._growth;
136 string[] array = growth[1].Split(
'/');
138 for (
int i = 0; i < array.Length; i++)
142 if (growth.Length > 2)
162 stage.harvest =
true;
175 s.renderData =
source.renderData;
191 int num = cell.objVal / 30;
252 cell.objVal = (byte)(num * 30);
299 if (p1 ==
null || p1.
seed ==
null)
323 bool flag = cell.isWatered || (cell.IsTopWater &&
source.tag.Contains(
"flood"));
325 if (plantData !=
null && flag)
329 int num =
Step * mtp * ((!flag) ? 1 : 2);
330 int num2 = cell.objVal / 30;
331 int num3 = (cell.objVal + num) / 30;
375 cell.objVal += (byte)num;
388 cell.objVal = (byte)(
stages.Length * 30 - 1);
409 cell.isHarvested =
false;
413 public void SetStage(
int idx,
bool renewHarvest =
false)
415 cell.objVal = (byte)(idx * 30);
416 cell.gatherCount = 0;
419 cell.isWatered =
true;
423 cell.isHarvested =
true;
427 EClass._zone.dirtyElectricity =
true;
522 int num = cell.sourceObj.components.Length - 1;
558 public void TryPick(
Cell cell,
string idThing,
int idMat = -1,
int num = 1,
bool applySeed =
false)
570 int num = (cell.IsFarmField ? 400 : 1000);
573 if (soilCost > maxSoil)
575 num += (soilCost - maxSoil) * 10;
601 cell.isHarvested =
true;
602 cell.gatherCount = 0;
619 if (plantData !=
null && plantData.
size > 0)
621 t.c_weight = t.SelfWeight * (80 + plantData.size * plantData.size * 100) / 100;
622 t.SetBool(115, enable:
true);
623 t.isWeightChanged =
true;
626 if (
source._growth.Length > 4)
633 num2 -=
EClass.
rnd(2 + (soilCost - maxSoil) / 20);
674 int encLv = thing.encLV / 10 + ((thing.encLV > 0) ? 1 : 0);
675 bool flag = t.IsFood || t.
Evalue(10) > 0 || t.id ==
"grass";
676 foreach (
Element value
in thing.elements.dict.Values)
678 if ((!value.
IsFoodTrait || flag) && (value.IsFoodTrait || value.id == 2))
680 t.elements.ModBase(value.
id, value.
Value / 10 * 10);
684 t.c_refText = thing.c_refText;
void Say(string lang, string ref1=null, string ref2=null)
SourceBlock.Row sourceBlock
SourceMaterial.Row matObj_fixed
Thing Pick(Thing t, bool msg=true, bool tryStack=true)
static SourceManager sources
static BaseGameScreen screen
bool disableUsermapBenefit
void SetTile(int tileIdx, params int[] _tiles)
void TryPick(Cell cell, string idThing, int idMat=-1, int num=1, bool applySeed=false)
void PopHarvest(Chara c, Thing t=null, int num=-1)
virtual int GetStageTile()
virtual bool IsHarvestStage(int idx)
virtual void OnReachNextStage()
virtual int AutoMineStage
static Stage currentStage
void TryPick(Cell cell, Thing t, Chara c, bool applySeed=false)
virtual void OnHit(Chara c)
virtual int GetShadow(int index)
void PopMineObj(Chara c=null)
static SourceObj.Row[] sourceSnowTree
void SetStage(int idx, bool renewHarvest=false)
virtual RenderData RenderHarvest
void TryGrow(VirtualDate date)
virtual AnimeID AnimeProgress
virtual Stage CreateStage()
virtual void OnHitFail(Chara c)
virtual bool CanReapSeed()
void EqualizePlants(Point pos)
virtual void OnSetStage(int idx)
virtual bool IsCrimeToHarvest
virtual void SetStageTile(Stage s)
virtual bool WitherOnLastStage
virtual void OnRenderTileMap(RenderParam p)
void OnProgressComplete(Chara c)
virtual string GetSoundProgress()
void Init(SourceObj.Row _row)
virtual bool DrawHarvestOnTop
virtual bool NeedSunlight
virtual void OnExceedLastStage()
virtual void OnMineObj(Chara c=null)
virtual float MtpProgress
virtual bool BlockSight(Cell cell)
virtual bool UseGenericFirstStageTile
void PopHarvest(Chara c, string idThing, int num=-1)
Thing TryPopSeed(Chara c)
bool CanGrow(VirtualDate date)
virtual bool BlockPass(Cell cell)
virtual void SetGenericFirstStageTile(Stage s)
virtual bool CanLevelSeed
PlantData TryGetPlant(Point p)
void TrySmoothPick(Cell cell, Thing t, Chara c)
void RefreshFOV(int x, int z, int radius=6, bool recalculate=false)
void MineObj(Point point, Task task=null, Chara c=null)
void SetObj(int x, int z, int id=0, int value=1, int dir=0)
void AddShadow(MeshPassParam p, ref Vector3 fix)
void SetObj(int id=0, int value=1, int dir=0)
void ForeachNeighbor(Action< Point > action, bool diagonal=true)
Point GetRandomNeighbor()
void Draw(RenderParam p, int tile)
int ConvertTile(int tile)
static ShadowData Instance
static Thing CreateFromCategory(string idCat, int lv=-1)
static Thing Create(string id, int idMat=-1, int lv=-1)
static Thing MakeSeed(SourceObj.Row obj, PlantData plant=null)
bool TryAddThingInSharedContainer(Thing t, List< Thing > containers=null, bool add=true, bool msg=false, Chara chara=null, bool sharedOnly=true)
Card AddCard(Card t, Point point)