Elin Decompiled Documentation EA 23.359.1 Nightly
Loading...
Searching...
No Matches
Point Class Reference
Inheritance diagram for Point:
EClass LogicalPoint RegionPoint LogicalFire

Public Member Functions

bool Within (int _x, int _z, int _w, int _h)
 
Chara FirstVisibleChara ()
 
bool HasRoomOrArea (BaseArea a)
 
bool IsInSpot< T > ()
 
bool IsPublicSpace ()
 
 Point ()
 
 Point (Point p)
 
 Point (int _x, int _z)
 
 Point (int _index)
 
Point Copy ()
 
T Copy< T > ()
 
Point Set (int _x, int _z)
 
Point Set (int index)
 
Point Set (Point point)
 
override string ToString ()
 
void Set (Vector3 v)
 
ref Vector3 PositionAuto ()
 
ref Vector3 Position (int height)
 
ref Vector3 Position ()
 
ref Vector3 PositionTopdown ()
 
ref Vector3 PositionTopdownTreasure ()
 
ref Vector3 PositionCenter ()
 
Quaternion GetRotation (Point to)
 
float GetAngle (Point to)
 
float GetAngle2 (Point to)
 
Point GetNearestPoint (bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
 
bool ForeachNearestPoint (Func< Point, bool > endFunc, bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int maxRange=30)
 
Point GetRandomNeighbor ()
 
Point GetRandomPoint (int radius, bool requireLos=true, bool allowChara=true, bool allowBlocked=false, int tries=100)
 
Point GetRandomPointInRadius (int minRadius, int maxRadius, bool requireLos=true, bool allowChara=true, bool allowBlocked=false, int tries=2000)
 
Point GetPointTowards (Point dest)
 
void TalkWitnesses (Chara criminal, string idTalk, int radius=4, WitnessType type=WitnessType.everyone, Func< Chara, bool > talkIf=null, int chance=3)
 
List< Chara > ListWitnesses (Chara criminal, int radius=4, WitnessType type=WitnessType.crime, Chara target=null)
 
bool TryWitnessCrime (Chara criminal, Chara target=null, int radius=4, Func< Chara, bool > funcWitness=null)
 
void CallGuard (Chara criminal, Chara caller)
 
void SetBlock (int idMat=0, int idBlock=0)
 
void SetFloor (int idMat=0, int idFloor=0)
 
void SetObj (int id=0, int value=1, int dir=0)
 
void ModFire (int value, bool extinguish=false)
 
void Plow ()
 
bool Equals (int _x, int _z)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
int Distance (Point p)
 
int Distance (int tx, int tz)
 
bool IsBlockByHeight (Point p)
 
Point Clamp (bool useBounds=false)
 
List< Card > ListCards (bool includeMasked=false)
 
List< Card > ListVisibleCards ()
 
Card FindAttackTarget ()
 
Chara FindChara (Func< Chara, bool > func)
 
T FindThing< T > ()
 
Thing FindThing (Func< Thing, bool > func)
 
List< Card > ListThings< T > (bool onlyInstalled=true)
 
List< Chara > ListCharas ()
 
List< Chara > ListVisibleCharas ()
 
List< Chara > ListCharasInNeighbor (Func< Chara, bool > func)
 
List< Chara > ListCharasInRadius (Chara cc, int dist, Func< Chara, bool > func, bool onlyVisible=true)
 
T GetInstalled< T > ()
 
Effect PlayEffect (string id)
 
SoundSource PlaySound (string id, bool synced=true, float v=1f, bool spatial=true)
 
void RefreshNeighborTiles ()
 
void RefreshTile ()
 
bool HasNonHomeProperty (Thing exclude=null)
 
void Animate (AnimeID id, bool animeBlock=false)
 
RenderParam ApplyAnime (RenderParam p)
 
Vector3 ApplyAnime (ref Vector3 p)
 
List< IInspect > ListInspectorTargets ()
 
void ForeachMultiSize (int w, int h, Action< Point, bool > action)
 
void ForeachNeighbor (Action< Point > action, bool diagonal=true)
 
Point ToRegionPos ()
 
void SetHighlight (int id)
 

Static Public Member Functions

static Point GetShared (int x, int z)
 
static Point operator+ (Point lhs, Point rhs)
 
- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (long a)
 
static int rnd (int a)
 
static int curve (long _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 

Public Attributes

int x
 
int z
 

Static Public Attributes

static readonly XY[] Surrounds
 
static Vector3 fixedPos
 
static Point shared = new Point()
 
static Point shared2 = new Point()
 
static Point shared3 = new Point()
 
static Map map
 
static Point Invalid
 
static Point Zero = new Point()
 
static BaseGameScreen _screen
 
- Static Public Attributes inherited from EClass
static Core core
 

Properties

int index [get]
 
Cell cell [get]
 
SourceMaterial.Row matRoofBlock [get]
 
SourceMaterial.Row matBlock [get]
 
SourceMaterial.Row matFloor [get]
 
SourceMaterial.Row matBridge [get]
 
SourceBlock.Row sourceRoofBlock [get]
 
SourceBlock.Row sourceBlock [get]
 
SourceFloor.Row sourceFloor [get]
 
SourceFloor.Row sourceBridge [get]
 
SourceObj.Row sourceObj [get]
 
CellDetail detail [get]
 
Area area [get]
 
Point Front [get]
 
GrowSystem growth [get]
 
int eloX [get]
 
int eloY [get]
 
bool HasDesignation [get]
 
bool HasDirt [get]
 
bool IsValid [get, set]
 
bool IsInBounds [get]
 
bool IsInBoundsPlus [get]
 
bool IsFarmField [get]
 
bool IsWater [get]
 
bool HasRamp [get]
 
bool HasRail [get]
 
bool HasRampOrLadder [get]
 
bool HasObj [get]
 
bool HasDecal [get]
 
bool HasBlock [get]
 
bool HasMinableBlock [get]
 
bool HasWallOrFence [get]
 
bool HasWall [get]
 
bool HasFence [get]
 
bool IsSunLit [get]
 
bool HasNonWallBlock [get]
 
bool HasTaskBuild [get]
 
bool HasBlockRecipe [get]
 
bool HasFloor [get]
 
bool HasBridge [get]
 
bool IsSky [get]
 
bool HasArea [get]
 
bool HasChara [get]
 
bool HasThing [get]
 
bool HasMultipleChara [get]
 
bool IsDeepWater [get]
 
Chara FirstChara [get]
 
Thing FirstThing [get]
 
Thing LastThing [get]
 
Thing Installed [get]
 
List< Thing > Things [get]
 
List< Chara > Charas [get]
 
bool IsSeen [get]
 
bool IsSync [get]
 
bool IsHidden [get]
 
bool IsBlocked [get]
 
bool IsHotSpring [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Private Attributes

Vector3 vCache
 

Detailed Description

Definition at line 8 of file Point.cs.

Constructor & Destructor Documentation

◆ Point() [1/4]

Point.Point ( )
inline

◆ Point() [2/4]

Point.Point ( Point  p)
inline

Definition at line 470 of file Point.cs.

471 {
472 x = p.x;
473 z = p.z;
474 }
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39

References x, and z.

◆ Point() [3/4]

Point.Point ( int  _x,
int  _z 
)
inline

Definition at line 476 of file Point.cs.

477 {
478 x = _x;
479 z = _z;
480 }

References x, and z.

◆ Point() [4/4]

Point.Point ( int  _index)
inline

Definition at line 482 of file Point.cs.

483 {
484 Set(_index);
485 }
Point Set(int _x, int _z)
Definition: Point.cs:499

References Set().

Member Function Documentation

◆ Animate()

void Point.Animate ( AnimeID  id,
bool  animeBlock = false 
)
inline

Definition at line 1304 of file Point.cs.

1305 {
1306 if (!IsValid)
1307 {
1308 return;
1309 }
1310 CellDetail orCreateDetail = cell.GetOrCreateDetail();
1311 if (orCreateDetail.anime == null)
1312 {
1313 TransAnime transAnime = (orCreateDetail.anime = new TransAnime
1314 {
1315 data = ResourceCache.Load<TransAnimeData>("Scene/Render/Anime/" + id),
1316 point = this,
1317 animeBlock = animeBlock
1318 }.Init());
1319 EClass._map.pointAnimes.Add(transAnime);
1320 if (id == AnimeID.Quake)
1321 {
1322 transAnime.drawBlock = true;
1323 }
1324 }
1325 }
AnimeID
Definition: AnimeID.cs:2
TransAnime anime
Definition: CellDetail.cs:21
CellDetail GetOrCreateDetail()
Definition: Cell.cs:1605
Definition: EClass.cs:6
static Map _map
Definition: EClass.cs:19
List< TransAnime > pointAnimes
Definition: Map.cs:86
bool IsValid
Definition: Point.cs:84
Cell cell
Definition: Point.cs:47

References EClass._map, CellDetail.anime, and Map.pointAnimes.

Referenced by ActMelee.Attack(), ActEffect.DamageEle(), TaskDrawWater.OnCreateProgress(), TaskHarvest.OnCreateProgress(), TaskMine.OnCreateProgress(), TaskPlow.OnCreateProgress(), TaskPourWater.OnCreateProgress(), EffectMeteor.OnPlay(), TaskCut.OnProgress(), TaskDig.OnProgressComplete(), ActBash.Perform(), and Map.Quake().

◆ ApplyAnime() [1/2]

Vector3 Point.ApplyAnime ( ref Vector3  p)
inline

Definition at line 1342 of file Point.cs.

1343 {
1344 if (detail == null || detail.anime == null)
1345 {
1346 return p;
1347 }
1348 p.x += detail.anime.v.x;
1349 p.y += detail.anime.v.y;
1350 p.z += detail.anime.v.z;
1351 return p;
1352 }
CellDetail detail
Definition: Point.cs:67
Vector3 v
Definition: TransAnime.cs:5

◆ ApplyAnime() [2/2]

RenderParam Point.ApplyAnime ( RenderParam  p)
inline

Definition at line 1327 of file Point.cs.

1328 {
1329 if (detail == null || detail.anime == null)
1330 {
1331 return p;
1332 }
1333 p.x += detail.anime.v.x;
1334 p.y += detail.anime.v.y;
1335 p.z += detail.anime.v.z;
1336 p.v.x += detail.anime.v.x;
1337 p.v.y += detail.anime.v.y;
1338 p.v.z += detail.anime.v.z;
1339 return p;
1340 }

References RenderParam.v.

Referenced by Recipe.OnRenderMarker(), and Card.RenderMarker().

◆ CallGuard()

void Point.CallGuard ( Chara  criminal,
Chara  caller 
)
inline

Definition at line 899 of file Point.cs.

900 {
901 if (caller.HasCondition<ConSleep>())
902 {
903 caller.RemoveCondition<ConSleep>();
904 }
905 caller.Talk("callGuards");
906 List<Chara> list = EClass._map.charas.Where((Chara c) => c.trait is TraitGuard && !c.IsInCombat).ToList();
907 if (list.Count > 0)
908 {
909 list.Sort((Chara a, Chara b) => a.Dist(criminal) - b.Dist(criminal));
910 Chara chara = list.First();
911 caller.Say("calledGuard", caller);
912 chara.DoHostileAction(criminal);
913 }
915 {
916 EClass._zone.SetAlarm(enable: true);
917 }
918 }
bool IsPCFactionOrMinion
Definition: Card.cs:2342
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:7211
int Dist(Card c)
Definition: Card.cs:8246
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7329
Definition: Chara.cs:10
bool IsInCombat
Definition: Chara.cs:920
bool HasCondition(string alias)
Definition: Chara.cs:10094
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:6797
static Zone _zone
Definition: EClass.cs:21
List< Chara > charas
Definition: Map.cs:84
bool isAlarmSet
Definition: Spatial.cs:430
virtual bool SetAlarmOnBreakLaw
Definition: Zone.cs:238
virtual void SetAlarm(bool enable)
Definition: Zone.cs:3893

References EClass._map, EClass._zone, Map.charas, Card.Dist(), Chara.DoHostileAction(), Chara.HasCondition(), Spatial.isAlarmSet, Chara.IsInCombat, Card.IsPCFactionOrMinion, Card.Say(), Zone.SetAlarm(), Zone.SetAlarmOnBreakLaw, and Card.Talk().

Referenced by TryWitnessCrime().

◆ Clamp()

Point Point.Clamp ( bool  useBounds = false)
inline

Definition at line 1010 of file Point.cs.

1011 {
1012 if (useBounds)
1013 {
1014 if (x < map.bounds.x)
1015 {
1016 x = map.bounds.x;
1017 }
1018 else if (x >= map.bounds.maxX)
1019 {
1020 x = map.bounds.maxX;
1021 }
1022 if (z < map.bounds.z)
1023 {
1024 z = map.bounds.z;
1025 }
1026 else if (z >= map.bounds.maxZ)
1027 {
1028 z = map.bounds.maxZ;
1029 }
1030 }
1031 else
1032 {
1033 if (x < 0)
1034 {
1035 x = 0;
1036 }
1037 else if (x >= map.Size)
1038 {
1039 x = map.Size - 1;
1040 }
1041 if (z < 0)
1042 {
1043 z = 0;
1044 }
1045 else if (z >= map.Size)
1046 {
1047 z = map.Size - 1;
1048 }
1049 }
1050 return this;
1051 }
int Size
Definition: MapBounds.cs:20
int maxZ
Definition: MapBounds.cs:17
int maxX
Definition: MapBounds.cs:14
int x
Definition: MapBounds.cs:8
MapBounds bounds
Definition: Map.cs:55
static Map map
Definition: Point.cs:26

References Map.bounds, map, MapBounds.maxX, MapBounds.maxZ, MapBounds.Size, MapBounds.x, x, MapBounds.z, and z.

Referenced by Zone.AddGlobalCharasOnActivate(), Crawler.Crawl(), BaseTileMap.Draw(), POIMap.Cell.GetCenter(), FactionBranch.GetMailBoxPos(), Map.GetRandomPoint(), MapBounds.GetSurface(), MapGen.MakeNeighbor(), WidgetMinimap.OnPointerDown(), AM_Cinema.OnUpdateInput(), and GameUpdater.Update().

◆ Copy()

Point Point.Copy ( )
inline

Definition at line 487 of file Point.cs.

488 {
489 return new Point(x, z);
490 }
Point()
Definition: Point.cs:466

References Point(), x, and z.

Referenced by AM_Sim._OnUpdateInput(), ActPlan._Update(), RoomManager.AddArea(), ActMelee.Attack(), AM_Adv.AxisMove(), AI_Shopping.Buy(), GoalManualMove.CanMove(), CoreDebug.COM_Teleport(), Crawler.Crawl(), EffectMeteor.Create(), EffectMeteor.CreateComet(), Chara.CreateReplacement(), ActEffect.DamageEle(), Player.EnterLocalZone(), AreaTypeFarm.GetAI(), Chara.GetDestination(), PathManager.GetFirstStep(), TaskPoint.GetHitResult(), LayerInspect.GetMenuItems(), AIWork_Fish.GetWork(), Card.HatchEgg(), TaskWater.ListPoints(), Trait.ListPoints(), TraitLightSun.ListPoints(), Los.ListVisible(), SurvivalManager.MeteorThing(), Chara.MoveNeighborDefinitely(), TraitNewZone.MoveZone(), ActBolt.OnMarkMapHighlights(), AM_ExpandArea.OnProcessTiles(), AM_MoveInstalled.OnProcessTiles(), InspectGroupBlock.OnSetActions(), InspectGroupObj.OnSetActions(), BaseTileSelector.OnUpdate(), ActRanged.Perform(), ActPlan.Item.Perform(), EffectIRenderer.Play(), Effect.Play(), AttackProcess.PlayRangedAnime(), ActEffect.Proc(), ActEffect.ProcAt(), Map.Quake(), ReligionManager.Reforge(), WidgetSearch.RefreshList(), SerializedCards.Restore(), AI_Fish.Run(), TaskDump.Run(), LayerCraftFloat.ShowContextMenu(), Player.SimulateFaction(), ActThrow.Throw(), RoomManager.TryAddArea(), TaskHarvest.TryGetAct(), Card.TryMoveFrom(), BaseTileSelector.TryProcessTiles(), ActPlan.TrySetAct(), HotItemHeld.TrySetAct(), TraitBroom.TrySetHeldAct(), ButtonAbility.TryUse(), WidgetDebug.UpdateText(), and VirtualRoom.VirtualRoom().

◆ Copy< T >()

T Point.Copy< T > ( )
inline
Type Constraints
T :Point 

Definition at line 492 of file Point.cs.

492 : Point
493 {
494 T val = Activator.CreateInstance<T>();
495 val.Set(this);
496 return val;
497 }
Definition: Point.cs:9

References Set().

◆ Distance() [1/2]

int Point.Distance ( int  tx,
int  tz 
)
inline

Definition at line 996 of file Point.cs.

997 {
998 return Fov.Distance(tx, tz, x, z);
999 }
Definition: Fov.cs:6
static int Distance(int x1, int y1, int x2, int y2)
Definition: Fov.cs:134

References Fov.Distance(), x, and z.

◆ Distance() [2/2]

◆ Equals() [1/2]

bool Point.Equals ( int  _x,
int  _z 
)
inline

Definition at line 962 of file Point.cs.

963 {
964 if (x == _x)
965 {
966 return z == _z;
967 }
968 return false;
969 }

References x, and z.

Referenced by ActPlan._Update(), Zone.AddGlobalCharasOnActivate(), ActMelee.Attack(), GoalManualMove.CanMove(), ActTelekinesis.CanPerform(), Chara.CanReplace(), PointTarget.CheckLastTarget(), EffectMeteor.Create(), ActEffect.DamageEle(), ActionMode.DoFunc(), CharaRenderer.DrawHat(), ActPlan.GetAction(), TaskBuild.GetHitResult(), TaskMine.GetHitResult(), AI_Trolley.GetPoint(), Los.GetRushPoint(), Zone.GetSpawnPos(), ObjInfo.GetTemp(), BlockInfo.GetTempList(), ObjInfo.GetTempList(), AM_Build.HitTest(), IsInSpot< T >(), TraitShackle.IsRestraining(), Chara.MoveRandom(), ActRush.OnMarkMapHighlights(), AI_Sleep.OnProgressComplete(), TraitNewZone.OnStepped(), AM_Adv.OnUpdateCursor(), TraitGeneMachine.OnUse(), ActMissileBarrage.Perform(), ActMissileBarrage2.Perform(), ActMoneyDump.Perform(), ActRanged.Perform(), ActTelekinesis.Perform(), ActWhirlwind.Perform(), AM_Adv.PressedActionMove(), ActEffect.Proc(), BaseTileSelector.ProcessFillTiles(), WidgetMouseover.Refresh(), AM_Adv.RefreshArrow(), BaseTileSelector.RefreshMouseInfo(), Area.RemovePoint(), SerializedCards.Restore(), AI_Bladder.Run(), AI_Idle.Run(), AI_Torture.Run(), AI_UseCrafter.Run(), GoalManualMove.Run(), AM_Adv.SetPressedAction(), Chara.Stumble(), Chara.SyncRide(), Player.TargetRanged(), ActThrow.Throw(), Chara.Tick(), AI_Goto.TryGoTo(), MapGen.TryMakeRiver(), GoalManualMove.TryMove(), Card.TryMoveFrom(), Chara.TryMoveTowards(), HotItemHeld.TrySetAct(), TraitGene.TrySetHeldAct(), Map.TrySmoothPick(), and CharaRenderer.UpdatePosition().

◆ Equals() [2/2]

override bool Point.Equals ( object  obj)
inline

Definition at line 971 of file Point.cs.

972 {
973 Point point = obj as Point;
974 if (point == null)
975 {
976 Debug.Log(point?.ToString() + ":" + point.GetType()?.ToString() + "is not Point");
977 return false;
978 }
979 if (x == point.x)
980 {
981 return z == point.z;
982 }
983 return false;
984 }
override string ToString()
Definition: Point.cs:520

References Debug, Point(), ToString(), x, and z.

◆ FindAttackTarget()

Card Point.FindAttackTarget ( )
inline

Definition at line 1100 of file Point.cs.

1101 {
1102 foreach (Card item in ListCards())
1103 {
1104 if (item.isChara || item.trait.CanBeAttacked)
1105 {
1106 return item;
1107 }
1108 }
1109 return null;
1110 }
Definition: Card.cs:11
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1053

References item, and ListCards().

Referenced by ActRanged.Perform(), and ActThrow.Throw().

◆ FindChara()

Chara Point.FindChara ( Func< Chara, bool >  func)
inline

Definition at line 1112 of file Point.cs.

1113 {
1114 if (detail != null)
1115 {
1116 foreach (Chara chara in detail.charas)
1117 {
1118 if (func(chara))
1119 {
1120 return chara;
1121 }
1122 }
1123 }
1124 return null;
1125 }
List< Chara > charas
Definition: CellDetail.cs:13

References CellDetail.charas, and detail.

Referenced by TaskCullLife.CanPerform(), and TaskCullLife.Run().

◆ FindThing()

Thing Point.FindThing ( Func< Thing, bool >  func)
inline

Definition at line 1142 of file Point.cs.

1143 {
1144 if (detail != null)
1145 {
1146 foreach (Thing thing in detail.things)
1147 {
1148 if (func(thing))
1149 {
1150 return thing;
1151 }
1152 }
1153 }
1154 return null;
1155 }
List< Thing > things
Definition: CellDetail.cs:11
Definition: Thing.cs:8

References detail, and CellDetail.things.

Referenced by AM_Adv._OnUpdateInput(), ActPlan._Update(), Zone.AddGlobalCharasOnActivate(), Hobby.GetEfficiency(), TaskChopWood.GetLog(), ConSleep.OnBeforeStart(), ConSleep.OnRemoved(), ActRanged.Perform(), AI_Idle.Run(), and ConSuspend.Tick().

◆ FindThing< T >()

T Point.FindThing< T > ( )
inline
Type Constraints
T :Trait 

Definition at line 1127 of file Point.cs.

1127 : Trait
1128 {
1129 if (IsValid && detail != null)
1130 {
1131 foreach (Thing thing in detail.things)
1132 {
1133 if (thing.trait is T)
1134 {
1135 return thing.trait as T;
1136 }
1137 }
1138 }
1139 return null;
1140 }
Trait trait
Definition: Card.cs:54
Definition: Trait.cs:7

References detail, IsValid, CellDetail.things, and Card.trait.

◆ FirstVisibleChara()

Chara Point.FirstVisibleChara ( )
inline

Definition at line 402 of file Point.cs.

403 {
404 if (detail != null)
405 {
406 foreach (Chara chara in detail.charas)
407 {
408 if (EClass.pc.CanSee(chara))
409 {
410 return chara;
411 }
412 }
413 }
414 return null;
415 }
bool CanSee(Card c)
Definition: Chara.cs:1302
static Chara pc
Definition: EClass.cs:15

References Chara.CanSee(), CellDetail.charas, detail, and EClass.pc.

Referenced by HotItemHeld.TrySetAct().

◆ ForeachMultiSize()

void Point.ForeachMultiSize ( int  w,
int  h,
Action< Point, bool >  action 
)
inline

Definition at line 1387 of file Point.cs.

1388 {
1389 for (int i = 0; i < h; i++)
1390 {
1391 for (int j = 0; j < w; j++)
1392 {
1393 shared3.Set(x - j, z + i);
1394 action(shared3, j == 0 && i == 0);
1395 }
1396 }
1397 }
static Point shared3
Definition: Point.cs:24

Referenced by Chara.DestroyPath(), UIInspector.DrawHighlight(), TraitBoat.ForeachDeck(), Card.ForeachPoint(), HotItemHeld.OnRenderTile(), AI_HaulResource.Run(), and TaskMoveInstalled.Run().

◆ ForeachNearestPoint()

bool Point.ForeachNearestPoint ( Func< Point, bool >  endFunc,
bool  allowBlock = false,
bool  allowChara = true,
bool  allowInstalled = true,
bool  ignoreCenter = false,
int  maxRange = 30 
)
inline

Definition at line 692 of file Point.cs.

693 {
694 Point p = new Point();
695 int num = 1;
696 int num2 = x;
697 int num3 = z;
698 if (IsValid(num2, num3) && endFunc(p))
699 {
700 return true;
701 }
702 if (IsValid(num2, num3 + 1) && endFunc(p))
703 {
704 return true;
705 }
706 for (int i = 0; i < maxRange; i++)
707 {
708 for (int j = 0; j < num; j++)
709 {
710 num2++;
711 if (IsValid(num2, num3) && endFunc(p))
712 {
713 return true;
714 }
715 }
716 for (int k = 0; k < num; k++)
717 {
718 num3++;
719 if (IsValid(num2, num3) && endFunc(p))
720 {
721 return true;
722 }
723 }
724 num++;
725 for (int l = 0; l < num; l++)
726 {
727 num2--;
728 if (IsValid(num2, num3) && endFunc(p))
729 {
730 return true;
731 }
732 }
733 for (int m = 0; m < num; m++)
734 {
735 num3--;
736 if (IsValid(num2, num3) && endFunc(p))
737 {
738 return true;
739 }
740 }
741 num++;
742 }
743 Debug.Log("ForeachNearestPoint Fail:" + this);
744 return false;
745 bool IsValid(int dx, int dz)
746 {
747 p.Set(dx, dz);
748 if (!p.IsInBounds || !map.Contains(dx, dz) || (ignoreCenter && dx == x && dz == z))
749 {
750 return false;
751 }
752 if ((!allowBlock && (p.cell.blocked || p.cell.hasDoor || (p.cell.growth != null && p.cell.growth.IsTree))) || (!allowChara && p.HasChara) || (!allowInstalled && p.Installed != null))
753 {
754 return false;
755 }
756 return true;
757 }
758 }
GrowSystem growth
Definition: Cell.cs:247
bool hasDoor
Definition: Cell.cs:279
virtual bool IsTree
Definition: GrowSystem.cs:101
bool Contains(int dx, int dz)
Definition: MapBounds.cs:38
Thing Installed
Definition: Point.cs:323
bool IsInBounds
Definition: Point.cs:100
bool HasChara
Definition: Point.cs:234

References Algorithms.WeightCell.blocked, cell, MapBounds.Contains(), Debug, Cell.growth, HasChara, Cell.hasDoor, Installed, IsInBounds, GrowSystem.IsTree, IsValid, map, Point(), Set(), x, and z.

◆ ForeachNeighbor()

void Point.ForeachNeighbor ( Action< Point >  action,
bool  diagonal = true 
)
inline

Definition at line 1399 of file Point.cs.

1400 {
1401 Point point = new Point();
1402 for (int i = x - 1; i <= x + 1; i++)
1403 {
1404 for (int j = z - 1; j <= z + 1; j++)
1405 {
1406 if (diagonal || i == x || j == z)
1407 {
1408 point.Set(i, j);
1409 if (point.IsValid)
1410 {
1411 action(point);
1412 }
1413 }
1414 }
1415 }
1416 }

References IsValid, and Set().

Referenced by ActMelee.Attack(), GrowSystem.EqualizePlants(), ListCharasInNeighbor(), Chara.MoveNeighborDefinitely(), ActMoneyDump.Perform(), ActRanged.Perform(), AI_Idle.Run(), and TraitSpotBiome.Update().

◆ GetAngle()

float Point.GetAngle ( Point  to)
inline

Definition at line 608 of file Point.cs.

609 {
610 Vector3 vector = to.Position() - Position();
611 return Mathf.Atan2(vector.y, vector.x) * 57.29578f;
612 }
ref Vector3 Position(int height)
Definition: Point.cs:549
ref Vector3 Position()
Definition: Point.cs:561

References Position().

Referenced by GetRotation().

◆ GetAngle2()

float Point.GetAngle2 ( Point  to)
inline

Definition at line 614 of file Point.cs.

615 {
616 int num = to.x - x;
617 return Mathf.Atan2(to.z - z, num) * 57.29578f;
618 }

References x, and z.

Referenced by Map.ListPointsInArc().

◆ GetHashCode()

override int Point.GetHashCode ( )
inline

Definition at line 986 of file Point.cs.

987 {
988 return x + z * map.Size;
989 }

References map, MapBounds.Size, x, and z.

◆ GetInstalled< T >()

T Point.GetInstalled< T > ( )
inline
Type Constraints
T :Trait 

Definition at line 1235 of file Point.cs.

1235 : Trait
1236 {
1237 if (detail != null)
1238 {
1239 foreach (Thing thing in detail.things)
1240 {
1241 if (thing.IsInstalled && thing.trait is T)
1242 {
1243 return thing.trait as T;
1244 }
1245 }
1246 }
1247 return null;
1248 }
bool IsInstalled
Definition: Card.cs:2451

References Card.IsInstalled, Card.things, and Card.trait.

◆ GetNearestPoint()

Point Point.GetNearestPoint ( bool  allowBlock = false,
bool  allowChara = true,
bool  allowInstalled = true,
bool  ignoreCenter = false,
int  minRadius = 0 
)
inline

Definition at line 620 of file Point.cs.

621 {
622 Point p = new Point();
623 int r = 1;
624 int num = x;
625 int num2 = z;
626 if (IsValid(num, num2))
627 {
628 return p;
629 }
630 if (IsValid(num, num2 + 1))
631 {
632 return p;
633 }
634 for (int i = 0; i < 30; i++)
635 {
636 for (int j = 0; j < r; j++)
637 {
638 num++;
639 if (IsValid(num, num2))
640 {
641 return p;
642 }
643 }
644 for (int k = 0; k < r; k++)
645 {
646 num2++;
647 if (IsValid(num, num2))
648 {
649 return p;
650 }
651 }
652 r++;
653 for (int l = 0; l < r; l++)
654 {
655 num--;
656 if (IsValid(num, num2))
657 {
658 return p;
659 }
660 }
661 for (int m = 0; m < r; m++)
662 {
663 num2--;
664 if (IsValid(num, num2))
665 {
666 return p;
667 }
668 }
669 r++;
670 }
671 p.Set(this);
672 return p;
673 bool IsValid(int dx, int dz)
674 {
675 p.Set(dx, dz);
676 if (minRadius > r / 2)
677 {
678 return false;
679 }
680 if (!p.IsInBounds || !map.Contains(dx, dz) || (ignoreCenter && dx == x && dz == z))
681 {
682 return false;
683 }
684 if ((!allowBlock && (p.cell.blocked || p.cell.hasDoor || (p.cell.growth != null && p.cell.growth.IsTree))) || (!allowChara && p.HasChara) || (!allowInstalled && p.Installed != null))
685 {
686 return false;
687 }
688 return true;
689 }
690 }

References Algorithms.WeightCell.blocked, cell, MapBounds.Contains(), Cell.growth, HasChara, Cell.hasDoor, Installed, IsInBounds, GrowSystem.IsTree, IsValid, map, Point(), Set(), x, and z.

Referenced by InvOwnerChaosOffering._OnProcess(), TraitShrine._OnUse(), Zone.AddGlobalCharasOnActivate(), Quest.AddResident(), Recipe.Build(), Zone.ClaimZone(), DramaOutcome.event_az(), ZonePreEnterBout.Execute(), CoreDebug.Fix_LostCore(), FactionBranch.GetMailBoxPos(), FortuneRollData.GetPrize(), MapBounds.GetRandomSpawnPos(), Zone.GetRandomVisitPos(), Chara.GetRevived(), ZoneEventRaid.GetSpawnPos(), Zone.GetSpawnPos(), ActEffect.GetTeleportPos(), Card.GiveBirth(), Card.HatchEgg(), TraitFoodEggFertilized.Incubate(), ListPeopleParty.JoinParty(), Card.Kick(), Chara.MoveHome(), Zone_Void.OnActivate(), FactionBranch.OnActivateZone(), FactionBranch.OnAfterSimulate(), TraitGeneratorHamster.OnDie(), TraitStrangePainting.OnDie(), TraitStrangeStatue.OnDie(), Zone_DungeonFairy.OnGenerateMap(), GrowSystemTree.OnHitFail(), SurvivalManager.OnMineWreck(), TraitDiary.OnRead(), QuestEscort.OnStart(), ZoneEventDefenseGame.OnVisit(), ActSummonGuard.Perform(), ActEffect.Proc(), ActEffect.ProcAt(), CoreDebug.QuickStart(), TraitBaseSpellbook.ReadFailEffect(), Chara.RequestProtection(), Zone.Revive(), Chara.Revive(), AI_Churyu.Run(), AI_Idle.Run(), GoalCombat.Run(), ZoneEventQuest.Spawn(), ReligionExtension.SpawnAltar(), ZoneEventQuest.SpawnBoss(), CoreDebug.SpawnBoss(), Card.SpawnLoot(), SurvivalManager.StartRaid(), CoreDebug.TestSpawn(), Chara.TryDropBossLoot(), Zone.TryGenerateBigDaddy(), Religion.TryGetGift(), Zone.TrySpawnFollower(), and Card.TryUnrestrain().

◆ GetPointTowards()

Point Point.GetPointTowards ( Point  dest)
inline

Definition at line 802 of file Point.cs.

803 {
804 Point point = new Point(this);
805 int num = dest.x - point.x;
806 int num2 = dest.z - point.z;
807 if (Mathf.Abs(num) > 1 || Mathf.Abs(num2) > 1)
808 {
809 int num3 = Mathf.Max(Mathf.Abs(num), Mathf.Abs(num2));
810 point.x += num / num3;
811 point.z += num2 / num3;
812 }
813 return point;
814 }

References Point(), x, and z.

Referenced by Chara.TryMoveTowards().

◆ GetRandomNeighbor()

Point Point.GetRandomNeighbor ( )
inline

Definition at line 760 of file Point.cs.

761 {
762 int num = ((EClass.rnd(2) == 0) ? 1 : (-1));
763 if (EClass.rnd(2) == 0)
764 {
765 return new Point(Mathf.Clamp(x + num, 0, map.Size - 1), z);
766 }
767 return new Point(x, Mathf.Clamp(z + num, 0, map.Size - 1));
768 }
static int rnd(long a)
Definition: EClass.cs:59

References map, Point(), EClass.rnd(), MapBounds.Size, x, and z.

Referenced by Chara._Move(), ActEffect.GetTeleportPos(), Chara.MoveRandom(), GrowSystem.OnExceedLastStage(), and ActRanged.Perform().

◆ GetRandomPoint()

Point Point.GetRandomPoint ( int  radius,
bool  requireLos = true,
bool  allowChara = true,
bool  allowBlocked = false,
int  tries = 100 
)
inline

Definition at line 770 of file Point.cs.

771 {
772 Point point = new Point();
773 for (int i = 0; i < tries; i++)
774 {
775 point.Set(x - radius + EClass.rnd(radius * 2 + 1), z - radius + EClass.rnd(radius * 2 + 1));
776 if (point.IsValid && (allowBlocked || !point.IsBlocked) && (!requireLos || Los.IsVisible(this, point)) && (allowChara || !point.HasChara))
777 {
778 return point;
779 }
780 }
781 return null;
782 }
Definition: Los.cs:5
static bool IsVisible(Point p1, Point p2, Action< Point, bool > _onVisit=null)
Definition: Los.cs:167
bool IsBlocked
Definition: Point.cs:359

References HasChara, IsBlocked, IsValid, Los.IsVisible(), Point(), EClass.rnd(), Set(), x, and z.

Referenced by ZonePreEnterEncounter.Execute(), FactionBranch.GenerateGarbage(), Zone.GetRandomVisitPos(), ActRanged.Perform(), ActEffect.Proc(), ActEffect.ProcAt(), AI_Idle.Run(), ActThrow.Throw(), ConMiasma.Tick(), Chara.TryDuplicate(), AI_Idle.TryPerformIdleUse(), Zone.TrySpawnFollower(), and ActRide.Unride().

◆ GetRandomPointInRadius()

Point Point.GetRandomPointInRadius ( int  minRadius,
int  maxRadius,
bool  requireLos = true,
bool  allowChara = true,
bool  allowBlocked = false,
int  tries = 2000 
)
inline

Definition at line 784 of file Point.cs.

785 {
786 Point point = new Point();
787 for (int i = 0; i < tries; i++)
788 {
789 point.Set(x - maxRadius + EClass.rnd(maxRadius * 2 + 1), z - maxRadius + EClass.rnd(maxRadius * 2 + 1));
790 if (point.IsValid && (allowBlocked || !point.IsBlocked) && (allowChara || !point.HasChara))
791 {
792 int num = point.Distance(this);
793 if (num >= minRadius && num <= maxRadius && (!requireLos || Los.IsVisible(this, point)))
794 {
795 return point;
796 }
797 }
798 }
799 return null;
800 }
int Distance(Point p)
Definition: Point.cs:991

References Distance(), HasChara, IsBlocked, IsValid, Los.IsVisible(), Point(), EClass.rnd(), Set(), x, and z.

Referenced by DramaOutcome.event_az(), ZonePreEnterEncounter.Execute(), Zone.Generate(), ActMissileBarrage.Perform(), ActMissileBarrage2.Perform(), and AI_Idle.Run().

◆ GetRotation()

Quaternion Point.GetRotation ( Point  to)
inline

Definition at line 603 of file Point.cs.

604 {
605 return Quaternion.Euler(0f, 0f, GetAngle(to));
606 }
float GetAngle(Point to)
Definition: Point.cs:608

References GetAngle().

Referenced by Effect._Play().

◆ GetShared()

static Point Point.GetShared ( int  x,
int  z 
)
inlinestatic

Definition at line 386 of file Point.cs.

387 {
388 shared.x = x;
389 shared.z = z;
390 return shared;
391 }
static Point shared
Definition: Point.cs:20

References shared, x, and z.

Referenced by Zone_Dungeon.PlaceRail(), and AI_Goto.TryGoTo().

◆ HasNonHomeProperty()

bool Point.HasNonHomeProperty ( Thing  exclude = null)
inline

Definition at line 1288 of file Point.cs.

1289 {
1290 if (FirstThing == null)
1291 {
1292 return false;
1293 }
1294 foreach (Thing thing in detail.things)
1295 {
1296 if (thing != exclude && thing.isNPCProperty)
1297 {
1298 return true;
1299 }
1300 }
1301 return false;
1302 }
bool isNPCProperty
Definition: Card.cs:557
Thing FirstThing
Definition: Point.cs:297

References Card.isNPCProperty, and Card.things.

◆ HasRoomOrArea()

bool Point.HasRoomOrArea ( BaseArea  a)
inline

Definition at line 417 of file Point.cs.

418 {
419 if (area != a)
420 {
421 return cell.room == a;
422 }
423 return true;
424 }
Area area
Definition: Point.cs:69

References area.

Referenced by Map.FindThing().

◆ IsBlockByHeight()

bool Point.IsBlockByHeight ( Point  p)
inline

Definition at line 1001 of file Point.cs.

1002 {
1003 if (Mathf.Abs(p.cell.minHeight - cell.topHeight) > 8)
1004 {
1005 return Mathf.Abs(p.cell.topHeight - cell.minHeight) > 8;
1006 }
1007 return false;
1008 }
byte topHeight
Definition: Cell.cs:100
byte minHeight
Definition: Cell.cs:102

References cell, Cell.minHeight, and Cell.topHeight.

◆ IsInSpot< T >()

bool Point.IsInSpot< T > ( )
inline
Type Constraints
T :Trait 

Definition at line 426 of file Point.cs.

426 : Trait
427 {
428 foreach (Thing thing in EClass._map.things)
429 {
430 if (!(thing.trait is T) || thing.trait.radius == 0)
431 {
432 continue;
433 }
434 foreach (Point item in thing.trait.ListPoints())
435 {
436 if (Equals(item))
437 {
438 return true;
439 }
440 }
441 }
442 return false;
443 }
List< Thing > things
Definition: Map.cs:52
bool Equals(int _x, int _z)
Definition: Point.cs:962
virtual int radius
Definition: Trait.cs:94
virtual List< Point > ListPoints(Point center=null, bool onlyPassable=true, bool allowChara=true)
Definition: Trait.cs:870

References EClass._map, Equals(), item, Trait.ListPoints(), Trait.radius, Map.things, and Card.trait.

◆ IsPublicSpace()

bool Point.IsPublicSpace ( )
inline

Definition at line 445 of file Point.cs.

446 {
447 if (area != null)
448 {
450 {
451 return true;
452 }
453 return false;
454 }
455 if (cell.room != null)
456 {
458 {
459 return true;
460 }
461 return false;
462 }
463 return true;
464 }
virtual bool IsPublicArea
Definition: AreaType.cs:20
AreaType type
Definition: BaseArea.cs:32
Room room
Definition: Cell.cs:122

References area, cell, AreaType.IsPublicArea, Cell.room, and BaseArea.type.

Referenced by Map.FindThing().

◆ ListCards()

List< Card > Point.ListCards ( bool  includeMasked = false)
inline

Definition at line 1053 of file Point.cs.

1054 {
1055 List<Card> list = new List<Card>();
1056 bool flag = EClass.scene.actionMode != null && EClass.scene.actionMode.IsRoofEditMode();
1057 if (detail != null)
1058 {
1059 foreach (Thing thing in detail.things)
1060 {
1061 if (!thing.isHidden && (includeMasked || !thing.isMasked) && thing.isRoofItem == flag)
1062 {
1063 list.Add(thing);
1064 }
1065 }
1066 if (!flag)
1067 {
1068 foreach (Chara chara in detail.charas)
1069 {
1070 list.Add(chara);
1071 }
1072 }
1073 }
1074 return list;
1075 }
virtual bool IsRoofEditMode(Card c=null)
Definition: ActionMode.cs:311
bool isMasked
Definition: Card.cs:593
bool isRoofItem
Definition: Card.cs:581
bool isHidden
Definition: Card.cs:533
static Scene scene
Definition: EClass.cs:31
ActionMode actionMode
Definition: Scene.cs:79

References Scene.actionMode, CellDetail.charas, detail, Card.isHidden, Card.isMasked, ActionMode.IsRoofEditMode(), Card.isRoofItem, EClass.scene, and CellDetail.things.

Referenced by Chara._Move(), ActPlan._Update(), Map._ValidateInstalled(), ActMelee.Attack(), Recipe.Build(), Trait.CookProgress(), ActEffect.DamageEle(), FindAttackTarget(), AI_Clean.GetCleanPoint(), Card.GetRestrainer(), Trait.Offer(), Trait.OfferProcess(), TraitFertilizer.OnSimulateHour(), ActPick.Perform(), AM_Deconstruct.Perform(), AI_Clean.Run(), RecipeUpdater.RunDisassemble(), AM_Picker.Test(), TraitCatalyst.TrySetHeldAct(), TraitLeash.TrySetHeldAct(), TraitSalesTag.TrySetHeldAct(), TraitStethoscope.TrySetHeldAct(), TraitToolTorch.TrySetHeldAct(), TraitWhipEgg.TrySetHeldAct(), TraitWhipLove.TrySetHeldAct(), Map.TryShatter(), and CoreDebug.UpdateInput().

◆ ListCharas()

List< Chara > Point.ListCharas ( )
inline

Definition at line 1173 of file Point.cs.

1174 {
1175 List<Chara> list = new List<Chara>();
1176 if (detail != null)
1177 {
1178 foreach (Chara chara in detail.charas)
1179 {
1180 list.Add(chara);
1181 }
1182 }
1183 return list;
1184 }

References CellDetail.charas, and detail.

Referenced by Chara._Move(), AM_Adv._OnUpdateInput(), Recipe.Build(), RecipeCard.Build(), ActRide.Perform(), ActThrow.Throw(), Chara.TryPush(), TraitDeedDivorce.TrySetHeldAct(), and TraitDeedLostRing.TrySetHeldAct().

◆ ListCharasInNeighbor()

List< Chara > Point.ListCharasInNeighbor ( Func< Chara, bool >  func)
inline

Definition at line 1202 of file Point.cs.

1203 {
1204 List<Chara> list = new List<Chara>();
1205 ForeachNeighbor(delegate(Point p)
1206 {
1207 if (p.detail == null)
1208 {
1209 return;
1210 }
1211 foreach (Chara chara in p.detail.charas)
1212 {
1213 if (func(chara))
1214 {
1215 list.Add(chara);
1216 }
1217 }
1218 });
1219 return list;
1220 }
void ForeachNeighbor(Action< Point > action, bool diagonal=true)
Definition: Point.cs:1399

References CellDetail.charas, detail, and ForeachNeighbor().

Referenced by AI_Idle.DoSomethingToNearChara(), ConWet.OnStart(), and ActWhirlwind.Perform().

◆ ListCharasInRadius()

List< Chara > Point.ListCharasInRadius ( Chara  cc,
int  dist,
Func< Chara, bool >  func,
bool  onlyVisible = true 
)
inline

Definition at line 1222 of file Point.cs.

1223 {
1224 List<Chara> list = new List<Chara>();
1225 foreach (Chara chara in EClass._map.charas)
1226 {
1227 if (func(chara) && chara.Dist(cc) < dist && (!onlyVisible || Los.IsVisible(chara, cc)))
1228 {
1229 list.Add(chara);
1230 }
1231 }
1232 return list;
1233 }

References EClass._map, Map.charas, Card.Dist(), and Los.IsVisible().

Referenced by AI_Idle.DoSomethingToCharaInRadius(), Chara.ListFussableCharas(), ConTransmuteHuman.OnBeforeStart(), ActRanged.Perform(), FoodEffect.Proc(), AI_Fuck.Run(), BaseSong< T >.TickSong(), StanceSongEnd.TickSong(), and StanceSongSleep.TickSong().

◆ ListInspectorTargets()

List< IInspect > Point.ListInspectorTargets ( )
inline

Definition at line 1354 of file Point.cs.

1355 {
1356 List<IInspect> list = new List<IInspect>();
1357 CellDetail cellDetail = detail;
1358 if (cellDetail != null)
1359 {
1360 foreach (Chara chara in cellDetail.charas)
1361 {
1362 if (chara.isSynced)
1363 {
1364 list.Add(chara);
1365 }
1366 }
1367 foreach (Thing thing in cellDetail.things)
1368 {
1369 list.Add(thing);
1370 }
1371 if (cellDetail.designation != null && !(cellDetail.designation is TaskCut) && !(cellDetail.designation is TaskMine))
1372 {
1373 list.Add(cellDetail.designation);
1374 }
1375 }
1376 if (ObjInfo._CanInspect(this))
1377 {
1378 list.Add(ObjInfo.GetTempList(this));
1379 }
1380 if (BlockInfo._CanInspect(this))
1381 {
1382 list.Add(BlockInfo.GetTempList(this));
1383 }
1384 return list;
1385 }
static bool _CanInspect(Point pos)
Definition: BlockInfo.cs:31
static BlockInfo GetTempList(Point _pos)
Definition: BlockInfo.cs:21
TaskDesignation designation
Definition: CellDetail.cs:19
override bool isSynced
Definition: Chara.cs:711
static bool _CanInspect(Point pos)
Definition: ObjInfo.cs:67
static ObjInfo GetTempList(Point _pos)
Definition: ObjInfo.cs:57

References BlockInfo._CanInspect(), ObjInfo._CanInspect(), CellDetail.charas, CellDetail.designation, BlockInfo.GetTempList(), ObjInfo.GetTempList(), Chara.isSynced, and CellDetail.things.

Referenced by UIInspector.InspectUnderMouse(), and LayerInteraction.TryShow().

◆ ListThings< T >()

List< Card > Point.ListThings< T > ( bool  onlyInstalled = true)
inline
Type Constraints
T :Trait 

Definition at line 1157 of file Point.cs.

1157 : Trait
1158 {
1159 List<Card> list = new List<Card>();
1160 if (detail != null)
1161 {
1162 foreach (Thing thing in detail.things)
1163 {
1164 if (!thing.isHidden && !thing.isRoofItem && !thing.isMasked && (!onlyInstalled || thing.IsInstalled) && thing.trait is T)
1165 {
1166 list.Add(thing);
1167 }
1168 }
1169 }
1170 return list;
1171 }

References detail, Card.isHidden, Card.IsInstalled, Card.isMasked, Card.isRoofItem, CellDetail.things, and Card.trait.

◆ ListVisibleCards()

List< Card > Point.ListVisibleCards ( )
inline

Definition at line 1077 of file Point.cs.

1078 {
1079 List<Card> list = new List<Card>();
1080 if (detail != null)
1081 {
1082 foreach (Thing thing in detail.things)
1083 {
1084 if (!thing.isHidden && !thing.isMasked && !thing.isRoofItem)
1085 {
1086 list.Add(thing);
1087 }
1088 }
1089 foreach (Chara chara in detail.charas)
1090 {
1091 if (EClass.pc.CanSee(chara))
1092 {
1093 list.Add(chara);
1094 }
1095 }
1096 }
1097 return list;
1098 }

References Chara.CanSee(), CellDetail.charas, detail, Card.isHidden, Card.isMasked, Card.isRoofItem, EClass.pc, and CellDetail.things.

Referenced by HotItemNoItem._TrySetAct(), and HotItemAct.TrySetAct().

◆ ListVisibleCharas()

List< Chara > Point.ListVisibleCharas ( )
inline

Definition at line 1186 of file Point.cs.

1187 {
1188 List<Chara> list = new List<Chara>();
1189 if (detail != null)
1190 {
1191 foreach (Chara chara in detail.charas)
1192 {
1193 if (EClass.pc.CanSee(chara))
1194 {
1195 list.Add(chara);
1196 }
1197 }
1198 }
1199 return list;
1200 }

References Chara.CanSee(), CellDetail.charas, detail, and EClass.pc.

Referenced by HotItemHeld.TrySetToolAct().

◆ ListWitnesses()

List< Chara > Point.ListWitnesses ( Chara  criminal,
int  radius = 4,
WitnessType  type = WitnessType::crime,
Chara  target = null 
)
inline

Definition at line 831 of file Point.cs.

832 {
833 List<Chara> list = new List<Chara>();
834 foreach (Point item in map.ListPointsInCircle(this, radius, mustBeWalkable: false))
835 {
836 List<Chara> list2 = item.detail?.charas;
837 if (list2 == null || list2.Count == 0)
838 {
839 continue;
840 }
841 foreach (Chara item2 in list2)
842 {
843 if (item2 == criminal || item2.IsPC || (item2.HasCondition<ConDim>() && EClass.rnd(2) == 0) || item2.conSuspend != null || item2.isParalyzed || item2.IsDisabled || (type != WitnessType.everyone && type != WitnessType.ally && item2 != target && !item2.CanWitness))
844 {
845 continue;
846 }
847 switch (type)
848 {
849 case WitnessType.ally:
850 if (!criminal.IsPCFaction || item2.hostility <= Hostility.Neutral)
851 {
852 continue;
853 }
854 break;
855 case WitnessType.crime:
856 if (criminal == null || item2.isBlind || item2.isConfused || (criminal.IsPCParty && (item2.IsPCFaction || item2.IsPCFactionMinion)) || (target == null && item2.OriginalHostility < Hostility.Neutral))
857 {
858 continue;
859 }
860 break;
861 case WitnessType.music:
862 if (item2.hostility <= Hostility.Enemy)
863 {
864 continue;
865 }
866 break;
867 }
868 list.Add(item2);
869 }
870 }
871 return list;
872 }
Hostility
Definition: Hostility.cs:2
WitnessType
Definition: WitnessType.cs:2
Hostility OriginalHostility
Definition: Chara.cs:477
ConSuspend conSuspend
Definition: Chara.cs:106
override bool IsPC
Definition: Chara.cs:632
override bool IsPCParty
Definition: Chara.cs:635
bool isParalyzed
Definition: Chara.cs:136
override bool IsDisabled
Definition: Chara.cs:593
override bool IsPCFaction
Definition: Chara.cs:691
override bool IsPCFactionMinion
Definition: Chara.cs:675
bool isBlind
Definition: Chara.cs:134
Hostility hostility
Definition: Chara.cs:297
bool CanWitness
Definition: Chara.cs:1059
bool isConfused
Definition: Chara.cs:130
Definition: ConDim.cs:2
List< Point > ListPointsInCircle(Point center, float radius, bool mustBeWalkable=true, bool los=true)
Definition: Map.cs:2439

References Chara.CanWitness, Chara.conSuspend, Chara.HasCondition(), Chara.hostility, Chara.isBlind, Chara.isConfused, Chara.IsDisabled, Chara.isParalyzed, Chara.IsPC, Chara.IsPCFaction, Chara.IsPCFactionMinion, item, Map.ListPointsInCircle(), map, Chara.OriginalHostility, and EClass.rnd().

Referenced by ActMoneyDump.Perform(), AI_PlayMusic.Run(), AI_Steal.Run(), TalkWitnesses(), and TryWitnessCrime().

◆ ModFire()

void Point.ModFire ( int  value,
bool  extinguish = false 
)
inline

Definition at line 935 of file Point.cs.

936 {
937 if (extinguish && cell.HasFire)
938 {
939 PlaySound("extinguish");
940 PlayEffect("smoke");
941 PlayEffect("vanish");
942 }
943 map.ModFire(x, z, value);
944 }
bool HasFire
Definition: Cell.cs:712
void ModFire(int x, int z, int amount)
Definition: Map.cs:1309
SoundSource PlaySound(string id, bool synced=true, float v=1f, bool spatial=true)
Definition: Point.cs:1255
Effect PlayEffect(string id)
Definition: Point.cs:1250

References cell, Cell.HasFire, map, Map.ModFire(), PlayEffect(), PlaySound(), x, and z.

Referenced by ActEffect.DamageEle(), GameUpdater.SurfaceUpdater.FixedUpdate(), TaskWater.Run(), ActThrow.Throw(), LogicalFire.Transfer(), and LogicalFire.Update().

◆ operator+()

static Point Point.operator+ ( Point  lhs,
Point  rhs 
)
inlinestatic

Definition at line 525 of file Point.cs.

526 {
527 return new Point(lhs.x + rhs.x, lhs.z + rhs.z);
528 }

References Point(), x, and z.

◆ PlayEffect()

Effect Point.PlayEffect ( string  id)
inline

Definition at line 1250 of file Point.cs.

1251 {
1252 return Effect.Get(id).Play(this);
1253 }
Definition: Effect.cs:7
static Effect Get(Effect original)
Definition: Effect.cs:80
void Play(float delay, Point from, float fixY=0f, Point to=null, Sprite sprite=null)
Definition: Effect.cs:100

References Effect.Get(), and Effect.Play().

Referenced by ActMelee.Attack(), Chara.Banish(), Card.Die(), Card.GiveBirth(), ModFire(), ActMultihit.Perform(), ActRush.Perform(), ActSwarm.Perform(), ActTelekinesis.Perform(), ActEffect.ProcAt(), TraitBaseSpellbook.ReadFailEffect(), AI_Clean.Run(), AI_Slaughter.Run(), and TaskClean.Run().

◆ PlaySound()

SoundSource Point.PlaySound ( string  id,
bool  synced = true,
float  v = 1f,
bool  spatial = true 
)
inline

Definition at line 1255 of file Point.cs.

1256 {
1257 Vector3 vector = default(Vector3);
1258 if (spatial)
1259 {
1260 if (!IsValid)
1261 {
1262 return null;
1263 }
1264 vector = (EClass._zone.IsRegion ? PositionTopdown() : Position());
1265 vector.z = 0f;
1266 if (Vector3.Distance(vector, EClass.scene.transAudio.position) > EClass.core.gameSetting.audio.maxRange)
1267 {
1268 return null;
1269 }
1270 if (!synced)
1271 {
1272 v -= 0.4f;
1273 }
1274 }
1275 return EClass.Sound.Play(id, vector, (!spatial) ? 1f : (v * ((EClass.screen.Zoom >= 1f) ? 1f : EClass.screen.Zoom)));
1276 }
GameSetting gameSetting
Definition: Core.cs:47
static Core core
Definition: EClass.cs:7
static BaseGameScreen screen
Definition: EClass.cs:33
static SoundManager Sound
Definition: EClass.cs:47
AudioSetting audio
Definition: GameSetting.cs:344
ref Vector3 PositionTopdown()
Definition: Point.cs:570
Transform transAudio
Definition: Scene.cs:31

References GameSetting.audio, EClass.core, Core.gameSetting, GameSetting.AudioSetting.maxRange, EClass.scene, EClass.screen, EClass.Sound, Scene.transAudio, and BaseGameScreen.Zoom.

Referenced by Chara.Banish(), Map.DestroyObj(), Card.Die(), Card.GiveBirth(), Map.MineBlock(), Map.MineFloor(), Map.MineObjSound(), ModFire(), TaskHarvest.OnCreateProgress(), TaskPlow.OnCreateProgress(), TaskCut.OnProgress(), TaskMoveInstalled.OnProgressComplete(), ActMultihit.Perform(), ActSwarm.Perform(), ActTelekinesis.Perform(), Card.PlaySound(), ActEffect.Proc(), ActEffect.ProcAt(), AI_Fish.ProgressFish.Ripple(), and AI_Craft_Snowman.Run().

◆ Plow()

void Point.Plow ( )
inline

Definition at line 946 of file Point.cs.

947 {
948 if (IsFarmField)
949 {
951 {
953 }
954 else if (cell.Front.HasWallOrFence)
955 {
957 }
958 }
959 SetFloor(4, 4);
960 }
bool HasWallOrFence
Definition: Cell.cs:867
Cell Front
Definition: Cell.cs:151
Point GetPoint()
Definition: Cell.cs:1141
Cell Right
Definition: Cell.cs:163
bool IsFarmField
Definition: Point.cs:123
void SetFloor(int idMat=0, int idFloor=0)
Definition: Point.cs:925

References cell, Cell.Front, Cell.GetPoint(), Cell.HasWallOrFence, IsFarmField, Cell.Right, Set(), and SetFloor().

◆ Position() [1/2]

ref Vector3 Point.Position ( )
inline

Definition at line 561 of file Point.cs.

562 {
563 byte b = ((cell.bridgeHeight == 0) ? cell.height : cell.bridgeHeight);
564 vCache.x = (float)(x + z) * _screen.tileAlign.x;
565 vCache.y = (float)(z - x) * _screen.tileAlign.y + (float)(int)b * _screen.tileMap._heightMod.y;
566 vCache.z = 1000f + vCache.x * _screen.tileWeight.x + vCache.y * _screen.tileWeight.z + (float)(int)b * _screen.tileMap._heightMod.z;
567 return ref vCache;
568 }
BaseTileMap tileMap
Vector3 _heightMod
Definition: BaseTileMap.cs:335
byte height
Definition: Cell.cs:94
byte bridgeHeight
Definition: Cell.cs:96
Vector3 vCache
Definition: Point.cs:41
static BaseGameScreen _screen
Definition: Point.cs:43

References BaseTileMap._heightMod, _screen, Cell.bridgeHeight, cell, Cell.height, BaseGameScreen.tileAlign, BaseGameScreen.tileMap, vCache, x, and z.

Referenced by GetAngle(), Position(), PositionAuto(), and PositionCenter().

◆ Position() [2/2]

◆ PositionAuto()

ref Vector3 Point.PositionAuto ( )
inline

Definition at line 540 of file Point.cs.

541 {
543 {
544 return ref PositionTopdown();
545 }
546 return ref Position();
547 }
virtual bool IsRegion
Definition: Spatial.cs:515

References EClass._zone, Spatial.IsRegion, Position(), and PositionTopdown().

Referenced by AM_Adv.OnAfterUpdate(), and CardRenderer.PlayAnime().

◆ PositionCenter()

ref Vector3 Point.PositionCenter ( )
inline

Definition at line 588 of file Point.cs.

589 {
591 {
593 }
594 else
595 {
596 Position();
597 }
598 vCache.x += EClass.screen.tileWorldSize.x * 0.5f;
599 vCache.y += EClass.screen.tileWorldSize.y * 0.75f;
600 return ref vCache;
601 }

References EClass._zone, Spatial.IsRegion, Position(), PositionTopdown(), and vCache.

Referenced by ActEffect.DamageEle(), BaseGameScreen.Focus(), Card.MoveImmediate(), AM_Adv.OnActivate(), AM_MoveInstalled.OnRenderTile(), Scene.OnUpdate(), AM_Cinema.OnUpdateInput(), AttackProcess.PlayRangedAnime(), ActorEx.Refresh(), AM_Adv.RefreshArrow(), BaseGameScreen.RefreshPosition(), Card.Teleport(), and GameUpdater.Update100ms().

◆ PositionTopdown()

ref Vector3 Point.PositionTopdown ( )
inline

Definition at line 570 of file Point.cs.

571 {
572 byte b = ((cell.bridgeHeight == 0) ? cell.height : cell.bridgeHeight);
573 vCache.x = (float)x * _screen.tileAlign.x;
574 vCache.y = (float)z * _screen.tileAlign.y + (float)(int)b * _screen.tileMap._heightMod.y;
575 vCache.z = 1000f + vCache.x * _screen.tileWeight.x + vCache.y * _screen.tileWeight.z + (float)(int)b * _screen.tileMap._heightMod.z;
576 return ref vCache;
577 }

References BaseTileMap._heightMod, _screen, Cell.bridgeHeight, cell, Cell.height, BaseGameScreen.tileAlign, BaseGameScreen.tileMap, vCache, x, and z.

Referenced by TileSelectorElona.OnRenderTile(), PositionAuto(), PositionCenter(), GameScreenElona.RefreshPosition(), ActionMode.RefreshTexts(), and GameUpdater.Update().

◆ PositionTopdownTreasure()

ref Vector3 Point.PositionTopdownTreasure ( )
inline

Definition at line 579 of file Point.cs.

580 {
582 vCache.x = (float)(x - EClass.scene.elomap.minX) * screenElona.tileAlign.x;
583 vCache.y = (float)(z - EClass.scene.elomap.minY) * screenElona.tileAlign.y;
584 vCache.z = 1400f;
585 return ref vCache;
586 }
int minX
Definition: EloMap.cs:112
int minY
Definition: EloMap.cs:114
EloMap elomap
Definition: Scene.cs:149
GameScreenElona screenElona
Definition: Scene.cs:95

References Scene.elomap, EloMap.minX, EloMap.minY, EClass.scene, Scene.screenElona, BaseGameScreen.tileAlign, vCache, x, and z.

Referenced by LayerTreasureMap.SetMap().

◆ RefreshNeighborTiles()

void Point.RefreshNeighborTiles ( )
inline

◆ RefreshTile()

void Point.RefreshTile ( )
inline

Definition at line 1283 of file Point.cs.

1284 {
1286 }
void RefreshSingleTile(int x, int z)
Definition: Map.cs:2264

◆ Set() [1/4]

Point Point.Set ( int  _x,
int  _z 
)
inline

Definition at line 499 of file Point.cs.

500 {
501 x = _x;
502 z = _z;
503 return this;
504 }

References x, and z.

Referenced by Map._AddCard(), Chara._Move(), Card._OnDeserialized(), AM_Sim._OnUpdateInput(), ActPlan._Update(), Map._ValidateInstalled(), Zone.Activate(), Map.AddCardOnActivate(), Zone.AddGlobalCharasOnActivate(), AI_Goto.AI_Goto(), PartialMap.Apply(), ActMelee.Attack(), RecipeUpdater.Build(), GoalManualMove.CanMove(), ActRush.CanPerform(), ActTelekinesis.CanPerform(), ActThrow.CanPerform(), TaskPoint.CanPerform(), Act.CanPerform(), PointTarget.CheckLastTarget(), Copy< T >(), Crawler.Crawl(), EffectMeteor.Create(), BaseTileMap.Draw(), TaskBuild.DrawMarker(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), Player.EnterLocalZone(), GameUpdater.SurfaceUpdater.FixedUpdate(), GameUpdater.FastSurfaceUpdater.FixedUpdate(), Card.ForeachFOV(), ForeachNearestPoint(), ForeachNeighbor(), Map.ForeachNeighbor(), Map.ForeachPoint(), MapBounds.ForeachPoint(), Map.ForeachSphere(), Map.ForeachSquare(), Zone_SnowGrave.GenerateGrave(), AI_Clean.GetCleanPoint(), AI_Fish.GetFishingPoint(), TaskBuild.GetHitResult(), TileTypeVine.GetMountHeight(), TileTypeWallHang.GetMountHeight(), GetNearestPoint(), AI_Trolley.GetPoint(), BaseGameScreen.GetRandomPoint(), GetRandomPoint(), GetRandomPointInRadius(), MapBounds.GetRandomSpace(), Cell.GetSharedPoint(), MapBounds.GetSpawnPos(), ActEffect.GetTeleportPos(), BlockInfo.GetTemp(), ObjInfo.GetTemp(), BlockInfo.GetTempList(), ObjInfo.GetTempList(), Los.IsBlocked(), Los.IsVisible(), Los.ListVisible(), MapGen.MakeNeighbor(), MapGen.MakeNeighbor_old(), MapGen.MakeRoad(), MapGenDungen.OnGenerateTerrain(), WidgetMinimap.OnPointerDown(), AM_Designation< T >.OnProcessTiles(), AM_MoveInstalled.OnProcessTiles(), HotItemHeld.OnRenderTile(), BaseTileSelector.OnUpdate(), WidgetMinimap.OnUpdate(), AM_Cinema.OnUpdateInput(), Act.Perform(), ActMissileBarrage.Perform(), ActMissileBarrage2.Perform(), ActRanged.Perform(), ActRush.Perform(), ActThrow.Perform(), ActPlan.Item.Perform(), Zone_Dungeon.PlaceRail(), Plow(), Point(), GenRoom.Populate(), MapGen.Populate(), AM_Adv.PressedActionMove(), BaseTileSelector.ProcessTiles(), ReligionManager.Reforge(), BaseTileSelector.RefreshMouseInfo(), PathProgress.RequestPath(), PathProgress.RequestPathImmediate(), AI_Fish.Run(), AI_Goto.Run(), GoalManualMove.Run(), TaskPoint.Run(), TaskWater.Run(), CharaRenderer.SetFirst(), Map.SetFoormark(), Act.SetReference(), RegionPoint.SetRegionPoint(), LayerInteraction.Show(), ActThrow.Throw(), AI_Goto.TryGoTo(), GoalManualMove.TryMove(), Card.TryMoveFrom(), Chara.TryMoveTowards(), GameUpdater.Update(), LogicalFire.Update(), PointTarget.Update(), CharaRenderer.UpdatePosition(), and Chara.UpdateSight().

◆ Set() [2/4]

Point Point.Set ( int  index)
inline

Definition at line 506 of file Point.cs.

507 {
508 x = index % map.Size;
509 z = index % map.SizeXZ / map.Size;
510 return this;
511 }
int index
Definition: Point.cs:45

References index, map, MapBounds.Size, x, and z.

◆ Set() [3/4]

Point Point.Set ( Point  point)
inline

Definition at line 513 of file Point.cs.

514 {
515 x = point.x;
516 z = point.z;
517 return this;
518 }

References x, and z.

◆ Set() [4/4]

void Point.Set ( Vector3  v)
inline

Definition at line 530 of file Point.cs.

531 {
532 v.x -= 0.64f;
533 v.y -= 0.64f;
534 int num = Mathf.RoundToInt(v.x / _screen.tileAlign.x);
535 int num2 = Mathf.RoundToInt(v.y / _screen.tileAlign.y);
536 x = (num2 - num) / 2 * -1;
537 z = num - x;
538 }

References _screen, BaseGameScreen.tileAlign, x, and z.

◆ SetBlock()

void Point.SetBlock ( int  idMat = 0,
int  idBlock = 0 
)
inline

Definition at line 920 of file Point.cs.

921 {
922 map.SetBlock(x, z, idMat, idBlock);
923 }
void SetBlock(int x, int z, int idMat=0, int idBlock=0)
Definition: Map.cs:1133

References map, Map.SetBlock(), x, and z.

Referenced by ZonePreEnterDigStairs.Execute(), Map.MineBlock(), Zone_Dungeon.PlaceRail(), and Chara.TryDropBossLoot().

◆ SetFloor()

void Point.SetFloor ( int  idMat = 0,
int  idFloor = 0 
)
inline

Definition at line 925 of file Point.cs.

926 {
927 map.SetFloor(x, z, idMat, idFloor);
928 }
void SetFloor(int x, int z, int idMat=0, int idFloor=0)
Definition: Map.cs:1084

References map, Map.SetFloor(), x, and z.

Referenced by Map.MineFloor(), TraitBoat.OnChangePlaceState(), TaskPlow.OnCreateProgress(), TraitBoat.OnRemovedFromZone(), and Plow().

◆ SetHighlight()

void Point.SetHighlight ( int  id)
inline

Definition at line 1426 of file Point.cs.

1427 {
1428 cell.highlight = (byte)id;
1430 }
static Player player
Definition: EClass.cs:13
List< Cell > lastMarkedHighlights
Definition: Player.cs:1227

References Player.lastMarkedHighlights, and EClass.player.

Referenced by Act.OnMarkMapHighlights().

◆ SetObj()

void Point.SetObj ( int  id = 0,
int  value = 1,
int  dir = 0 
)
inline

◆ TalkWitnesses()

void Point.TalkWitnesses ( Chara  criminal,
string  idTalk,
int  radius = 4,
WitnessType  type = WitnessType::everyone,
Func< Chara, bool >  talkIf = null,
int  chance = 3 
)
inline

Definition at line 816 of file Point.cs.

817 {
818 if (talkIf == null)
819 {
820 talkIf = (Chara c) => EClass.rnd(chance) == 0;
821 }
822 foreach (Chara item in ListWitnesses(criminal, radius, type))
823 {
824 if (talkIf(item) && !item.renderer.IsTalking())
825 {
826 item.Talk(idTalk);
827 }
828 }
829 }
List< Chara > ListWitnesses(Chara criminal, int radius=4, WitnessType type=WitnessType.crime, Chara target=null)
Definition: Point.cs:831

References item, ListWitnesses(), and EClass.rnd().

Referenced by DramaOutcome.marry(), ElementContainerCard.OnLevelUp(), ElementContainerZone.OnLevelUp(), TraitSkyHelm.OnUse(), ActMoneyDump.Perform(), AI_Bladder.Run(), and AI_Craft_Snowman.Run().

◆ ToRegionPos()

Point Point.ToRegionPos ( )
inline

Definition at line 1418 of file Point.cs.

1419 {
1420 Point point = new Point(x, z);
1421 point.x += EClass.scene.elomap.minX;
1422 point.z += EClass.scene.elomap.minY;
1423 return point;
1424 }

References Scene.elomap, EloMap.minX, EloMap.minY, and EClass.scene.

Referenced by TraitDeedRelocate.OnRead().

◆ ToString()

override string Point.ToString ( )
inline

Definition at line 520 of file Point.cs.

521 {
522 return "(" + x + " / " + z + ")";
523 }

References x, and z.

Referenced by Algorithms.PathFinder._FindPath(), ActEffect.DamageEle(), Equals(), TaskPoint.Run(), Card.ToString(), Chara.ToString(), Zone.ToString(), and WidgetDebug.UpdateText().

◆ TryWitnessCrime()

bool Point.TryWitnessCrime ( Chara  criminal,
Chara  target = null,
int  radius = 4,
Func< Chara, bool >  funcWitness = null 
)
inline

Definition at line 874 of file Point.cs.

875 {
876 List<Chara> list = ListWitnesses(criminal, radius, WitnessType.crime, target);
877 bool result = false;
878 if (funcWitness == null)
879 {
880 funcWitness = (Chara c) => EClass.rnd(10) == 0;
881 }
882 foreach (Chara item in list)
883 {
884 if (funcWitness(item))
885 {
886 CallGuard(criminal, item);
887 result = true;
888 target?.DoHostileAction(criminal);
889 if (item != target)
890 {
891 item.DoHostileAction(criminal);
892 }
893 break;
894 }
895 }
896 return result;
897 }
void CallGuard(Chara criminal, Chara caller)
Definition: Point.cs:899

References CallGuard(), item, ListWitnesses(), and EClass.rnd().

Referenced by ConTransmuteBat.CheckSeen(), AI_OpenLock.CreateProgress(), AI_PryOpen.CreateProgress(), Player.ModKarma(), TaskDig.OnCreateProgress(), TaskHarvest.OnCreateProgress(), TaskMine.OnCreateProgress(), ActTelekinesis.Perform(), InvOwner.Transaction.Process(), AI_Fuck.Run(), AI_Idle.Run(), and AI_Steal.Run().

◆ Within()

bool Point.Within ( int  _x,
int  _z,
int  _w,
int  _h 
)
inline

Definition at line 393 of file Point.cs.

394 {
395 if (x >= _x && z >= _z && x < _x + _w)
396 {
397 return z < _z + _h;
398 }
399 return false;
400 }

References x, and z.

Referenced by PartialMap.Save().

Member Data Documentation

◆ _screen

BaseGameScreen Point._screen
static

Definition at line 43 of file Point.cs.

Referenced by Position(), PositionTopdown(), and Set().

◆ fixedPos

Vector3 Point.fixedPos
static

Definition at line 18 of file Point.cs.

◆ Invalid

◆ map

◆ shared

◆ shared2

Point Point.shared2 = new Point()
static

Definition at line 22 of file Point.cs.

Referenced by TileTypeVine.GetMountHeight(), and TileTypeWallHang.GetMountHeight().

◆ shared3

Point Point.shared3 = new Point()
static

Definition at line 24 of file Point.cs.

◆ Surrounds

readonly XY [] Point.Surrounds
static
Initial value:
= new XY[4]
{
new XY(0, -1),
new XY(1, 0),
new XY(0, 1),
new XY(-1, 0)
}
Definition: XY.cs:2

Definition at line 10 of file Point.cs.

Referenced by LogicalFire.Update().

◆ vCache

Vector3 Point.vCache
private

Definition at line 41 of file Point.cs.

Referenced by Position(), PositionCenter(), PositionTopdown(), and PositionTopdownTreasure().

◆ x

int Point.x

Definition at line 36 of file Point.cs.

Referenced by Algorithms.PathFinder._FindPath(), PathManager._GetFirstStep(), Chara._Move(), Card._OnSerializing(), SerializedCards.Add(), CharaMassTransfer.Add(), Card.AddBlood(), SourceMaterial.Row.AddBlood(), Zone.AddCard(), Map.AddCardOnActivate(), Zone.AddChara(), Lot.AddConnectedRooms(), Zone.AddThing(), PartialMap.Apply(), AM_Adv.AxisMove(), Recipe.Build(), Card.CalculateFOV(), TraitSpotExit.CanBuiltAt(), Region.CanCreateZone(), Chara.CanInteractTo(), Chara.CanMoveTo(), Clamp(), Card.ClearFOV(), MapBounds.Contains(), Copy(), RecipeCard.Craft(), EffectMeteor.Create(), SpatialGen.CreateInstance(), Region.CreateRandomSite(), Region.CreateZone(), TraitNewZone.CreateZone(), FactionBranch.DailyOutcome(), ActEffect.DamageEle(), Spatial.Dist(), Distance(), BaseTileMap.Draw(), TileMapElona.Draw(), TaskBuild.DrawMarker(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), WidgetMinimap.EmitParticle(), Player.EnterLocalZone(), Equals(), ZonePreEnterDigStairs.Execute(), Algorithms.PathFinder.FindPath(), GameUpdater.SurfaceUpdater.FixedUpdate(), GameUpdater.FastSurfaceUpdater.FixedUpdate(), GameUpdater.LogicUpdater.FixedUpdate(), TraitBoat.ForeachDeck(), ForeachNearestPoint(), Map.ForeachNeighbor(), Zone.Generate(), Zone_SnowGrave.GenerateGrave(), GetAngle2(), EloMap.GetCell(), TraitScrollMapTreasure.GetDest(), TraitNewZone.GetExitPos(), AI_Fish.GetFishingPoint(), GetHashCode(), TaskBuild.GetHitResult(), TaskMine.GetHitResult(), TileTypeVine.GetMountHeight(), TileTypeWallHang.GetMountHeight(), GetNearestPoint(), AI_Trolley.GetPoint(), GetPointTowards(), GetRandomNeighbor(), Region.GetRandomPoint(), GetRandomPoint(), GetRandomPointInRadius(), MapBounds.GetRandomSpace(), GetShared(), MapBounds.GetSpawnPos(), EloMap.GetZone(), AM_MoveInstalled.HitTest(), AI_Goto.IsDestinationReached(), PathProgress.IsDestinationReached(), BaseTileSelector.IsInRange(), Los.IsVisible(), Map.ListPointsInArc(), Map.ListPointsInCircle(), Map.ListPointsInSquare(), Map.ListPointsOnEdge(), Los.ListVisible(), Chara.LookAt(), MapGen.MakeNeighbor(), MapGen.MakeNeighbor_old(), MapGen.MakeRiver(), MapGen.MakeRoad(), Map.MineBlock(), Map.MineFloor(), Map.MineObj(), Map.MineRamp(), ModFire(), Map.MoveCard(), Chara.MoveHome(), TraitNewZone.MoveZone(), TraitMoongate.MoveZone(), POIMap.OccyupyPOI(), WidgetArtTool.OnActivate(), Region.OnAdvanceHour(), AM_Copy.OnAfterProcessTiles(), Zone_Nymelle.OnBeforeSimulate(), TaskDrawWater.OnCreateProgress(), TaskPourWater.OnCreateProgress(), Player.OnExitBorder(), SurvivalManager.OnExpandFloor(), Act.OnMarkMapHighlights(), SurvivalManager.OnMineWreck(), AIWork_Clean.OnPerformWork(), GenRoom.OnPopulate(), AM_Populate.OnProcessTiles(), AM_Terrain.OnProcessTiles(), AI_Water.OnProgressComplete(), TaskCut.OnProgressComplete(), TaskMine.OnProgressComplete(), TaskMoveInstalled.OnProgressComplete(), Recipe.OnRenderMarker(), AM_BaseTerrain.OnRenderTile(), HotItemHeld.OnRenderTile(), PointList.OnSerializing(), TraitFertilizer.OnSimulateHour(), TraitDrink.OnThrowGround(), WidgetMinimap.OnUpdate(), TraitStairsLocked.OnUse(), operator+(), Zone_Dungeon.PlaceRail(), Point(), Position(), PositionTopdown(), PositionTopdownTreasure(), AM_Adv.PressedActionMove(), ActEffect.ProcAt(), BaseTileSelector.ProcessTiles(), Room.Refresh(), AM_Adv.RefreshArrow(), AM_Region.RefreshArrow(), BaseTileSelector.RefreshMouseInfo(), Weather.RefreshWeather(), RegionPoint.RegionPoint(), Card.RenderMarker(), Map.Resize(), SerializedCards.Restore(), Map.Reveal(), AI_Bladder.Run(), AI_Clean.Run(), AI_Fish.Run(), GoalCombat.Run(), TaskClean.Run(), TaskWater.Run(), RecipeUpdater.RunRecipe(), Map.Save(), ActWait.Search(), Set(), LogicalPoint.Set(), SetBlock(), SetFloor(), SetObj(), Card.SetPlaceState(), RegionPoint.SetRegionPoint(), WidgetHotbar.SetShortcutMenu(), LayerCraftFloat.ShowContextMenu(), TraitDoor.ToggleDoor(), TraitDoorSwing.ToggleDoor(), ToString(), Zone.TryGenerateShrine(), AI_Goto.TryGoTo(), MapGen.TryMakeRiver(), Card.TryMoveFrom(), TraitNewZone.TrySetAct(), GoalCombat.TryUseAbility(), GameUpdater.Update(), LogicalFire.Update(), CoreDebug.UpdateInput(), WidgetDebug.UpdateText(), Map.ValidateInstalled(), VirtualRoom.VirtualRoom(), and Within().

◆ z

int Point.z

Definition at line 39 of file Point.cs.

Referenced by Algorithms.PathFinder._FindPath(), PathManager._GetFirstStep(), Chara._Move(), Card._OnSerializing(), SerializedCards.Add(), CharaMassTransfer.Add(), Card.AddBlood(), SourceMaterial.Row.AddBlood(), Zone.AddCard(), Map.AddCardOnActivate(), Zone.AddChara(), Lot.AddConnectedRooms(), Zone.AddThing(), PartialMap.Apply(), AM_Adv.AxisMove(), Recipe.Build(), Card.CalculateFOV(), TraitSpotExit.CanBuiltAt(), Region.CanCreateZone(), Chara.CanInteractTo(), GoalManualMove.CanMove(), Chara.CanMoveTo(), Clamp(), Card.ClearFOV(), MapBounds.Contains(), Copy(), RecipeCard.Craft(), EffectMeteor.Create(), SpatialGen.CreateInstance(), Region.CreateRandomSite(), Region.CreateZone(), TraitNewZone.CreateZone(), FactionBranch.DailyOutcome(), Spatial.Dist(), Distance(), BaseTileMap.Draw(), TileMapElona.Draw(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), WidgetMinimap.EmitParticle(), Player.EnterLocalZone(), Equals(), ZonePreEnterDigStairs.Execute(), Algorithms.PathFinder.FindPath(), GameUpdater.SurfaceUpdater.FixedUpdate(), GameUpdater.FastSurfaceUpdater.FixedUpdate(), GameUpdater.LogicUpdater.FixedUpdate(), TraitBoat.ForeachDeck(), ForeachNearestPoint(), Map.ForeachNeighbor(), Zone.Generate(), Zone_SnowGrave.GenerateGrave(), GetAngle2(), EloMap.GetCell(), AI_Clean.GetCleanPoint(), TraitScrollMapTreasure.GetDest(), TraitNewZone.GetExitPos(), AI_Fish.GetFishingPoint(), GetHashCode(), TaskBuild.GetHitResult(), TaskMine.GetHitResult(), TileTypeVine.GetMountHeight(), TileTypeWallHang.GetMountHeight(), GetNearestPoint(), AI_Trolley.GetPoint(), GetPointTowards(), GetRandomNeighbor(), Region.GetRandomPoint(), GetRandomPoint(), GetRandomPointInRadius(), MapBounds.GetRandomSpace(), GetShared(), MapBounds.GetSpawnPos(), EloMap.GetZone(), AM_MoveInstalled.HitTest(), AI_Goto.IsDestinationReached(), PathProgress.IsDestinationReached(), BaseTileSelector.IsInRange(), Los.IsVisible(), Map.ListPointsInArc(), Map.ListPointsInCircle(), Map.ListPointsInSquare(), Map.ListPointsOnEdge(), Los.ListVisible(), Chara.LookAt(), MapGen.MakeNeighbor(), MapGen.MakeNeighbor_old(), MapGen.MakeRiver(), MapGen.MakeRoad(), Map.MineBlock(), Map.MineFloor(), Map.MineObj(), Map.MineRamp(), ModFire(), Map.MoveCard(), POIMap.OccyupyPOI(), WidgetArtTool.OnActivate(), Region.OnAdvanceHour(), AM_Copy.OnAfterProcessTiles(), Zone_Nymelle.OnBeforeSimulate(), TaskDrawWater.OnCreateProgress(), TaskPourWater.OnCreateProgress(), SurvivalManager.OnExpandFloor(), Act.OnMarkMapHighlights(), SurvivalManager.OnMineWreck(), AIWork_Clean.OnPerformWork(), GenRoom.OnPopulate(), AM_Populate.OnProcessTiles(), AM_Terrain.OnProcessTiles(), AI_Water.OnProgressComplete(), TaskCut.OnProgressComplete(), TaskMine.OnProgressComplete(), TaskMoveInstalled.OnProgressComplete(), Recipe.OnRenderMarker(), AM_BaseTerrain.OnRenderTile(), HotItemHeld.OnRenderTile(), PointList.OnSerializing(), TraitFertilizer.OnSimulateHour(), TraitDrink.OnThrowGround(), WidgetMinimap.OnUpdate(), TraitStairsLocked.OnUse(), operator+(), Zone_Dungeon.PlaceRail(), Point(), Position(), PositionTopdown(), PositionTopdownTreasure(), AM_Adv.PressedActionMove(), ActEffect.ProcAt(), BaseTileSelector.ProcessTiles(), Room.Refresh(), AM_Adv.RefreshArrow(), AM_Region.RefreshArrow(), BaseTileSelector.RefreshMouseInfo(), Weather.RefreshWeather(), RegionPoint.RegionPoint(), Card.RenderMarker(), Map.Resize(), SerializedCards.Restore(), Map.Reveal(), AI_Bladder.Run(), AI_Clean.Run(), AI_Fish.Run(), GoalCombat.Run(), GoalManualMove.Run(), TaskClean.Run(), TaskWater.Run(), RecipeUpdater.RunRecipe(), Map.Save(), ActWait.Search(), Set(), LogicalPoint.Set(), SetBlock(), SetFloor(), SetObj(), Card.SetPlaceState(), RegionPoint.SetRegionPoint(), LayerCraftFloat.ShowContextMenu(), TraitDoor.ToggleDoor(), TraitDoorSwing.ToggleDoor(), ToString(), Zone.TryGenerateShrine(), AI_Goto.TryGoTo(), MapGen.TryMakeRiver(), Card.TryMoveFrom(), TraitNewZone.TrySetAct(), GoalCombat.TryUseAbility(), GameUpdater.Update(), LogicalFire.Update(), CoreDebug.UpdateInput(), WidgetDebug.UpdateText(), Map.ValidateInstalled(), VirtualRoom.VirtualRoom(), and Within().

◆ Zero

Point Point.Zero = new Point()
static

Definition at line 33 of file Point.cs.

Property Documentation

◆ area

◆ cell

Cell Point.cell
get

Definition at line 47 of file Point.cs.

Referenced by Map._AddCard(), ObjInfo._CanInspect(), TaskPoint._CanPerformTask(), AIWork._FuncWorkPoint(), PathManager._GetFirstStep(), ActionMode._HitTest(), TileType._HitTest(), Chara._Move(), Effect._Play(), Map._RemoveCard(), ActPlan._Update(), Map._ValidateInstalled(), SourceMaterial.Row.AddBlood(), Area.AddPoint(), GameDate.AdvanceMin(), PartialMap.Apply(), TraitHouseBoard.ApplyData(), ActMelee.Attack(), Recipe.Build(), RecipeBridgePillar.Build(), RecipeCard.Build(), TaskClean.CanClean(), Chara.CanDuplicate(), AI_Fish.CanPerform(), TaskDrawWater.CanProgress(), TaskHarvest.CanProgress(), TaskPourWater.CanProgress(), Player.CanSee(), TraitPotionEmpty.CanUse(), CoreDebug.COM_Teleport(), RecipeCard.Craft(), Crawler.Crawl(), ActEffect.DamageEle(), Map.DestroyObj(), BaseGameScreen.Draw(), BaseTileMap.Draw(), TileMapElona.Draw(), CardRenderer.Draw(), ScreenGuide.DrawWall(), AM_Build.FixBridge(), GameUpdater.SurfaceUpdater.FixedUpdate(), GameUpdater.FastSurfaceUpdater.FixedUpdate(), ForeachNearestPoint(), Zone.Generate(), AI_Clean.GetCleanPoint(), TileTypeVine.GetDesiredDir(), TileTypeWallHang.GetDesiredDir(), AI_Fish.GetFishingPoint(), AM_Mine.GetGuidePass(), TaskBuild.GetHitResult(), TaskDrawWater.GetHitResult(), TaskMine.GetHitResult(), TaskPlow.GetHitResult(), TaskPourWater.GetHitResult(), Map.GetNearbyResourcePoint(), GetNearestPoint(), LogicalPointManager.GetOrCreate(), Map.GetRandomPoint(), MapBounds.GetRandomSpace(), MapBounds.GetRandomSpawnPos(), Chara.GetRoomWork(), ActEffect.GetShortTeleportPos(), Zone.GetSpawnPos(), Card.GetSprite(), MapBounds.GetSurface(), ActEffect.GetTeleportPos(), TaskWater.GetText(), BaseTaskHarvest.GetTextSmall(), TaskDig.GetTextSmall(), TaskMine.GetTextSmall(), BaseTileMap.GetThingPosition(), TraitBoat.GetWaterMat(), Chara.HasAccess(), Recipe.HasSameTile(), AM_Build.HitTest(), AM_Copy.HitTest(), AM_FlagCell.HitTest(), TileTypeBridgePillar.HitTest(), TileTypeRoof.HitTest(), IsBlockByHeight(), TraitDoor.IsOpen(), IsPublicSpace(), TraitDoor.IsValid(), Trait.ListPoints(), Map.ListPointsInCircle(), Map.ListPointsInSquare(), Map.ListPointsOnEdge(), Props.ListThingStack(), MapGen.MakeRiver(), Map.MineBlock(), Map.MineFloor(), Map.MineObj(), Map.MineObjSound(), Map.MineRamp(), ModFire(), Chara.MoveRandom(), DesignationList< T >.OnAdd(), FactionBranch.OnAfterSimulate(), TaskDig.OnCreateProgress(), TaskDrawWater.OnCreateProgress(), TaskHarvest.OnCreateProgress(), TaskMine.OnCreateProgress(), TaskPlow.OnCreateProgress(), TaskPourWater.OnCreateProgress(), GrowSystem.OnExceedLastStage(), SurvivalManager.OnMineWreck(), WidgetMinimap.OnPointerDown(), AM_FlagCell.OnProcessTiles(), AM_Populate.OnProcessTiles(), AM_Terrain.OnProcessTiles(), TaskCut.OnProgress(), TaskBuild.OnProgressComplete(), Area.OnRemove(), Recipe.OnRenderMarker(), RecipeCard.OnRenderMarker(), ActionMode.OnRenderTile(), AM_Build.OnRenderTile(), AM_Mine.OnRenderTile(), AM_Picker.OnRenderTile(), TraitRoadSign.OnRenderTile(), ActionMode.OnRenderTileFloor(), TaskCut.OnStart(), EffectIRenderer.OnUpdate(), ActRanged.Perform(), ActWater.Perform(), Zone_Dungeon.PlaceRail(), Plow(), GenRoom.Populate(), MapGen.Populate(), BiomeProfile.Populate(), Position(), PositionTopdown(), ActEffect.ProcAt(), Room.Refresh(), Zone.RefreshBGM(), ActionMode.RefreshTexts(), BaseGameScreen.RefreshWeather(), DesignationList< T >.Remove(), Area.RemovePoint(), Card.RenderMarker(), ActionMode.RotateUnderMouse(), AI_Clean.Run(), AI_Fish.Run(), AI_Idle.Run(), TaskClean.Run(), TaskWater.Run(), RecipeUpdater.RunRecipe(), Map.SetFoormark(), Card.SetHidden(), Card.SetPlaceState(), PointTarget.ShouldIgnore(), TraitTrolley.ShouldPlaySound(), TaskWater.ShouldWater(), AM_Picker.TestFloor(), AM_Picker.TestObj(), AM_Terrain.TopHeight(), LogicalFire.Transfer(), Zone.TryAddThing(), BiomeProfile.ClusterObj.TryCreate(), BiomeProfile.ClusterThing.TryCreate(), TaskHarvest.TryGetAct(), AI_Goto.TryGoTo(), TraitHouseBoard.TrySetAct(), TraitRoomPlate.TrySetAct(), TraitFakeTile.TrySetHeldAct(), HotItemHeld.TrySetToolAct(), Map.TryShatter(), TraitSeed.TrySprout(), LogicalFire.Update(), TraitSpotBiome.Update(), TransAnime.Update(), GameUpdater.Update100ms(), ActionMode.UpdateInput(), Chara.UpdateSight(), WidgetDebug.UpdateText(), BlockInfo.WriteNote(), and ObjInfo.WriteNote().

◆ Charas

◆ detail

◆ eloX

int Point.eloX
get

Definition at line 75 of file Point.cs.

Referenced by Chara.Tick().

◆ eloY

int Point.eloY
get

Definition at line 77 of file Point.cs.

Referenced by Chara.Tick().

◆ FirstChara

◆ FirstThing

Thing Point.FirstThing
get

Definition at line 296 of file Point.cs.

297 {
298 get
299 {
300 CellDetail cellDetail = detail;
301 if (cellDetail == null || cellDetail.things.Count <= 0)
302 {
303 return null;
304 }
305 return detail.things[0];
306 }
307 }

Referenced by CardRenderer.Draw(), and CoreDebug.UpdateInput().

◆ Front

Point Point.Front
get

Definition at line 71 of file Point.cs.

◆ growth

◆ HasArea

bool Point.HasArea
get

Definition at line 231 of file Point.cs.

Referenced by TileType._HitTest().

◆ HasBlock

◆ HasBlockRecipe

bool Point.HasBlockRecipe
get

Definition at line 213 of file Point.cs.

Referenced by UIInspector.DrawHighlight(), and ActionMode.GetGuidePass().

◆ HasBridge

◆ HasChara

◆ HasDecal

bool Point.HasDecal
get

◆ HasDesignation

bool Point.HasDesignation
get

Definition at line 79 of file Point.cs.

Referenced by AM_Designation< T >.HitTest(), and AM_Build.OnProcessTiles().

◆ HasDirt

bool Point.HasDirt
get

Definition at line 81 of file Point.cs.

Referenced by TaskClean.CanClean(), AI_Clean.GetCleanPoint(), and AI_Clean.Run().

◆ HasFence

bool Point.HasFence
get

Definition at line 165 of file Point.cs.

166 {
167 get
168 {
169 if (cell._block != 0)
170 {
171 return cell.sourceBlock.tileType.IsFence;
172 }
173 return false;
174 }
175 }
SourceBlock.Row sourceBlock
Definition: Cell.cs:1090
int _block
Definition: Cell.cs:42

◆ HasFloor

bool Point.HasFloor
get

Definition at line 215 of file Point.cs.

Referenced by CoreDebug.COM_Teleport(), Map.MineFloor(), and AM_Picker.Test().

◆ HasMinableBlock

bool Point.HasMinableBlock
get

Definition at line 139 of file Point.cs.

140 {
141 get
142 {
143 if (HasObj)
144 {
145 return sourceBlock.tileType.IsFullBlock;
146 }
147 return false;
148 }
149 }
SourceBlock.Row sourceBlock
Definition: Point.cs:59
bool HasObj
Definition: Point.cs:133

Referenced by TaskCut.GetHitResult(), and AI_HaulResource.Run().

◆ HasMultipleChara

bool Point.HasMultipleChara
get

Definition at line 259 of file Point.cs.

260 {
261 get
262 {
263 if (detail != null)
264 {
265 return detail.charas.Count > 1;
266 }
267 return false;
268 }
269 }

Referenced by GoalSleep.Run().

◆ HasNonWallBlock

bool Point.HasNonWallBlock
get

Definition at line 189 of file Point.cs.

190 {
191 get
192 {
193 if (HasBlock)
194 {
195 return !cell.sourceBlock.tileType.IsWallOrFence;
196 }
197 return false;
198 }
199 }
bool HasBlock
Definition: Point.cs:137

Referenced by BlockInfo._CanInspect(), ActionMode.GetGuidePass(), and Recipe.OnRenderMarker().

◆ HasObj

◆ HasRail

bool Point.HasRail
get

Definition at line 129 of file Point.cs.

Referenced by TraitTrolley.CanActivate(), and AI_Trolley.GetPoint().

◆ HasRamp

bool Point.HasRamp
get

Definition at line 127 of file Point.cs.

◆ HasRampOrLadder

bool Point.HasRampOrLadder
get

Definition at line 131 of file Point.cs.

◆ HasTaskBuild

bool Point.HasTaskBuild
get

Definition at line 201 of file Point.cs.

202 {
203 get
204 {
205 if (cell.detail != null)
206 {
207 return cell.detail.designation is TaskBuild;
208 }
209 return false;
210 }
211 }
CellDetail detail
Definition: Cell.cs:112

◆ HasThing

bool Point.HasThing
get

Definition at line 246 of file Point.cs.

247 {
248 get
249 {
250 CellDetail cellDetail = detail;
251 if (cellDetail == null)
252 {
253 return false;
254 }
255 return cellDetail.things.Count > 0;
256 }
257 }

Referenced by Chara._Move(), ActPlan._Update(), Zone.Generate(), SurvivalManager.GetRandomPoint(), Zone_Dungeon.PlaceRail(), Zone.SpawnLostItems(), Zone.TryGenerateShrine(), TaskHarvest.TryGetAct(), and TraitSpotBiome.Update().

◆ HasWall

bool Point.HasWall
get

Definition at line 153 of file Point.cs.

154 {
155 get
156 {
157 if (cell._block != 0)
158 {
159 return cell.sourceBlock.tileType.IsWall;
160 }
161 return false;
162 }
163 }

◆ HasWallOrFence

◆ index

◆ Installed

◆ IsBlocked

◆ IsDeepWater

bool Point.IsDeepWater
get

Definition at line 271 of file Point.cs.

272 {
273 get
274 {
276 {
277 return sourceFloor.tileType.IsDeepWater;
278 }
279 return false;
280 }
281 }
bool IsTopWaterAndNoSnow
Definition: Cell.cs:748
SourceFloor.Row sourceFloor
Definition: Point.cs:61

Referenced by Chara.MoveRandom().

◆ IsFarmField

◆ IsHidden

bool Point.IsHidden
get

Definition at line 342 of file Point.cs.

343 {
344 get
345 {
346 if (cell.isSeen)
347 {
348 if (cell.room != null && !EClass.screen.tileMap.hideRoomFog && !cell.hasDoor)
349 {
350 return cell.HasRoof;
351 }
352 return false;
353 }
354 return true;
355 }
356 }
bool hideRoomFog
Definition: BaseTileMap.cs:281
bool HasRoof
Definition: Cell.cs:684
bool isSeen
Definition: Cell.cs:294

Referenced by ActPlan._Update(), ActThrow.CanPerform(), Chara.CanSeeSimple(), HotItemHeld.TrySetToolAct(), and PointTarget.Update().

◆ IsHotSpring

bool Point.IsHotSpring
get

Definition at line 370 of file Point.cs.

371 {
372 get
373 {
375 {
376 if (!EClass.debug.enable && !EClass._zone.elements.Has(3701))
377 {
378 return IsInSpot<TraitGeyser>();
379 }
380 return true;
381 }
382 return false;
383 }
384 }
bool enable
Definition: CoreDebug.cs:302
static CoreDebug debug
Definition: EClass.cs:49
bool Has(int ele)
ElementContainerZone elements
Definition: Zone.cs:46
virtual bool IsUnderwater
Definition: Zone.cs:276

Referenced by AI_Idle.Run(), AI_PassTime.Run(), and TraitFoodEgg.Update().

◆ IsInBounds

◆ IsInBoundsPlus

bool Point.IsInBoundsPlus
get

Definition at line 111 of file Point.cs.

112 {
113 get
114 {
115 if (x >= 0 && z >= 0 && x <= map.Size - 1)
116 {
117 return z <= map.Size - 1;
118 }
119 return false;
120 }
121 }

Referenced by ActionMode._HitTest(), and TaskBuild.GetHitResult().

◆ IsSeen

◆ IsSky

bool Point.IsSky
get

Definition at line 219 of file Point.cs.

220 {
221 get
222 {
223 if (sourceFloor.tileType == TileType.Sky)
224 {
225 return !HasBridge;
226 }
227 return false;
228 }
229 }
bool HasBridge
Definition: Point.cs:217
static TileTypeSky Sky
Definition: TileType.cs:75

Referenced by TileType._HitTest(), ActPlan._Update(), ActThrow.CanPerform(), TaskDig.GetHitResult(), SurvivalManager.GetRandomPoint(), Map.MineFloor(), TaskDig.OnProgressComplete(), TraitSpotBiome.Update(), and GameUpdater.Update100ms().

◆ IsSunLit

bool Point.IsSunLit
get

Definition at line 177 of file Point.cs.

178 {
179 get
180 {
182 {
183 return Map.sunMap.Contains(index);
184 }
185 return true;
186 }
187 }
bool IsNight
Definition: Date.cs:112
static World world
Definition: EClass.cs:41
Definition: Map.cs:13
bool IsIndoor
Definition: Map.cs:136
static HashSet< int > sunMap
Definition: Map.cs:14
GameDate date
Definition: World.cs:6

Referenced by Chara.CanDuplicate(), and ActEffect.ProcAt().

◆ IsSync

◆ IsValid

bool Point.IsValid
getset

Definition at line 83 of file Point.cs.

84 {
85 get
86 {
87 if (x >= 0 && z >= 0 && x < map.Size)
88 {
89 return z < map.Size;
90 }
91 return false;
92 }
93 set
94 {
95 x = ((!value) ? (-999) : 0);
96 }
97 }

Referenced by PathManager._GetFirstStep(), ActionMode._HitTest(), AM_Sim._OnUpdateInput(), Effect._Play(), BaseTileSelector._ProcessTile(), ActPlan._Update(), Map._ValidateInstalled(), Zone.Activate(), Map.AddCardOnActivate(), Zone.AddCardSplinkle(), Zone.AddGlobalCharasOnActivate(), Card.AddThing(), AM_Adv.AxisMove(), DesignationList< T >.CanAdd(), Chara.CanInteractTo(), Chara.CanMoveTo(), Chara.CanSee(), Chara.CanSeeSimple(), CoreDebug.COM_Teleport(), Chara.DestroyPath(), Card.Die(), AIAct.DoGoto(), AIAct.DoGotoInteraction(), BaseTileMap.Draw(), ZonePreEnterDigStairs.Execute(), FindThing< T >(), GameUpdater.SurfaceUpdater.FixedUpdate(), GameUpdater.FastSurfaceUpdater.FixedUpdate(), ForeachNearestPoint(), ForeachNeighbor(), Zone.Generate(), AI_Clean.GetCleanPoint(), PathManager.GetFirstStep(), AI_Fish.GetFishingPoint(), TaskBuild.GetHitResult(), LayerInspect.GetMenuItems(), Map.GetNearbyResourcePoint(), GetNearestPoint(), LogicalPointManager.GetOrCreate(), AI_Trolley.GetPoint(), Map.GetRandomEdge(), MapBounds.GetRandomEdge(), Trait.GetRandomPoint(), GetRandomPoint(), GetRandomPointInRadius(), MapBounds.GetRandomSpawnPos(), MapBounds.GetRandomSurface(), Zone.GetRandomVisitPos(), ActEffect.GetShortTeleportPos(), Zone.GetSpawnPos(), Card.GetSprite(), ActEffect.GetTeleportPos(), AM_BaseTerrain.HitTest(), UIInspector.InspectUnderMouse(), Chara.IsEnemyOnPath(), MapGen.MakeNeighbor(), MapGen.MakeNeighbor_old(), MapGen.MakeRoad(), Map.MineBlock(), Map.MineFloor(), Map.MineObj(), Map.MineRamp(), ActBolt.OnMarkMapHighlights(), ActComet.OnMarkMapHighlights(), ActFlare.OnMarkMapHighlights(), ActRush.OnMarkMapHighlights(), ActTelekinesis.OnMarkMapHighlights(), TileSelectorElona.OnRenderTile(), ActionMode.OnRenderTile(), AM_BaseTerrain.OnRenderTile(), ActionMode.OnRenderTileFloor(), BaseTileSelector.OnUpdate(), AM_BaseGameMode.OnUpdateInput(), LayerInspect.OnUpdateInput(), CardRenderer.PlayAnime(), AM_Adv.PressedActionMove(), ActEffect.Proc(), ActEffect.ProcAt(), WidgetSearch.RefreshList(), BaseTileSelector.RefreshMouseInfo(), Chara.RequestProtection(), SerializedCards.Restore(), ActionMode.RotateUnderMouse(), AI_Fish.Run(), AI_Idle.Run(), GoalCombat.Run(), GoalManualMove.Run(), TaskDump.Run(), Player.TargetRanged(), AI_Goto.TryGoTo(), Card.TryMoveFrom(), LayerInteraction.TryShow(), Zone.TrySpawnFollower(), GameUpdater.Update(), LogicalFire.Update(), PointTarget.Update(), GameUpdater.Update100ms(), ActionMode.UpdateInput(), CoreDebug.UpdateInput(), Chara.UpdateSight(), and WidgetDebug.UpdateText().

◆ IsWater

bool Point.IsWater
get

◆ LastThing

Thing Point.LastThing
get

Definition at line 309 of file Point.cs.

310 {
311 get
312 {
313 CellDetail cellDetail = detail;
314 if (cellDetail == null || cellDetail.things.Count <= 0)
315 {
316 return null;
317 }
318 return detail.things.LastItem();
319 }
320 }

Referenced by CardRenderer.Draw(), AM_EditMarker.GetTarget(), AM_Visibility.GetTarget(), and AM_Adv.ShowAllAction().

◆ matBlock

◆ matBridge

◆ matFloor

◆ matRoofBlock

SourceMaterial.Row Point.matRoofBlock
get

Definition at line 49 of file Point.cs.

◆ sourceBlock

◆ sourceBridge

◆ sourceFloor

◆ sourceObj

◆ sourceRoofBlock

SourceBlock.Row Point.sourceRoofBlock
get

Definition at line 57 of file Point.cs.

◆ Things


The documentation for this class was generated from the following file: