Elin Decompiled Documentation
EA 23.102 Nightly
Loading...
Searching...
No Matches
GrowSystemPasture.cs
Go to the documentation of this file.
1
using
UnityEngine;
2
3
public
class
GrowSystemPasture
:
GrowSystemWheat
4
{
5
public
override
int
HarvestStage
=> -1;
6
7
public
override
bool
CanReapSeed
()
8
{
9
return
base.stage.idx >= 1;
10
}
11
12
public
override
void
OnMineObj
(
Chara
c =
null
)
13
{
14
if
(
IsWithered
() || base.stage.idx == 0)
15
{
16
base.OnMineObj(c);
17
return
;
18
}
19
int
num = 1 +
EClass
.
rnd
(base.stage.idx);
20
Thing
thing =
EClass
.
_map
.
TryGetPlant
(
GrowSystem
.
cell
)?.
seed
;
21
if
(thing !=
null
&& thing.
encLV
> 1 && !
EClass
.
_zone
.
IsUserZone
)
22
{
23
num +=
EClass
.
rndHalf
((
int
)Mathf.Sqrt(thing.
encLV
) + 1);
24
}
25
PopHarvest
(c,
"pasture"
, num);
26
}
27
}
Card.encLV
int encLV
Definition:
Card.cs:310
Chara
Definition:
Chara.cs:10
EClass
Definition:
EClass.cs:5
EClass.rnd
static int rnd(int a)
Definition:
EClass.cs:50
EClass._zone
static Zone _zone
Definition:
EClass.cs:20
EClass._map
static Map _map
Definition:
EClass.cs:18
EClass.rndHalf
static int rndHalf(int a)
Definition:
EClass.cs:74
GrowSystemPasture
Definition:
GrowSystemPasture.cs:4
GrowSystemPasture.CanReapSeed
override bool CanReapSeed()
Definition:
GrowSystemPasture.cs:7
GrowSystemPasture.HarvestStage
override int HarvestStage
Definition:
GrowSystemPasture.cs:5
GrowSystemPasture.OnMineObj
override void OnMineObj(Chara c=null)
Definition:
GrowSystemPasture.cs:12
GrowSystemWheat
Definition:
GrowSystemWheat.cs:2
GrowSystem
Definition:
GrowSystem.cs:4
GrowSystem.IsWithered
bool IsWithered()
Definition:
GrowSystem.cs:473
GrowSystem.PopHarvest
void PopHarvest(Chara c, string idThing, int num=-1)
Definition:
GrowSystem.cs:606
GrowSystem.cell
static Cell cell
Definition:
GrowSystem.cs:45
Map.TryGetPlant
PlantData TryGetPlant(Point p)
Definition:
Map.cs:1920
PlantData.seed
Thing seed
Definition:
PlantData.cs:6
Thing
Definition:
Thing.cs:8
Zone.IsUserZone
virtual bool IsUserZone
Definition:
Zone.cs:264
Elin
GrowSystemPasture.cs
Generated by
1.9.6