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