Elin Modding Docs Doc
Loading...
Searching...
No Matches
GrowSystemPasture.cs
1
using
System;
2
using
UnityEngine;
3
4
// Token: 0x0200067F RID: 1663
5
public
class
GrowSystemPasture
:
GrowSystemWheat
6
{
7
// Token: 0x17000D47 RID: 3399
8
// (get) Token: 0x06002EB7 RID: 11959 RVA: 0x00106764 File Offset: 0x00104964
9
public
override
int
HarvestStage
10
{
11
get
12
{
13
return
-1;
14
}
15
}
16
17
// Token: 0x06002EB8 RID: 11960 RVA: 0x00106767 File Offset: 0x00104967
18
public
override
bool
CanReapSeed()
19
{
20
return
base.stage.idx >= 1;
21
}
22
23
// Token: 0x06002EB9 RID: 11961 RVA: 0x0010677C File Offset: 0x0010497C
24
public
override
void
OnMineObj(
Chara
c =
null
)
25
{
26
if
(base.IsWithered() || base.stage.idx == 0)
27
{
28
base.OnMineObj(c);
29
return
;
30
}
31
int
num = 1 +
EClass
.rnd(base.stage.idx);
32
PlantData
plantData =
EClass
._map.TryGetPlant(
GrowSystem
.cell);
33
Thing
thing = (plantData !=
null
) ? plantData.seed :
null
;
34
if
(thing !=
null
&& thing.encLV > 1)
35
{
36
num +=
EClass
.rndHalf((
int
)Mathf.Sqrt((
float
)thing.encLV) + 1);
37
}
38
base.PopHarvest(c,
"pasture"
, num);
39
}
40
}
Chara
Definition
Chara.cs:12
EClass
Definition
EClass.cs:7
GrowSystem
Definition
GrowSystem.cs:6
GrowSystemPasture
Definition
GrowSystemPasture.cs:6
GrowSystemWheat
Definition
GrowSystemWheat.cs:5
PlantData
Definition
PlantData.cs:6
Thing
Definition
Thing.cs:10
Elin
GrowSystemPasture.cs
Generated by
1.12.0