13 public static Point GetShared(
int x,
int z)
26 return this.x + this.z *
Point.map.Size;
36 return Point.map.cells[this.x, this.z];
46 return this.cell.matRoofBlock;
56 return this.cell.matBlock;
66 return this.cell.matFloor;
76 return this.cell.matBridge;
86 return this.cell.sourceRoofBlock;
96 return this.cell.sourceBlock;
106 return this.cell.sourceFloor;
116 return this.cell.sourceBridge;
126 return this.cell.sourceObj;
136 return this.cell.detail;
161 return new Point(this.x + 1, this.z - 1);
171 return this.cell.growth;
181 return EClass.scene.elomap.minX + this.x;
191 return EClass.scene.elomap.minY + this.z;
197 public bool HasDesignation
202 return ((detail !=
null) ? detail.designation :
null) !=
null;
212 return this.cell.decal > 0;
223 return this.x >= 0 && this.z >= 0 && this.x < Point.map.Size && this.z <
Point.map.Size;
227 this.x = (value ? 0 : -999);
233 public bool IsInBounds
237 return this.x >= Point.map.bounds.x && this.z >= Point.map.bounds.z && this.x <= Point.map.bounds.maxX && this.z <=
Point.map.bounds.maxZ;
243 public bool IsInBoundsPlus
247 return this.x >= 0 && this.z >= 0 && this.x <= Point.map.Size - 1 && this.z <= Point.map.Size - 1;
252 public bool Within(
int _x,
int _z,
int _w,
int _h)
254 return this.x >= _x && this.z >= _z && this.x < _x + _w && this.z < _z + _h;
259 public bool IsFarmField
263 return (this.HasBridge ? this.sourceBridge : this.sourceFloor).alias ==
"field";
273 return this.cell.IsTopWater;
283 return this.cell.HasRamp;
293 return this.sourceObj.tag.Contains(
"rail");
299 public bool HasRampOrLadder
303 return this.cell.HasRampOrLadder;
313 return this.cell.obj > 0;
323 return this.cell.decal > 0;
333 return this.cell._block > 0;
339 public bool HasMinableBlock
343 return this.HasObj && this.sourceBlock.tileType.IsFullBlock;
349 public bool HasWallOrFence
353 return this.cell.HasWallOrFence;
363 return this.cell._block != 0 && this.cell.sourceBlock.tileType.IsWall;
373 return this.cell._block != 0 && this.cell.sourceBlock.tileType.IsFence;
379 public bool HasNonWallBlock
383 return this.HasBlock && !this.cell.sourceBlock.tileType.IsWallOrFence;
389 public bool HasTaskBuild
393 return this.cell.detail !=
null && this.cell.detail.designation is
TaskBuild;
399 public bool HasBlockRecipe
405 return taskBuild !=
null && taskBuild.isBlock;
415 return this.cell._floor > 0;
421 public bool HasBridge
425 return this.cell._bridge > 0;
435 return this.sourceFloor.tileType == TileType.Sky && !this.HasBridge;
446 return ((detail !=
null) ? detail.area :
null) !=
null;
457 return detail !=
null && detail.charas.Count > 0;
468 return detail !=
null && detail.things.Count > 0;
474 public bool HasMultipleChara
478 return this.detail !=
null && this.detail.charas.Count > 1;
484 public Chara FirstChara
489 if (detail ==
null || detail.charas.Count <= 0)
493 return this.detail.charas[0];
498 public Chara FirstVisibleChara()
500 if (this.detail !=
null)
502 foreach (
Chara chara
in this.detail.charas)
504 if (
EClass.pc.CanSee(chara))
515 public Thing FirstThing
520 if (detail ==
null || detail.things.Count <= 0)
524 return this.detail.things[0];
530 public Thing LastThing
535 if (detail ==
null || detail.things.Count <= 0)
539 return this.detail.things.LastItem<
Thing>();
545 public Thing Installed
549 if (this.detail ==
null || this.detail.things.Count <= 0 || !
this.detail.things[0].IsInstalled)
553 return this.detail.things[0];
559 public List<Thing> Things
563 return this.cell.Things;
569 public List<Chara> Charas
573 return this.cell.Charas;
583 return this.cell.isSeen;
593 return this.cell.pcSync;
603 return !this.cell.isSeen || (this.cell.room !=
null && !EClass.screen.tileMap.hideRoomFog && !this.cell.hasDoor && this.cell.HasRoof);
609 public bool IsBlocked
613 return !this.IsValid || this.cell.blocked;
618 public bool HasRoomOrArea(
BaseArea a)
620 return this.area == a || this.cell.room == a;
624 public bool IsPublicSpace()
626 if (this.area !=
null)
628 return this.area.type.IsPublicArea;
630 return this.cell.room ==
null || this.cell.room.type.IsPublicArea;
646 public Point(
int _x,
int _z)
653 public Point(
int _index)
661 return new Point(this.x, this.z);
665 public T Copy<T>() where T :
Point
667 T t = Activator.CreateInstance<T>();
673 public Point Set(
int _x,
int _z)
681 public Point Set(
int index)
683 this.x = index %
Point.map.Size;
684 this.z = index % Point.map.SizeXZ /
Point.map.Size;
697 public override string ToString()
699 return string.Concat(
new string[]
710 public void Set(Vector3 v)
714 int num = Mathf.RoundToInt(v.x /
Point._screen.tileAlign.x);
715 int num2 = Mathf.RoundToInt(v.y /
Point._screen.tileAlign.y);
716 this.x = (num2 - num) / 2 * -1;
717 this.z = num - this.x;
721 public ref Vector3 PositionAuto()
723 if (
EClass._zone.IsRegion)
725 return this.PositionTopdown();
727 return this.Position();
731 public ref Vector3 Position(
int height)
735 return this.Position();
737 this.vCache.x = (float)(this.x + this.z) *
Point._screen.tileAlign.x;
738 this.vCache.y = (float)(this.z - this.x) * Point._screen.tileAlign.y + (float)height *
Point._screen.tileMap._heightMod.y;
739 this.vCache.z = 1000f + this.vCache.x * Point._screen.tileWeight.x + this.vCache.y * Point._screen.tileWeight.z + (float)height *
Point._screen.tileMap._heightMod.z;
740 return ref this.vCache;
744 public ref Vector3 Position()
746 byte b = (this.cell.bridgeHeight == 0) ? this.cell.height : this.cell.bridgeHeight;
747 this.vCache.x = (float)(this.x + this.z) *
Point._screen.tileAlign.x;
748 this.vCache.y = (float)(this.z - this.x) * Point._screen.tileAlign.y + (float)b *
Point._screen.tileMap._heightMod.y;
749 this.vCache.z = 1000f + this.vCache.x * Point._screen.tileWeight.x + this.vCache.y * Point._screen.tileWeight.z + (float)b *
Point._screen.tileMap._heightMod.z;
750 return ref this.vCache;
754 public ref Vector3 PositionTopdown()
756 byte b = (this.cell.bridgeHeight == 0) ? this.cell.height : this.cell.bridgeHeight;
757 this.vCache.x = (float)this.x *
Point._screen.tileAlign.x;
758 this.vCache.y = (float)this.z *
Point._screen.tileAlign.y + (
float)b *
Point._screen.tileMap._heightMod.y;
759 this.vCache.z = 1000f + this.vCache.x * Point._screen.tileWeight.x + this.vCache.y * Point._screen.tileWeight.z + (float)b *
Point._screen.tileMap._heightMod.z;
760 return ref this.vCache;
764 public ref Vector3 PositionTopdownTreasure()
767 this.vCache.x = (float)(this.x -
EClass.scene.elomap.minX) * screenElona.tileAlign.x;
768 this.vCache.y = (float)(this.z -
EClass.scene.elomap.minY) * screenElona.tileAlign.y;
769 this.vCache.z = 1400f;
770 return ref this.vCache;
774 public ref Vector3 PositionCenter()
776 if (
EClass._zone.IsRegion)
778 this.PositionTopdown();
784 this.vCache.x = this.vCache.x + EClass.screen.tileWorldSize.x * 0.5f;
785 this.vCache.y = this.vCache.y + EClass.screen.tileWorldSize.y * 0.75f;
786 return ref this.vCache;
790 public Quaternion GetRotation(
Point to)
792 return Quaternion.Euler(0f, 0f, this.GetAngle(to));
796 public unsafe
float GetAngle(
Point to)
798 Vector3 vector = *to.Position() - *this.Position();
799 return Mathf.Atan2(vector.y, vector.x) * 57.29578f;
803 public float GetAngle2(
Point to)
805 int num = to.x - this.x;
806 return Mathf.Atan2((
float)(to.z -
this.z), (
float)num) * 57.29578f;
810 public Point GetNearestPoint(
bool allowBlock =
false,
bool allowChara =
true,
bool allowInstalled =
true,
bool ignoreCenter =
false)
812 Point.<>c__DisplayClass146_0 CS$<>8__locals1;
813 CS$<>8__locals1.ignoreCenter = ignoreCenter;
814 CS$<>8__locals1.<>4__this =
this;
815 CS$<>8__locals1.allowBlock = allowBlock;
816 CS$<>8__locals1.allowChara = allowChara;
817 CS$<>8__locals1.allowInstalled = allowInstalled;
818 CS$<>8__locals1.p =
new Point();
822 if (this.<GetNearestPoint>g__IsValid|146_0(num2, num3, ref CS$<>8__locals1))
824 return CS$<>8__locals1.p;
826 if (this.<GetNearestPoint>g__IsValid|146_0(num2, num3 + 1, ref CS$<>8__locals1))
828 return CS$<>8__locals1.p;
830 for (
int i = 0; i < 30; i++)
832 for (
int j = 0; j < num; j++)
835 if (this.<GetNearestPoint>g__IsValid|146_0(num2, num3, ref CS$<>8__locals1))
837 return CS$<>8__locals1.p;
841 for (
int k = 0; k < num; k++)
844 if (this.<GetNearestPoint>g__IsValid|146_0(num2, num3, ref CS$<>8__locals1))
846 return CS$<>8__locals1.p;
849 for (
int l = 0; l < num; l++)
852 if (this.<GetNearestPoint>g__IsValid|146_0(num2, num3, ref CS$<>8__locals1))
854 return CS$<>8__locals1.p;
858 for (
int m = 0; m < num; m++)
861 if (this.<GetNearestPoint>g__IsValid|146_0(num2, num3, ref CS$<>8__locals1))
863 return CS$<>8__locals1.p;
867 CS$<>8__locals1.p.Set(
this);
868 return CS$<>8__locals1.p;
872 public bool ForeachNearestPoint(Func<Point, bool> endFunc,
bool allowBlock =
false,
bool allowChara =
true,
bool allowInstalled =
true,
bool ignoreCenter =
false)
874 Point.<>c__DisplayClass147_0 CS$<>8__locals1;
875 CS$<>8__locals1.ignoreCenter = ignoreCenter;
876 CS$<>8__locals1.<>4__this =
this;
877 CS$<>8__locals1.allowBlock = allowBlock;
878 CS$<>8__locals1.allowChara = allowChara;
879 CS$<>8__locals1.allowInstalled = allowInstalled;
880 CS$<>8__locals1.p =
new Point();
884 if (this.<ForeachNearestPoint>g__IsValid|147_0(num2, num3, ref CS$<>8__locals1) && endFunc(CS$<>8__locals1.p))
888 if (this.<ForeachNearestPoint>g__IsValid|147_0(num2, num3 + 1, ref CS$<>8__locals1) && endFunc(CS$<>8__locals1.p))
892 for (
int i = 0; i < 30; i++)
894 for (
int j = 0; j < num; j++)
897 if (this.<ForeachNearestPoint>g__IsValid|147_0(num2, num3, ref CS$<>8__locals1) && endFunc(CS$<>8__locals1.p))
903 for (
int k = 0; k < num; k++)
906 if (this.<ForeachNearestPoint>g__IsValid|147_0(num2, num3, ref CS$<>8__locals1) && endFunc(CS$<>8__locals1.p))
911 for (
int l = 0; l < num; l++)
914 if (this.<ForeachNearestPoint>g__IsValid|147_0(num2, num3, ref CS$<>8__locals1) && endFunc(CS$<>8__locals1.p))
920 for (
int m = 0; m < num; m++)
923 if (this.<ForeachNearestPoint>g__IsValid|147_0(num2, num3, ref CS$<>8__locals1) && endFunc(CS$<>8__locals1.p))
929 Debug.Log(
"ForeachNearestPoint Fail:" + ((
this !=
null) ? this.ToString() :
null));
934 public Point GetRandomNeighbor()
936 int num = (
EClass.rnd(2) == 0) ? 1 : -1;
939 return new Point(Mathf.Clamp(
this.x + num, 0,
Point.map.Size - 1),
this.z);
941 return new Point(this.x, Mathf.Clamp(
this.z + num, 0,
Point.map.Size - 1));
945 public Point GetRandomPoint(
int radius,
bool requireLos =
true,
bool allowChara =
true,
bool allowBlocked =
false,
int tries = 100)
948 for (
int i = 0; i < tries; i++)
950 point.Set(this.x - radius +
EClass.rnd(radius * 2 + 1),
this.z - radius +
EClass.rnd(radius * 2 + 1));
951 if (point.IsValid && (allowBlocked || !point.IsBlocked) && (!requireLos ||
Los.IsVisible(
this, point,
null)) && (allowChara || !point.HasChara))
963 int num = dest.x - point.x;
964 int num2 = dest.z - point.z;
965 if (Mathf.Abs(num) > 1 || Mathf.Abs(num2) > 1)
967 int num3 = Mathf.Max(Mathf.Abs(num), Mathf.Abs(num2));
968 point.x += num / num3;
969 point.z += num2 / num3;
975 public void TalkWitnesses(
Chara criminal,
string idTalk,
int radius = 4, WitnessType type = WitnessType.everyone, Func<Chara, bool> talkIf =
null,
int chance = 3)
981 foreach (
Chara chara
in this.ListWitnesses(criminal, radius, type,
null))
983 if (talkIf(chara) && !chara.renderer.IsTalking())
985 chara.Talk(idTalk,
null,
null,
false);
991 public List<Chara> ListWitnesses(
Chara criminal,
int radius = 4, WitnessType type = WitnessType.crime,
Chara target =
null)
993 List<Chara> list =
new List<Chara>();
994 foreach (
Point point
in Point.map.ListPointsInCircle(
this, (
float)radius,
false,
true))
997 List<Chara> list2 = (detail !=
null) ? detail.charas :
null;
998 if (list2 !=
null && list2.Count != 0)
1000 foreach (
Chara chara
in list2)
1002 if (chara != criminal && !chara.IsPC && (chara == target || chara.CanWitness) && (!chara.HasCondition<
ConDim>() ||
EClass.rnd(2) != 0) && chara.conSuspend ==
null && !chara.isParalyzed && !chara.IsDisabled)
1006 case WitnessType.crime:
1007 if (criminal ==
null || chara.isBlind || chara.isConfused || (criminal.IsPCParty && (chara.IsPCFaction || chara.IsPCFactionMinion)))
1013 if (chara.OriginalHostility < Hostility.Neutral)
1018 else if (!target.IsFriendOrAbove(chara))
1023 case WitnessType.music:
1024 if (chara.hostility <= Hostility.Enemy)
1029 case WitnessType.ally:
1030 if (!criminal.IsPCFaction)
1034 if (chara.hostility <= Hostility.Neutral)
1049 public bool TryWitnessCrime(
Chara criminal,
Chara target =
null,
int radius = 4, Func<Chara, bool> funcWitness =
null)
1051 List<Chara> list = this.ListWitnesses(criminal, radius, WitnessType.crime, target);
1052 bool result =
false;
1053 if (funcWitness ==
null)
1057 foreach (
Chara chara
in list)
1059 if (funcWitness(chara))
1061 this.CallGuard(criminal, chara);
1065 target.DoHostileAction(criminal,
false);
1067 if (chara != target)
1069 chara.DoHostileAction(criminal,
false);
1079 public void CallGuard(
Chara criminal,
Chara caller)
1081 caller.Talk(
"callGuards",
null,
null,
false);
1082 List<Chara> list = (from c in EClass._map.charas
1084 select c).ToList<Chara>();
1088 caller.Say(
"calledGuard", caller,
null,
null);
1089 chara.DoHostileAction(criminal,
false);
1094 public void SetBlock(
int idMat = 0,
int idBlock = 0)
1096 Point.map.SetBlock(this.x, this.z, idMat, idBlock);
1100 public void SetFloor(
int idMat = 0,
int idFloor = 0)
1102 Point.map.SetFloor(this.x, this.z, idMat, idFloor);
1106 public void SetObj(
int id = 0,
int value = 1,
int dir = 0)
1108 Point.map.SetObj(this.x, this.z,
id, value, dir);
1112 public void ModFire(
int value)
1114 Point.map.ModFire(this.x, this.z, value);
1120 if (this.IsFarmField)
1122 if (this.cell.Right.HasWallOrFence)
1124 this.Set(this.cell.Right.GetPoint());
1126 else if (this.cell.Front.HasWallOrFence)
1128 this.Set(this.cell.Front.GetPoint());
1131 this.SetFloor(4, 4);
1135 public bool Equals(
int _x,
int _z)
1137 return this.x == _x && this.z == _z;
1141 public override bool Equals(
object obj)
1146 Point point2 = point;
1147 string str = (point2 !=
null) ? point2.ToString() :
null;
1149 Type type = point.GetType();
1150 Debug.Log(str + str2 + ((type !=
null) ? type.ToString() :
null) +
"is not Point");
1153 return this.x == point.x && this.z == point.z;
1157 public override int GetHashCode()
1159 return this.x + this.z *
Point.map.Size;
1163 public int Distance(
Point p)
1165 return Fov.Distance(p.x, p.z,
this.x,
this.z);
1169 public int Distance(
int tx,
int tz)
1171 return Fov.Distance(tx, tz, this.x, this.z);
1175 public bool IsBlockByHeight(
Point p)
1177 return Mathf.Abs((
int)(p.cell.minHeight -
this.cell.topHeight)) > 8 && Mathf.Abs((
int)(p.cell.topHeight -
this.cell.minHeight)) > 8;
1181 public Point Clamp(
bool useBounds =
false)
1185 if (this.x <
Point.map.bounds.x)
1187 this.x =
Point.map.bounds.x;
1189 else if (this.x >=
Point.map.bounds.maxX)
1191 this.x =
Point.map.bounds.maxX;
1193 if (this.z <
Point.map.bounds.z)
1195 this.z =
Point.map.bounds.z;
1197 else if (this.z >=
Point.map.bounds.maxZ)
1199 this.z =
Point.map.bounds.maxZ;
1208 else if (this.x >=
Point.map.Size)
1210 this.x = Point.map.Size - 1;
1216 else if (this.z >=
Point.map.Size)
1218 this.z = Point.map.Size - 1;
1225 public List<Card> ListCards(
bool includeMasked =
false)
1227 Point.listCard.Clear();
1228 bool flag = EClass.scene.actionMode !=
null &&
EClass.scene.actionMode.IsRoofEditMode(
null);
1229 if (this.detail !=
null)
1231 foreach (
Thing thing
in this.detail.things)
1233 if (!thing.isHidden && (includeMasked || !thing.isMasked) && thing.isRoofItem == flag)
1235 Point.listCard.Add(thing);
1240 foreach (
Chara item
in this.detail.charas)
1242 Point.listCard.Add(item);
1246 return Point.listCard;
1250 public List<Card> ListVisibleCards()
1252 Point.listCard.Clear();
1253 if (this.detail !=
null)
1255 foreach (
Thing thing
in this.detail.things)
1257 if (!thing.isHidden && !thing.isMasked && !thing.isRoofItem)
1259 Point.listCard.Add(thing);
1262 foreach (
Chara chara
in this.detail.charas)
1264 if (
EClass.pc.CanSee(chara))
1266 Point.listCard.Add(chara);
1270 return Point.listCard;
1274 public Card FindAttackTarget()
1276 foreach (
Card card
in this.ListCards(
false))
1278 if (card.isChara || card.trait.CanBeAttacked)
1287 public T FindThing<T>() where T :
Trait
1289 if (this.detail !=
null)
1291 foreach (
Thing thing
in this.detail.things)
1293 if (thing.trait is T)
1295 return thing.trait as T;
1303 public List<Card> ListThings<T>(
bool onlyInstalled =
true) where T :
Trait
1305 Point.listCard.Clear();
1306 if (this.detail !=
null)
1308 foreach (
Thing thing
in this.detail.things)
1310 if (!thing.isHidden && !thing.isRoofItem && !thing.isMasked && (!onlyInstalled || thing.IsInstalled) && thing.trait is T)
1312 Point.listCard.Add(thing);
1316 return Point.listCard;
1320 public List<Chara> ListCharas()
1322 Point.listChara.Clear();
1323 if (this.detail !=
null)
1325 foreach (
Chara item
in this.detail.charas)
1327 Point.listChara.Add(item);
1330 return Point.listChara;
1334 public List<Chara> ListVisibleCharas()
1336 Point.listChara.Clear();
1337 if (this.detail !=
null)
1339 foreach (
Chara chara
in this.detail.charas)
1341 if (
EClass.pc.CanSee(chara))
1343 Point.listChara.Add(chara);
1347 return Point.listChara;
1351 public List<Chara> ListCharasInNeighbor(Func<Chara, bool> func)
1353 Point.listChara.Clear();
1354 this.ForeachNeighbor(delegate(
Point p)
1356 if (p.detail ==
null)
1360 foreach (
Chara chara
in p.detail.charas)
1364 Point.listChara.Add(chara);
1368 return Point.listChara;
1372 public List<Chara> ListCharasInRadius(
Chara cc,
int dist, Func<Chara, bool> func)
1374 Point.listChara.Clear();
1377 if (func(chara) && chara.Dist(cc) < dist &&
Los.IsVisible(chara, cc))
1379 Point.listChara.Add(chara);
1382 return Point.listChara;
1386 public T GetInstalled<T>() where T :
Trait
1388 if (this.detail !=
null)
1390 foreach (
Thing thing
in this.detail.things)
1392 if (thing.IsInstalled && thing.trait is T)
1394 return thing.trait as T;
1402 public Effect PlayEffect(
string id)
1404 return Effect.Get(
id).Play(
this, 0f,
null,
null);
1408 public unsafe SoundSource PlaySound(
string id,
bool synced =
true,
float v = 1f,
bool spatial =
true)
1410 Vector3 vector =
default(Vector3);
1417 vector = (EClass._zone.IsRegion ? (*this.PositionTopdown()) : (*this.Position()));
1419 if (Vector3.Distance(vector,
EClass.scene.transAudio.position) >
EClass.core.gameSetting.audio.maxRange)
1428 return EClass.Sound.Play(
id, vector, (!spatial) ? 1f : (v * ((
EClass.screen.Zoom >= 1f) ? 1f :
EClass.screen.Zoom)));
1432 public void RefreshNeighborTiles()
1434 Point.map.RefreshNeighborTiles(this.x, this.z);
1438 public void RefreshTile()
1440 Point.map.RefreshSingleTile(this.x, this.z);
1444 public bool HasNonHomeProperty(
Thing exclude =
null)
1446 if (this.FirstThing ==
null)
1450 foreach (
Thing thing
in this.detail.things)
1452 if (thing != exclude && thing.isNPCProperty)
1461 public void Animate(AnimeID
id,
bool animeBlock =
false)
1467 CellDetail orCreateDetail = this.cell.GetOrCreateDetail();
1468 if (orCreateDetail.anime !=
null)
1474 data = ResourceCache.Load<
TransAnimeData>(
"Scene/Render/Anime/" +
id.ToString()),
1476 animeBlock = animeBlock
1478 orCreateDetail.anime = transAnime;
1479 EClass._map.pointAnimes.Add(transAnime);
1480 if (
id == AnimeID.Quake)
1482 transAnime.drawBlock =
true;
1489 if (this.detail ==
null || this.detail.anime ==
null)
1493 p.x += this.detail.anime.v.x;
1494 p.y += this.detail.anime.v.y;
1495 p.z += this.detail.anime.v.z;
1496 p.v.x = p.v.x + this.detail.anime.v.x;
1497 p.v.y = p.v.y + this.detail.anime.v.y;
1498 p.v.z = p.v.z + this.detail.anime.v.z;
1503 public Vector3 ApplyAnime(ref Vector3 p)
1505 if (this.detail ==
null || this.detail.anime ==
null)
1509 p.x += this.detail.anime.v.x;
1510 p.y += this.detail.anime.v.y;
1511 p.z += this.detail.anime.v.z;
1516 public List<IInspect> ListInspectorTargets()
1518 List<IInspect> list =
new List<IInspect>();
1522 foreach (
Chara chara
in detail.charas)
1529 foreach (
Thing item
in detail.things)
1533 if (detail.designation !=
null && !(detail.designation is
TaskCut) && !(detail.designation is
TaskMine))
1535 list.Add(detail.designation);
1538 if (
ObjInfo._CanInspect(
this))
1540 list.Add(
ObjInfo.GetTempList(
this));
1550 public void ForeachMultiSize(
int w,
int h, Action<Point, bool> action)
1552 for (
int i = 0; i < h; i++)
1554 for (
int j = 0; j < w; j++)
1556 Point.shared3.Set(this.x - j, this.z + i);
1557 action(
Point.shared3, j == 0 && i == 0);
1563 public void ForeachNeighbor(Action<Point> action,
bool diagonal =
true)
1566 for (
int i = this.x - 1; i <= this.x + 1; i++)
1568 for (
int j = this.z - 1; j <= this.z + 1; j++)
1570 if (diagonal || i == this.x || j == this.z)
1583 public Point ToRegionPos()
1586 point.x +=
EClass.scene.elomap.minX;
1587 point.z +=
EClass.scene.elomap.minY;
1593 private bool <GetNearestPoint>g__IsValid|146_0(
int dx,
int dz, ref
Point.<>c__DisplayClass146_0 A_3)
1596 return A_3.p.IsInBounds &&
Point.map.Contains(dx, dz) && (!A_3.ignoreCenter || dx != this.x || dz != this.z) && (A_3.allowBlock || (!A_3.p.cell.blocked && !A_3.p.cell.hasDoor && (A_3.p.cell.growth ==
null || !A_3.p.cell.growth.IsTree))) && (A_3.allowChara || !A_3.p.HasChara) && (A_3.allowInstalled || A_3.p.Installed ==
null);
1601 private bool <ForeachNearestPoint>g__IsValid|147_0(
int dx,
int dz, ref
Point.<>c__DisplayClass147_0 A_3)
1604 return A_3.p.IsInBounds &&
Point.map.Contains(dx, dz) && (!A_3.ignoreCenter || dx != this.x || dz != this.z) && (A_3.allowBlock || (!A_3.p.cell.blocked && !A_3.p.cell.hasDoor && (A_3.p.cell.growth ==
null || !A_3.p.cell.growth.IsTree))) && (A_3.allowChara || !A_3.p.HasChara) && (A_3.allowInstalled || A_3.p.Installed ==
null);
1608 public static readonly
XY[] Surrounds =
new XY[]
1617 public static Vector3 fixedPos;
1629 public static Map map;
1649 private Vector3 vCache;
1655 private static List<Card> listCard =
new List<Card>();
1658 private static List<Chara> listChara =
new List<Chara>();