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