Elin Decompiled Documentation EA 23.153 Nightly
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)
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 (num >= ShadowStage)
232 {
233 int shadow = GetShadow(num);
234 if (shadow == -1)
235 {
236 shadow = row.pref.shadow;
237 }
238 if (shadow > 1 && !cell.ignoreObjShadow)
239 {
241 }
242 }
243 }
244
245 public void SetRandomStage()
246 {
247 int num = Rand.rnd(stages.Length);
248 if (num == 0 && EClass.rnd(5) != 0 && stages.Length >= 2)
249 {
250 num++;
251 }
252 else if (num == stages.Length - 1 && EClass.rnd(5) != 0 && stages.Length >= 2)
253 {
254 num--;
255 }
256 cell.objVal = (byte)(num * 30);
257 }
258
259 public void SetDefaultStage()
260 {
261 cell.objVal = (byte)(DefaultStage * 30);
262 }
263
264 public virtual void OnSetObj()
265 {
266 }
267
268 public bool CanGrow(VirtualDate date)
269 {
270 if (source.id == 0)
271 {
272 return false;
273 }
274 if (cell.HasBlock && !cell.sourceBlock.tileType.IsFence)
275 {
276 return false;
277 }
278 if (GrowUndersea)
279 {
280 if (EClass._zone.IsUnderwater || cell.sourceFloor.tileType.IsDeepWater)
281 {
282 return true;
283 }
284 }
285 else if (EClass._zone.IsUnderwater)
286 {
287 return false;
288 }
289 if (!GrowOnLand)
290 {
291 return false;
292 }
293 if (NeedSunlight)
294 {
295 if (date.sunMap == null)
296 {
297 date.BuildSunMap();
298 }
299 if ((cell.HasRoof || date.IsWinter || EClass._map.IsIndoor) && !date.sunMap.Contains(cell.index))
300 {
301 return false;
302 }
303 }
304 return true;
305 }
306
307 public void TryGrow(VirtualDate date)
308 {
309 if (CanGrow(date))
310 {
311 Grow();
312 }
313 }
314
315 public void EqualizePlants(Point pos)
316 {
318 if (p1 == null || p1.seed == null)
319 {
320 return;
321 }
322 pos.ForeachNeighbor(delegate(Point pos2)
323 {
324 Thing thing = EClass._map.TryGetPlant(pos2)?.seed;
325 if (thing == null)
326 {
328 if (installed != null && installed.id == p1.seed.id)
329 {
330 thing = installed;
331 }
332 }
333 if (thing != null && p1.seed.refVal == thing.refVal && thing.encLV >= p1.seed.encLV)
334 {
335 p1.seed = thing;
336 }
337 }, diagonal: false);
338 }
339
340 public void Grow(int mtp = 1)
341 {
342 bool flag = cell.isWatered || (cell.IsTopWater && (source.tag.Contains("flood") || source.tag.Contains("undersea")));
343 PlantData plantData = EClass._map.TryGetPlant(cell);
344 if (plantData != null && flag)
345 {
346 plantData.water++;
347 }
348 int num = Step * mtp * ((!flag) ? 1 : 2);
349 int num2 = cell.objVal / 30;
350 int num3 = (cell.objVal + num) / 30;
351 if (num2 != num3)
352 {
354 {
355 PopHarvest(null);
356 }
358 {
359 Point point = cell.GetPoint();
360 EqualizePlants(point);
361 Thing thing = TryPopSeed(null);
362 PopMineObj();
363 if (thing != null)
364 {
365 point.SetObj();
366 EClass._zone.AddCard(thing, point).Install();
367 }
368 }
369 else if (num2 == StageLength - 1)
370 {
372 {
373 Point point2 = cell.GetPoint();
374 EqualizePlants(point2);
375 Thing thing2 = TryPopSeed(null);
376 if (thing2 != null)
377 {
378 point2.SetObj();
379 EClass._zone.AddCard(thing2, point2).Install();
380 }
381 }
382 else
383 {
385 }
386 }
387 else
388 {
390 }
391 }
392 else
393 {
394 cell.objVal += (byte)num;
395 }
396 cell.Refresh();
398 }
399
400 public virtual void OnReachNextStage()
401 {
402 SetStage(cell.objVal / 30 + 1);
403 }
404
405 public virtual void OnExceedLastStage()
406 {
407 cell.objVal = (byte)(stages.Length * 30 - 1);
408 if (!CanRegrow || Rand.rnd(2) != 0)
409 {
410 return;
411 }
412 Point point = cell.GetPoint();
413 if (point.IsFarmField)
414 {
415 return;
416 }
417 if (Rand.rnd(2) == 0)
418 {
419 Point randomNeighbor = point.GetRandomNeighbor();
420 if (randomNeighbor.cell.CanGrowWeed)
421 {
422 randomNeighbor.SetObj(cell.obj);
423 point.SetObj();
424 return;
425 }
426 }
427 cell.objVal = 0;
428 cell.isHarvested = false;
429 cell.isWatered = cell.HasLiquid;
430 }
431
432 public void SetStage(int idx, bool renewHarvest = false)
433 {
434 cell.objVal = (byte)(idx * 30);
435 cell.gatherCount = 0;
436 if (cell.HasLiquid)
437 {
438 cell.isWatered = true;
439 }
440 if (renewHarvest)
441 {
442 cell.isHarvested = true;
443 }
444 if (cell.sourceObj.id == 118)
445 {
446 EClass._zone.dirtyElectricity = true;
447 }
448 OnSetStage(idx);
449 }
450
451 public virtual void OnSetStage(int idx)
452 {
453 }
454
455 public bool HaltGrowth()
456 {
457 return stage.idx == HarvestStage;
458 }
459
460 public void Perish()
461 {
463 {
464 if (CanHarvest())
465 {
466 PopHarvest(null);
467 }
468 Thing thing = TryPopSeed(null);
469 if (thing != null)
470 {
472 }
474 return;
475 }
477 {
479 return;
480 }
481 if (EClass.rnd(3) == 0)
482 {
483 Thing thing2 = TryPopSeed(null);
484 if (thing2 != null)
485 {
487 }
488 }
490 }
491
492 public bool IsWithered()
493 {
495 {
496 return true;
497 }
498 return false;
499 }
500
501 public bool CanHarvest()
502 {
504 {
505 return false;
506 }
507 return true;
508 }
509
510 public virtual bool CanReapSeed()
511 {
512 return CanHarvest();
513 }
514
515 public virtual void OnHit(Chara c)
516 {
517 }
518
519 public virtual void OnHitFail(Chara c)
520 {
521 }
522
524 {
525 EClass._map.MineObj(cell.GetPoint(), null, c);
526 }
527
528 public void PopMineObj(Chara c = null)
529 {
531 {
532 OnMineObj(c);
533 TryPopSeed(c);
534 }
535 }
536
537 public virtual void OnMineObj(Chara c = null)
538 {
539 if (!IsWithered())
540 {
541 int num = cell.sourceObj.components.Length - 1;
542 Thing t = ThingGen.Create(cell.sourceObj.components[num].Split('/')[0], cell.matObj_fixed.alias);
543 TryPick(cell, t, c);
544 }
545 }
546
547 public void TryPick(Cell cell, Thing t, Chara c, bool applySeed = false)
548 {
549 if (applySeed)
550 {
551 ApplySeed(t);
552 }
554 {
555 if (EClass.rnd(4) != 0)
556 {
557 if (t.Num > 1)
558 {
559 t.SetNum(t.Num / 2);
560 }
561 else if (EClass.rnd(2) == 0)
562 {
563 return;
564 }
566 {
568 }
569 }
570 }
571 else
572 {
574 }
575 }
576
577 public void TryPick(Cell cell, string idThing, int idMat = -1, int num = 1, bool applySeed = false)
578 {
579 if (num > 0)
580 {
581 TryPick(cell, ThingGen.Create(idThing, idMat).SetNum(num), EClass.pc, applySeed);
582 }
583 }
584
586 {
587 if (source.HasTag(CTAG.seed))
588 {
589 int num = (cell.IsFarmField ? 400 : 1000);
590 int soilCost = EClass._zone.GetSoilCost();
591 int maxSoil = EClass._zone.MaxSoil;
592 if (soilCost > maxSoil)
593 {
594 num += (soilCost - maxSoil) * 10;
595 }
596 if (IsWithered())
597 {
598 num /= 5;
599 }
601 {
602 return null;
603 }
604 if (EClass.player.isAutoFarming || EClass.rnd(num) < EClass.rnd(source.chance))
605 {
608 {
609 return thing;
610 }
611 TryPick(cell, thing, c);
612 return thing;
613 }
614 }
615 return null;
616 }
617
618 public void Harvest(Chara c)
619 {
620 cell.isHarvested = true;
621 cell.gatherCount = 0;
622 PopHarvest(c);
623 }
624
625 public void PopHarvest(Chara c, string idThing, int num = -1)
626 {
627 PopHarvest(c, ThingGen.Create(idThing), num);
628 }
629
630 public void PopHarvest(Chara c, Thing t = null, int num = -1)
631 {
632 if (t == null)
633 {
634 if (idHarvestThing.StartsWith('#'))
635 {
636 t = ThingGen.CreateFromCategory(idHarvestThing.Replace("#", ""));
637 }
638 else
639 {
640 string text = idHarvestThing;
641 if (text == "potato" && EClass.rnd(3) == 0)
642 {
643 text = "784";
644 }
645 t = ThingGen.Create(text.IsEmpty("apple"));
646 }
647 }
648 ApplySeed(t);
649 PlantData plantData = EClass._map.TryGetPlant(cell);
650 if (plantData != null && plantData.size > 0)
651 {
652 t.c_weight = t.SelfWeight * (80 + plantData.size * plantData.size * 100) / 100;
653 t.SetBool(115, enable: true);
654 t.isWeightChanged = true;
655 }
656 t.SetBlessedState(BlessedState.Normal);
657 if (source._growth.Length > 4)
658 {
659 int num2 = EClass.rnd(source._growth[4].ToInt()) + 1;
660 int soilCost = EClass._zone.GetSoilCost();
661 int maxSoil = EClass._zone.MaxSoil;
662 if (soilCost > maxSoil && EClass.player.stats.days >= 5)
663 {
664 num2 -= EClass.rnd(2 + (soilCost - maxSoil) / 20);
665 }
666 if (num2 <= 0)
667 {
669 {
670 c?.Say("cropSpoiled", c, cell.GetObjName());
671 }
672 return;
673 }
674 t.SetNum(num2);
675 }
676 else if (Application.isEditor)
677 {
678 Debug.Log("harvest count not set:" + source.id + "/" + source.alias);
679 }
680 if (num > 0)
681 {
682 t.SetNum(num);
683 }
684 if (c == null || EClass.player.isAutoFarming)
685 {
686 TryPick(cell, t, c);
687 }
688 else
689 {
690 c.Pick(t);
691 }
692 }
693
694 public void ApplySeed(Thing t)
695 {
698 {
699 thing = null;
700 }
701 if (thing == null)
702 {
703 return;
704 }
705 int encLv = thing.encLV / 10 + ((thing.encLV > 0) ? 1 : 0);
706 bool flag = t.IsFood || t.Evalue(10) > 0 || t.id == "grass";
707 foreach (Element value in thing.elements.dict.Values)
708 {
709 if ((!value.IsFoodTrait || flag) && (value.IsFoodTrait || value.id == 2))
710 {
711 t.elements.ModBase(value.id, value.Value / 10 * 10);
712 }
713 }
714 t.SetEncLv(encLv);
715 t.c_refText = thing.c_refText;
716 t.isCrafted = true;
717 }
718
719 public virtual int GetHp()
720 {
721 return source.hp;
722 }
723}
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:31
Card AddCard(Card c)
Definition: Card.cs:3006
Thing SetNum(int a)
Definition: Card.cs:3356
int refVal
Definition: Card.cs:190
int encLV
Definition: Card.cs:310
int Evalue(int ele)
Definition: Card.cs:2507
Card Install()
Definition: Card.cs:3590
int Num
Definition: Card.cs:154
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6423
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
Thing Pick(Thing t, bool msg=true, bool tryStack=true)
Definition: Chara.cs:4017
RenderData objS_flat
Definition: CoreRef.cs:302
Renderers renderers
Definition: CoreRef.cs:347
CoreRef refs
Definition: Core.cs:51
bool IsWinter
Definition: Date.cs:186
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
static int rnd(int a)
Definition: EClass.cs:58
static Core core
Definition: EClass.cs:6
static Zone _zone
Definition: EClass.cs:20
static Map _map
Definition: EClass.cs:18
static SourceManager sources
Definition: EClass.cs:42
static BaseGameScreen screen
Definition: EClass.cs:32
static Player player
Definition: EClass.cs:12
static Chara pc
Definition: EClass.cs:14
int id
Definition: ELEMENT.cs:248
int Value
Definition: ELEMENT.cs:290
bool IsFoodTrait
Definition: ELEMENT.cs:362
bool disableUsermapBenefit
GamePrincipal principal
Definition: Game.cs:221
CardManager cards
Definition: Game.cs:155
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:577
void SetDefaultStage()
Definition: GrowSystem.cs:259
void PopHarvest(Chara c, Thing t=null, int num=-1)
Definition: GrowSystem.cs:630
void ApplySeed(Thing t)
Definition: GrowSystem.cs:694
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:400
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:547
virtual int HarvestStage
Definition: GrowSystem.cs:69
virtual void OnHit(Chara c)
Definition: GrowSystem.cs:515
bool CanHarvest()
Definition: GrowSystem.cs:501
bool IsWithered()
Definition: GrowSystem.cs:492
int[] baseTiles
Definition: GrowSystem.cs:53
void Perish()
Definition: GrowSystem.cs:460
virtual int GetShadow(int index)
Definition: GrowSystem.cs:188
virtual int DefaultStage
Definition: GrowSystem.cs:67
void PopMineObj(Chara c=null)
Definition: GrowSystem.cs:528
static SourceObj.Row[] sourceSnowTree
Definition: GrowSystem.cs:37
string idHarvestThing
Definition: GrowSystem.cs:59
void SetStage(int idx, bool renewHarvest=false)
Definition: GrowSystem.cs:432
virtual RenderData RenderHarvest
Definition: GrowSystem.cs:61
void TryGrow(VirtualDate date)
Definition: GrowSystem.cs:307
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:519
virtual bool CanReapSeed()
Definition: GrowSystem.cs:510
virtual bool GrowOnLand
Definition: GrowSystem.cs:95
void EqualizePlants(Point pos)
Definition: GrowSystem.cs:315
virtual bool IsMature
Definition: GrowSystem.cs:103
const int DivStage
Definition: GrowSystem.cs:43
virtual void OnSetStage(int idx)
Definition: GrowSystem.cs:451
virtual int Step
Definition: GrowSystem.cs:63
void Grow(int mtp=1)
Definition: GrowSystem.cs:340
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 OnRenderTileMap(RenderParam p)
Definition: GrowSystem.cs:193
virtual void OnSetObj()
Definition: GrowSystem.cs:264
void OnProgressComplete(Chara c)
Definition: GrowSystem.cs:523
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:405
void SetRandomStage()
Definition: GrowSystem.cs:245
virtual void OnMineObj(Chara c=null)
Definition: GrowSystem.cs:537
bool IsLastStage()
Definition: GrowSystem.cs:105
virtual float MtpProgress
Definition: GrowSystem.cs:91
virtual bool BlockSight(Cell cell)
Definition: GrowSystem.cs:115
virtual int ShadowStage
Definition: GrowSystem.cs:85
bool HaltGrowth()
Definition: GrowSystem.cs:455
virtual bool UseGenericFirstStageTile
Definition: GrowSystem.cs:77
void PopHarvest(Chara c, string idThing, int num=-1)
Definition: GrowSystem.cs:625
void Harvest(Chara c)
Definition: GrowSystem.cs:618
virtual bool CanRegrow
Definition: GrowSystem.cs:81
Thing TryPopSeed(Chara c)
Definition: GrowSystem.cs:585
virtual int GetHp()
Definition: GrowSystem.cs:719
Stage[] stages
Definition: GrowSystem.cs:51
virtual bool GrowUndersea
Definition: GrowSystem.cs:97
bool CanGrow(VirtualDate date)
Definition: GrowSystem.cs:268
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:1920
void TrySmoothPick(Cell cell, Thing t, Chara c)
Definition: Map.cs:1791
void RefreshFOV(int x, int z, int radius=6, bool recalculate=false)
Definition: Map.cs:923
void MineObj(Point point, Task task=null, Chara c=null)
Definition: Map.cs:1827
void SetObj(int x, int z, int id=0, int value=1, int dir=0)
Definition: Map.cs:1522
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:68
Stats stats
Definition: Player.cs:832
bool isAutoFarming
Definition: Player.cs:997
Definition: Point.cs:9
Thing Installed
Definition: Point.cs:315
void SetObj(int id=0, int value=1, int dir=0)
Definition: Point.cs:908
void ForeachNeighbor(Action< Point > action, bool diagonal=true)
Definition: Point.cs:1377
bool IsFarmField
Definition: Point.cs:127
Cell cell
Definition: Point.cs:51
Point GetRandomNeighbor()
Definition: Point.cs:743
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
List< Item > items
Definition: ShadowData.cs:101
static ShadowData Instance
Definition: ShadowData.cs:99
SourceObj objs
int shadow
Definition: SourcePref.cs:35
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(SourceObj.Row obj, 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:509
virtual bool IsUserZone
Definition: Zone.cs:266
bool TryAddThingInSharedContainer(Thing t, List< Thing > containers=null, bool add=true, bool msg=false, Chara chara=null, bool sharedOnly=true)
Definition: Zone.cs:2053
virtual bool IsUnderwater
Definition: Zone.cs:264
int GetSoilCost()
Definition: Zone.cs:3537
Card AddCard(Card t, Point point)
Definition: Zone.cs:1910