22 public void SetTile(
int tileIdx, params
int[] _tiles)
24 tiles =
new int[_tiles.Length];
25 for (
int i = 0; i <
tiles.Length; i++)
77 public virtual int Step => 5;
141 return "Material/grass";
153 string[] growth = _row._growth;
154 string[] array = growth[1].Split(
'/');
156 for (
int i = 0; i < array.Length; i++)
160 if (growth.Length > 2)
180 stage.harvest =
true;
193 s.renderData =
source.renderData;
209 int num = cell.objVal / 30;
247 EClass.scene.psFey.transform.position =
new Vector3(p.
x, p.
y, p.
z - 2f);
275 cell.objVal = (byte)(num * 30);
337 if (p1 ==
null || p1.
seed ==
null)
361 bool flag = cell.isWatered || (cell.IsTopWater && (
source.tag.Contains(
"flood") ||
source.tag.Contains(
"undersea")));
363 if (plantData !=
null && flag)
367 int num =
Step * mtp * ((!flag) ? 1 : 2);
368 int num2 = cell.objVal / 30;
369 int num3 = (cell.objVal + num) / 30;
413 cell.objVal += (byte)num;
426 cell.objVal = (byte)(
stages.Length * 30 - 1);
447 cell.isHarvested =
false;
451 public void SetStage(
int idx,
bool renewHarvest =
false)
453 cell.objVal = (byte)(idx * 30);
454 cell.gatherCount = 0;
457 cell.isWatered =
true;
461 cell.isHarvested =
true;
465 EClass._zone.dirtyElectricity =
true;
560 int num = cell.sourceObj.components.Length - 1;
596 public void TryPick(
Cell cell,
string idThing,
int idMat = -1,
int num = 1,
bool applySeed =
false)
608 int num = (cell.IsFarmField ? 400 : 1000);
611 if (soilCost > maxSoil)
613 num += (soilCost - maxSoil) * 10;
639 cell.isHarvested =
true;
640 cell.gatherCount = 0;
660 if (text ==
"potato" &&
EClass.
rnd(3) == 0)
670 if (plantData !=
null && plantData.
size > 0)
672 t.c_weight = t.SelfWeight * (80 + plantData.size * plantData.size * 100) / 100;
673 t.SetBool(115, enable:
true);
674 t.isWeightChanged =
true;
678 if (
source._growth.Length > 4)
685 num2 -=
EClass.
rnd(2 + (soilCost - maxSoil) / 20);
697 else if (Application.isEditor)
709 c.
ModExpParty(207, Mathf.Min(t.c_weight * num3 / 125, 500));
724 int encLv = thing.encLV / 10 + ((thing.encLV > 0) ? 1 : 0);
725 bool flag = t.IsFood || t.
Evalue(10) > 0 || t.id ==
"grass";
726 foreach (
Element value
in thing.elements.dict.Values)
728 if ((!value.
IsFoodTrait || flag) && (value.IsFoodTrait || value.id == 2))
730 t.elements.ModBase(value.
id, value.
Value / 10 * 10);
734 t.c_refText = thing.c_refText;
void ModExpParty(int ele, int a)
void Say(string lang, string ref1=null, string ref2=null)
SourceBlock.Row sourceBlock
SourceFloor.Row sourceFloor
SourceMaterial.Row matObj_fixed
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()
static SourceObj.Row[] _sourceSnowTree
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)
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
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 void OnRenderTileMap(RenderParam p, bool drawShadow=true)
virtual bool BlockSight(Cell cell)
virtual bool UseGenericFirstStageTile
void PopHarvest(Chara c, string idThing, int num=-1)
Thing TryPopSeed(Chara c)
virtual bool GrowUndersea
bool CanGrow(VirtualDate date)
virtual bool BlockPass(Cell cell)
virtual void SetGenericFirstStageTile(Stage s)
static SourceObj.Row[] SourceSnowTree
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(string id, PlantData plant=null)
bool TryAddThingInSharedContainer(Thing t, List< Thing > containers=null, bool add=true, bool msg=false, Chara chara=null, bool sharedOnly=true)
virtual bool IsUnderwater
Card AddCard(Card t, Point point)