Elin Decompiled Documentation EA 23.321 Nightly Patch 1
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 ()
 
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< CharaListWitnesses (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< CardListCards (bool includeMasked=false)
 
List< CardListVisibleCards ()
 
Card FindAttackTarget ()
 
Chara FindChara (Func< Chara, bool > func)
 
FindThing< T > ()
 
Thing FindThing (Func< Thing, bool > func)
 
List< CardListThings< T > (bool onlyInstalled=true)
 
List< CharaListCharas ()
 
List< CharaListVisibleCharas ()
 
List< CharaListCharasInNeighbor (Func< Chara, bool > func)
 
List< CharaListCharasInRadius (Chara cc, int dist, Func< Chara, bool > func, bool onlyVisible=true)
 
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< IInspectListInspectorTargets ()
 
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< ThingThings [get]
 
List< CharaCharas [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
 

Static Private Attributes

static List< CardlistCard = new List<Card>()
 
static List< CharalistChara = new List<Chara>()
 

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 474 of file Point.cs.

475 {
476 x = p.x;
477 z = p.z;
478 }
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 480 of file Point.cs.

481 {
482 x = _x;
483 z = _z;
484 }

References x, and z.

◆ Point() [4/4]

Point.Point ( int  _index)
inline

Definition at line 486 of file Point.cs.

487 {
488 Set(_index);
489 }
Point Set(int _x, int _z)
Definition: Point.cs:503

References Set().

Member Function Documentation

◆ Animate()

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

Definition at line 1308 of file Point.cs.

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

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 1346 of file Point.cs.

1347 {
1348 if (detail == null || detail.anime == null)
1349 {
1350 return p;
1351 }
1352 p.x += detail.anime.v.x;
1353 p.y += detail.anime.v.y;
1354 p.z += detail.anime.v.z;
1355 return p;
1356 }
CellDetail detail
Definition: Point.cs:71
Vector3 v
Definition: TransAnime.cs:5

◆ ApplyAnime() [2/2]

RenderParam Point.ApplyAnime ( RenderParam  p)
inline

Definition at line 1331 of file Point.cs.

1332 {
1333 if (detail == null || detail.anime == null)
1334 {
1335 return p;
1336 }
1337 p.x += detail.anime.v.x;
1338 p.y += detail.anime.v.y;
1339 p.z += detail.anime.v.z;
1340 p.v.x += detail.anime.v.x;
1341 p.v.y += detail.anime.v.y;
1342 p.v.z += detail.anime.v.z;
1343 return p;
1344 }

References RenderParam.v.

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

◆ CallGuard()

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

Definition at line 903 of file Point.cs.

904 {
905 if (caller.HasCondition<ConSleep>())
906 {
907 caller.RemoveCondition<ConSleep>();
908 }
909 caller.Talk("callGuards");
910 List<Chara> list = EClass._map.charas.Where((Chara c) => c.trait is TraitGuard && !c.IsInCombat).ToList();
911 if (list.Count > 0)
912 {
913 list.Sort((Chara a, Chara b) => a.Dist(criminal) - b.Dist(criminal));
914 Chara chara = list.First();
915 caller.Say("calledGuard", caller);
916 chara.DoHostileAction(criminal);
917 }
919 {
920 EClass._zone.SetAlarm(enable: true);
921 }
922 }
bool IsPCFactionOrMinion
Definition: Card.cs:2342
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:7138
int Dist(Card c)
Definition: Card.cs:8131
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7256
Definition: Chara.cs:10
bool IsInCombat
Definition: Chara.cs:887
bool HasCondition(string alias)
Definition: Chara.cs:9866
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:6631
static Zone _zone
Definition: EClass.cs:21
List< Chara > charas
Definition: Map.cs:81
bool isAlarmSet
Definition: Spatial.cs:430
virtual bool SetAlarmOnBreakLaw
Definition: Zone.cs:235
virtual void SetAlarm(bool enable)
Definition: Zone.cs:3756

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 1014 of file Point.cs.

1015 {
1016 if (useBounds)
1017 {
1018 if (x < map.bounds.x)
1019 {
1020 x = map.bounds.x;
1021 }
1022 else if (x >= map.bounds.maxX)
1023 {
1024 x = map.bounds.maxX;
1025 }
1026 if (z < map.bounds.z)
1027 {
1028 z = map.bounds.z;
1029 }
1030 else if (z >= map.bounds.maxZ)
1031 {
1032 z = map.bounds.maxZ;
1033 }
1034 }
1035 else
1036 {
1037 if (x < 0)
1038 {
1039 x = 0;
1040 }
1041 else if (x >= map.Size)
1042 {
1043 x = map.Size - 1;
1044 }
1045 if (z < 0)
1046 {
1047 z = 0;
1048 }
1049 else if (z >= map.Size)
1050 {
1051 z = map.Size - 1;
1052 }
1053 }
1054 return this;
1055 }
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:52
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 491 of file Point.cs.

492 {
493 return new Point(x, z);
494 }
Point()
Definition: Point.cs:470

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(), 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(), 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 496 of file Point.cs.

496 : Point
497 {
498 T val = Activator.CreateInstance<T>();
499 val.Set(this);
500 return val;
501 }
Definition: Point.cs:9

References Set().

◆ Distance() [1/2]

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

Definition at line 1000 of file Point.cs.

1001 {
1002 return Fov.Distance(tx, tz, x, z);
1003 }
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 966 of file Point.cs.

967 {
968 if (x == _x)
969 {
970 return z == _z;
971 }
972 return false;
973 }

References x, and z.

Referenced by ActPlan._Update(), Zone.Activate(), 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(), 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 975 of file Point.cs.

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

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

◆ FindAttackTarget()

Card Point.FindAttackTarget ( )
inline

Definition at line 1104 of file Point.cs.

1105 {
1106 foreach (Card item in ListCards())
1107 {
1108 if (item.isChara || item.trait.CanBeAttacked)
1109 {
1110 return item;
1111 }
1112 }
1113 return null;
1114 }
Definition: Card.cs:11
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1057

References item, and ListCards().

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

◆ FindChara()

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

Definition at line 1116 of file Point.cs.

1117 {
1118 if (detail != null)
1119 {
1120 foreach (Chara chara in detail.charas)
1121 {
1122 if (func(chara))
1123 {
1124 return chara;
1125 }
1126 }
1127 }
1128 return null;
1129 }
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 1146 of file Point.cs.

1147 {
1148 if (detail != null)
1149 {
1150 foreach (Thing thing in detail.things)
1151 {
1152 if (func(thing))
1153 {
1154 return thing;
1155 }
1156 }
1157 }
1158 return null;
1159 }
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 1131 of file Point.cs.

1131 : Trait
1132 {
1133 if (IsValid && detail != null)
1134 {
1135 foreach (Thing thing in detail.things)
1136 {
1137 if (thing.trait is T)
1138 {
1139 return thing.trait as T;
1140 }
1141 }
1142 }
1143 return null;
1144 }
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 406 of file Point.cs.

407 {
408 if (detail != null)
409 {
410 foreach (Chara chara in detail.charas)
411 {
412 if (EClass.pc.CanSee(chara))
413 {
414 return chara;
415 }
416 }
417 }
418 return null;
419 }
bool CanSee(Card c)
Definition: Chara.cs:1253
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 1391 of file Point.cs.

1392 {
1393 for (int i = 0; i < h; i++)
1394 {
1395 for (int j = 0; j < w; j++)
1396 {
1397 shared3.Set(x - j, z + i);
1398 action(shared3, j == 0 && i == 0);
1399 }
1400 }
1401 }
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 696 of file Point.cs.

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

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 1403 of file Point.cs.

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

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 612 of file Point.cs.

613 {
614 Vector3 vector = to.Position() - Position();
615 return Mathf.Atan2(vector.y, vector.x) * 57.29578f;
616 }
ref Vector3 Position(int height)
Definition: Point.cs:553
ref Vector3 Position()
Definition: Point.cs:565

References Position().

Referenced by GetRotation().

◆ GetAngle2()

float Point.GetAngle2 ( Point  to)
inline

Definition at line 618 of file Point.cs.

619 {
620 int num = to.x - x;
621 return Mathf.Atan2(to.z - z, num) * 57.29578f;
622 }

References x, and z.

Referenced by Map.ListPointsInArc().

◆ GetHashCode()

override int Point.GetHashCode ( )
inline

Definition at line 990 of file Point.cs.

991 {
992 return x + z * map.Size;
993 }

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

◆ GetInstalled< T >()

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

Definition at line 1239 of file Point.cs.

1239 : Trait
1240 {
1241 if (detail != null)
1242 {
1243 foreach (Thing thing in detail.things)
1244 {
1245 if (thing.IsInstalled && thing.trait is T)
1246 {
1247 return thing.trait as T;
1248 }
1249 }
1250 }
1251 return null;
1252 }
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 624 of file Point.cs.

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

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.HatchEgg(), TraitFoodEggFertilized.Incubate(), ListPeopleParty.JoinParty(), Card.Kick(), Chara.MoveHome(), Zone_Void.OnActivate(), FactionBranch.OnActivateZone(), FactionBranch.OnAfterSimulate(), 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(), Card.TryUnrestrain(), and CoreDebug.UpdateInput().

◆ GetPointTowards()

Point Point.GetPointTowards ( Point  dest)
inline

Definition at line 806 of file Point.cs.

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

References Point(), x, and z.

Referenced by Chara.TryMoveTowards().

◆ GetRandomNeighbor()

Point Point.GetRandomNeighbor ( )
inline

Definition at line 764 of file Point.cs.

765 {
766 int num = ((EClass.rnd(2) == 0) ? 1 : (-1));
767 if (EClass.rnd(2) == 0)
768 {
769 return new Point(Mathf.Clamp(x + num, 0, map.Size - 1), z);
770 }
771 return new Point(x, Mathf.Clamp(z + num, 0, map.Size - 1));
772 }
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 774 of file Point.cs.

775 {
776 Point point = new Point();
777 for (int i = 0; i < tries; i++)
778 {
779 point.Set(x - radius + EClass.rnd(radius * 2 + 1), z - radius + EClass.rnd(radius * 2 + 1));
780 if (point.IsValid && (allowBlocked || !point.IsBlocked) && (!requireLos || Los.IsVisible(this, point)) && (allowChara || !point.HasChara))
781 {
782 return point;
783 }
784 }
785 return null;
786 }
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:363

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

Referenced by ZonePreEnterEncounter.Execute(), FactionBranch.GenerateGarbage(), Zone.GetRandomVisitPos(), 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 788 of file Point.cs.

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

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(), and AI_Idle.Run().

◆ GetRotation()

Quaternion Point.GetRotation ( Point  to)
inline

Definition at line 607 of file Point.cs.

608 {
609 return Quaternion.Euler(0f, 0f, GetAngle(to));
610 }
float GetAngle(Point to)
Definition: Point.cs:612

References GetAngle().

Referenced by Effect._Play().

◆ GetShared()

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

Definition at line 390 of file Point.cs.

391 {
392 shared.x = x;
393 shared.z = z;
394 return shared;
395 }
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 1292 of file Point.cs.

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

References Card.isNPCProperty, and Card.things.

◆ HasRoomOrArea()

bool Point.HasRoomOrArea ( BaseArea  a)
inline

Definition at line 421 of file Point.cs.

422 {
423 if (area != a)
424 {
425 return cell.room == a;
426 }
427 return true;
428 }
Area area
Definition: Point.cs:73

References area.

Referenced by Map.FindThing().

◆ IsBlockByHeight()

bool Point.IsBlockByHeight ( Point  p)
inline

Definition at line 1005 of file Point.cs.

1006 {
1007 if (Mathf.Abs(p.cell.minHeight - cell.topHeight) > 8)
1008 {
1009 return Mathf.Abs(p.cell.topHeight - cell.minHeight) > 8;
1010 }
1011 return false;
1012 }
byte topHeight
Definition: Cell.cs:86
byte minHeight
Definition: Cell.cs:88

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

◆ IsInSpot< T >()

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

Definition at line 430 of file Point.cs.

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

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

◆ IsPublicSpace()

bool Point.IsPublicSpace ( )
inline

Definition at line 449 of file Point.cs.

450 {
451 if (area != null)
452 {
454 {
455 return true;
456 }
457 return false;
458 }
459 if (cell.room != null)
460 {
462 {
463 return true;
464 }
465 return false;
466 }
467 return true;
468 }
virtual bool IsPublicArea
Definition: AreaType.cs:20
AreaType type
Definition: BaseArea.cs:32
Room room
Definition: Cell.cs:110

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 1057 of file Point.cs.

1058 {
1059 listCard.Clear();
1060 bool flag = EClass.scene.actionMode != null && EClass.scene.actionMode.IsRoofEditMode();
1061 if (detail != null)
1062 {
1063 foreach (Thing thing in detail.things)
1064 {
1065 if (!thing.isHidden && (includeMasked || !thing.isMasked) && thing.isRoofItem == flag)
1066 {
1067 listCard.Add(thing);
1068 }
1069 }
1070 if (!flag)
1071 {
1072 foreach (Chara chara in detail.charas)
1073 {
1074 listCard.Add(chara);
1075 }
1076 }
1077 }
1078 return listCard;
1079 }
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
static List< Card > listCard
Definition: Point.cs:45
ActionMode actionMode
Definition: Scene.cs:79

References Scene.actionMode, CellDetail.charas, detail, Card.isHidden, Card.isMasked, ActionMode.IsRoofEditMode(), Card.isRoofItem, listCard, 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(), Map.RefreshFOV(), 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 1177 of file Point.cs.

1178 {
1179 listChara.Clear();
1180 if (detail != null)
1181 {
1182 foreach (Chara chara in detail.charas)
1183 {
1184 listChara.Add(chara);
1185 }
1186 }
1187 return listChara;
1188 }
static List< Chara > listChara
Definition: Point.cs:47

References CellDetail.charas, detail, and listChara.

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 1206 of file Point.cs.

1207 {
1208 listChara.Clear();
1209 ForeachNeighbor(delegate(Point p)
1210 {
1211 if (p.detail == null)
1212 {
1213 return;
1214 }
1215 foreach (Chara chara in p.detail.charas)
1216 {
1217 if (func(chara))
1218 {
1219 listChara.Add(chara);
1220 }
1221 }
1222 });
1223 return listChara;
1224 }
void ForeachNeighbor(Action< Point > action, bool diagonal=true)
Definition: Point.cs:1403

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

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 1226 of file Point.cs.

1227 {
1228 listChara.Clear();
1229 foreach (Chara chara in EClass._map.charas)
1230 {
1231 if (func(chara) && chara.Dist(cc) < dist && (!onlyVisible || Los.IsVisible(chara, cc)))
1232 {
1233 listChara.Add(chara);
1234 }
1235 }
1236 return listChara;
1237 }

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(), StanceSongEnd.TickSong(), StanceSongSleep.TickSong(), and StanceSongValor.TickSong().

◆ ListInspectorTargets()

List< IInspect > Point.ListInspectorTargets ( )
inline

Definition at line 1358 of file Point.cs.

1359 {
1360 List<IInspect> list = new List<IInspect>();
1361 CellDetail cellDetail = detail;
1362 if (cellDetail != null)
1363 {
1364 foreach (Chara chara in cellDetail.charas)
1365 {
1366 if (chara.isSynced)
1367 {
1368 list.Add(chara);
1369 }
1370 }
1371 foreach (Thing thing in cellDetail.things)
1372 {
1373 list.Add(thing);
1374 }
1375 if (cellDetail.designation != null && !(cellDetail.designation is TaskCut) && !(cellDetail.designation is TaskMine))
1376 {
1377 list.Add(cellDetail.designation);
1378 }
1379 }
1380 if (ObjInfo._CanInspect(this))
1381 {
1382 list.Add(ObjInfo.GetTempList(this));
1383 }
1384 if (BlockInfo._CanInspect(this))
1385 {
1386 list.Add(BlockInfo.GetTempList(this));
1387 }
1388 return list;
1389 }
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:709
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 1161 of file Point.cs.

1161 : Trait
1162 {
1163 listCard.Clear();
1164 if (detail != null)
1165 {
1166 foreach (Thing thing in detail.things)
1167 {
1168 if (!thing.isHidden && !thing.isRoofItem && !thing.isMasked && (!onlyInstalled || thing.IsInstalled) && thing.trait is T)
1169 {
1170 listCard.Add(thing);
1171 }
1172 }
1173 }
1174 return listCard;
1175 }

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

◆ ListVisibleCards()

List< Card > Point.ListVisibleCards ( )
inline

Definition at line 1081 of file Point.cs.

1082 {
1083 listCard.Clear();
1084 if (detail != null)
1085 {
1086 foreach (Thing thing in detail.things)
1087 {
1088 if (!thing.isHidden && !thing.isMasked && !thing.isRoofItem)
1089 {
1090 listCard.Add(thing);
1091 }
1092 }
1093 foreach (Chara chara in detail.charas)
1094 {
1095 if (EClass.pc.CanSee(chara))
1096 {
1097 listCard.Add(chara);
1098 }
1099 }
1100 }
1101 return listCard;
1102 }

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

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

◆ ListVisibleCharas()

List< Chara > Point.ListVisibleCharas ( )
inline

Definition at line 1190 of file Point.cs.

1191 {
1192 listChara.Clear();
1193 if (detail != null)
1194 {
1195 foreach (Chara chara in detail.charas)
1196 {
1197 if (EClass.pc.CanSee(chara))
1198 {
1199 listChara.Add(chara);
1200 }
1201 }
1202 }
1203 return listChara;
1204 }

References Chara.CanSee(), CellDetail.charas, detail, listChara, 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 835 of file Point.cs.

836 {
837 List<Chara> list = new List<Chara>();
838 foreach (Point item in map.ListPointsInCircle(this, radius, mustBeWalkable: false))
839 {
840 List<Chara> list2 = item.detail?.charas;
841 if (list2 == null || list2.Count == 0)
842 {
843 continue;
844 }
845 foreach (Chara item2 in list2)
846 {
847 if (item2 == criminal || item2.IsPC || (item2.HasCondition<ConDim>() && EClass.rnd(2) == 0) || item2.conSuspend != null || item2.isParalyzed || item2.IsDisabled || (type != 0 && type != WitnessType.ally && item2 != target && !item2.CanWitness))
848 {
849 continue;
850 }
851 switch (type)
852 {
853 case WitnessType.ally:
854 if (!criminal.IsPCFaction || item2.hostility <= Hostility.Neutral)
855 {
856 continue;
857 }
858 break;
859 case WitnessType.crime:
860 if (criminal == null || item2.isBlind || item2.isConfused || (criminal.IsPCParty && (item2.IsPCFaction || item2.IsPCFactionMinion)) || (target == null && item2.OriginalHostility < Hostility.Neutral))
861 {
862 continue;
863 }
864 break;
865 case WitnessType.music:
866 if (item2.hostility <= Hostility.Enemy)
867 {
868 continue;
869 }
870 break;
871 }
872 list.Add(item2);
873 }
874 }
875 return list;
876 }
Hostility
Definition: Hostility.cs:2
WitnessType
Definition: WitnessType.cs:2
Hostility OriginalHostility
Definition: Chara.cs:475
ConSuspend conSuspend
Definition: Chara.cs:104
override bool IsPC
Definition: Chara.cs:630
override bool IsPCParty
Definition: Chara.cs:633
bool isParalyzed
Definition: Chara.cs:134
override bool IsDisabled
Definition: Chara.cs:591
override bool IsPCFaction
Definition: Chara.cs:689
override bool IsPCFactionMinion
Definition: Chara.cs:673
bool isBlind
Definition: Chara.cs:132
Hostility hostility
Definition: Chara.cs:295
bool CanWitness
Definition: Chara.cs:1026
bool isConfused
Definition: Chara.cs:128
Definition: ConDim.cs:2
List< Point > ListPointsInCircle(Point center, float radius, bool mustBeWalkable=true, bool los=true)
Definition: Map.cs:2323

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 939 of file Point.cs.

940 {
941 if (extinguish && cell.HasFire)
942 {
943 PlaySound("extinguish");
944 PlayEffect("smoke");
945 PlayEffect("vanish");
946 }
947 map.ModFire(x, z, value);
948 }
bool HasFire
Definition: Cell.cs:684
void ModFire(int x, int z, int amount)
Definition: Map.cs:1193
SoundSource PlaySound(string id, bool synced=true, float v=1f, bool spatial=true)
Definition: Point.cs:1259
Effect PlayEffect(string id)
Definition: Point.cs:1254

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 529 of file Point.cs.

530 {
531 return new Point(lhs.x + rhs.x, lhs.z + rhs.z);
532 }

References Point(), x, and z.

◆ PlayEffect()

Effect Point.PlayEffect ( string  id)
inline

Definition at line 1254 of file Point.cs.

1255 {
1256 return Effect.Get(id).Play(this);
1257 }
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(), 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 1259 of file Point.cs.

1260 {
1261 Vector3 vector = default(Vector3);
1262 if (spatial)
1263 {
1264 if (!IsValid)
1265 {
1266 return null;
1267 }
1268 vector = (EClass._zone.IsRegion ? PositionTopdown() : Position());
1269 vector.z = 0f;
1270 if (Vector3.Distance(vector, EClass.scene.transAudio.position) > EClass.core.gameSetting.audio.maxRange)
1271 {
1272 return null;
1273 }
1274 if (!synced)
1275 {
1276 v -= 0.4f;
1277 }
1278 }
1279 return EClass.Sound.Play(id, vector, (!spatial) ? 1f : (v * ((EClass.screen.Zoom >= 1f) ? 1f : EClass.screen.Zoom)));
1280 }
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:299
ref Vector3 PositionTopdown()
Definition: Point.cs:574
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(), 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 950 of file Point.cs.

951 {
952 if (IsFarmField)
953 {
955 {
957 }
958 else if (cell.Front.HasWallOrFence)
959 {
961 }
962 }
963 SetFloor(4, 4);
964 }
bool HasWallOrFence
Definition: Cell.cs:839
Cell Front
Definition: Cell.cs:137
Point GetPoint()
Definition: Cell.cs:1113
Cell Right
Definition: Cell.cs:149
bool IsFarmField
Definition: Point.cs:127
void SetFloor(int idMat=0, int idFloor=0)
Definition: Point.cs:929

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 565 of file Point.cs.

566 {
567 byte b = ((cell.bridgeHeight == 0) ? cell.height : cell.bridgeHeight);
568 vCache.x = (float)(x + z) * _screen.tileAlign.x;
569 vCache.y = (float)(z - x) * _screen.tileAlign.y + (float)(int)b * _screen.tileMap._heightMod.y;
570 vCache.z = 1000f + vCache.x * _screen.tileWeight.x + vCache.y * _screen.tileWeight.z + (float)(int)b * _screen.tileMap._heightMod.z;
571 return ref vCache;
572 }
BaseTileMap tileMap
Vector3 _heightMod
Definition: BaseTileMap.cs:335
byte height
Definition: Cell.cs:80
byte bridgeHeight
Definition: Cell.cs:82
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 544 of file Point.cs.

545 {
547 {
548 return ref PositionTopdown();
549 }
550 return ref Position();
551 }
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 592 of file Point.cs.

593 {
595 {
596 _ = ref PositionTopdown();
597 }
598 else
599 {
600 _ = ref Position();
601 }
602 vCache.x += EClass.screen.tileWorldSize.x * 0.5f;
603 vCache.y += EClass.screen.tileWorldSize.y * 0.75f;
604 return ref vCache;
605 }

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

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

◆ PositionTopdown()

ref Vector3 Point.PositionTopdown ( )
inline

Definition at line 574 of file Point.cs.

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

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 583 of file Point.cs.

584 {
586 vCache.x = (float)(x - EClass.scene.elomap.minX) * screenElona.tileAlign.x;
587 vCache.y = (float)(z - EClass.scene.elomap.minY) * screenElona.tileAlign.y;
588 vCache.z = 1400f;
589 return ref vCache;
590 }
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 1287 of file Point.cs.

1288 {
1290 }
void RefreshSingleTile(int x, int z)
Definition: Map.cs:2148

◆ Set() [1/4]

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

Definition at line 503 of file Point.cs.

504 {
505 x = _x;
506 z = _z;
507 return this;
508 }

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(), 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(), 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 510 of file Point.cs.

511 {
512 x = index % map.Size;
513 z = index % map.SizeXZ / map.Size;
514 return this;
515 }
int index
Definition: Point.cs:49

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

◆ Set() [3/4]

Point Point.Set ( Point  point)
inline

Definition at line 517 of file Point.cs.

518 {
519 x = point.x;
520 z = point.z;
521 return this;
522 }

References x, and z.

◆ Set() [4/4]

void Point.Set ( Vector3  v)
inline

Definition at line 534 of file Point.cs.

535 {
536 v.x -= 0.64f;
537 v.y -= 0.64f;
538 int num = Mathf.RoundToInt(v.x / _screen.tileAlign.x);
539 int num2 = Mathf.RoundToInt(v.y / _screen.tileAlign.y);
540 x = (num2 - num) / 2 * -1;
541 z = num - x;
542 }

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

◆ SetBlock()

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

Definition at line 924 of file Point.cs.

925 {
926 map.SetBlock(x, z, idMat, idBlock);
927 }
void SetBlock(int x, int z, int idMat=0, int idBlock=0)
Definition: Map.cs:1017

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 929 of file Point.cs.

930 {
931 map.SetFloor(x, z, idMat, idFloor);
932 }
void SetFloor(int x, int z, int idMat=0, int idFloor=0)
Definition: Map.cs:970

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 1430 of file Point.cs.

1431 {
1432 cell.highlight = (byte)id;
1434 }
static Player player
Definition: EClass.cs:13
List< Cell > lastMarkedHighlights
Definition: Player.cs:1215

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 820 of file Point.cs.

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

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

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

◆ ToRegionPos()

Point Point.ToRegionPos ( )
inline

Definition at line 1422 of file Point.cs.

1423 {
1424 Point point = new Point(x, z);
1425 point.x += EClass.scene.elomap.minX;
1426 point.z += EClass.scene.elomap.minY;
1427 return point;
1428 }

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

Referenced by TraitDeedRelocate.OnRead().

◆ ToString()

override string Point.ToString ( )
inline

Definition at line 524 of file Point.cs.

525 {
526 return "(" + x + " / " + z + ")";
527 }

References x, and z.

Referenced by Algorithms.PathFinder._FindPath(), 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 878 of file Point.cs.

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

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 397 of file Point.cs.

398 {
399 if (x >= _x && z >= _z && x < _x + _w)
400 {
401 return z < _z + _h;
402 }
403 return false;
404 }

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

◆ listCard

List<Card> Point.listCard = new List<Card>()
staticprivate

Definition at line 45 of file Point.cs.

Referenced by ListCards(), ListThings< T >(), and ListVisibleCards().

◆ listChara

List<Chara> Point.listChara = new List<Chara>()
staticprivate

Definition at line 47 of file Point.cs.

Referenced by ListCharas(), ListCharasInNeighbor(), and ListVisibleCharas().

◆ map

◆ shared

◆ shared2

Point Point.shared2 = new Point()
static

Definition at line 22 of file Point.cs.

Referenced by 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(), Zone.Activate(), 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(), 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(), 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(), TaskDig.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(), 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(), Zone.Activate(), 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(), 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(), 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(), TaskDig.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(), 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 51 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(), 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(), 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(), TraitDye.OnThrowGround(), 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 79 of file Point.cs.

Referenced by Chara.Tick().

◆ eloY

int Point.eloY
get

Definition at line 81 of file Point.cs.

Referenced by Chara.Tick().

◆ FirstChara

◆ FirstThing

Thing Point.FirstThing
get

Definition at line 300 of file Point.cs.

301 {
302 get
303 {
304 CellDetail cellDetail = detail;
305 if (cellDetail == null || cellDetail.things.Count <= 0)
306 {
307 return null;
308 }
309 return detail.things[0];
310 }
311 }

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

◆ Front

Point Point.Front
get

Definition at line 75 of file Point.cs.

◆ growth

◆ HasArea

bool Point.HasArea
get

Definition at line 235 of file Point.cs.

Referenced by TileType._HitTest().

◆ HasBlock

◆ HasBlockRecipe

bool Point.HasBlockRecipe
get

Definition at line 217 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 83 of file Point.cs.

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

◆ HasDirt

bool Point.HasDirt
get

Definition at line 85 of file Point.cs.

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

◆ HasFence

bool Point.HasFence
get

Definition at line 169 of file Point.cs.

170 {
171 get
172 {
173 if (cell._block != 0)
174 {
175 return cell.sourceBlock.tileType.IsFence;
176 }
177 return false;
178 }
179 }
byte _block
Definition: Cell.cs:32
SourceBlock.Row sourceBlock
Definition: Cell.cs:1062

◆ HasFloor

bool Point.HasFloor
get

Definition at line 219 of file Point.cs.

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

◆ HasMinableBlock

bool Point.HasMinableBlock
get

Definition at line 143 of file Point.cs.

144 {
145 get
146 {
147 if (HasObj)
148 {
149 return sourceBlock.tileType.IsFullBlock;
150 }
151 return false;
152 }
153 }
SourceBlock.Row sourceBlock
Definition: Point.cs:63
bool HasObj
Definition: Point.cs:137

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

◆ HasMultipleChara

bool Point.HasMultipleChara
get

Definition at line 263 of file Point.cs.

264 {
265 get
266 {
267 if (detail != null)
268 {
269 return detail.charas.Count > 1;
270 }
271 return false;
272 }
273 }

Referenced by GoalSleep.Run().

◆ HasNonWallBlock

bool Point.HasNonWallBlock
get

Definition at line 193 of file Point.cs.

194 {
195 get
196 {
197 if (HasBlock)
198 {
199 return !cell.sourceBlock.tileType.IsWallOrFence;
200 }
201 return false;
202 }
203 }
bool HasBlock
Definition: Point.cs:141

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

◆ HasObj

◆ HasRail

bool Point.HasRail
get

Definition at line 133 of file Point.cs.

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

◆ HasRamp

bool Point.HasRamp
get

Definition at line 131 of file Point.cs.

◆ HasRampOrLadder

bool Point.HasRampOrLadder
get

Definition at line 135 of file Point.cs.

◆ HasTaskBuild

bool Point.HasTaskBuild
get

Definition at line 205 of file Point.cs.

206 {
207 get
208 {
209 if (cell.detail != null)
210 {
211 return cell.detail.designation is TaskBuild;
212 }
213 return false;
214 }
215 }
CellDetail detail
Definition: Cell.cs:100

◆ HasThing

bool Point.HasThing
get

Definition at line 250 of file Point.cs.

251 {
252 get
253 {
254 CellDetail cellDetail = detail;
255 if (cellDetail == null)
256 {
257 return false;
258 }
259 return cellDetail.things.Count > 0;
260 }
261 }

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 157 of file Point.cs.

158 {
159 get
160 {
161 if (cell._block != 0)
162 {
163 return cell.sourceBlock.tileType.IsWall;
164 }
165 return false;
166 }
167 }

◆ HasWallOrFence

◆ index

◆ Installed

◆ IsBlocked

◆ IsDeepWater

bool Point.IsDeepWater
get

Definition at line 275 of file Point.cs.

276 {
277 get
278 {
280 {
281 return sourceFloor.tileType.IsDeepWater;
282 }
283 return false;
284 }
285 }
bool IsTopWaterAndNoSnow
Definition: Cell.cs:720
SourceFloor.Row sourceFloor
Definition: Point.cs:65

Referenced by Chara.MoveRandom().

◆ IsFarmField

◆ IsHidden

bool Point.IsHidden
get

Definition at line 346 of file Point.cs.

347 {
348 get
349 {
350 if (cell.isSeen)
351 {
352 if (cell.room != null && !EClass.screen.tileMap.hideRoomFog && !cell.hasDoor)
353 {
354 return cell.HasRoof;
355 }
356 return false;
357 }
358 return true;
359 }
360 }
bool hideRoomFog
Definition: BaseTileMap.cs:281
bool HasRoof
Definition: Cell.cs:656
bool isSeen
Definition: Cell.cs:290

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

◆ IsHotSpring

bool Point.IsHotSpring
get

Definition at line 374 of file Point.cs.

375 {
376 get
377 {
379 {
380 if (!EClass.debug.enable && !EClass._zone.elements.Has(3701))
381 {
382 return IsInSpot<TraitGeyser>();
383 }
384 return true;
385 }
386 return false;
387 }
388 }
bool enable
Definition: CoreDebug.cs:301
static CoreDebug debug
Definition: EClass.cs:49
bool Has(int ele)
ElementContainerZone elements
Definition: Zone.cs:43
virtual bool IsUnderwater
Definition: Zone.cs:273

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

◆ IsInBounds

◆ IsInBoundsPlus

bool Point.IsInBoundsPlus
get

Definition at line 115 of file Point.cs.

116 {
117 get
118 {
119 if (x >= 0 && z >= 0 && x <= map.Size - 1)
120 {
121 return z <= map.Size - 1;
122 }
123 return false;
124 }
125 }

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

◆ IsSeen

◆ IsSky

bool Point.IsSky
get

Definition at line 223 of file Point.cs.

224 {
225 get
226 {
227 if (sourceFloor.tileType == TileType.Sky)
228 {
229 return !HasBridge;
230 }
231 return false;
232 }
233 }
bool HasBridge
Definition: Point.cs:221
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 181 of file Point.cs.

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

Referenced by Chara.CanDuplicate().

◆ IsSync

◆ IsValid

bool Point.IsValid
getset

Definition at line 87 of file Point.cs.

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

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(), 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(), 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(), 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 313 of file Point.cs.

314 {
315 get
316 {
317 CellDetail cellDetail = detail;
318 if (cellDetail == null || cellDetail.things.Count <= 0)
319 {
320 return null;
321 }
322 return detail.things.LastItem();
323 }
324 }

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 53 of file Point.cs.

◆ sourceBlock

◆ sourceBridge

◆ sourceFloor

◆ sourceObj

◆ sourceRoofBlock

SourceBlock.Row Point.sourceRoofBlock
get

Definition at line 61 of file Point.cs.

◆ Things


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