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

Public Member Functions

override void Update ()
 
void Transfer (Point p, byte amount=1)
 
- Public Member Functions inherited from LogicalPoint
new void Set (Point p)
 
virtual void Update ()
 
virtual void Kill ()
 
- Public Member Functions inherited from Point
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)
 
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)
 

Properties

int fireAmount [get]
 
override LogicalPointManager manager [get]
 
- Properties inherited from LogicalPoint
virtual LogicalPointManager manager [get]
 
- Properties inherited from Point
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 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]
 
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]
 

Additional Inherited Members

- Static Public Member Functions inherited from Point
static Point GetShared (int x, int z)
 
- Static Public Member Functions inherited from EClass
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
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 inherited from LogicalPoint
new int index
 
bool open
 
int life = 5
 
- Public Attributes inherited from Point
int x
 
int z
 
- Static Public Attributes inherited from Point
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
 

Detailed Description

Definition at line 1 of file LogicalFire.cs.

Member Function Documentation

◆ Transfer()

void LogicalFire.Transfer ( Point  p,
byte  amount = 1 
)
inline

Definition at line 89 of file LogicalFire.cs.

90 {
91 ModFire(-amount);
92 if (!p.cell.HasFire)
93 {
94 SE.Play("fire");
95 }
96 p.ModFire(amount);
97 }
bool HasFire
Definition: Cell.cs:676
void ModFire(int value, bool extinguish=false)
Definition: Point.cs:897
Cell cell
Definition: Point.cs:51

References Point.cell, Cell.HasFire, and Point.ModFire().

Referenced by Update().

◆ Update()

override void LogicalFire.Update ( )
inlinevirtual

Reimplemented from LogicalPoint.

Definition at line 7 of file LogicalFire.cs.

8 {
9 manager.refreshList.Add(this);
10 bool flag = false;
11 XY[] surrounds = Point.Surrounds;
12 for (int i = 0; i < surrounds.Length; i++)
13 {
14 XY xY = surrounds[i];
15 Point.shared.Set(x + xY.x, z + xY.y);
16 if (!Point.shared.IsValid)
17 {
18 continue;
19 }
22 {
23 continue;
24 }
26 {
28 continue;
29 }
30 if (fireAmount <= 0)
31 {
32 base.cell.effect = null;
33 continue;
34 }
35 byte b = (byte)(fireAmount - cell.fireAmount);
36 if (cell.fireAmount == 0)
37 {
38 if (fireAmount >= 2 && b >= 2)
39 {
40 if (EClass.rnd(2) == 0)
41 {
43 }
44 ModFire(-1);
45 flag = true;
46 }
47 }
48 else if (b == 1)
49 {
50 if (life < 2)
51 {
52 ModFire(-1);
53 }
54 else if (EClass.rnd(3) == 0)
55 {
57 ModFire(1);
58 flag = true;
59 }
60 }
61 else
62 {
63 if (b > 6)
64 {
65 b = 6;
66 }
67 Transfer(Point.shared, (byte)(b - 1));
68 flag = true;
69 }
70 }
71 if (fireAmount == 0)
72 {
73 base.cell.effect = null;
74 }
75 else
76 {
77 EClass._map.Burn(x, z);
78 }
79 if (!flag)
80 {
81 life--;
82 }
83 if (life < 0)
84 {
85 Kill();
86 }
87 }
Definition: Cell.cs:7
int fireAmount
Definition: Cell.cs:957
Definition: EClass.cs:5
static int rnd(int a)
Definition: EClass.cs:50
static Map _map
Definition: EClass.cs:18
override LogicalPointManager manager
Definition: LogicalFire.cs:5
void Transfer(Point p, byte amount=1)
Definition: LogicalFire.cs:89
int fireAmount
Definition: LogicalFire.cs:3
HashSet< Point > refreshList
LogicalPoint GetOrCreate(Point point)
virtual void Kill()
Definition: LogicalPoint.cs:22
void Burn(int x, int z, bool instant=false)
Definition: Map.cs:1396
Definition: Point.cs:9
static Point shared
Definition: Point.cs:20
Point Set(int _x, int _z)
Definition: Point.cs:479
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
bool IsValid
Definition: Point.cs:88
static readonly XY[] Surrounds
Definition: Point.cs:10
Definition: XY.cs:2
int y
Definition: XY.cs:5
int x
Definition: XY.cs:3

References EClass._map, Map.Burn(), Point.cell, Cell.fireAmount, fireAmount, LogicalPointManager.GetOrCreate(), Point.IsValid, LogicalPoint.Kill(), LogicalPoint.life, manager, Point.ModFire(), LogicalPointManager.refreshList, EClass.rnd(), Point.Set(), Point.shared, Point.Surrounds, Transfer(), Point.x, XY.x, XY.y, and Point.z.

Property Documentation

◆ fireAmount

int LogicalFire.fireAmount
get

Definition at line 3 of file LogicalFire.cs.

Referenced by Update().

◆ manager

override LogicalPointManager LogicalFire.manager
get

Definition at line 5 of file LogicalFire.cs.

Referenced by Update().


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