Elin Decompiled Documentation EA 23.331 Nightly
Loading...
Searching...
No Matches
GrowSystemCha.cs
Go to the documentation of this file.
2{
3 public override int HarvestStage => 3;
4
5 protected override bool UseGenericFirstStageTile => false;
6
7 public override bool CanReapSeed()
8 {
9 return base.stage.idx >= 3;
10 }
11
12 public override void OnMineObj(Chara c = null)
13 {
14 if (EClass.rnd(2) == 0)
15 {
16 TryPick(GrowSystem.cell, ThingGen.Create("grass", EClass.sources.materials.alias["grass"].id), c);
17 }
18 if (base.stage.idx == HarvestStage)
19 {
20 PopHarvest(c ?? EClass.pc, ThingGen.Create(idHarvestThing.IsEmpty("leaf_tea")));
21 }
22 }
23}
Definition: Chara.cs:10
Definition: EClass.cs:6
static int rnd(long a)
Definition: EClass.cs:59
static SourceManager sources
Definition: EClass.cs:43
static Chara pc
Definition: EClass.cs:15
override int HarvestStage
Definition: GrowSystemCha.cs:3
override bool CanReapSeed()
Definition: GrowSystemCha.cs:7
override bool UseGenericFirstStageTile
Definition: GrowSystemCha.cs:5
override void OnMineObj(Chara c=null)
void TryPick(Cell cell, Thing t, Chara c, bool applySeed=false)
Definition: GrowSystem.cs:566
string idHarvestThing
Definition: GrowSystem.cs:55
void PopHarvest(Chara c, string idThing, int num=-1)
Definition: GrowSystem.cs:644
static Cell cell
Definition: GrowSystem.cs:41
SourceMaterial materials
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53