Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
Cell.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using Algorithms;
3using FloodSpill;
4using UnityEngine;
5
6public class Cell : WeightCell, IFloodCell
7{
8 public static Map map;
9
10 public static Cell Void = new Cell();
11
12 public static List<SourceMaterial.Row> matList;
13
14 public static List<SourceBlock.Row> blockList;
15
16 public static List<SourceFloor.Row> floorList;
17
18 public static List<SourceCellEffect.Row> effectList;
19
20 public static List<SourceObj.Row> objList;
21
22 public static int Size;
23
24 public static Cell[,] cells;
25
26 public const int DivAutotile = 12;
27
28 public byte _dirs;
29
30 public byte _block;
31
32 public byte _blockMat;
33
34 public byte _floor;
35
36 public byte _floorMat;
37
38 public byte obj;
39
40 public byte objVal;
41
42 public byte objMat;
43
44 public byte decal;
45
46 public byte _bridge;
47
48 public byte _bridgeMat;
49
50 public byte _roofBlock;
51
52 public byte _roofBlockMat;
53
54 public byte _roofBlockDir;
55
56 public byte x;
57
58 public byte z;
59
60 public byte light;
61
62 public byte autotile;
63
64 public byte autotileBridge;
65
66 public byte autotileObj;
67
68 public byte shore;
69
70 public byte shadow;
71
72 public byte height;
73
74 public byte bridgeHeight;
75
76 public byte shadowMod;
77
78 public byte topHeight;
79
80 public byte minHeight;
81
82 public byte bridgePillar;
83
84 public byte highlight;
85
86 public ushort lightR;
87
88 public ushort lightG;
89
90 public ushort lightB;
91
93
95
97
99
101
102 public Room room;
103
104 public bool pcSync;
105
106 public const int DIV_LIQUID = 10;
107
108 private static bool openSight;
109
110 private static bool openPath;
111
112 public const int DivStage = 30;
113
114 public int index => x + z * Size;
115
116 public byte TopHeight
117 {
118 get
119 {
120 if (bridgeHeight != 0)
121 {
122 return bridgeHeight;
123 }
124 return height;
125 }
126 }
127
128 public Cell Front
129 {
130 get
131 {
132 if (z <= 0)
133 {
134 return Void;
135 }
136 return cells[x, z - 1];
137 }
138 }
139
140 public Cell Right
141 {
142 get
143 {
144 if (x + 1 >= Size)
145 {
146 return Void;
147 }
148 return cells[x + 1, z];
149 }
150 }
151
152 public Cell Back
153 {
154 get
155 {
156 if (z + 1 >= Size)
157 {
158 return Void;
159 }
160 return cells[x, z + 1];
161 }
162 }
163
164 public Cell Left
165 {
166 get
167 {
168 if (x <= 0)
169 {
170 return Void;
171 }
172 return cells[x - 1, z];
173 }
174 }
175
177 {
178 get
179 {
180 if (x + 1 >= Size || z <= 0)
181 {
182 return Void;
183 }
184 return cells[x + 1, z - 1];
185 }
186 }
187
189 {
190 get
191 {
192 if (x <= 0 || z <= 0)
193 {
194 return Void;
195 }
196 return cells[x - 1, z - 1];
197 }
198 }
199
201 {
202 get
203 {
204 if (x + 1 >= Size || z + 1 >= Size)
205 {
206 return Void;
207 }
208 return cells[x + 1, z + 1];
209 }
210 }
211
213 {
214 get
215 {
216 if (x <= 0 || z + 1 >= Size)
217 {
218 return Void;
219 }
220 return cells[x - 1, z + 1];
221 }
222 }
223
225 {
226 get
227 {
228 GrowSystem.cell = this;
229 return sourceObj.growth;
230 }
231 }
232
233 public bool isSurrounded
234 {
235 get
236 {
237 return bits[0];
238 }
239 set
240 {
241 bits[0] = value;
242 }
243 }
244
245 public bool isShadowed
246 {
247 get
248 {
249 return bits[1];
250 }
251 set
252 {
253 bits[1] = value;
254 }
255 }
256
257 public bool hasDoor
258 {
259 get
260 {
261 return bits[3];
262 }
263 set
264 {
265 bits[3] = value;
266 }
267 }
268
269 public bool skipRender
270 {
271 get
272 {
273 return bits[4];
274 }
275 set
276 {
277 bits[4] = value;
278 }
279 }
280
281 public bool isSeen
282 {
283 get
284 {
285 return bits[6];
286 }
287 set
288 {
289 bits[6] = value;
290 }
291 }
292
293 public bool isSurrounded4d
294 {
295 get
296 {
297 return bits[7];
298 }
299 set
300 {
301 bits[7] = value;
302 }
303 }
304
305 public bool isForceFloat
306 {
307 get
308 {
309 return bits[8];
310 }
311 set
312 {
313 bits[8] = value;
314 }
315 }
316
317 public bool blockSight
318 {
319 get
320 {
321 return bits[9];
322 }
323 set
324 {
325 bits[9] = value;
326 }
327 }
328
329 public bool isHarvested
330 {
331 get
332 {
333 return bits[10];
334 }
335 set
336 {
337 bits[10] = value;
338 }
339 }
340
341 public bool isWatered
342 {
343 get
344 {
345 return bits[11];
346 }
347 set
348 {
349 bits[11] = value;
350 }
351 }
352
353 public bool isSlopeEdge
354 {
355 get
356 {
357 return bits[12];
358 }
359 set
360 {
361 bits[12] = value;
362 }
363 }
364
365 public bool isBridgeEdge
366 {
367 get
368 {
369 return bits[13];
370 }
371 set
372 {
373 bits[13] = value;
374 }
375 }
376
377 public bool ignoreObjShadow
378 {
379 get
380 {
381 return bits[14];
382 }
383 set
384 {
385 bits[14] = value;
386 }
387 }
388
389 public bool nonGradient
390 {
391 get
392 {
393 return bits[15];
394 }
395 set
396 {
397 bits[15] = value;
398 }
399 }
400
401 public bool impassable
402 {
403 get
404 {
405 return bits[16];
406 }
407 set
408 {
409 bits[16] = value;
410 }
411 }
412
413 public bool outOfBounds
414 {
415 get
416 {
417 return bits[17];
418 }
419 set
420 {
421 bits[17] = value;
422 }
423 }
424
425 public bool isWallEdge
426 {
427 get
428 {
429 return bits[20];
430 }
431 set
432 {
433 bits[20] = value;
434 }
435 }
436
437 public bool isModified
438 {
439 get
440 {
441 return bits[21];
442 }
443 set
444 {
445 bits[21] = value;
446 }
447 }
448
449 public bool isClearSnow
450 {
451 get
452 {
453 return bits[22];
454 }
455 set
456 {
457 bits[22] = value;
458 }
459 }
460
461 public bool fullWall
462 {
463 get
464 {
465 return bits[23];
466 }
467 set
468 {
469 bits[23] = value;
470 }
471 }
472
473 public bool isFloating
474 {
475 get
476 {
477 return bits[24];
478 }
479 set
480 {
481 bits[24] = value;
482 }
483 }
484
485 public bool lotWall
486 {
487 get
488 {
489 return bits[25];
490 }
491 set
492 {
493 bits[25] = value;
494 }
495 }
496
497 public bool hasDoorBoat
498 {
499 get
500 {
501 return bits[26];
502 }
503 set
504 {
505 bits[26] = value;
506 }
507 }
508
509 public bool isDeck
510 {
511 get
512 {
513 return bits[27];
514 }
515 set
516 {
517 bits[27] = value;
518 }
519 }
520
521 public bool castFloorShadow
522 {
523 get
524 {
525 return bits[28];
526 }
527 set
528 {
529 bits[28] = value;
530 }
531 }
532
533 public bool lotShade
534 {
535 get
536 {
537 return bits[29];
538 }
539 set
540 {
541 bits[29] = value;
542 }
543 }
544
545 public bool isShoreSand
546 {
547 get
548 {
549 return bits[30];
550 }
551 set
552 {
553 bits[30] = value;
554 }
555 }
556
558 {
559 get
560 {
561 return bits[31];
562 }
563 set
564 {
565 bits[31] = value;
566 }
567 }
568
569 public bool hasWindow
570 {
571 get
572 {
573 return bits2[0];
574 }
575 set
576 {
577 bits2[0] = value;
578 }
579 }
580
581 public bool isCurtainClosed
582 {
583 get
584 {
585 return bits2[1];
586 }
587 set
588 {
589 bits2[1] = value;
590 }
591 }
592
593 public bool isSkyFloor
594 {
595 get
596 {
597 return bits2[2];
598 }
599 set
600 {
601 bits2[2] = value;
602 }
603 }
604
605 public bool isClearArea
606 {
607 get
608 {
609 return bits2[3];
610 }
611 set
612 {
613 bits2[3] = value;
614 }
615 }
616
617 public bool isObjDyed
618 {
619 get
620 {
621 return bits2[4];
622 }
623 set
624 {
625 bits2[4] = value;
626 }
627 }
628
629 public bool crossWall
630 {
631 get
632 {
633 return bits2[5];
634 }
635 set
636 {
637 bits2[5] = value;
638 }
639 }
640
641 public bool HasObj => obj != 0;
642
643 public bool HasBlock => _block != 0;
644
645 public bool HasFloor => _floor != 0;
646
647 public bool HasRoof
648 {
649 get
650 {
651 if (room != null)
652 {
653 return room.lot.idRoofStyle != 0;
654 }
655 return false;
656 }
657 }
658
659 public bool HasFloorOrBlock
660 {
661 get
662 {
663 if (_block == 0)
664 {
665 return _floor != 0;
666 }
667 return true;
668 }
669 }
670
671 public bool HasBridge => _bridge != 0;
672
673 public bool HasLiquid => effect?.IsLiquid ?? false;
674
675 public bool HasFire
676 {
677 get
678 {
679 if (effect != null)
680 {
681 return effect.IsFire;
682 }
683 return false;
684 }
685 }
686
687 public bool IsNotWaterEdge
688 {
689 get
690 {
691 if (!HasFullBlock && !floorList[_floor].tileType.IsWater)
692 {
693 return floorList[_floor].edge == 0;
694 }
695 return true;
696 }
697 }
698
699 public bool IsTopWater
700 {
701 get
702 {
703 if (_bridge != 0)
704 {
705 return floorList[_bridge].tileType.IsWater;
706 }
707 return floorList[_floor].tileType.IsWater;
708 }
709 }
710
712 {
713 get
714 {
715 if (IsTopWater)
716 {
718 {
719 return isClearSnow;
720 }
721 return true;
722 }
723 return false;
724 }
725 }
726
727 public bool IsFloorWater => floorList[_floor].tileType.IsWater;
728
729 public bool IsFarmField
730 {
731 get
732 {
733 if (_bridge != 0)
734 {
735 return sourceBridge.alias == "field";
736 }
737 return sourceFloor.alias == "field";
738 }
739 }
740
741 public bool CanGrowWeed
742 {
743 get
744 {
745 if (obj == 0 && FirstThing == null && !HasBlock && !HasRoof)
746 {
747 if (!IsFarmField)
748 {
749 if (_bridge != 0)
750 {
751 if (matBridge.category == "grass")
752 {
753 return sourceBridge.tag.Contains("weed");
754 }
755 return false;
756 }
757 if (matFloor.category == "grass")
758 {
759 return sourceFloor.tag.Contains("weed");
760 }
761 return false;
762 }
763 return true;
764 }
765 return false;
766 }
767 }
768
769 public bool IsBridgeWater
770 {
771 get
772 {
773 if (_bridge != 0)
774 {
775 return floorList[_bridge].tileType.IsWater;
776 }
777 return false;
778 }
779 }
780
781 public bool IsSnowTile
782 {
783 get
784 {
786 {
787 return !isDeck;
788 }
789 return false;
790 }
791 }
792
793 public bool IsDeepWater
794 {
795 get
796 {
797 if (sourceSurface.tileType.IsDeepWater)
798 {
799 return !IsIceTile;
800 }
801 return false;
802 }
803 }
804
805 public bool IsIceTile
806 {
807 get
808 {
810 {
811 return !isClearSnow;
812 }
813 return false;
814 }
815 }
816
817 public bool HasFullBlock => blockList[_block].tileType.IsFullBlock;
818
820 {
821 get
822 {
823 if (!HasFullBlock)
824 {
825 return HasWallOrFence;
826 }
827 return true;
828 }
829 }
830
831 public bool HasWallOrFence => blockList[_block].tileType.IsWallOrFence;
832
833 public bool HasWall => blockList[_block].tileType.IsWall;
834
835 public bool HasFence => blockList[_block].tileType.IsFence;
836
837 public bool HasRamp => blockList[_block].tileType.IsRamp;
838
839 public bool HasLadder => blockList[_block].tileType.IsLadder;
840
841 public bool HasRampOrLadder
842 {
843 get
844 {
845 if (!HasRamp)
846 {
847 return HasLadder;
848 }
849 return true;
850 }
851 }
852
853 public bool HasSlope => blockList[_block].tileType == TileType.Slope;
854
855 public bool HasStairs => blockList[_block].tileType == TileType.Stairs;
856
857 public bool HasHalfBlock => blockList[_block].tileType == TileType.HalfBlock;
858
859 public bool HasBlockOrRamp => blockList[_block].isBlockOrRamp;
860
861 public bool UseLowBlock => blockList[_block].tileType.UseLowBlock;
862
863 public bool CastShadow => blockList[_block].tileType.CastShadowSelf;
864
865 public bool CastAmbientShadow => blockList[_block].tileType.CastAmbientShadow;
866
867 public bool IsRoomEdge
868 {
869 get
870 {
871 if (Front.room == room && Right.room == room)
872 {
873 return FrontRight.room != room;
874 }
875 return true;
876 }
877 }
878
879 public bool IsLotEdge
880 {
881 get
882 {
883 if (Front.room != null && Right.room != null && FrontRight.room != null && Back.room != null && Left.room != null && (Front.room == null || (!Front.room.data.atrium && Front.HasRoof)))
884 {
885 if (Right.room != null)
886 {
887 return Right.room.data.atrium | !Right.HasRoof;
888 }
889 return false;
890 }
891 return true;
892 }
893 }
894
895 public bool IsBlocked => blocked;
896
897 public int blockDir
898 {
899 get
900 {
901 return _dirs % 4;
902 }
903 set
904 {
905 _dirs = (byte)(_dirs - blockDir + value);
906 }
907 }
908
909 public int objDir
910 {
911 get
912 {
913 return _dirs / 4 % 8;
914 }
915 set
916 {
917 _dirs = (byte)(_dirs - objDir * 4 + value % 8 * 4);
918 }
919 }
920
921 public int floorDir
922 {
923 get
924 {
925 return _dirs / 32;
926 }
927 set
928 {
929 _dirs = (byte)(_dirs - floorDir * 32 + value * 32);
930 }
931 }
932
933 public bool IsSky
934 {
935 get
936 {
937 if (sourceFloor.tileType == TileType.Sky)
938 {
939 return !HasBridge;
940 }
941 return false;
942 }
943 }
944
945 public int liquidLv
946 {
947 get
948 {
949 if (effect != null && effect.LiquidAmount != 0)
950 {
951 return (effect?.LiquidAmount ?? 0) / 3 + 1;
952 }
953 return 0;
954 }
955 }
956
957 public int fireAmount => effect?.FireAmount ?? 0;
958
959 public bool IsVoid => this == Void;
960
962 {
963 get
964 {
965 CellDetail cellDetail = detail;
966 if (cellDetail == null || cellDetail.things.Count <= 0)
967 {
968 return null;
969 }
970 return detail.things[0];
971 }
972 }
973
975 {
976 get
977 {
978 if (detail == null || detail.things.Count <= 0 || !detail.things[0].IsInstalled)
979 {
980 return null;
981 }
982 return detail.things[0];
983 }
984 }
985
986 public List<Thing> Things => (detail ?? CellDetail.Empty).things;
987
988 public List<Chara> Charas => (detail ?? CellDetail.Empty).charas;
989
990 public int gatherCount
991 {
992 get
993 {
994 if (!map.gatherCounts.ContainsKey(index))
995 {
996 return 0;
997 }
998 return map.gatherCounts[index];
999 }
1000 set
1001 {
1002 if (value == 0)
1003 {
1004 if (map.gatherCounts.ContainsKey(index))
1005 {
1006 map.gatherCounts.Remove(index);
1007 }
1008 }
1009 else
1010 {
1011 map.gatherCounts[index] = value;
1012 }
1013 }
1014 }
1015
1016 public bool HasFloodBlock
1017 {
1018 get
1019 {
1020 if (!sourceBlock.tileType.IsFloodBlock)
1021 {
1022 return hasDoor;
1023 }
1024 return true;
1025 }
1026 }
1027
1029
1031
1033
1035
1037
1039 {
1040 get
1041 {
1042 if (!isObjDyed)
1043 {
1044 return matList[objMat];
1045 }
1046 return sourceObj.DefaultMaterial;
1047 }
1048 }
1049
1051
1053
1055
1057
1059 {
1060 get
1061 {
1062 if (_bridge != 0)
1063 {
1064 return sourceBridge;
1065 }
1066 return sourceFloor;
1067 }
1068 }
1069
1071
1073
1075 {
1076 get
1077 {
1078 if (!(sourceFloor.biome != null))
1079 {
1080 return EClass._zone.biome;
1081 }
1082 return sourceFloor.biome;
1083 }
1084 }
1085
1086 public override bool Equals(object obj)
1087 {
1088 return false;
1089 }
1090
1091 public override string ToString()
1092 {
1093 return "Cell(" + x + "," + z + " " + matBlock?.ToString() + "/" + matFloor?.ToString() + "/" + _block + ")";
1094 }
1095
1096 public override int GetHashCode()
1097 {
1098 return index;
1099 }
1100
1102 {
1103 return new Point(x, z);
1104 }
1105
1107 {
1108 return Point.shared.Set(x, z);
1109 }
1110
1111 public bool CanSuffocate()
1112 {
1113 if (!IsDeepWater)
1114 {
1115 return false;
1116 }
1117 if (detail != null && detail.things.Count > 0)
1118 {
1119 foreach (Thing thing in detail.things)
1120 {
1121 if (thing.IsInstalled && thing.isFloating)
1122 {
1123 return false;
1124 }
1125 }
1126 }
1127 return true;
1128 }
1129
1130 public bool HasObstacle()
1131 {
1132 if (!blocked && _block == 0 && obj == 0)
1133 {
1134 return hasDoor;
1135 }
1136 return true;
1137 }
1138
1139 public bool CanBuildRamp(int dir)
1140 {
1141 if (HasRamp)
1142 {
1143 return blockDir == dir;
1144 }
1145 return true;
1146 }
1147
1148 public void Refresh()
1149 {
1150 Cell cell2 = ((x > 0) ? cells[x - 1, z] : Void);
1151 Cell cell3 = ((x + 1 < Size) ? cells[x + 1, z] : Void);
1152 Cell cell4 = ((z > 0) ? cells[x, z - 1] : Void);
1153 Cell cell5 = ((z + 1 < Size) ? cells[x, z + 1] : Void);
1154 Cell cell6 = ((x > 0 && z > 0) ? cells[x - 1, z - 1] : Void);
1155 Cell cell7 = ((x + 1 < Size && z > 0) ? cells[x + 1, z - 1] : Void);
1156 Cell cell8 = ((x > 0 && z + 1 < Size) ? cells[x - 1, z + 1] : Void);
1157 Cell cell9 = ((x + 1 < Size && z + 1 < Size) ? cells[x + 1, z + 1] : Void);
1158 Cell cell10 = ((z > 1) ? cells[x, z - 2] : Void);
1159 Cell cell11 = ((x + 2 < Size) ? cells[x + 2, z] : Void);
1160 TileType tileType = sourceBlock.tileType;
1161 TileType tileType2 = sourceFloor.tileType;
1162 MapBounds bounds = map.bounds;
1163 bool flag = _bridge != 0;
1164 outOfBounds = x < bounds.x || z < bounds.z || x > bounds.maxX || z > bounds.maxZ;
1165 isSurrounded4d = cell2.HasFullBlock && cell3.HasFullBlock && cell4.HasFullBlock && cell5.HasFullBlock;
1166 isSurrounded = isSurrounded4d && cell6.HasFullBlock && cell7.HasFullBlock && cell8.HasFullBlock && cell9.HasFullBlock && cell4.bridgeHeight == bridgeHeight && cell3.bridgeHeight == bridgeHeight && cell5.bridgeHeight == bridgeHeight && cell2.bridgeHeight == bridgeHeight;
1168 hasDoor = false;
1169 hasDoorBoat = false;
1170 isDeck = false;
1171 isShoreSand = false;
1172 hasWindow = false;
1173 isCurtainClosed = false;
1174 isSkyFloor = tileType2 != TileType.Sky && (cell3.sourceFloor.tileType == TileType.Sky || cell4.sourceFloor.tileType == TileType.Sky);
1175 openPath = false;
1176 openSight = tileType.IsOpenSight || (cell4.hasWindow && !cell4.isCurtainClosed) || (cell3.hasWindow && !cell3.isCurtainClosed);
1177 blockSight = tileType.IsBlockSight || ((objList[obj].growth != null) ? objList[obj].growth.BlockSight(this) : objList[obj].tileType.IsBlockSight);
1178 blocked = outOfBounds || tileType.IsBlockPass || (tileType2.IsBlockPass && !flag) || ((objList[obj].growth != null) ? objList[obj].growth.BlockPass(this) : objList[obj].tileType.IsBlockPass) || impassable;
1179 isSlopeEdge = height > cell3.height || height > cell4.height;
1180 if (flag && sourceBridge.tileType.ShowPillar)
1181 {
1182 isBridgeEdge = _bridge != cell3._bridge || _bridge != cell4._bridge || bridgeHeight > cell3.bridgeHeight || bridgeHeight > cell4.bridgeHeight || _bridge != cell2._bridge || _bridge != cell5._bridge || bridgeHeight > cell2.bridgeHeight || bridgeHeight > cell5.bridgeHeight;
1183 }
1184 else
1185 {
1186 isBridgeEdge = false;
1187 }
1188 lotShade = false;
1189 if (room == null && !EClass._zone.IsSnowCovered)
1190 {
1191 if ((cell11.room != null && cell3.sourceBlock.tileType.CastShadowSelf) || (cell10.room != null && cell4.sourceBlock.tileType.CastShadowSelf))
1192 {
1193 lotShade = true;
1194 }
1195 else if ((cell11.Front.room != null && cell7.sourceBlock.tileType.CastShadowSelf) || (cell10.Right.room != null && cell7.sourceBlock.tileType.CastShadowSelf) || (cell7.FrontRight.room != null && cell7.Right.sourceBlock.tileType.CastShadowSelf))
1196 {
1197 lotShade = true;
1198 }
1199 else if (cell11.sourceBlock.tileType.CastShadowSelf && cell11.Right.room != null)
1200 {
1201 lotShade = true;
1202 }
1203 }
1204 isShadowed = lotShade || sourceBlock.tileType.CastShadowSelf || cell4.sourceBlock.tileType.CastShadowBack || (!HasRoof && _roofBlock != 0);
1205 castFloorShadow = lotShade || (room == null && sourceBlock.tileType.CastShadowSelf);
1206 byte b = (flag ? bridgeHeight : height);
1207 byte b2 = ((cell4.bridgeHeight == 0) ? cell4.height : cell4.bridgeHeight);
1208 byte b3 = ((cell3.bridgeHeight == 0) ? cell3.height : cell3.bridgeHeight);
1209 byte b4 = ((cell10.bridgeHeight == 0) ? cell10.height : cell10.bridgeHeight);
1210 byte b5 = ((cell11.bridgeHeight == 0) ? cell11.height : cell11.bridgeHeight);
1211 int num = 0;
1212 if (b3 - b > num)
1213 {
1214 num = b3 - b;
1215 }
1216 if (b2 - b > num)
1217 {
1218 num = b2 - b;
1219 }
1220 if (b5 - b - 4 > num)
1221 {
1222 num = b5 - b - 4;
1223 }
1224 if (b4 - b - 4 > num)
1225 {
1226 num = b4 - b - 4;
1227 }
1228 num -= 4;
1229 if (num > 15)
1230 {
1231 num = 15;
1232 }
1233 if (IsTopWater)
1234 {
1235 num /= 3;
1236 }
1237 else if (isShadowed)
1238 {
1239 num /= 2;
1240 }
1241 if (num <= 0)
1242 {
1243 num = 0;
1244 }
1245 shadowMod = (byte)num;
1246 baseWeight = 0;
1247 if (detail != null && detail.things.Count > 0)
1248 {
1249 for (int i = 0; i < detail.things.Count; i++)
1250 {
1251 Thing thing = detail.things[i];
1252 if (!thing.IsInstalled)
1253 {
1254 continue;
1255 }
1256 if (thing.trait.WeightMod > baseWeight)
1257 {
1258 baseWeight = thing.trait.WeightMod;
1259 }
1260 if (thing.isHidden)
1261 {
1262 continue;
1263 }
1264 if (thing.trait.IsFloating)
1265 {
1266 isFloating = true;
1267 if (IsFloorWater)
1268 {
1269 blocked = true;
1270 }
1271 else
1272 {
1273 isDeck = true;
1274 }
1275 }
1276 else
1277 {
1278 if (thing.trait.IsOpenPath)
1279 {
1280 blocked = false;
1281 hasDoorBoat = true;
1282 openPath = true;
1283 openSight = true;
1284 }
1285 if (thing.trait.IsBlockPath)
1286 {
1287 blocked = true;
1288 }
1289 }
1290 if (thing.trait.IsOpenSight)
1291 {
1292 openSight = true;
1293 }
1294 if (thing.trait is TraitDoor)
1295 {
1296 blocked = false;
1297 hasDoor = true;
1298 blockSight = true;
1299 }
1300 else if (thing.trait.IsBlockSight)
1301 {
1302 blockSight = true;
1303 }
1304 Trait trait = thing.trait;
1305 if (!(trait is TraitWindow))
1306 {
1307 if (trait is TraitCurtain)
1308 {
1309 isCurtainClosed = thing.isOn;
1310 }
1311 }
1312 else
1313 {
1314 hasWindow = true;
1315 }
1316 }
1317 }
1318 minHeight = (byte)(10 + b + ((IsTopWater && !isFloating) ? sourceFloor.tileType.FloorAltitude : 0));
1319 topHeight = (byte)(minHeight + tileType.slopeHeight);
1320 weights[0] = (byte)((Mathf.Abs(cell4.minHeight - topHeight) <= 8 || Mathf.Abs(cell4.topHeight - minHeight) <= 8) ? 1u : 0u);
1321 weights[1] = (byte)((Mathf.Abs(cell3.minHeight - topHeight) <= 8 || Mathf.Abs(cell3.topHeight - minHeight) <= 8) ? 1u : 0u);
1322 weights[2] = (byte)((Mathf.Abs(cell5.minHeight - topHeight) <= 8 || Mathf.Abs(cell5.topHeight - minHeight) <= 8) ? 1u : 0u);
1323 weights[3] = (byte)((Mathf.Abs(cell2.minHeight - topHeight) <= 8 || Mathf.Abs(cell2.topHeight - minHeight) <= 8) ? 1u : 0u);
1324 if (IsDeepWater)
1325 {
1326 baseWeight += 100;
1327 }
1328 ignoreObjShadow = (b2 > b && b2 - b > 6) || (b3 > b && b3 - b > 6);
1329 isWallEdge = !blocked && cell3.sourceBlock.tileType.IsWallOrFence && cell3.blockDir != 1 && cell4.sourceBlock.tileType.IsWallOrFence && cell4.blockDir != 0;
1330 if (isWallEdge)
1331 {
1332 blockSight = cell3.sourceBlock.tileType.IsBlockSight && cell4.sourceBlock.tileType.IsBlockSight;
1333 blocked = true;
1334 blockSight = true;
1335 }
1336 shadow = 0;
1337 if (!HasBlock)
1338 {
1339 if (cell2.isSeen && cell2.CastAmbientShadow && !cell2.hasDoor && bridgeHeight == cell2.bridgeHeight && !sourceFloor.ignoreTransition && (!cell2.sourceBlock.tileType.IsWallOrFence || cell2.blockDir != 0))
1340 {
1341 shadow++;
1342 }
1343 if (cell5.isSeen && cell5.CastAmbientShadow && !cell5.hasDoor && bridgeHeight == cell5.bridgeHeight && !sourceFloor.ignoreTransition && (!cell5.sourceBlock.tileType.IsWallOrFence || cell5.blockDir != 1))
1344 {
1345 shadow += 2;
1346 }
1347 }
1348 else
1349 {
1350 if (isFloating && (room != null || cell4.room != null || cell3.room != null || cell7.room != null))
1351 {
1352 isFloating = false;
1353 }
1354 if (sourceBlock.tileType.IsFence && !hasDoor && (blockDir != 0 || cell5.topHeight >= b - 3) && (blockDir != 1 || cell2.topHeight >= b - 3))
1355 {
1356 shadow = (byte)(blockDir + 4);
1357 }
1358 }
1359 bool isFloorWater = IsFloorWater;
1360 if (isFloorWater)
1361 {
1362 shore = (byte)((((!cell5.IsNotWaterEdge && z != Size - 1 && height == cell5.height) ? 1 : 0) + ((!cell3.IsNotWaterEdge && x != Size - 1 && height == cell3.height) ? 2 : 0) + ((!cell4.IsNotWaterEdge && z != 0 && height == cell4.height) ? 4 : 0) + ((!cell2.IsNotWaterEdge && x != 0 && height == cell2.height) ? 8 : 0)) * 12);
1363 isShoreSand = cell5.sourceFloor.isBeach || cell3.sourceFloor.isBeach || cell4.sourceFloor.isBeach || cell2.sourceFloor.isBeach;
1364 if (shore != 0)
1365 {
1366 shore += (byte)(isShoreSand ? 2 : 3);
1367 }
1368 }
1369 else
1370 {
1371 shore = 0;
1372 }
1373 if (sourceFloor.autotile > 0)
1374 {
1375 autotile = (byte)(((IsAutoTileEdge(cell5) && z != Size - 1) ? 1 : 0) + ((IsAutoTileEdge(cell3) && x != Size - 1) ? 2 : 0) + ((IsAutoTileEdge(cell4) && z != 0) ? 4 : 0) + ((IsAutoTileEdge(cell2) && x != 0) ? 8 : 0));
1376 }
1377 else
1378 {
1379 autotile = 0;
1380 }
1381 if (_bridge != 0 && sourceBridge.autotile > 0)
1382 {
1383 autotileBridge = (byte)(((IsBridgeAutoTileEdge(cell5) && z != Size - 1) ? 1 : 0) + ((IsBridgeAutoTileEdge(cell3) && x != Size - 1) ? 2 : 0) + ((IsBridgeAutoTileEdge(cell4) && z != 0) ? 4 : 0) + ((IsBridgeAutoTileEdge(cell2) && x != 0) ? 8 : 0));
1384 }
1385 else
1386 {
1387 autotileBridge = 0;
1388 }
1389 if (obj != 0 && sourceObj.autoTile)
1390 {
1391 autotileObj = (byte)(((IsObjAutoTileEdge(cell5) && z != Size - 1) ? 1 : 0) + ((IsObjAutoTileEdge(cell3) && x != Size - 1) ? 2 : 0) + ((IsObjAutoTileEdge(cell4) && z != 0) ? 4 : 0) + ((IsObjAutoTileEdge(cell2) && x != 0) ? 8 : 0));
1392 }
1393 else
1394 {
1395 autotileObj = 0;
1396 }
1397 if (openSight)
1398 {
1399 blockSight = false;
1400 }
1401 if (openPath)
1402 {
1403 blocked = false;
1404 }
1405 bool IsAutoTileEdge(Cell cell)
1406 {
1407 if (cell.sourceFloor.autotilePriority <= sourceFloor.autotilePriority && (!sourceFloor.isBeach || !cell.sourceFloor.isBeach) && (cell._floor != _floor || cell._floorMat != _floorMat))
1408 {
1409 return true;
1410 }
1411 if (!isFloorWater)
1412 {
1413 return height != cell.height;
1414 }
1415 return false;
1416 }
1417 bool IsBridgeAutoTileEdge(Cell cell)
1418 {
1419 if (cell.sourceBridge.autotilePriority <= sourceBridge.autotilePriority && (cell._bridge != _bridge || cell._bridgeMat != _bridgeMat))
1420 {
1421 return true;
1422 }
1423 return bridgeHeight != cell.bridgeHeight;
1424 }
1425 bool IsObjAutoTileEdge(Cell cell)
1426 {
1427 if (cell.obj != obj && (obj != 31 || (cell.obj != 97 && cell.obj != 98)))
1428 {
1429 return true;
1430 }
1431 return topHeight != cell.topHeight;
1432 }
1433 }
1434
1435 public void RotateBlock(int a)
1436 {
1437 int num = blockDir;
1438 int num2 = (sourceBlock.tileType.IsWallOrFence ? 3 : sourceBlock._tiles.Length);
1439 num += a;
1440 if (num < 0)
1441 {
1442 num = num2 - 1;
1443 }
1444 if (num >= num2)
1445 {
1446 num = 0;
1448 }
1449 blockDir = num;
1450 }
1451
1452 public void RotateFloor(int a)
1453 {
1454 int num = floorDir;
1455 num += a;
1456 if (num < 0)
1457 {
1458 num = sourceFloor._tiles.Length - 1;
1459 }
1460 if (num >= sourceFloor._tiles.Length)
1461 {
1462 num = 0;
1463 }
1464 floorDir = num;
1465 }
1466
1467 public void RotateObj(bool reverse = false, bool useBlockDir = false)
1468 {
1469 int num = (useBlockDir ? blockDir : objDir);
1470 num = ((!reverse) ? (num + 1) : (num - 1));
1471 if (num < 0)
1472 {
1473 num = sourceObj._tiles.Length - 1;
1474 }
1475 if (num >= sourceObj._tiles.Length)
1476 {
1477 num = 0;
1478 }
1479 if (useBlockDir)
1480 {
1481 blockDir = num;
1482 }
1483 else
1484 {
1485 objDir = num;
1486 }
1487 }
1488
1489 public void RotateAll()
1490 {
1491 bool flag = EInput.isShiftDown || Input.GetMouseButton(1);
1493 if (mouseTarget.card != null)
1494 {
1495 mouseTarget.card.Rotate(flag);
1496 return;
1497 }
1498 if (detail == null || detail.things.Count == 0)
1499 {
1500 if (HasBlock)
1501 {
1502 if (sourceBlock.tileType.CanRotate(buildMode: false))
1503 {
1504 RotateBlock((!flag) ? 1 : (-1));
1505 }
1506 }
1507 else if (HasObj)
1508 {
1509 if (sourceObj.tileType.CanRotate(buildMode: false))
1510 {
1511 RotateObj(flag, sourceObj.tileType.IsUseBlockDir);
1512 }
1513 }
1514 else if (HasFloor)
1515 {
1516 RotateFloor((!flag) ? 1 : (-1));
1517 }
1518 }
1520 }
1521
1522 public void Reset()
1523 {
1524 _block = (_blockMat = (_floor = (_floorMat = (obj = (decal = (objVal = (objMat = 0)))))));
1525 bits.Bits = 0u;
1526 bits2.Bits = 0u;
1527 }
1528
1530 {
1531 if (detail == null)
1532 {
1534 }
1535 return detail;
1536 }
1537
1538 public void TryDespawnDetail()
1539 {
1540 if (detail != null && detail.TryDespawn())
1541 {
1542 detail = null;
1543 }
1544 }
1545
1546 public void AddCard(Card c)
1547 {
1549 if (c.isChara)
1550 {
1551 detail.charas.Add(c.Chara);
1552 return;
1553 }
1555 c.Thing.stackOrder = detail.things.Count - 1;
1557 {
1559 }
1560 }
1561
1562 public void RemoveCard(Card c)
1563 {
1564 if (c.isChara)
1565 {
1566 if (detail != null)
1567 {
1568 detail.charas.Remove(c.Chara);
1569 }
1570 }
1571 else
1572 {
1573 if (detail != null)
1574 {
1575 detail.things.Remove(c.Thing);
1576 }
1578 {
1580 }
1581 }
1583 }
1584
1585 public string GetBlockName()
1586 {
1587 return Lang.Parse("blockName", matBlock.GetName(), sourceBlock.GetName());
1588 }
1589
1590 public string GetFloorName()
1591 {
1592 return Lang.Parse("blockName", matFloor.GetName(), sourceFloor.GetName());
1593 }
1594
1595 public string GetBridgeName()
1596 {
1597 return Lang.Parse("blockName", matBridge.GetName(), sourceBridge.GetName());
1598 }
1599
1600 public string GetObjName()
1601 {
1602 PlantData plantData = EClass._map.TryGetPlant(this);
1603 string text = sourceObj.GetName();
1604 if (sourceObj.tag.Contains("mat_name") && matObj.alias != "granite" && (sourceObj.id != 10 || !(matObj.alias == "crystal")))
1605 {
1606 text = "_of2".lang(matObj.GetName(), text);
1607 }
1608 if (plantData != null && plantData.size > 0)
1609 {
1610 text = Lang.GetList("plant_size")[plantData.size - 1] + text;
1611 }
1612 text = text.AddArticle();
1613 if (plantData != null)
1614 {
1615 if (plantData.seed != null)
1616 {
1617 if (!plantData.seed.c_refText.IsEmpty())
1618 {
1619 text = plantData.seed.c_refText;
1620 }
1621 if (plantData.seed.encLV > 0)
1622 {
1623 text = text + "+" + plantData.seed.encLV;
1624 }
1625 }
1626 if (plantData.fert != 0)
1627 {
1628 text += ((plantData.fert > 0) ? "fertilized" : "defertilized").lang();
1629 }
1630 }
1631 if (map.backerObjs.ContainsKey(index))
1632 {
1633 int key = map.backerObjs[index];
1634 SourceBacker.Row row = EClass.sources.backers.map.TryGetValue(key);
1635 if (row != null && EClass.core.config.backer.Show(row))
1636 {
1637 string name = row.Name;
1638 text = ((sourceObj.id == 82) ? "backerRemain".lang(text, name) : "backerTree".lang(text, name));
1639 }
1640 }
1641 return text;
1642 }
1643
1644 public string GetLiquidName()
1645 {
1646 return Lang.Parse("liquidName", sourceEffect.GetName());
1647 }
1648
1650 {
1651 GrowSystem.cell = this;
1652 return obj.growth?.CanGrow(date) ?? false;
1653 }
1654
1655 public void TryGrow(VirtualDate date = null)
1656 {
1657 growth?.TryGrow(date);
1658 }
1659
1660 public bool CanHarvest()
1661 {
1662 return growth?.CanHarvest() ?? false;
1663 }
1664
1665 public bool CanReapSeed()
1666 {
1667 return growth?.CanReapSeed() ?? false;
1668 }
1669
1670 public bool CanMakeStraw()
1671 {
1672 if (sourceObj.alias == "wheat")
1673 {
1674 return growth.IsLastStage();
1675 }
1676 return false;
1677 }
1678
1680 {
1681 return EClass._map.TryGetPlant(this);
1682 }
1683
1684 public float GetSurfaceHeight()
1685 {
1686 if (detail == null)
1687 {
1688 return 0f;
1689 }
1690 bool isTopWater = IsTopWater;
1691 for (int i = 0; i < detail.things.Count; i++)
1692 {
1693 Thing thing = detail.things[i];
1694 if (!thing.IsInstalled)
1695 {
1696 continue;
1697 }
1698 if (isTopWater)
1699 {
1700 if (thing.isFloating)
1701 {
1702 return thing.Pref.height + 0.1f;
1703 }
1704 }
1705 else if (thing.Pref.Surface)
1706 {
1707 return 0.1f * (float)thing.altitude + thing.Pref.height;
1708 }
1709 }
1710 return 0f;
1711 }
1712
1713 public bool HasZoneStairs(bool includeLocked = true)
1714 {
1715 if (detail == null)
1716 {
1717 return false;
1718 }
1719 foreach (Thing thing in detail.things)
1720 {
1721 if (thing.IsInstalled && (thing.trait is TraitStairs || (includeLocked && thing.trait is TraitStairsLocked)))
1722 {
1723 return true;
1724 }
1725 }
1726 return false;
1727 }
1728
1729 public override bool IsPathBlocked(PathManager.MoveType moveType)
1730 {
1731 if (moveType == PathManager.MoveType.Default)
1732 {
1733 return blocked;
1734 }
1735 if (!blocked)
1736 {
1737 if (detail != null)
1738 {
1739 return detail.charas.Count > 0;
1740 }
1741 return false;
1742 }
1743 return true;
1744 }
1745}
void Add(Act a, string s="")
Definition: ActPlan.cs:11
bool atrium
Definition: AreaData.cs:66
AreaData data
Definition: BaseArea.cs:29
Definition: Card.cs:11
virtual Chara Chara
Definition: Card.cs:1946
bool isFloating
Definition: Card.cs:622
string c_refText
Definition: Card.cs:1529
Trait trait
Definition: Card.cs:49
int encLV
Definition: Card.cs:310
int altitude
Definition: Card.cs:214
bool IsInstalled
Definition: Card.cs:2241
virtual void Rotate(bool reverse=false)
Definition: Card.cs:5479
virtual bool isChara
Definition: Card.cs:1959
virtual Thing Thing
Definition: Card.cs:1934
bool isHidden
Definition: Card.cs:502
bool isOn
Definition: Card.cs:514
virtual CardRow sourceCard
Definition: Card.cs:2007
bool TryDespawn()
Definition: CellDetail.cs:35
static CellDetail Empty
Definition: CellDetail.cs:23
List< Thing > things
Definition: CellDetail.cs:11
static CellDetail Spawn()
Definition: CellDetail.cs:25
List< Chara > charas
Definition: CellDetail.cs:13
int LiquidAmount
Definition: CellEffect.cs:162
int FireAmount
Definition: CellEffect.cs:150
bool IsFire
Definition: CellEffect.cs:135
bool IsLiquid
Definition: CellEffect.cs:138
SourceCellEffect.Row source
Definition: CellEffect.cs:133
Definition: Cell.cs:7
static Cell[,] cells
Definition: Cell.cs:24
byte _block
Definition: Cell.cs:30
bool HasBlockOrRamp
Definition: Cell.cs:859
override int GetHashCode()
Definition: Cell.cs:1096
bool CanHarvest()
Definition: Cell.cs:1660
Room room
Definition: Cell.cs:102
bool HasHalfBlock
Definition: Cell.cs:857
byte TopHeight
Definition: Cell.cs:117
bool IsBlocked
Definition: Cell.cs:895
bool HasWallOrFence
Definition: Cell.cs:831
bool CanMakeStraw()
Definition: Cell.cs:1670
void RemoveCard(Card c)
Definition: Cell.cs:1562
static List< SourceBlock.Row > blockList
Definition: Cell.cs:14
SourceBlock.Row sourceBlock
Definition: Cell.cs:1052
Cell BackRight
Definition: Cell.cs:201
bool lotShade
Definition: Cell.cs:534
bool IsSnowTile
Definition: Cell.cs:782
bool castFloorShadow
Definition: Cell.cs:522
SourceMaterial.Row matBlock
Definition: Cell.cs:1030
byte autotile
Definition: Cell.cs:62
PlantData TryGetPlant()
Definition: Cell.cs:1679
bool HasBlock
Definition: Cell.cs:643
byte shadow
Definition: Cell.cs:70
byte objMat
Definition: Cell.cs:42
static List< SourceFloor.Row > floorList
Definition: Cell.cs:16
bool IsIceTile
Definition: Cell.cs:806
bool CanBuildRamp(int dir)
Definition: Cell.cs:1139
SourceFloor.Row sourceFloor
Definition: Cell.cs:1054
CellEffect effect
Definition: Cell.cs:94
byte _bridge
Definition: Cell.cs:46
SourceMaterial.Row matRoofBlock
Definition: Cell.cs:1028
bool isDeck
Definition: Cell.cs:510
byte shadowMod
Definition: Cell.cs:76
byte _floor
Definition: Cell.cs:34
Cell Back
Definition: Cell.cs:153
bool HasStairs
Definition: Cell.cs:855
bool lotWall
Definition: Cell.cs:486
bool IsBridgeWater
Definition: Cell.cs:770
bool hasWindow
Definition: Cell.cs:570
byte decal
Definition: Cell.cs:44
bool HasFence
Definition: Cell.cs:835
bool hasDoorBoat
Definition: Cell.cs:498
bool HasBridge
Definition: Cell.cs:671
Point GetSharedPoint()
Definition: Cell.cs:1106
string GetBridgeName()
Definition: Cell.cs:1595
Critter critter
Definition: Cell.cs:96
bool isHarvested
Definition: Cell.cs:330
bool IsTopWaterAndNoSnow
Definition: Cell.cs:712
bool isClearSnow
Definition: Cell.cs:450
bool isFloating
Definition: Cell.cs:474
override bool IsPathBlocked(PathManager.MoveType moveType)
Definition: Cell.cs:1729
Cell Front
Definition: Cell.cs:129
SourceMaterial.Row matObj
Definition: Cell.cs:1036
CellDetail GetOrCreateDetail()
Definition: Cell.cs:1529
List< Thing > Things
Definition: Cell.cs:986
bool IsFarmField
Definition: Cell.cs:730
SourceMaterial.Row matBridge
Definition: Cell.cs:1034
const int DivAutotile
Definition: Cell.cs:26
bool HasLadder
Definition: Cell.cs:839
bool IsFloorWater
Definition: Cell.cs:727
void TryGrow(VirtualDate date=null)
Definition: Cell.cs:1655
byte objVal
Definition: Cell.cs:40
byte _floorMat
Definition: Cell.cs:36
BitArray32 bits2
Definition: Cell.cs:100
bool IsLotEdge
Definition: Cell.cs:880
bool HasWall
Definition: Cell.cs:833
static List< SourceObj.Row > objList
Definition: Cell.cs:20
BiomeProfile biome
Definition: Cell.cs:1075
byte _blockMat
Definition: Cell.cs:32
bool blockSight
Definition: Cell.cs:318
static int Size
Definition: Cell.cs:22
bool pcSync
Definition: Cell.cs:104
bool UseLowBlock
Definition: Cell.cs:861
void Refresh()
Definition: Cell.cs:1148
void Reset()
Definition: Cell.cs:1522
static Map map
Definition: Cell.cs:8
bool HasObstacle()
Definition: Cell.cs:1130
byte shore
Definition: Cell.cs:68
Thing Installed
Definition: Cell.cs:975
bool skipRender
Definition: Cell.cs:270
byte topHeight
Definition: Cell.cs:78
byte minHeight
Definition: Cell.cs:80
ushort lightG
Definition: Cell.cs:88
bool isModified
Definition: Cell.cs:438
byte _roofBlock
Definition: Cell.cs:50
byte _bridgeMat
Definition: Cell.cs:48
bool isCurtainClosed
Definition: Cell.cs:582
byte light
Definition: Cell.cs:60
bool IsTopWater
Definition: Cell.cs:700
List< Chara > Charas
Definition: Cell.cs:988
bool CastAmbientShadow
Definition: Cell.cs:865
byte height
Definition: Cell.cs:72
byte autotileObj
Definition: Cell.cs:66
GrowSystem growth
Definition: Cell.cs:225
ushort lightB
Definition: Cell.cs:90
bool isWatered
Definition: Cell.cs:342
SourceFloor.Row sourceBridge
Definition: Cell.cs:1056
bool isClearArea
Definition: Cell.cs:606
CellDetail detail
Definition: Cell.cs:92
const int DIV_LIQUID
Definition: Cell.cs:106
bool HasLiquid
Definition: Cell.cs:673
bool isShadowed
Definition: Cell.cs:246
byte _roofBlockDir
Definition: Cell.cs:54
bool IsSky
Definition: Cell.cs:934
BitArray32 bits
Definition: Cell.cs:98
override string ToString()
Definition: Cell.cs:1091
bool HasFloodBlock
Definition: Cell.cs:1017
byte autotileBridge
Definition: Cell.cs:64
bool isToggleWallPillar
Definition: Cell.cs:558
byte z
Definition: Cell.cs:58
bool HasRoof
Definition: Cell.cs:648
Cell Left
Definition: Cell.cs:165
string GetFloorName()
Definition: Cell.cs:1590
bool isSkyFloor
Definition: Cell.cs:594
SourceMaterial.Row matFloor
Definition: Cell.cs:1032
static bool openPath
Definition: Cell.cs:110
int floorDir
Definition: Cell.cs:922
byte _roofBlockMat
Definition: Cell.cs:52
bool isSeen
Definition: Cell.cs:282
void AddCard(Card c)
Definition: Cell.cs:1546
byte obj
Definition: Cell.cs:38
bool isSlopeEdge
Definition: Cell.cs:354
bool isShoreSand
Definition: Cell.cs:546
SourceObj.Row sourceObj
Definition: Cell.cs:1072
void TryDespawnDetail()
Definition: Cell.cs:1538
bool HasFire
Definition: Cell.cs:676
byte highlight
Definition: Cell.cs:84
int objDir
Definition: Cell.cs:910
static bool openSight
Definition: Cell.cs:108
Cell BackLeft
Definition: Cell.cs:213
SourceBlock.Row sourceRoofBlock
Definition: Cell.cs:1050
string GetBlockName()
Definition: Cell.cs:1585
string GetObjName()
Definition: Cell.cs:1600
bool isForceFloat
Definition: Cell.cs:306
bool HasFloor
Definition: Cell.cs:645
SourceCellEffect.Row sourceEffect
Definition: Cell.cs:1070
bool isSurrounded
Definition: Cell.cs:234
void RotateBlock(int a)
Definition: Cell.cs:1435
bool isWallEdge
Definition: Cell.cs:426
bool outOfBounds
Definition: Cell.cs:414
int fireAmount
Definition: Cell.cs:957
byte x
Definition: Cell.cs:56
bool CanGrow(SourceObj.Row obj, VirtualDate date)
Definition: Cell.cs:1649
Point GetPoint()
Definition: Cell.cs:1101
bool impassable
Definition: Cell.cs:402
static Cell Void
Definition: Cell.cs:10
void RotateAll()
Definition: Cell.cs:1489
bool HasObj
Definition: Cell.cs:641
Cell Right
Definition: Cell.cs:141
static List< SourceCellEffect.Row > effectList
Definition: Cell.cs:18
void RotateObj(bool reverse=false, bool useBlockDir=false)
Definition: Cell.cs:1467
Cell FrontLeft
Definition: Cell.cs:189
bool crossWall
Definition: Cell.cs:630
bool isObjDyed
Definition: Cell.cs:618
bool IsDeepWater
Definition: Cell.cs:794
bool HasRamp
Definition: Cell.cs:837
bool CanReapSeed()
Definition: Cell.cs:1665
bool ignoreObjShadow
Definition: Cell.cs:378
byte bridgeHeight
Definition: Cell.cs:74
bool CastShadow
Definition: Cell.cs:863
bool CanGrowWeed
Definition: Cell.cs:742
bool fullWall
Definition: Cell.cs:462
int index
Definition: Cell.cs:114
int liquidLv
Definition: Cell.cs:946
bool isBridgeEdge
Definition: Cell.cs:366
bool hasDoor
Definition: Cell.cs:258
int blockDir
Definition: Cell.cs:898
SourceFloor.Row sourceSurface
Definition: Cell.cs:1059
string GetLiquidName()
Definition: Cell.cs:1644
float GetSurfaceHeight()
Definition: Cell.cs:1684
bool HasFullBlockOrWallOrFence
Definition: Cell.cs:820
bool CanSuffocate()
Definition: Cell.cs:1111
byte _dirs
Definition: Cell.cs:28
static List< SourceMaterial.Row > matList
Definition: Cell.cs:12
bool HasZoneStairs(bool includeLocked=true)
Definition: Cell.cs:1713
bool IsRoomEdge
Definition: Cell.cs:868
const int DivStage
Definition: Cell.cs:112
int gatherCount
Definition: Cell.cs:991
Thing FirstThing
Definition: Cell.cs:962
bool HasFullBlock
Definition: Cell.cs:817
void RotateFloor(int a)
Definition: Cell.cs:1452
bool IsVoid
Definition: Cell.cs:959
bool HasSlope
Definition: Cell.cs:853
SourceMaterial.Row matObj_fixed
Definition: Cell.cs:1039
bool IsNotWaterEdge
Definition: Cell.cs:688
Cell FrontRight
Definition: Cell.cs:177
bool HasRampOrLadder
Definition: Cell.cs:842
bool HasFloorOrBlock
Definition: Cell.cs:660
override bool Equals(object obj)
Definition: Cell.cs:1086
ushort lightR
Definition: Cell.cs:86
bool nonGradient
Definition: Cell.cs:390
byte bridgePillar
Definition: Cell.cs:82
bool isSurrounded4d
Definition: Cell.cs:294
BackerContentConfig backer
Definition: CoreConfig.cs:600
Definition: Core.cs:14
static new Core Instance
Definition: Core.cs:15
Scene scene
Definition: Core.cs:65
CoreConfig config
Definition: Core.cs:70
Definition: EClass.cs:5
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
bool CanHarvest()
Definition: GrowSystem.cs:482
void TryGrow(VirtualDate date)
Definition: GrowSystem.cs:288
virtual bool CanReapSeed()
Definition: GrowSystem.cs:491
bool IsLastStage()
Definition: GrowSystem.cs:101
virtual bool BlockSight(Cell cell)
Definition: GrowSystem.cs:111
Definition: Lang.cs:6
static string[] GetList(string id)
Definition: Lang.cs:114
static string Parse(string idLang, string val1, string val2=null, string val3=null, string val4=null, string val5=null)
Definition: Lang.cs:147
int maxZ
Definition: MapBounds.cs:17
Definition: Map.cs:13
PlantData TryGetPlant(Point p)
Definition: Map.cs:1920
Dictionary< int, int > gatherCounts
Definition: Map.cs:61
Dictionary< int, int > backerObjs
Definition: Map.cs:67
Zone zone
Definition: Map.cs:87
MapBounds bounds
Definition: Map.cs:52
Thing seed
Definition: PlantData.cs:6
int fert
Definition: PlantData.cs:12
int size
Definition: PlantData.cs:15
Definition: Point.cs:9
static Point shared
Definition: Point.cs:20
Point Set(int _x, int _z)
Definition: Point.cs:479
void RefreshNeighborTiles()
Definition: Point.cs:1240
bool multisize
Definition: RenderRow.cs:64
Definition: Room.cs:4
PointTarget mouseTarget
Definition: Scene.cs:129
SourceBacker backers
string GetName(int id)
Definition: SourceObj.cs:149
bool Surface
Definition: SourcePref.cs:314
float height
Definition: SourcePref.cs:47
virtual bool IsSnowCovered
Definition: Spatial.cs:531
Definition: Thing.cs:8
override SourcePref Pref
Definition: Thing.cs:50
static TileTypeSky Sky
Definition: TileType.cs:67
static TileTypeHalfBlock HalfBlock
Definition: TileType.cs:27
static TileTypeSlope Slope
Definition: TileType.cs:23
virtual byte slopeHeight
Definition: TileType.cs:223
static TileTypeStairs Stairs
Definition: TileType.cs:29
Definition: Trait.cs:7
virtual bool IsBlockPath
Definition: Trait.cs:52
virtual bool IsBlockSight
Definition: Trait.cs:54
virtual bool ShouldRefreshTile
Definition: Trait.cs:71
virtual bool IsOpenPath
Definition: Trait.cs:60
virtual bool IsFloating
Definition: Trait.cs:62
virtual bool IsOpenSight
Definition: Trait.cs:58
virtual byte WeightMod
Definition: Trait.cs:42
BiomeProfile biome
Definition: Zone.cs:126