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;
146 return "Material/grass";
158 string[] growth = _row._growth;
159 string[] array = growth[1].Split(
'/');
161 for (
int i = 0; i < array.Length; i++)
165 if (growth.Length > 2)
185 stage.harvest =
true;
198 s.renderData =
source.renderData;
214 int num = cell.objVal / 30;
252 EClass.scene.psFey.transform.position =
new Vector3(p.
x, p.
y, p.
z - 2f);
280 cell.objVal = (byte)(num * 30);
342 if (p1 ==
null || p1.
seed ==
null)
366 bool flag = cell.isWatered || (cell.IsTopWater && (
source.tag.Contains(
"flood") ||
source.tag.Contains(
"undersea")));
368 if (plantData !=
null && flag)
372 int num =
Step * mtp * ((!flag) ? 1 : 2);
373 int num2 = cell.objVal / 30;
374 int num3 = (cell.objVal + num) / 30;
418 cell.objVal += (byte)num;
431 cell.objVal = (byte)(
stages.Length * 30 - 1);
452 cell.isHarvested =
false;
456 public void SetStage(
int idx,
bool renewHarvest =
false)
458 cell.objVal = (byte)(idx * 30);
459 cell.gatherCount = 0;
462 cell.isWatered =
true;
466 cell.isHarvested =
true;
470 EClass._zone.dirtyElectricity =
true;
565 int num = cell.sourceObj.components.Length - 1;
601 public void TryPick(
Cell cell,
string idThing,
int idMat = -1,
int num = 1,
bool applySeed =
false)
621 int num = (cell.IsFarmField ? 400 : 1000);
624 if (soilCost > maxSoil)
626 num += (soilCost - maxSoil) * 10;
644 cell.isHarvested =
true;
645 cell.gatherCount = 0;
667 if (plantData !=
null && plantData.
size > 0)
669 t.c_weight = t.SelfWeight * (80 + plantData.size * plantData.size * 100) / 100;
670 t.SetBool(115, enable:
true);
671 t.isWeightChanged =
true;
675 if (
source._growth.Length > 4)
682 num2 -=
EClass.
rnd(2 + (soilCost - maxSoil) / 20);
702 c.
ModExpParty(207, Mathf.Min(t.c_weight * num3 / 125, 500));
717 int encLv = thing.encLV / 10 + ((thing.encLV > 0) ? 1 : 0);
718 bool flag = t.IsFood || t.
Evalue(10) > 0 || t.id ==
"grass";
719 foreach (
Element value
in thing.elements.dict.Values)
721 if ((!value.
IsFoodTrait || flag) && (value.IsFoodTrait || value.id == 2))
723 t.elements.ModBase(value.
id, value.
Value / 10 * 10);
727 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
SourceMaterial.Row matObj
SourceFloor.Row sourceSurface
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 idSource)
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)