Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ZonePreEnterDigStairs Class Reference
Inheritance diagram for ZonePreEnterDigStairs:
ZonePreEnterEvent EClass

Public Member Functions

override void Execute ()
 
virtual void Execute ()
 

Public Attributes

Point pos
 
bool fromAbove
 
int uidZone
 

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
 
- 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]
 

Detailed Description

Definition at line 3 of file ZonePreEnterDigStairs.cs.

Member Function Documentation

◆ Execute()

override void ZonePreEnterDigStairs.Execute ( )
inlinevirtual

Reimplemented from ZonePreEnterEvent.

Definition at line 14 of file ZonePreEnterDigStairs.cs.

15 {
16 if (pos.HasBlock)
17 {
18 pos.SetBlock();
19 }
20 if (pos.HasObj)
21 {
22 pos.SetObj();
23 }
24 Trait trait = null;
25 foreach (Thing thing2 in pos.Things)
26 {
27 if (thing2.trait is TraitStairsLocked)
28 {
29 trait = thing2.trait;
30 break;
31 }
32 if (thing2.trait is TraitNewZone traitNewZone && ((fromAbove && traitNewZone.IsUpstairs) || (!fromAbove && traitNewZone.IsDownstairs)))
33 {
34 trait = traitNewZone;
35 break;
36 }
37 }
38 if (trait != null)
39 {
40 return;
41 }
43 {
44 for (int i = pos.z - 1; i < pos.z + 2; i++)
45 {
46 for (int j = pos.x - 1; j < pos.x + 2; j++)
47 {
48 Point point = new Point(j, i);
49 if (point.IsValid && point.sourceFloor.tileType == TileType.Sky)
50 {
52 }
53 }
54 }
55 }
57 EClass._zone.AddCard(thing, pos.x, pos.z);
58 thing.c_uidZone = uidZone;
59 thing.SetPlaceState(PlaceState.installed);
60 thing.isPlayerCreation = true;
61 }
PlaceState
Definition: PlaceState.cs:2
string GetIdStairs(bool upstairs)
TileGroup interior
void SetPlaceState(PlaceState newState, bool byPlayer=false)
Definition: Card.cs:3454
Trait trait
Definition: Card.cs:49
Definition: EClass.cs:5
static Zone _zone
Definition: EClass.cs:20
static Map _map
Definition: EClass.cs:18
void SetFloor(int x, int z, int idMat=0, int idFloor=0)
Definition: Map.cs:951
Definition: Point.cs:9
void SetObj(int id=0, int value=1, int dir=0)
Definition: Point.cs:892
List< Thing > Things
Definition: Point.cs:314
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
SourceFloor.Row sourceFloor
Definition: Point.cs:65
void SetBlock(int idMat=0, int idBlock=0)
Definition: Point.cs:882
bool IsValid
Definition: Point.cs:88
bool HasObj
Definition: Point.cs:137
bool HasBlock
Definition: Point.cs:141
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: Thing.cs:8
static TileTypeSky Sky
Definition: TileType.cs:67
Definition: Trait.cs:7
BiomeProfile biome
Definition: Zone.cs:126
virtual bool IsSkyLevel
Definition: Zone.cs:262
Card AddCard(Card t, Point point)
Definition: Zone.cs:1893

References EClass._map, EClass._zone, Zone.AddCard(), Zone.biome, ThingGen.Create(), BiomeProfile.TileGroup.floor, fromAbove, BiomeProfile.Style.GetIdStairs(), Point.HasBlock, Point.HasObj, BiomeProfile.Tile.id, BiomeProfile.interior, Zone.IsSkyLevel, Point.IsValid, BiomeProfile.Tile.mat, pos, Point.SetBlock(), Map.SetFloor(), Point.SetObj(), Card.SetPlaceState(), TileType.Sky, Point.sourceFloor, BiomeProfile.style, Point.Things, Card.trait, uidZone, Point.x, and Point.z.

Member Data Documentation

◆ fromAbove

bool ZonePreEnterDigStairs.fromAbove

Definition at line 9 of file ZonePreEnterDigStairs.cs.

Referenced by Execute().

◆ pos

Point ZonePreEnterDigStairs.pos

Definition at line 6 of file ZonePreEnterDigStairs.cs.

Referenced by Execute().

◆ uidZone

int ZonePreEnterDigStairs.uidZone

Definition at line 12 of file ZonePreEnterDigStairs.cs.

Referenced by Execute().


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