Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
GameUpdater.SurfaceUpdater Class Reference
Inheritance diagram for GameUpdater.SurfaceUpdater:
GameUpdater.Updater EClass GameUpdater.FastSurfaceUpdater

Public Member Functions

override void FixedUpdate ()
 
- Public Member Functions inherited from GameUpdater.Updater
virtual void FixedUpdate ()
 
void SetUpdatesPerFrame (int _maxcount, float _duration)
 

Public Attributes

int x
 
int z
 
- Public Attributes inherited from GameUpdater.Updater
int index
 
int updatesPerFrame
 
int maxCount
 
float duration = 1f
 
float _updatesPerFrame
 
Point pos = new Point()
 

Properties

int SizeXZ [get]
 
int Size [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 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)
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 62 of file GameUpdater.cs.

Member Function Documentation

◆ FixedUpdate()

override void GameUpdater.SurfaceUpdater.FixedUpdate ( )
inlinevirtual

Reimplemented from GameUpdater.Updater.

Reimplemented in GameUpdater.FastSurfaceUpdater.

Definition at line 72 of file GameUpdater.cs.

73 {
74 if (!pos.Set(x, z).IsValid)
75 {
76 x = (z = 0);
77 }
79 _ = EClass._map.Roaming.raceMap.TryGetValue("fish")?.num;
80 bool isRaining = EClass.world.weather.IsRaining;
81 for (int i = 0; i < updatesPerFrame; i++)
82 {
83 pos.Set(x, z);
84 _ = pos.sourceObj;
85 bool flag = pos.sourceBlock.id != 0;
86 Cell cell = pos.cell;
87 bool flag2 = EClass._map.IsIndoor || cell.HasRoof;
88 if (cell.effect != null)
89 {
90 if (cell.HasFire)
91 {
92 if (isRaining)
93 {
94 pos.ModFire(-5);
95 }
96 else if (EClass.rnd(2) == 0)
97 {
98 pos.ModFire(-2);
99 }
100 }
101 else if (cell.HasLiquid && (!isRaining || cell.IsTopWater || cell.HasRoof))
102 {
103 EClass._map.ModLiquid(pos.x, pos.z, -1);
104 }
105 }
106 if (isRaining)
107 {
108 if (!flag2)
109 {
110 if (cell.IsFarmField)
111 {
112 cell.isWatered = true;
113 }
114 if (EClass.rnd(500) == 0 && !flag && !cell.blocked && !cell.HasObj && !cell.IsTopWaterAndNoSnow && !EClass._zone.IsRegion)
115 {
116 EClass._map.SetLiquid(pos.x, pos.z, 1, EClass.rnd(3) + 1);
117 }
118 }
119 if (EClass.rnd(50) == 0 && cell.decal != 0)
120 {
121 cell.decal = 0;
122 }
123 }
124 if (EClass.rnd(30) == 0 && cell.decal != 0 && !pos.IsInBounds)
125 {
126 cell.decal = 0;
127 }
128 x++;
129 if (x >= Size)
130 {
131 x = 0;
132 z++;
133 if (z >= Size)
134 {
135 z = 0;
136 }
137 }
138 }
139 }
Definition: Cell.cs:7
CellEffect effect
Definition: Cell.cs:94
byte decal
Definition: Cell.cs:44
bool IsTopWaterAndNoSnow
Definition: Cell.cs:712
bool IsFarmField
Definition: Cell.cs:730
bool IsTopWater
Definition: Cell.cs:700
bool HasLiquid
Definition: Cell.cs:673
bool HasRoof
Definition: Cell.cs:648
bool HasFire
Definition: Cell.cs:676
bool HasObj
Definition: Cell.cs:641
Definition: EClass.cs:5
static int rnd(int a)
Definition: EClass.cs:50
static Zone _zone
Definition: EClass.cs:20
static World world
Definition: EClass.cs:40
static Map _map
Definition: EClass.cs:18
void SetUpdatesPerFrame(int _maxcount, float _duration)
Definition: GameUpdater.cs:25
void SetLiquid(int x, int z, CellEffect effect=null)
Definition: Map.cs:1464
PropsRoaming Roaming
Definition: Map.cs:125
void ModLiquid(int x, int z, int amount)
Definition: Map.cs:1500
Point Set(int _x, int _z)
Definition: Point.cs:479
int x
Definition: Point.cs:36
void ModFire(int value, bool extinguish=false)
Definition: Point.cs:897
int z
Definition: Point.cs:39
SourceObj.Row sourceObj
Definition: Point.cs:69
bool IsValid
Definition: Point.cs:88
bool IsInBounds
Definition: Point.cs:104
Cell cell
Definition: Point.cs:51
Dictionary< string, PropSet > raceMap
Definition: Props.cs:14
virtual bool IsRegion
Definition: Spatial.cs:501
bool IsRaining
Definition: Weather.cs:117
Weather weather
Definition: World.cs:12

References EClass._map, EClass._zone, Algorithms.WeightCell.blocked, Point.cell, Cell.decal, Cell.effect, Cell.HasFire, Cell.HasLiquid, Cell.HasObj, Cell.HasRoof, Cell.IsFarmField, Point.IsInBounds, Weather.IsRaining, Spatial.IsRegion, Cell.IsTopWater, Cell.IsTopWaterAndNoSnow, Point.IsValid, Point.ModFire(), Map.ModLiquid(), GameUpdater.Updater.pos, Props.raceMap, EClass.rnd(), Map.Roaming, Point.Set(), Map.SetLiquid(), GameUpdater.Updater.SetUpdatesPerFrame(), GameUpdater.SurfaceUpdater.Size, GameUpdater.SurfaceUpdater.SizeXZ, Point.sourceObj, GameUpdater.Updater.updatesPerFrame, World.weather, EClass.world, GameUpdater.SurfaceUpdater.x, Point.x, GameUpdater.SurfaceUpdater.z, and Point.z.

Referenced by GameUpdater.FixedUpdate().

Member Data Documentation

◆ x

int GameUpdater.SurfaceUpdater.x

◆ z

int GameUpdater.SurfaceUpdater.z

Property Documentation

◆ Size

int GameUpdater.SurfaceUpdater.Size
get

Definition at line 70 of file GameUpdater.cs.

Referenced by GameUpdater.SurfaceUpdater.FixedUpdate().

◆ SizeXZ

int GameUpdater.SurfaceUpdater.SizeXZ
get

Definition at line 68 of file GameUpdater.cs.

Referenced by GameUpdater.SurfaceUpdater.FixedUpdate().


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