Elin Decompiled Documentation EA 23.186 Nyaightly
Loading...
Searching...
No Matches
Point.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using Newtonsoft.Json;
5using UnityEngine;
6
7[Serializable]
8public class Point : EClass
9{
10 public static readonly XY[] Surrounds = new XY[4]
11 {
12 new XY(0, -1),
13 new XY(1, 0),
14 new XY(0, 1),
15 new XY(-1, 0)
16 };
17
18 public static Vector3 fixedPos;
19
20 public static Point shared = new Point();
21
22 public static Point shared2 = new Point();
23
24 public static Point shared3 = new Point();
25
26 public static Map map;
27
28 public static Point Invalid = new Point
29 {
30 IsValid = false
31 };
32
33 public static Point Zero = new Point();
34
35 [JsonProperty]
36 public int x;
37
38 [JsonProperty]
39 public int z;
40
41 private Vector3 vCache;
42
43 public static BaseGameScreen _screen;
44
45 private static List<Card> listCard = new List<Card>();
46
47 private static List<Chara> listChara = new List<Chara>();
48
49 public int index => x + z * map.Size;
50
51 public Cell cell => map.cells[x, z];
52
54
56
58
60
62
64
66
68
70
72
73 public Area area => detail?.area;
74
75 public Point Front => new Point(x + 1, z - 1);
76
78
79 public int eloX => EClass.scene.elomap.minX + x;
80
81 public int eloY => EClass.scene.elomap.minY + z;
82
83 public bool HasDesignation => cell.detail?.designation != null;
84
85 public bool HasDirt => cell.decal != 0;
86
87 public bool IsValid
88 {
89 get
90 {
91 if (x >= 0 && z >= 0 && x < map.Size)
92 {
93 return z < map.Size;
94 }
95 return false;
96 }
97 set
98 {
99 x = ((!value) ? (-999) : 0);
100 }
101 }
102
103 public bool IsInBounds
104 {
105 get
106 {
107 if (x >= map.bounds.x && z >= map.bounds.z && x <= map.bounds.maxX)
108 {
109 return z <= map.bounds.maxZ;
110 }
111 return false;
112 }
113 }
114
115 public bool IsInBoundsPlus
116 {
117 get
118 {
119 if (x >= 0 && z >= 0 && x <= map.Size - 1)
120 {
121 return z <= map.Size - 1;
122 }
123 return false;
124 }
125 }
126
127 public bool IsFarmField => (HasBridge ? sourceBridge : sourceFloor).alias == "field";
128
129 public bool IsWater => cell.IsTopWater;
130
131 public bool HasRamp => cell.HasRamp;
132
133 public bool HasRail => sourceObj.tag.Contains("rail");
134
136
137 public bool HasObj => cell.obj != 0;
138
139 public bool HasDecal => cell.decal != 0;
140
141 public bool HasBlock => cell._block != 0;
142
143 public bool HasMinableBlock
144 {
145 get
146 {
147 if (HasObj)
148 {
149 return sourceBlock.tileType.IsFullBlock;
150 }
151 return false;
152 }
153 }
154
156
157 public bool HasWall
158 {
159 get
160 {
161 if (cell._block != 0)
162 {
163 return cell.sourceBlock.tileType.IsWall;
164 }
165 return false;
166 }
167 }
168
169 public bool HasFence
170 {
171 get
172 {
173 if (cell._block != 0)
174 {
175 return cell.sourceBlock.tileType.IsFence;
176 }
177 return false;
178 }
179 }
180
181 public bool HasNonWallBlock
182 {
183 get
184 {
185 if (HasBlock)
186 {
187 return !cell.sourceBlock.tileType.IsWallOrFence;
188 }
189 return false;
190 }
191 }
192
193 public bool HasTaskBuild
194 {
195 get
196 {
197 if (cell.detail != null)
198 {
199 return cell.detail.designation is TaskBuild;
200 }
201 return false;
202 }
203 }
204
205 public bool HasBlockRecipe => (cell.detail?.designation as TaskBuild)?.isBlock ?? false;
206
207 public bool HasFloor => cell._floor != 0;
208
209 public bool HasBridge => cell._bridge != 0;
210
211 public bool IsSky
212 {
213 get
214 {
215 if (sourceFloor.tileType == TileType.Sky)
216 {
217 return !HasBridge;
218 }
219 return false;
220 }
221 }
222
223 public bool HasArea => detail?.area != null;
224
225 public bool HasChara
226 {
227 get
228 {
229 CellDetail cellDetail = detail;
230 if (cellDetail == null)
231 {
232 return false;
233 }
234 return cellDetail.charas.Count > 0;
235 }
236 }
237
238 public bool HasThing
239 {
240 get
241 {
242 CellDetail cellDetail = detail;
243 if (cellDetail == null)
244 {
245 return false;
246 }
247 return cellDetail.things.Count > 0;
248 }
249 }
250
252 {
253 get
254 {
255 if (detail != null)
256 {
257 return detail.charas.Count > 1;
258 }
259 return false;
260 }
261 }
262
263 public bool IsDeepWater
264 {
265 get
266 {
268 {
269 return sourceFloor.tileType.IsDeepWater;
270 }
271 return false;
272 }
273 }
274
276 {
277 get
278 {
279 CellDetail cellDetail = detail;
280 if (cellDetail == null || cellDetail.charas.Count <= 0)
281 {
282 return null;
283 }
284 return detail.charas[0];
285 }
286 }
287
289 {
290 get
291 {
292 CellDetail cellDetail = detail;
293 if (cellDetail == null || cellDetail.things.Count <= 0)
294 {
295 return null;
296 }
297 return detail.things[0];
298 }
299 }
300
302 {
303 get
304 {
305 CellDetail cellDetail = detail;
306 if (cellDetail == null || cellDetail.things.Count <= 0)
307 {
308 return null;
309 }
310 return detail.things.LastItem();
311 }
312 }
313
315 {
316 get
317 {
318 if (detail == null || detail.things.Count <= 0 || !detail.things[0].IsInstalled)
319 {
320 return null;
321 }
322 return detail.things[0];
323 }
324 }
325
326 public List<Thing> Things => cell.Things;
327
328 public List<Chara> Charas => cell.Charas;
329
330 public bool IsSeen => cell.isSeen;
331
332 public bool IsSync => cell.pcSync;
333
334 public bool IsHidden
335 {
336 get
337 {
338 if (cell.isSeen)
339 {
340 if (cell.room != null && !EClass.screen.tileMap.hideRoomFog && !cell.hasDoor)
341 {
342 return cell.HasRoof;
343 }
344 return false;
345 }
346 return true;
347 }
348 }
349
350 public bool IsBlocked
351 {
352 get
353 {
354 if (IsValid)
355 {
356 return cell.blocked;
357 }
358 return true;
359 }
360 }
361
362 public bool IsHotSpring
363 {
364 get
365 {
367 {
368 if (!EClass._zone.elements.Has(3701))
369 {
370 return IsInSpot<TraitGeyser>();
371 }
372 return true;
373 }
374 return false;
375 }
376 }
377
378 public static Point GetShared(int x, int z)
379 {
380 shared.x = x;
381 shared.z = z;
382 return shared;
383 }
384
385 public bool Within(int _x, int _z, int _w, int _h)
386 {
387 if (x >= _x && z >= _z && x < _x + _w)
388 {
389 return z < _z + _h;
390 }
391 return false;
392 }
393
395 {
396 if (detail != null)
397 {
398 foreach (Chara chara in detail.charas)
399 {
400 if (EClass.pc.CanSee(chara))
401 {
402 return chara;
403 }
404 }
405 }
406 return null;
407 }
408
409 public bool HasRoomOrArea(BaseArea a)
410 {
411 if (area != a)
412 {
413 return cell.room == a;
414 }
415 return true;
416 }
417
418 public bool IsInSpot<T>() where T : Trait
419 {
420 foreach (Thing thing in EClass._map.things)
421 {
422 if (!(thing.trait is T) || thing.trait.radius == 0)
423 {
424 continue;
425 }
426 foreach (Point item in thing.trait.ListPoints())
427 {
428 if (Equals(item))
429 {
430 return true;
431 }
432 }
433 }
434 return false;
435 }
436
437 public bool IsPublicSpace()
438 {
439 if (area != null)
440 {
442 {
443 return true;
444 }
445 return false;
446 }
447 if (cell.room != null)
448 {
450 {
451 return true;
452 }
453 return false;
454 }
455 return true;
456 }
457
458 public Point()
459 {
460 }
461
462 public Point(Point p)
463 {
464 x = p.x;
465 z = p.z;
466 }
467
468 public Point(int _x, int _z)
469 {
470 x = _x;
471 z = _z;
472 }
473
474 public Point(int _index)
475 {
476 Set(_index);
477 }
478
479 public Point Copy()
480 {
481 return new Point(x, z);
482 }
483
484 public T Copy<T>() where T : Point
485 {
486 T val = Activator.CreateInstance<T>();
487 val.Set(this);
488 return val;
489 }
490
491 public Point Set(int _x, int _z)
492 {
493 x = _x;
494 z = _z;
495 return this;
496 }
497
498 public Point Set(int index)
499 {
500 x = index % map.Size;
501 z = index % map.SizeXZ / map.Size;
502 return this;
503 }
504
505 public Point Set(Point point)
506 {
507 x = point.x;
508 z = point.z;
509 return this;
510 }
511
512 public override string ToString()
513 {
514 return "(" + x + " / " + z + ")";
515 }
516
517 public void Set(Vector3 v)
518 {
519 v.x -= 0.64f;
520 v.y -= 0.64f;
521 int num = Mathf.RoundToInt(v.x / _screen.tileAlign.x);
522 int num2 = Mathf.RoundToInt(v.y / _screen.tileAlign.y);
523 x = (num2 - num) / 2 * -1;
524 z = num - x;
525 }
526
527 public ref Vector3 PositionAuto()
528 {
530 {
531 return ref PositionTopdown();
532 }
533 return ref Position();
534 }
535
536 public ref Vector3 Position(int height)
537 {
538 if (height == -1)
539 {
540 return ref Position();
541 }
542 vCache.x = (float)(x + z) * _screen.tileAlign.x;
543 vCache.y = (float)(z - x) * _screen.tileAlign.y + (float)height * _screen.tileMap._heightMod.y;
544 vCache.z = 1000f + vCache.x * _screen.tileWeight.x + vCache.y * _screen.tileWeight.z + (float)height * _screen.tileMap._heightMod.z;
545 return ref vCache;
546 }
547
548 public ref Vector3 Position()
549 {
550 byte b = ((cell.bridgeHeight == 0) ? cell.height : cell.bridgeHeight);
551 vCache.x = (float)(x + z) * _screen.tileAlign.x;
552 vCache.y = (float)(z - x) * _screen.tileAlign.y + (float)(int)b * _screen.tileMap._heightMod.y;
553 vCache.z = 1000f + vCache.x * _screen.tileWeight.x + vCache.y * _screen.tileWeight.z + (float)(int)b * _screen.tileMap._heightMod.z;
554 return ref vCache;
555 }
556
557 public ref Vector3 PositionTopdown()
558 {
559 byte b = ((cell.bridgeHeight == 0) ? cell.height : cell.bridgeHeight);
560 vCache.x = (float)x * _screen.tileAlign.x;
561 vCache.y = (float)z * _screen.tileAlign.y + (float)(int)b * _screen.tileMap._heightMod.y;
562 vCache.z = 1000f + vCache.x * _screen.tileWeight.x + vCache.y * _screen.tileWeight.z + (float)(int)b * _screen.tileMap._heightMod.z;
563 return ref vCache;
564 }
565
566 public ref Vector3 PositionTopdownTreasure()
567 {
569 vCache.x = (float)(x - EClass.scene.elomap.minX) * screenElona.tileAlign.x;
570 vCache.y = (float)(z - EClass.scene.elomap.minY) * screenElona.tileAlign.y;
571 vCache.z = 1400f;
572 return ref vCache;
573 }
574
575 public ref Vector3 PositionCenter()
576 {
578 {
579 _ = ref PositionTopdown();
580 }
581 else
582 {
583 _ = ref Position();
584 }
585 vCache.x += EClass.screen.tileWorldSize.x * 0.5f;
586 vCache.y += EClass.screen.tileWorldSize.y * 0.75f;
587 return ref vCache;
588 }
589
590 public Quaternion GetRotation(Point to)
591 {
592 return Quaternion.Euler(0f, 0f, GetAngle(to));
593 }
594
595 public float GetAngle(Point to)
596 {
597 Vector3 vector = to.Position() - Position();
598 return Mathf.Atan2(vector.y, vector.x) * 57.29578f;
599 }
600
601 public float GetAngle2(Point to)
602 {
603 int num = to.x - x;
604 return Mathf.Atan2(to.z - z, num) * 57.29578f;
605 }
606
607 public Point GetNearestPoint(bool allowBlock = false, bool allowChara = true, bool allowInstalled = true, bool ignoreCenter = false, int minRadius = 0)
608 {
609 Point p = new Point();
610 int r = 1;
611 int num = x;
612 int num2 = z;
613 if (IsValid(num, num2))
614 {
615 return p;
616 }
617 if (IsValid(num, num2 + 1))
618 {
619 return p;
620 }
621 for (int i = 0; i < 30; i++)
622 {
623 for (int j = 0; j < r; j++)
624 {
625 num++;
626 if (IsValid(num, num2))
627 {
628 return p;
629 }
630 }
631 for (int k = 0; k < r; k++)
632 {
633 num2++;
634 if (IsValid(num, num2))
635 {
636 return p;
637 }
638 }
639 r++;
640 for (int l = 0; l < r; l++)
641 {
642 num--;
643 if (IsValid(num, num2))
644 {
645 return p;
646 }
647 }
648 for (int m = 0; m < r; m++)
649 {
650 num2--;
651 if (IsValid(num, num2))
652 {
653 return p;
654 }
655 }
656 r++;
657 }
658 p.Set(this);
659 return p;
660 bool IsValid(int dx, int dz)
661 {
662 p.Set(dx, dz);
663 if (minRadius > r / 2)
664 {
665 return false;
666 }
667 if (!p.IsInBounds || !map.Contains(dx, dz) || (ignoreCenter && dx == x && dz == z))
668 {
669 return false;
670 }
671 if ((!allowBlock && (p.cell.blocked || p.cell.hasDoor || (p.cell.growth != null && p.cell.growth.IsTree))) || (!allowChara && p.HasChara) || (!allowInstalled && p.Installed != null))
672 {
673 return false;
674 }
675 return true;
676 }
677 }
678
679 public bool ForeachNearestPoint(Func<Point, bool> endFunc, bool allowBlock = false, bool allowChara = true, bool allowInstalled = true, bool ignoreCenter = false, int maxRange = 30)
680 {
681 Point p = new Point();
682 int num = 1;
683 int num2 = x;
684 int num3 = z;
685 if (IsValid(num2, num3) && endFunc(p))
686 {
687 return true;
688 }
689 if (IsValid(num2, num3 + 1) && endFunc(p))
690 {
691 return true;
692 }
693 for (int i = 0; i < maxRange; i++)
694 {
695 for (int j = 0; j < num; j++)
696 {
697 num2++;
698 if (IsValid(num2, num3) && endFunc(p))
699 {
700 return true;
701 }
702 }
703 for (int k = 0; k < num; k++)
704 {
705 num3++;
706 if (IsValid(num2, num3) && endFunc(p))
707 {
708 return true;
709 }
710 }
711 num++;
712 for (int l = 0; l < num; l++)
713 {
714 num2--;
715 if (IsValid(num2, num3) && endFunc(p))
716 {
717 return true;
718 }
719 }
720 for (int m = 0; m < num; m++)
721 {
722 num3--;
723 if (IsValid(num2, num3) && endFunc(p))
724 {
725 return true;
726 }
727 }
728 num++;
729 }
730 Debug.Log("ForeachNearestPoint Fail:" + this);
731 return false;
732 bool IsValid(int dx, int dz)
733 {
734 p.Set(dx, dz);
735 if (!p.IsInBounds || !map.Contains(dx, dz) || (ignoreCenter && dx == x && dz == z))
736 {
737 return false;
738 }
739 if ((!allowBlock && (p.cell.blocked || p.cell.hasDoor || (p.cell.growth != null && p.cell.growth.IsTree))) || (!allowChara && p.HasChara) || (!allowInstalled && p.Installed != null))
740 {
741 return false;
742 }
743 return true;
744 }
745 }
746
748 {
749 int num = ((EClass.rnd(2) == 0) ? 1 : (-1));
750 if (EClass.rnd(2) == 0)
751 {
752 return new Point(Mathf.Clamp(x + num, 0, map.Size - 1), z);
753 }
754 return new Point(x, Mathf.Clamp(z + num, 0, map.Size - 1));
755 }
756
757 public Point GetRandomPoint(int radius, bool requireLos = true, bool allowChara = true, bool allowBlocked = false, int tries = 100)
758 {
759 Point point = new Point();
760 for (int i = 0; i < tries; i++)
761 {
762 point.Set(x - radius + EClass.rnd(radius * 2 + 1), z - radius + EClass.rnd(radius * 2 + 1));
763 if (point.IsValid && (allowBlocked || !point.IsBlocked) && (!requireLos || Los.IsVisible(this, point)) && (allowChara || !point.HasChara))
764 {
765 return point;
766 }
767 }
768 return null;
769 }
770
771 public Point GetRandomPointInRadius(int minRadius, int maxRadius, bool requireLos = true, bool allowChara = true, bool allowBlocked = false, int tries = 2000)
772 {
773 Point point = new Point();
774 for (int i = 0; i < tries; i++)
775 {
776 point.Set(x - maxRadius + EClass.rnd(maxRadius * 2 + 1), z - maxRadius + EClass.rnd(maxRadius * 2 + 1));
777 if (point.IsValid && (allowBlocked || !point.IsBlocked) && (allowChara || !point.HasChara))
778 {
779 int num = point.Distance(this);
780 if (num >= minRadius && num <= maxRadius && (!requireLos || Los.IsVisible(this, point)))
781 {
782 return point;
783 }
784 }
785 }
786 return null;
787 }
788
790 {
791 Point point = new Point(this);
792 int num = dest.x - point.x;
793 int num2 = dest.z - point.z;
794 if (Mathf.Abs(num) > 1 || Mathf.Abs(num2) > 1)
795 {
796 int num3 = Mathf.Max(Mathf.Abs(num), Mathf.Abs(num2));
797 point.x += num / num3;
798 point.z += num2 / num3;
799 }
800 return point;
801 }
802
803 public void TalkWitnesses(Chara criminal, string idTalk, int radius = 4, WitnessType type = WitnessType.everyone, Func<Chara, bool> talkIf = null, int chance = 3)
804 {
805 if (talkIf == null)
806 {
807 talkIf = (Chara c) => EClass.rnd(chance) == 0;
808 }
809 foreach (Chara item in ListWitnesses(criminal, radius, type))
810 {
811 if (talkIf(item) && !item.renderer.IsTalking())
812 {
813 item.Talk(idTalk);
814 }
815 }
816 }
817
818 public List<Chara> ListWitnesses(Chara criminal, int radius = 4, WitnessType type = WitnessType.crime, Chara target = null)
819 {
820 List<Chara> list = new List<Chara>();
821 foreach (Point item in map.ListPointsInCircle(this, radius, mustBeWalkable: false))
822 {
823 List<Chara> list2 = item.detail?.charas;
824 if (list2 == null || list2.Count == 0)
825 {
826 continue;
827 }
828 foreach (Chara item2 in list2)
829 {
830 if (item2 == criminal || item2.IsPC || (item2 != target && !item2.CanWitness) || (item2.HasCondition<ConDim>() && EClass.rnd(2) == 0) || item2.conSuspend != null || item2.isParalyzed || item2.IsDisabled)
831 {
832 continue;
833 }
834 switch (type)
835 {
836 case WitnessType.ally:
837 if (!criminal.IsPCFaction || item2.hostility <= Hostility.Neutral)
838 {
839 continue;
840 }
841 break;
842 case WitnessType.crime:
843 if (criminal == null || item2.isBlind || item2.isConfused || (criminal.IsPCParty && (item2.IsPCFaction || item2.IsPCFactionMinion)) || (target == null && item2.OriginalHostility < Hostility.Neutral))
844 {
845 continue;
846 }
847 break;
848 case WitnessType.music:
849 if (item2.hostility <= Hostility.Enemy)
850 {
851 continue;
852 }
853 break;
854 }
855 list.Add(item2);
856 }
857 }
858 return list;
859 }
860
861 public bool TryWitnessCrime(Chara criminal, Chara target = null, int radius = 4, Func<Chara, bool> funcWitness = null)
862 {
863 List<Chara> list = ListWitnesses(criminal, radius, WitnessType.crime, target);
864 bool result = false;
865 if (funcWitness == null)
866 {
867 funcWitness = (Chara c) => EClass.rnd(10) == 0;
868 }
869 foreach (Chara item in list)
870 {
871 if (funcWitness(item))
872 {
873 CallGuard(criminal, item);
874 result = true;
875 target?.DoHostileAction(criminal);
876 if (item != target)
877 {
878 item.DoHostileAction(criminal);
879 }
880 break;
881 }
882 }
883 return result;
884 }
885
886 public void CallGuard(Chara criminal, Chara caller)
887 {
888 if (caller.HasCondition<ConSleep>())
889 {
890 caller.RemoveCondition<ConSleep>();
891 }
892 caller.Talk("callGuards");
893 List<Chara> list = EClass._map.charas.Where((Chara c) => c.trait is TraitGuard && !c.IsInCombat).ToList();
894 if (list.Count > 0)
895 {
896 Chara chara = list.RandomItem();
897 caller.Say("calledGuard", caller);
898 chara.DoHostileAction(criminal);
899 }
900 }
901
902 public void SetBlock(int idMat = 0, int idBlock = 0)
903 {
904 map.SetBlock(x, z, idMat, idBlock);
905 }
906
907 public void SetFloor(int idMat = 0, int idFloor = 0)
908 {
909 map.SetFloor(x, z, idMat, idFloor);
910 }
911
912 public void SetObj(int id = 0, int value = 1, int dir = 0)
913 {
914 map.SetObj(x, z, id, value, dir);
915 }
916
917 public void ModFire(int value, bool extinguish = false)
918 {
919 if (extinguish && cell.HasFire)
920 {
921 PlaySound("extinguish");
922 PlayEffect("smoke");
923 PlayEffect("vanish");
924 }
925 map.ModFire(x, z, value);
926 }
927
928 public void Plow()
929 {
930 if (IsFarmField)
931 {
933 {
935 }
936 else if (cell.Front.HasWallOrFence)
937 {
939 }
940 }
941 SetFloor(4, 4);
942 }
943
944 public bool Equals(int _x, int _z)
945 {
946 if (x == _x)
947 {
948 return z == _z;
949 }
950 return false;
951 }
952
953 public override bool Equals(object obj)
954 {
955 Point point = obj as Point;
956 if (point == null)
957 {
958 Debug.Log(point?.ToString() + ":" + point.GetType()?.ToString() + "is not Point");
959 return false;
960 }
961 if (x == point.x)
962 {
963 return z == point.z;
964 }
965 return false;
966 }
967
968 public override int GetHashCode()
969 {
970 return x + z * map.Size;
971 }
972
973 public int Distance(Point p)
974 {
975 return Fov.Distance(p.x, p.z, x, z);
976 }
977
978 public int Distance(int tx, int tz)
979 {
980 return Fov.Distance(tx, tz, x, z);
981 }
982
983 public bool IsBlockByHeight(Point p)
984 {
985 if (Mathf.Abs(p.cell.minHeight - cell.topHeight) > 8)
986 {
987 return Mathf.Abs(p.cell.topHeight - cell.minHeight) > 8;
988 }
989 return false;
990 }
991
992 public Point Clamp(bool useBounds = false)
993 {
994 if (useBounds)
995 {
996 if (x < map.bounds.x)
997 {
998 x = map.bounds.x;
999 }
1000 else if (x >= map.bounds.maxX)
1001 {
1002 x = map.bounds.maxX;
1003 }
1004 if (z < map.bounds.z)
1005 {
1006 z = map.bounds.z;
1007 }
1008 else if (z >= map.bounds.maxZ)
1009 {
1010 z = map.bounds.maxZ;
1011 }
1012 }
1013 else
1014 {
1015 if (x < 0)
1016 {
1017 x = 0;
1018 }
1019 else if (x >= map.Size)
1020 {
1021 x = map.Size - 1;
1022 }
1023 if (z < 0)
1024 {
1025 z = 0;
1026 }
1027 else if (z >= map.Size)
1028 {
1029 z = map.Size - 1;
1030 }
1031 }
1032 return this;
1033 }
1034
1035 public List<Card> ListCards(bool includeMasked = false)
1036 {
1037 listCard.Clear();
1038 bool flag = EClass.scene.actionMode != null && EClass.scene.actionMode.IsRoofEditMode();
1039 if (detail != null)
1040 {
1041 foreach (Thing thing in detail.things)
1042 {
1043 if (!thing.isHidden && (includeMasked || !thing.isMasked) && thing.isRoofItem == flag)
1044 {
1045 listCard.Add(thing);
1046 }
1047 }
1048 if (!flag)
1049 {
1050 foreach (Chara chara in detail.charas)
1051 {
1052 listCard.Add(chara);
1053 }
1054 }
1055 }
1056 return listCard;
1057 }
1058
1059 public List<Card> ListVisibleCards()
1060 {
1061 listCard.Clear();
1062 if (detail != null)
1063 {
1064 foreach (Thing thing in detail.things)
1065 {
1066 if (!thing.isHidden && !thing.isMasked && !thing.isRoofItem)
1067 {
1068 listCard.Add(thing);
1069 }
1070 }
1071 foreach (Chara chara in detail.charas)
1072 {
1073 if (EClass.pc.CanSee(chara))
1074 {
1075 listCard.Add(chara);
1076 }
1077 }
1078 }
1079 return listCard;
1080 }
1081
1083 {
1084 foreach (Card item in ListCards())
1085 {
1086 if (item.isChara || item.trait.CanBeAttacked)
1087 {
1088 return item;
1089 }
1090 }
1091 return null;
1092 }
1093
1094 public Chara FindChara(Func<Chara, bool> func)
1095 {
1096 if (detail != null)
1097 {
1098 foreach (Chara chara in detail.charas)
1099 {
1100 if (func(chara))
1101 {
1102 return chara;
1103 }
1104 }
1105 }
1106 return null;
1107 }
1108
1109 public T FindThing<T>() where T : Trait
1110 {
1111 if (IsValid && detail != null)
1112 {
1113 foreach (Thing thing in detail.things)
1114 {
1115 if (thing.trait is T)
1116 {
1117 return thing.trait as T;
1118 }
1119 }
1120 }
1121 return null;
1122 }
1123
1124 public Thing FindThing(Func<Thing, bool> func)
1125 {
1126 if (detail != null)
1127 {
1128 foreach (Thing thing in detail.things)
1129 {
1130 if (func(thing))
1131 {
1132 return thing;
1133 }
1134 }
1135 }
1136 return null;
1137 }
1138
1139 public List<Card> ListThings<T>(bool onlyInstalled = true) where T : Trait
1140 {
1141 listCard.Clear();
1142 if (detail != null)
1143 {
1144 foreach (Thing thing in detail.things)
1145 {
1146 if (!thing.isHidden && !thing.isRoofItem && !thing.isMasked && (!onlyInstalled || thing.IsInstalled) && thing.trait is T)
1147 {
1148 listCard.Add(thing);
1149 }
1150 }
1151 }
1152 return listCard;
1153 }
1154
1155 public List<Chara> ListCharas()
1156 {
1157 listChara.Clear();
1158 if (detail != null)
1159 {
1160 foreach (Chara chara in detail.charas)
1161 {
1162 listChara.Add(chara);
1163 }
1164 }
1165 return listChara;
1166 }
1167
1168 public List<Chara> ListVisibleCharas()
1169 {
1170 listChara.Clear();
1171 if (detail != null)
1172 {
1173 foreach (Chara chara in detail.charas)
1174 {
1175 if (EClass.pc.CanSee(chara))
1176 {
1177 listChara.Add(chara);
1178 }
1179 }
1180 }
1181 return listChara;
1182 }
1183
1184 public List<Chara> ListCharasInNeighbor(Func<Chara, bool> func)
1185 {
1186 listChara.Clear();
1187 ForeachNeighbor(delegate(Point p)
1188 {
1189 if (p.detail == null)
1190 {
1191 return;
1192 }
1193 foreach (Chara chara in p.detail.charas)
1194 {
1195 if (func(chara))
1196 {
1197 listChara.Add(chara);
1198 }
1199 }
1200 });
1201 return listChara;
1202 }
1203
1204 public List<Chara> ListCharasInRadius(Chara cc, int dist, Func<Chara, bool> func, bool onlyVisible = true)
1205 {
1206 listChara.Clear();
1207 foreach (Chara chara in EClass._map.charas)
1208 {
1209 if (func(chara) && chara.Dist(cc) < dist && (!onlyVisible || Los.IsVisible(chara, cc)))
1210 {
1211 listChara.Add(chara);
1212 }
1213 }
1214 return listChara;
1215 }
1216
1217 public T GetInstalled<T>() where T : Trait
1218 {
1219 if (detail != null)
1220 {
1221 foreach (Thing thing in detail.things)
1222 {
1223 if (thing.IsInstalled && thing.trait is T)
1224 {
1225 return thing.trait as T;
1226 }
1227 }
1228 }
1229 return null;
1230 }
1231
1232 public Effect PlayEffect(string id)
1233 {
1234 return Effect.Get(id).Play(this);
1235 }
1236
1237 public SoundSource PlaySound(string id, bool synced = true, float v = 1f, bool spatial = true)
1238 {
1239 Vector3 vector = default(Vector3);
1240 if (spatial)
1241 {
1242 if (!IsValid)
1243 {
1244 return null;
1245 }
1246 vector = (EClass._zone.IsRegion ? PositionTopdown() : Position());
1247 vector.z = 0f;
1248 if (Vector3.Distance(vector, EClass.scene.transAudio.position) > EClass.core.gameSetting.audio.maxRange)
1249 {
1250 return null;
1251 }
1252 if (!synced)
1253 {
1254 v -= 0.4f;
1255 }
1256 }
1257 return EClass.Sound.Play(id, vector, (!spatial) ? 1f : (v * ((EClass.screen.Zoom >= 1f) ? 1f : EClass.screen.Zoom)));
1258 }
1259
1261 {
1262 map.RefreshNeighborTiles(x, z);
1263 }
1264
1265 public void RefreshTile()
1266 {
1267 map.RefreshSingleTile(x, z);
1268 }
1269
1270 public bool HasNonHomeProperty(Thing exclude = null)
1271 {
1272 if (FirstThing == null)
1273 {
1274 return false;
1275 }
1276 foreach (Thing thing in detail.things)
1277 {
1278 if (thing != exclude && thing.isNPCProperty)
1279 {
1280 return true;
1281 }
1282 }
1283 return false;
1284 }
1285
1286 public void Animate(AnimeID id, bool animeBlock = false)
1287 {
1288 if (!IsValid)
1289 {
1290 return;
1291 }
1292 CellDetail orCreateDetail = cell.GetOrCreateDetail();
1293 if (orCreateDetail.anime == null)
1294 {
1295 TransAnime transAnime = (orCreateDetail.anime = new TransAnime
1296 {
1297 data = ResourceCache.Load<TransAnimeData>("Scene/Render/Anime/" + id),
1298 point = this,
1299 animeBlock = animeBlock
1300 }.Init());
1301 EClass._map.pointAnimes.Add(transAnime);
1302 if (id == AnimeID.Quake)
1303 {
1304 transAnime.drawBlock = true;
1305 }
1306 }
1307 }
1308
1310 {
1311 if (detail == null || detail.anime == null)
1312 {
1313 return p;
1314 }
1315 p.x += detail.anime.v.x;
1316 p.y += detail.anime.v.y;
1317 p.z += detail.anime.v.z;
1318 p.v.x += detail.anime.v.x;
1319 p.v.y += detail.anime.v.y;
1320 p.v.z += detail.anime.v.z;
1321 return p;
1322 }
1323
1324 public Vector3 ApplyAnime(ref Vector3 p)
1325 {
1326 if (detail == null || detail.anime == null)
1327 {
1328 return p;
1329 }
1330 p.x += detail.anime.v.x;
1331 p.y += detail.anime.v.y;
1332 p.z += detail.anime.v.z;
1333 return p;
1334 }
1335
1336 public List<IInspect> ListInspectorTargets()
1337 {
1338 List<IInspect> list = new List<IInspect>();
1339 CellDetail cellDetail = detail;
1340 if (cellDetail != null)
1341 {
1342 foreach (Chara chara in cellDetail.charas)
1343 {
1344 if (chara.isSynced)
1345 {
1346 list.Add(chara);
1347 }
1348 }
1349 foreach (Thing thing in cellDetail.things)
1350 {
1351 list.Add(thing);
1352 }
1353 if (cellDetail.designation != null && !(cellDetail.designation is TaskCut) && !(cellDetail.designation is TaskMine))
1354 {
1355 list.Add(cellDetail.designation);
1356 }
1357 }
1358 if (ObjInfo._CanInspect(this))
1359 {
1360 list.Add(ObjInfo.GetTempList(this));
1361 }
1362 if (BlockInfo._CanInspect(this))
1363 {
1364 list.Add(BlockInfo.GetTempList(this));
1365 }
1366 return list;
1367 }
1368
1369 public void ForeachMultiSize(int w, int h, Action<Point, bool> action)
1370 {
1371 for (int i = 0; i < h; i++)
1372 {
1373 for (int j = 0; j < w; j++)
1374 {
1375 shared3.Set(x - j, z + i);
1376 action(shared3, j == 0 && i == 0);
1377 }
1378 }
1379 }
1380
1381 public void ForeachNeighbor(Action<Point> action, bool diagonal = true)
1382 {
1383 Point point = new Point();
1384 for (int i = x - 1; i <= x + 1; i++)
1385 {
1386 for (int j = z - 1; j <= z + 1; j++)
1387 {
1388 if (diagonal || i == x || j == z)
1389 {
1390 point.Set(i, j);
1391 if (point.IsValid)
1392 {
1393 action(point);
1394 }
1395 }
1396 }
1397 }
1398 }
1399
1401 {
1402 Point point = new Point(x, z);
1403 point.x += EClass.scene.elomap.minX;
1404 point.z += EClass.scene.elomap.minY;
1405 return point;
1406 }
1407
1408 public void SetHighlight(int id)
1409 {
1410 cell.highlight = (byte)id;
1412 }
1413}
AnimeID
Definition: AnimeID.cs:2
Hostility
Definition: Hostility.cs:2
WitnessType
Definition: WitnessType.cs:2
virtual bool IsRoofEditMode(Card c=null)
Definition: ActionMode.cs:311
virtual bool IsPublicArea
Definition: AreaType.cs:20
Definition: Area.cs:4
AreaType type
Definition: BaseArea.cs:32
Vector3 tileWeight
BaseTileMap tileMap
bool hideRoomFog
Definition: BaseTileMap.cs:281
Vector3 _heightMod
Definition: BaseTileMap.cs:335
static bool _CanInspect(Point pos)
Definition: BlockInfo.cs:31
static BlockInfo GetTempList(Point _pos)
Definition: BlockInfo.cs:21
Definition: Card.cs:11
bool isMasked
Definition: Card.cs:576
bool isNPCProperty
Definition: Card.cs:540
bool isRoofItem
Definition: Card.cs:564
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:6402
Trait trait
Definition: Card.cs:51
bool IsInstalled
Definition: Card.cs:2343
int Dist(Card c)
Definition: Card.cs:7315
bool isHidden
Definition: Card.cs:516
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6499
TaskDesignation designation
Definition: CellDetail.cs:19
List< Thing > things
Definition: CellDetail.cs:11
TransAnime anime
Definition: CellDetail.cs:21
List< Chara > charas
Definition: CellDetail.cs:13
Area area
Definition: CellDetail.cs:15
Definition: Cell.cs:7
byte _block
Definition: Cell.cs:30
Room room
Definition: Cell.cs:102
bool HasWallOrFence
Definition: Cell.cs:831
SourceBlock.Row sourceBlock
Definition: Cell.cs:1052
SourceMaterial.Row matBlock
Definition: Cell.cs:1030
SourceFloor.Row sourceFloor
Definition: Cell.cs:1054
SourceMaterial.Row matRoofBlock
Definition: Cell.cs:1028
bool IsTopWaterAndNoSnow
Definition: Cell.cs:712
Cell Front
Definition: Cell.cs:129
CellDetail GetOrCreateDetail()
Definition: Cell.cs:1533
List< Thing > Things
Definition: Cell.cs:986
SourceMaterial.Row matBridge
Definition: Cell.cs:1034
bool pcSync
Definition: Cell.cs:104
byte topHeight
Definition: Cell.cs:78
byte minHeight
Definition: Cell.cs:80
bool IsTopWater
Definition: Cell.cs:700
List< Chara > Charas
Definition: Cell.cs:988
byte height
Definition: Cell.cs:72
GrowSystem growth
Definition: Cell.cs:225
SourceFloor.Row sourceBridge
Definition: Cell.cs:1056
CellDetail detail
Definition: Cell.cs:92
bool HasRoof
Definition: Cell.cs:648
SourceMaterial.Row matFloor
Definition: Cell.cs:1032
bool isSeen
Definition: Cell.cs:282
SourceObj.Row sourceObj
Definition: Cell.cs:1072
bool HasFire
Definition: Cell.cs:676
SourceBlock.Row sourceRoofBlock
Definition: Cell.cs:1050
Point GetPoint()
Definition: Cell.cs:1101
Cell Right
Definition: Cell.cs:141
bool HasRamp
Definition: Cell.cs:837
byte bridgeHeight
Definition: Cell.cs:74
bool hasDoor
Definition: Cell.cs:258
bool HasRampOrLadder
Definition: Cell.cs:842
Definition: Chara.cs:10
Hostility OriginalHostility
Definition: Chara.cs:469
ConSuspend conSuspend
Definition: Chara.cs:104
override bool IsPC
Definition: Chara.cs:610
bool isParalyzed
Definition: Chara.cs:132
bool IsInCombat
Definition: Chara.cs:862
bool HasCondition(string alias)
Definition: Chara.cs:8960
override bool IsDisabled
Definition: Chara.cs:583
override bool isSynced
Definition: Chara.cs:689
override bool IsPCFaction
Definition: Chara.cs:669
bool CanSee(Card c)
Definition: Chara.cs:1200
override bool IsPCFactionMinion
Definition: Chara.cs:653
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:6050
bool isBlind
Definition: Chara.cs:130
Hostility hostility
Definition: Chara.cs:289
bool CanWitness
Definition: Chara.cs:989
bool isConfused
Definition: Chara.cs:126
Definition: ConDim.cs:2
GameSetting gameSetting
Definition: Core.cs:47
Definition: EClass.cs:5
static Scene scene
Definition: EClass.cs:30
static Core core
Definition: EClass.cs:6
static Zone _zone
Definition: EClass.cs:20
static Map _map
Definition: EClass.cs:18
static int rnd(long a)
Definition: EClass.cs:58
static BaseGameScreen screen
Definition: EClass.cs:32
static Player player
Definition: EClass.cs:12
static Chara pc
Definition: EClass.cs:14
static SoundManager Sound
Definition: EClass.cs:46
Definition: Effect.cs:7
static Effect Get(Effect original)
Definition: Effect.cs:85
void Play(float delay, Point from, float fixY=0f, Point to=null, Sprite sprite=null)
Definition: Effect.cs:100
bool Has(int ele)
int minX
Definition: EloMap.cs:112
int minY
Definition: EloMap.cs:114
Definition: Fov.cs:6
static int Distance(int x1, int y1, int x2, int y2)
Definition: Fov.cs:134
AudioSetting audio
Definition: GameSetting.cs:297
virtual bool IsTree
Definition: GrowSystem.cs:87
Definition: Los.cs:5
static bool IsVisible(Point p1, Point p2, Action< Point, bool > _onVisit=null)
Definition: Los.cs:167
int Size
Definition: MapBounds.cs:20
int maxZ
Definition: MapBounds.cs:17
int maxX
Definition: MapBounds.cs:14
int x
Definition: MapBounds.cs:8
bool Contains(int dx, int dz)
Definition: MapBounds.cs:38
Definition: Map.cs:13
void RefreshNeighborTiles(int x, int z)
Definition: Map.cs:2214
void RefreshSingleTile(int x, int z)
Definition: Map.cs:2198
List< Thing > things
Definition: Map.cs:49
void ModFire(int x, int z, int amount)
Definition: Map.cs:1172
void SetFloor(int x, int z, int idMat=0, int idFloor=0)
Definition: Map.cs:957
void SetBlock(int x, int z, int idMat=0, int idBlock=0)
Definition: Map.cs:996
Cell[,] cells
Definition: Map.cs:85
List< Point > ListPointsInCircle(Point center, float radius, bool mustBeWalkable=true, bool los=true)
Definition: Map.cs:2373
List< Chara > charas
Definition: Map.cs:81
List< TransAnime > pointAnimes
Definition: Map.cs:83
void SetObj(int x, int z, int id=0, int value=1, int dir=0)
Definition: Map.cs:1535
MapBounds bounds
Definition: Map.cs:52
static bool _CanInspect(Point pos)
Definition: ObjInfo.cs:67
static ObjInfo GetTempList(Point _pos)
Definition: ObjInfo.cs:57
List< Cell > lastMarkedHighlights
Definition: Player.cs:1065
Definition: Point.cs:9
Thing Installed
Definition: Point.cs:315
int eloY
Definition: Point.cs:81
static Point shared
Definition: Point.cs:20
SourceMaterial.Row matBlock
Definition: Point.cs:55
SourceMaterial.Row matFloor
Definition: Point.cs:57
static Point GetShared(int x, int z)
Definition: Point.cs:378
int Distance(int tx, int tz)
Definition: Point.cs:978
SourceMaterial.Row matRoofBlock
Definition: Point.cs:53
int index
Definition: Point.cs:49
static Point Invalid
Definition: Point.cs:28
bool HasDirt
Definition: Point.cs:85
Vector3 vCache
Definition: Point.cs:41
bool IsBlockByHeight(Point p)
Definition: Point.cs:983
List< Chara > ListWitnesses(Chara criminal, int radius=4, WitnessType type=WitnessType.crime, Chara target=null)
Definition: Point.cs:818
bool IsSeen
Definition: Point.cs:330
SourceBlock.Row sourceBlock
Definition: Point.cs:63
bool HasFence
Definition: Point.cs:170
bool HasDecal
Definition: Point.cs:139
void ForeachMultiSize(int w, int h, Action< Point, bool > action)
Definition: Point.cs:1369
void SetObj(int id=0, int value=1, int dir=0)
Definition: Point.cs:912
Point Set(Point point)
Definition: Point.cs:505
List< Card > ListThings< T >(bool onlyInstalled=true)
Definition: Point.cs:1139
void Plow()
Definition: Point.cs:928
List< Card > ListVisibleCards()
Definition: Point.cs:1059
ref Vector3 Position(int height)
Definition: Point.cs:536
bool HasBridge
Definition: Point.cs:209
void SetHighlight(int id)
Definition: Point.cs:1408
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1035
float GetAngle(Point to)
Definition: Point.cs:595
static Point shared2
Definition: Point.cs:22
Vector3 ApplyAnime(ref Vector3 p)
Definition: Point.cs:1324
RenderParam ApplyAnime(RenderParam p)
Definition: Point.cs:1309
bool HasWall
Definition: Point.cs:158
Point Copy()
Definition: Point.cs:479
bool IsSky
Definition: Point.cs:212
Point(Point p)
Definition: Point.cs:462
ref Vector3 PositionTopdownTreasure()
Definition: Point.cs:566
bool HasDesignation
Definition: Point.cs:83
override string ToString()
Definition: Point.cs:512
Point Set(int _x, int _z)
Definition: Point.cs:491
List< IInspect > ListInspectorTargets()
Definition: Point.cs:1336
ref Vector3 PositionTopdown()
Definition: Point.cs:557
ref Vector3 PositionAuto()
Definition: Point.cs:527
T FindThing< T >()
Definition: Point.cs:1109
static Point Zero
Definition: Point.cs:33
void ForeachNeighbor(Action< Point > action, bool diagonal=true)
Definition: Point.cs:1381
CellDetail detail
Definition: Point.cs:71
Thing LastThing
Definition: Point.cs:302
bool HasTaskBuild
Definition: Point.cs:194
bool HasRail
Definition: Point.cs:133
Point(int _x, int _z)
Definition: Point.cs:468
bool IsBlocked
Definition: Point.cs:351
bool HasMultipleChara
Definition: Point.cs:252
bool IsWater
Definition: Point.cs:129
Quaternion GetRotation(Point to)
Definition: Point.cs:590
List< Thing > Things
Definition: Point.cs:326
int x
Definition: Point.cs:36
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
Definition: Point.cs:607
bool HasWallOrFence
Definition: Point.cs:155
void RefreshTile()
Definition: Point.cs:1265
bool HasNonHomeProperty(Thing exclude=null)
Definition: Point.cs:1270
bool IsInBoundsPlus
Definition: Point.cs:116
void ModFire(int value, bool extinguish=false)
Definition: Point.cs:917
int z
Definition: Point.cs:39
bool IsFarmField
Definition: Point.cs:127
bool IsSync
Definition: Point.cs:332
SourceMaterial.Row matBridge
Definition: Point.cs:59
List< Chara > Charas
Definition: Point.cs:328
void SetFloor(int idMat=0, int idFloor=0)
Definition: Point.cs:907
void CallGuard(Chara criminal, Chara caller)
Definition: Point.cs:886
SoundSource PlaySound(string id, bool synced=true, float v=1f, bool spatial=true)
Definition: Point.cs:1237
override bool Equals(object obj)
Definition: Point.cs:953
int eloX
Definition: Point.cs:79
List< Chara > ListCharasInNeighbor(Func< Chara, bool > func)
Definition: Point.cs:1184
ref Vector3 PositionCenter()
Definition: Point.cs:575
Point GetPointTowards(Point dest)
Definition: Point.cs:789
bool HasBlockRecipe
Definition: Point.cs:205
List< Chara > ListCharasInRadius(Chara cc, int dist, Func< Chara, bool > func, bool onlyVisible=true)
Definition: Point.cs:1204
bool HasThing
Definition: Point.cs:239
SourceObj.Row sourceObj
Definition: Point.cs:69
Chara FindChara(Func< Chara, bool > func)
Definition: Point.cs:1094
bool Equals(int _x, int _z)
Definition: Point.cs:944
bool HasMinableBlock
Definition: Point.cs:144
static BaseGameScreen _screen
Definition: Point.cs:43
List< Chara > ListCharas()
Definition: Point.cs:1155
bool TryWitnessCrime(Chara criminal, Chara target=null, int radius=4, Func< Chara, bool > funcWitness=null)
Definition: Point.cs:861
SourceFloor.Row sourceFloor
Definition: Point.cs:65
Card FindAttackTarget()
Definition: Point.cs:1082
static List< Chara > listChara
Definition: Point.cs:47
T Copy< T >()
Definition: Point.cs:484
void TalkWitnesses(Chara criminal, string idTalk, int radius=4, WitnessType type=WitnessType.everyone, Func< Chara, bool > talkIf=null, int chance=3)
Definition: Point.cs:803
void SetBlock(int idMat=0, int idBlock=0)
Definition: Point.cs:902
bool HasArea
Definition: Point.cs:223
Chara FirstVisibleChara()
Definition: Point.cs:394
bool Within(int _x, int _z, int _w, int _h)
Definition: Point.cs:385
bool IsValid
Definition: Point.cs:88
override int GetHashCode()
Definition: Point.cs:968
Effect PlayEffect(string id)
Definition: Point.cs:1232
bool HasObj
Definition: Point.cs:137
void RefreshNeighborTiles()
Definition: Point.cs:1260
ref Vector3 Position()
Definition: Point.cs:548
bool HasRoomOrArea(BaseArea a)
Definition: Point.cs:409
bool HasRamp
Definition: Point.cs:131
static readonly XY[] Surrounds
Definition: Point.cs:10
Point Front
Definition: Point.cs:75
bool HasRampOrLadder
Definition: Point.cs:135
Area area
Definition: Point.cs:73
Point ToRegionPos()
Definition: Point.cs:1400
bool HasFloor
Definition: Point.cs:207
Point(int _index)
Definition: Point.cs:474
Point()
Definition: Point.cs:458
bool ForeachNearestPoint(Func< Point, bool > endFunc, bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int maxRange=30)
Definition: Point.cs:679
Point GetRandomPointInRadius(int minRadius, int maxRadius, bool requireLos=true, bool allowChara=true, bool allowBlocked=false, int tries=2000)
Definition: Point.cs:771
int Distance(Point p)
Definition: Point.cs:973
bool IsHidden
Definition: Point.cs:335
static Point shared3
Definition: Point.cs:24
Chara FirstChara
Definition: Point.cs:276
Thing FirstThing
Definition: Point.cs:289
Point Clamp(bool useBounds=false)
Definition: Point.cs:992
bool HasBlock
Definition: Point.cs:141
static List< Card > listCard
Definition: Point.cs:45
bool IsInBounds
Definition: Point.cs:104
void Set(Vector3 v)
Definition: Point.cs:517
Cell cell
Definition: Point.cs:51
float GetAngle2(Point to)
Definition: Point.cs:601
Thing FindThing(Func< Thing, bool > func)
Definition: Point.cs:1124
Point GetRandomNeighbor()
Definition: Point.cs:747
void Animate(AnimeID id, bool animeBlock=false)
Definition: Point.cs:1286
static Vector3 fixedPos
Definition: Point.cs:18
SourceFloor.Row sourceBridge
Definition: Point.cs:67
bool IsPublicSpace()
Definition: Point.cs:437
GrowSystem growth
Definition: Point.cs:77
List< Chara > ListVisibleCharas()
Definition: Point.cs:1168
bool HasChara
Definition: Point.cs:226
bool HasNonWallBlock
Definition: Point.cs:182
bool IsHotSpring
Definition: Point.cs:363
bool IsInSpot< T >()
Definition: Point.cs:418
SourceBlock.Row sourceRoofBlock
Definition: Point.cs:61
Point Set(int index)
Definition: Point.cs:498
bool IsDeepWater
Definition: Point.cs:264
static Map map
Definition: Point.cs:26
Point GetRandomPoint(int radius, bool requireLos=true, bool allowChara=true, bool allowBlocked=false, int tries=100)
Definition: Point.cs:757
Transform transAudio
Definition: Scene.cs:31
ActionMode actionMode
Definition: Scene.cs:79
EloMap elomap
Definition: Scene.cs:149
GameScreenElona screenElona
Definition: Scene.cs:95
virtual bool IsRegion
Definition: Spatial.cs:503
Definition: Thing.cs:8
static TileTypeSky Sky
Definition: TileType.cs:71
Definition: Trait.cs:7
virtual int radius
Definition: Trait.cs:93
virtual List< Point > ListPoints(Point center=null, bool onlyPassable=true)
Definition: Trait.cs:748
Vector3 v
Definition: TransAnime.cs:5
ElementContainerZone elements
Definition: Zone.cs:43
Definition: XY.cs:2