Elin Decompiled Documentation EA 23.319 Nightly Patch 1
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
22 public override void OnSetObj()
23 {
24 string alias = source.alias;
25 if (alias == "tulip_red" || alias == "roseflower")
26 {
27 GrowSystem.cell.DyeObj("rubinus");
28 GrowSystem.cell.objDir = EClass.rnd(4);
29 }
30 }
31}
void DyeObj(string id)
Definition: Cell.cs:1724
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 void OnSetObj()
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:566
string idHarvestThing
Definition: GrowSystem.cs:55
SourceObj.Row source
Definition: GrowSystem.cs:45
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