Elin Decompiled Documentation EA 23.265 Nightly Patch 2
Loading...
Searching...
No Matches
GrowSystem.cs
Go to the documentation of this file.
1using UnityEngine;
2
3public class GrowSystem : EClass
4{
5 public class Stage
6 {
7 public int[] tiles;
8
9 public int idx;
10
11 public int tileEx;
12
14
15 public bool harvest;
16
17 public void SetTile(int _tile)
18 {
19 tiles = new int[Convert(_tile)];
20 }
21
22 public void SetTile(int tileIdx, params int[] _tiles)
23 {
24 tiles = new int[_tiles.Length];
25 for (int i = 0; i < tiles.Length; i++)
26 {
27 tiles[i] = Convert(_tiles[i] + tileIdx);
28 }
29 }
30
31 public int Convert(int tile)
32 {
33 return renderData.ConvertTile(tile);
34 }
35 }
36
37 public static SourceObj.Row[] sourceSnowTree = new SourceObj.Row[2]
38 {
39 EClass.sources.objs.map[54],
40 EClass.sources.objs.map[55]
41 };
42
43 public const int DivStage = 30;
44
45 public static Cell cell;
46
47 public static Stage currentStage;
48
50
51 public Stage[] stages;
52
53 public int[] baseTiles;
54
55 public int harvestTile;
56
57 public int afterHarvestTile;
58
59 public string idHarvestThing;
60
61 public virtual RenderData RenderHarvest => source.renderData;
62
63 public virtual int Step => 5;
64
65 public virtual int StageLength => 5;
66
67 public virtual int DefaultStage => Mathf.Clamp(StageLength - 2, 0, StageLength - 1);
68
69 public virtual int HarvestStage => -1;
70
71 public virtual int AutoMineStage => HarvestStage;
72
73 protected virtual int HaltStage => HarvestStage;
74
75 protected virtual bool DrawHarvestOnTop => false;
76
77 protected virtual bool UseGenericFirstStageTile => true;
78
79 protected virtual bool WitherOnLastStage => true;
80
81 protected virtual bool CanRegrow => true;
82
83 public virtual bool CanLevelSeed => true;
84
85 public virtual int ShadowStage => 1;
86
87 public virtual bool IsTree => false;
88
89 public virtual bool IsCrimeToHarvest => false;
90
91 public virtual float MtpProgress => 1f;
92
93 public virtual bool NeedSunlight => true;
94
95 public virtual bool GrowOnLand => true;
96
97 public virtual bool GrowUndersea => false;
98
99 public virtual AnimeID AnimeProgress => AnimeID.HitObj;
100
101 public Stage stage => stages[cell.objVal / 30];
102
103 public virtual bool IsMature => false;
104
105 public bool IsLastStage()
106 {
107 return stage.idx == StageLength - 1;
108 }
109
110 protected virtual bool IsHarvestStage(int idx)
111 {
112 return idx == HarvestStage;
113 }
114
115 public virtual bool BlockSight(Cell cell)
116 {
117 return false;
118 }
119
120 public virtual bool BlockPass(Cell cell)
121 {
122 return false;
123 }
124
125 public virtual string GetSoundProgress()
126 {
127 return "Material/grass";
128 }
129
130 public virtual Stage CreateStage()
131 {
132 return new Stage();
133 }
134
135 public void Init(SourceObj.Row _row)
136 {
137 source = _row;
138 stages = new Stage[StageLength];
139 string[] growth = _row._growth;
140 string[] array = growth[1].Split('/');
141 baseTiles = new int[array.Length];
142 for (int i = 0; i < array.Length; i++)
143 {
144 baseTiles[i] = array[i].ToInt();
145 }
146 if (growth.Length > 2)
147 {
148 harvestTile = RenderHarvest.ConvertTile(growth[2].ToInt());
149 idHarvestThing = growth[3];
150 }
151 for (int j = 0; j < StageLength; j++)
152 {
154 stages[j] = stage;
155 stage.idx = j;
156 if (j == 0 && UseGenericFirstStageTile)
157 {
159 }
160 else
161 {
163 }
164 if (harvestTile != 0 && IsHarvestStage(j))
165 {
166 stage.harvest = true;
167 }
168 }
169 }
170
171 public virtual void SetGenericFirstStageTile(Stage s)
172 {
173 s.renderData = EClass.core.refs.renderers.objS_flat;
174 s.SetTile(0, 100, 101, 102);
175 }
176
177 public virtual void SetStageTile(Stage s)
178 {
179 s.renderData = source.renderData;
180 s.SetTile(s.idx + (UseGenericFirstStageTile ? (-1) : 0), baseTiles);
181 }
182
183 public virtual int GetStageTile()
184 {
185 return currentStage.tiles[cell.objDir % currentStage.tiles.Length];
186 }
187
188 public virtual int GetShadow(int index)
189 {
190 return -1;
191 }
192
193 public virtual void OnRenderTileMap(RenderParam p, bool drawShadow = true)
194 {
195 int num = cell.objVal / 30;
196 currentStage = stages[num];
197 SourceObj.Row row = source;
198 float y = p.y;
199 float z = p.z;
200 if (num != 0 || !UseGenericFirstStageTile)
201 {
202 p.y += row.pref.y;
203 p.z += row.pref.z;
204 }
206 {
207 if (cell.isHarvested || harvestTile == 0)
208 {
209 p.tile = ((afterHarvestTile != 0) ? afterHarvestTile : GetStageTile());
211 }
212 else
213 {
215 {
216 p.tile = GetStageTile();
218 p.liquidLv = 0;
219 }
220 p.tile = harvestTile;
222 }
223 }
224 else
225 {
226 p.tile = GetStageTile();
228 }
229 p.y = y;
230 p.z = z;
231 if (cell.obj == 118 && Core.fixedFrame % 10f == 0f && IsMature)
232 {
233 EClass.scene.psFey.transform.position = new Vector3(p.x, p.y, p.z - 2f);
234 EClass.scene.psFey.Emit(1);
235 }
236 if (drawShadow && num >= ShadowStage)
237 {
238 int shadow = GetShadow(num);
239 if (shadow == -1)
240 {
241 shadow = row.pref.shadow;
242 }
243 if (shadow > 1 && !cell.ignoreObjShadow)
244 {
246 }
247 }
248 }
249
250 public void SetRandomStage()
251 {
252 int num = Rand.rnd(stages.Length);
253 if (num == 0 && EClass.rnd(5) != 0 && stages.Length >= 2)
254 {
255 num++;
256 }
257 else if (num == stages.Length - 1 && EClass.rnd(5) != 0 && stages.Length >= 2)
258 {
259 num--;
260 }
261 cell.objVal = (byte)(num * 30);
262 }
263
264 public void SetDefaultStage()
265 {
266 cell.objVal = (byte)(DefaultStage * 30);
267 }
268
269 public virtual void OnSetObj()
270 {
271 }
272
273 public bool CanGrow(VirtualDate date)
274 {
275 if (source.id == 0)
276 {
277 return false;
278 }
279 if (cell.HasBlock && !cell.sourceBlock.tileType.IsFence)
280 {
281 return false;
282 }
283 if (GrowUndersea)
284 {
285 if (EClass._zone.IsUnderwater || cell.sourceFloor.tileType.IsDeepWater)
286 {
287 return true;
288 }
289 }
290 else if (EClass._zone.IsUnderwater)
291 {
292 return false;
293 }
294 if (!GrowOnLand)
295 {
296 return false;
297 }
298 if (NeedSunlight)
299 {
300 if (date.sunMap == null)
301 {
302 date.BuildSunMap();
303 }
304 if ((cell.HasRoof || date.IsWinter || EClass._map.IsIndoor) && !date.sunMap.Contains(cell.index))
305 {
306 return false;
307 }
308 }
309 return true;
310 }
311
312 public void TryGrow(VirtualDate date)
313 {
314 if (CanGrow(date))
315 {
316 Grow();
317 }
318 }
319
320 public void EqualizePlants(Point pos)
321 {
323 if (p1 == null || p1.seed == null)
324 {
325 return;
326 }
327 pos.ForeachNeighbor(delegate(Point pos2)
328 {
329 Thing thing = EClass._map.TryGetPlant(pos2)?.seed;
330 if (thing == null)
331 {
333 if (installed != null && installed.id == p1.seed.id)
334 {
335 thing = installed;
336 }
337 }
338 if (thing != null && p1.seed.refVal == thing.refVal && thing.encLV >= p1.seed.encLV)
339 {
340 p1.seed = thing;
341 }
342 }, diagonal: false);
343 }
344
345 public void Grow(int mtp = 1)
346 {
347 bool flag = cell.isWatered || (cell.IsTopWater && (source.tag.Contains("flood") || source.tag.Contains("undersea")));
348 PlantData plantData = EClass._map.TryGetPlant(cell);
349 if (plantData != null && flag)
350 {
351 plantData.water++;
352 }
353 int num = Step * mtp * ((!flag) ? 1 : 2);
354 int num2 = cell.objVal / 30;
355 int num3 = (cell.objVal + num) / 30;
356 if (num2 != num3)
357 {
359 {
360 PopHarvest(null);
361 }
363 {
364 Point point = cell.GetPoint();
365 EqualizePlants(point);
366 Thing thing = TryPopSeed(null);
367 PopMineObj();
368 if (thing != null)
369 {
370 point.SetObj();
371 EClass._zone.AddCard(thing, point).Install();
372 }
373 }
374 else if (num2 == StageLength - 1)
375 {
377 {
378 Point point2 = cell.GetPoint();
379 EqualizePlants(point2);
380 Thing thing2 = TryPopSeed(null);
381 if (thing2 != null)
382 {
383 point2.SetObj();
384 EClass._zone.AddCard(thing2, point2).Install();
385 }
386 }
387 else
388 {
390 }
391 }
392 else
393 {
395 }
396 }
397 else
398 {
399 cell.objVal += (byte)num;
400 }
401 cell.Refresh();
403 }
404
405 public virtual void OnReachNextStage()
406 {
407 SetStage(cell.objVal / 30 + 1);
408 }
409
410 public virtual void OnExceedLastStage()
411 {
412 cell.objVal = (byte)(stages.Length * 30 - 1);
413 if (!CanRegrow || Rand.rnd(2) != 0)
414 {
415 return;
416 }
417 Point point = cell.GetPoint();
418 if (point.IsFarmField)
419 {
420 return;
421 }
422 if (Rand.rnd(2) == 0)
423 {
424 Point randomNeighbor = point.GetRandomNeighbor();
425 if (randomNeighbor.cell.CanGrowWeed)
426 {
427 randomNeighbor.SetObj(cell.obj);
428 point.SetObj();
429 return;
430 }
431 }
432 cell.objVal = 0;
433 cell.isHarvested = false;
434 cell.isWatered = cell.HasLiquid;
435 }
436
437 public void SetStage(int idx, bool renewHarvest = false)
438 {
439 cell.objVal = (byte)(idx * 30);
440 cell.gatherCount = 0;
441 if (cell.HasLiquid)
442 {
443 cell.isWatered = true;
444 }
445 if (renewHarvest)
446 {
447 cell.isHarvested = true;
448 }
449 if (cell.sourceObj.id == 118)
450 {
451 EClass._zone.dirtyElectricity = true;
452 }
453 OnSetStage(idx);
454 }
455
456 public virtual void OnSetStage(int idx)
457 {
458 }
459
460 public bool HaltGrowth()
461 {
462 return stage.idx == HarvestStage;
463 }
464
465 public void Perish()
466 {
468 {
469 if (CanHarvest())
470 {
471 PopHarvest(null);
472 }
473 Thing thing = TryPopSeed(null);
474 if (thing != null)
475 {
477 }
479 return;
480 }
482 {
484 return;
485 }
486 if (EClass.rnd(3) == 0)
487 {
488 Thing thing2 = TryPopSeed(null);
489 if (thing2 != null)
490 {
492 }
493 }
495 }
496
497 public bool IsWithered()
498 {
500 {
501 return true;
502 }
503 return false;
504 }
505
506 public bool CanHarvest()
507 {
509 {
510 return false;
511 }
512 return true;
513 }
514
515 public virtual bool CanReapSeed()
516 {
517 return CanHarvest();
518 }
519
520 public virtual void OnHit(Chara c)
521 {
522 }
523
524 public virtual void OnHitFail(Chara c)
525 {
526 }
527
529 {
530 EClass._map.MineObj(cell.GetPoint(), null, c);
531 }
532
533 public void PopMineObj(Chara c = null)
534 {
536 {
537 OnMineObj(c);
538 TryPopSeed(c);
539 }
540 }
541
542 public virtual void OnMineObj(Chara c = null)
543 {
544 if (!IsWithered())
545 {
546 int num = cell.sourceObj.components.Length - 1;
547 Thing t = ThingGen.Create(cell.sourceObj.components[num].Split('/')[0], cell.matObj_fixed.alias);
548 TryPick(cell, t, c);
549 }
550 }
551
552 public void TryPick(Cell cell, Thing t, Chara c, bool applySeed = false)
553 {
554 if (applySeed)
555 {
556 ApplySeed(t);
557 }
559 {
560 if (EClass.rnd(4) != 0)
561 {
562 if (t.Num > 1)
563 {
564 t.SetNum(t.Num / 2);
565 }
566 else if (EClass.rnd(2) == 0)
567 {
568 return;
569 }
571 {
573 }
574 }
575 }
576 else
577 {
579 }
580 }
581
582 public void TryPick(Cell cell, string idThing, int idMat = -1, int num = 1, bool applySeed = false)
583 {
584 if (num > 0)
585 {
586 TryPick(cell, ThingGen.Create(idThing, idMat).SetNum(num), EClass.pc, applySeed);
587 }
588 }
589
591 {
592 if (source.HasTag(CTAG.seed))
593 {
594 int num = (cell.IsFarmField ? 400 : 1000);
595 int soilCost = EClass._zone.GetSoilCost();
596 int maxSoil = EClass._zone.MaxSoil;
597 if (soilCost > maxSoil)
598 {
599 num += (soilCost - maxSoil) * 10;
600 }
601 if (IsWithered())
602 {
603 num /= 5;
604 }
606 {
607 return null;
608 }
609 if (EClass.player.isAutoFarming || EClass.rnd(num) < EClass.rnd(source.chance))
610 {
613 {
614 return thing;
615 }
616 TryPick(cell, thing, c);
617 return thing;
618 }
619 }
620 return null;
621 }
622
623 public void Harvest(Chara c)
624 {
625 cell.isHarvested = true;
626 cell.gatherCount = 0;
627 PopHarvest(c);
628 }
629
630 public void PopHarvest(Chara c, string idThing, int num = -1)
631 {
632 PopHarvest(c, ThingGen.Create(idThing), num);
633 }
634
635 public void PopHarvest(Chara c, Thing t = null, int num = -1)
636 {
637 if (t == null)
638 {
639 if (idHarvestThing.StartsWith('#'))
640 {
641 t = ThingGen.CreateFromCategory(idHarvestThing.Replace("#", ""));
642 }
643 else
644 {
645 string text = idHarvestThing;
646 if (text == "potato" && EClass.rnd(3) == 0)
647 {
648 text = "784";
649 }
650 t = ThingGen.Create(text.IsEmpty("apple"));
651 }
652 }
653 ApplySeed(t);
654 PlantData plantData = EClass._map.TryGetPlant(cell);
655 if (plantData != null && plantData.size > 0)
656 {
657 t.c_weight = t.SelfWeight * (80 + plantData.size * plantData.size * 100) / 100;
658 t.SetBool(115, enable: true);
659 t.isWeightChanged = true;
660 }
661 t.SetBlessedState(BlessedState.Normal);
662 if (source._growth.Length > 4)
663 {
664 int num2 = EClass.rnd(source._growth[4].ToInt()) + 1;
665 int soilCost = EClass._zone.GetSoilCost();
666 int maxSoil = EClass._zone.MaxSoil;
667 if (soilCost > maxSoil && EClass.player.stats.days >= 5)
668 {
669 num2 -= EClass.rnd(2 + (soilCost - maxSoil) / 20);
670 }
671 if (num2 <= 0)
672 {
674 {
675 c?.Say("cropSpoiled", c, cell.GetObjName());
676 }
677 return;
678 }
679 t.SetNum(num2);
680 }
681 else if (Application.isEditor)
682 {
683 Debug.Log("harvest count not set:" + source.id + "/" + source.alias);
684 }
685 if (num > 0)
686 {
687 t.SetNum(num);
688 }
689 TryPick(cell, t, c);
690 }
691
692 public void ApplySeed(Thing t)
693 {
696 {
697 thing = null;
698 }
699 if (thing == null)
700 {
701 return;
702 }
703 int encLv = thing.encLV / 10 + ((thing.encLV > 0) ? 1 : 0);
704 bool flag = t.IsFood || t.Evalue(10) > 0 || t.id == "grass";
705 foreach (Element value in thing.elements.dict.Values)
706 {
707 if ((!value.IsFoodTrait || flag) && (value.IsFoodTrait || value.id == 2))
708 {
709 t.elements.ModBase(value.id, value.Value / 10 * 10);
710 }
711 }
712 t.SetEncLv(encLv);
713 t.c_refText = thing.c_refText;
714 t.isCrafted = true;
715 }
716
717 public virtual int GetHp()
718 {
719 return source.hp;
720 }
721}
AnimeID
Definition: AnimeID.cs:2
BlessedState
Definition: BlessedState.cs:2
CTAG
Definition: CTAG.cs:2
@ seed
BaseTileMap tileMap
MeshPass passShadow
Definition: BaseTileMap.cs:133
Thing container_shipping
Definition: CardManager.cs:52
string id
Definition: Card.cs:36
Card AddCard(Card c)
Definition: Card.cs:3109
Thing SetNum(int a)
Definition: Card.cs:3520
int refVal
Definition: Card.cs:207
int encLV
Definition: Card.cs:327
int Evalue(int ele)
Definition: Card.cs:2574
Card Install()
Definition: Card.cs:3766
int Num
Definition: Card.cs:159
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6991
Definition: Cell.cs:7
SourceBlock.Row sourceBlock
Definition: Cell.cs:1052
bool HasBlock
Definition: Cell.cs:643
SourceFloor.Row sourceFloor
Definition: Cell.cs:1054
bool isHarvested
Definition: Cell.cs:330
byte objVal
Definition: Cell.cs:40
void Refresh()
Definition: Cell.cs:1152
bool HasLiquid
Definition: Cell.cs:673
byte z
Definition: Cell.cs:58
bool HasRoof
Definition: Cell.cs:648
byte obj
Definition: Cell.cs:38
SourceObj.Row sourceObj
Definition: Cell.cs:1072
string GetObjName()
Definition: Cell.cs:1604
byte x
Definition: Cell.cs:56
Point GetPoint()
Definition: Cell.cs:1101
bool ignoreObjShadow
Definition: Cell.cs:378
bool CanGrowWeed
Definition: Cell.cs:742
int index
Definition: Cell.cs:114
SourceMaterial.Row matObj_fixed
Definition: Cell.cs:1039
Definition: Chara.cs:10
RenderData objS_flat
Definition: CoreRef.cs:304
Renderers renderers
Definition: CoreRef.cs:357
Definition: Core.cs:14
CoreRef refs
Definition: Core.cs:51
static float fixedFrame
Definition: Core.cs:25
bool IsWinter
Definition: Date.cs:190
Definition: EClass.cs:6
static Game game
Definition: EClass.cs:9
static Scene scene
Definition: EClass.cs:31
static Core core
Definition: EClass.cs:7
static Zone _zone
Definition: EClass.cs:21
static Map _map
Definition: EClass.cs:19
static int rnd(long a)
Definition: EClass.cs:59
static SourceManager sources
Definition: EClass.cs:43
static BaseGameScreen screen
Definition: EClass.cs:33
static Player player
Definition: EClass.cs:13
static Chara pc
Definition: EClass.cs:15
int id
Definition: ELEMENT.cs:255
int Value
Definition: ELEMENT.cs:297
bool IsFoodTrait
Definition: ELEMENT.cs:369
bool disableUsermapBenefit
GamePrincipal principal
Definition: Game.cs:225
CardManager cards
Definition: Game.cs:156
int Convert(int tile)
Definition: GrowSystem.cs:31
RenderData renderData
Definition: GrowSystem.cs:13
void SetTile(int tileIdx, params int[] _tiles)
Definition: GrowSystem.cs:22
void SetTile(int _tile)
Definition: GrowSystem.cs:17
void TryPick(Cell cell, string idThing, int idMat=-1, int num=1, bool applySeed=false)
Definition: GrowSystem.cs:582
void SetDefaultStage()
Definition: GrowSystem.cs:264
void PopHarvest(Chara c, Thing t=null, int num=-1)
Definition: GrowSystem.cs:635
void ApplySeed(Thing t)
Definition: GrowSystem.cs:692
virtual int GetStageTile()
Definition: GrowSystem.cs:183
virtual int StageLength
Definition: GrowSystem.cs:65
virtual bool IsHarvestStage(int idx)
Definition: GrowSystem.cs:110
virtual void OnReachNextStage()
Definition: GrowSystem.cs:405
int afterHarvestTile
Definition: GrowSystem.cs:57
virtual int AutoMineStage
Definition: GrowSystem.cs:71
static Stage currentStage
Definition: GrowSystem.cs:47
void TryPick(Cell cell, Thing t, Chara c, bool applySeed=false)
Definition: GrowSystem.cs:552
virtual int HarvestStage
Definition: GrowSystem.cs:69
virtual void OnHit(Chara c)
Definition: GrowSystem.cs:520
bool CanHarvest()
Definition: GrowSystem.cs:506
bool IsWithered()
Definition: GrowSystem.cs:497
int[] baseTiles
Definition: GrowSystem.cs:53
void Perish()
Definition: GrowSystem.cs:465
virtual int GetShadow(int index)
Definition: GrowSystem.cs:188
virtual int DefaultStage
Definition: GrowSystem.cs:67
void PopMineObj(Chara c=null)
Definition: GrowSystem.cs:533
static SourceObj.Row[] sourceSnowTree
Definition: GrowSystem.cs:37
string idHarvestThing
Definition: GrowSystem.cs:59
void SetStage(int idx, bool renewHarvest=false)
Definition: GrowSystem.cs:437
virtual RenderData RenderHarvest
Definition: GrowSystem.cs:61
void TryGrow(VirtualDate date)
Definition: GrowSystem.cs:312
SourceObj.Row source
Definition: GrowSystem.cs:49
virtual AnimeID AnimeProgress
Definition: GrowSystem.cs:99
virtual Stage CreateStage()
Definition: GrowSystem.cs:130
virtual void OnHitFail(Chara c)
Definition: GrowSystem.cs:524
virtual bool CanReapSeed()
Definition: GrowSystem.cs:515
virtual bool GrowOnLand
Definition: GrowSystem.cs:95
void EqualizePlants(Point pos)
Definition: GrowSystem.cs:320
virtual bool IsMature
Definition: GrowSystem.cs:103
const int DivStage
Definition: GrowSystem.cs:43
virtual void OnSetStage(int idx)
Definition: GrowSystem.cs:456
virtual int Step
Definition: GrowSystem.cs:63
void Grow(int mtp=1)
Definition: GrowSystem.cs:345
virtual bool IsCrimeToHarvest
Definition: GrowSystem.cs:89
virtual int HaltStage
Definition: GrowSystem.cs:73
virtual void SetStageTile(Stage s)
Definition: GrowSystem.cs:177
Stage stage
Definition: GrowSystem.cs:101
virtual bool WitherOnLastStage
Definition: GrowSystem.cs:79
virtual void OnSetObj()
Definition: GrowSystem.cs:269
void OnProgressComplete(Chara c)
Definition: GrowSystem.cs:528
virtual string GetSoundProgress()
Definition: GrowSystem.cs:125
void Init(SourceObj.Row _row)
Definition: GrowSystem.cs:135
virtual bool DrawHarvestOnTop
Definition: GrowSystem.cs:75
virtual bool NeedSunlight
Definition: GrowSystem.cs:93
virtual void OnExceedLastStage()
Definition: GrowSystem.cs:410
void SetRandomStage()
Definition: GrowSystem.cs:250
virtual void OnMineObj(Chara c=null)
Definition: GrowSystem.cs:542
bool IsLastStage()
Definition: GrowSystem.cs:105
virtual float MtpProgress
Definition: GrowSystem.cs:91
virtual void OnRenderTileMap(RenderParam p, bool drawShadow=true)
Definition: GrowSystem.cs:193
virtual bool BlockSight(Cell cell)
Definition: GrowSystem.cs:115
virtual int ShadowStage
Definition: GrowSystem.cs:85
bool HaltGrowth()
Definition: GrowSystem.cs:460
virtual bool UseGenericFirstStageTile
Definition: GrowSystem.cs:77
void PopHarvest(Chara c, string idThing, int num=-1)
Definition: GrowSystem.cs:630
void Harvest(Chara c)
Definition: GrowSystem.cs:623
virtual bool CanRegrow
Definition: GrowSystem.cs:81
Thing TryPopSeed(Chara c)
Definition: GrowSystem.cs:590
virtual int GetHp()
Definition: GrowSystem.cs:717
Stage[] stages
Definition: GrowSystem.cs:51
virtual bool GrowUndersea
Definition: GrowSystem.cs:97
bool CanGrow(VirtualDate date)
Definition: GrowSystem.cs:273
static Cell cell
Definition: GrowSystem.cs:45
virtual bool BlockPass(Cell cell)
Definition: GrowSystem.cs:120
virtual bool IsTree
Definition: GrowSystem.cs:87
virtual void SetGenericFirstStageTile(Stage s)
Definition: GrowSystem.cs:171
int harvestTile
Definition: GrowSystem.cs:55
virtual bool CanLevelSeed
Definition: GrowSystem.cs:83
bool IsIndoor
Definition: Map.cs:131
PlantData TryGetPlant(Point p)
Definition: Map.cs:1942
void TrySmoothPick(Cell cell, Thing t, Chara c)
Definition: Map.cs:1804
void RefreshFOV(int x, int z, int radius=6, bool recalculate=false)
Definition: Map.cs:929
void MineObj(Point point, Task task=null, Chara c=null)
Definition: Map.cs:1840
void SetObj(int x, int z, int id=0, int value=1, int dir=0)
Definition: Map.cs:1535
void AddShadow(MeshPassParam p, ref Vector3 fix)
Definition: MeshPass.cs:195
int water
Definition: PlantData.cs:9
Thing seed
Definition: PlantData.cs:6
int size
Definition: PlantData.cs:15
int days
Definition: Player.cs:75
Stats stats
Definition: Player.cs:1016
bool isAutoFarming
Definition: Player.cs:1181
Definition: Point.cs:9
Thing Installed
Definition: Point.cs:327
void SetObj(int id=0, int value=1, int dir=0)
Definition: Point.cs:928
void ForeachNeighbor(Action< Point > action, bool diagonal=true)
Definition: Point.cs:1397
bool IsFarmField
Definition: Point.cs:127
Cell cell
Definition: Point.cs:51
Point GetRandomNeighbor()
Definition: Point.cs:759
Definition: Rand.cs:4
static int rnd(int max)
Definition: Rand.cs:52
void Draw(RenderParam p, int tile)
Definition: RenderData.cs:128
Vector3 offsetShadow
Definition: RenderData.cs:22
int ConvertTile(int tile)
Definition: RenderData.cs:110
RenderData renderData
Definition: RenderRow.cs:71
SourcePref pref
Definition: RenderRow.cs:68
ParticleSystem psFey
Definition: Scene.cs:119
List< Item > items
Definition: ShadowData.cs:101
static ShadowData Instance
Definition: ShadowData.cs:99
SourceObj objs
int shadow
Definition: SourcePref.cs:39
static Thing CreateFromCategory(string idCat, int lv=-1)
Definition: ThingGen.cs:75
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: Thing.cs:8
static Thing MakeSeed(string id, PlantData plant=null)
Definition: TraitSeed.cs:88
void BuildSunMap()
Definition: VirtualDate.cs:54
HashSet< int > sunMap
Definition: VirtualDate.cs:9
virtual int MaxSoil
Definition: Zone.cs:516
virtual bool IsUserZone
Definition: Zone.cs:271
bool TryAddThingInSharedContainer(Thing t, List< Thing > containers=null, bool add=true, bool msg=false, Chara chara=null, bool sharedOnly=true)
Definition: Zone.cs:2135
virtual bool IsUnderwater
Definition: Zone.cs:269
int GetSoilCost()
Definition: Zone.cs:3767
Card AddCard(Card t, Point point)
Definition: Zone.cs:1992