Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
TileTypeWallHang Class Reference
Inheritance diagram for TileTypeWallHang:
TileTypeObj TileType EClass TileTypePaint TileTypeWindow

Public Member Functions

override int GetDesiredDir (Point p, int d)
 
override void GetMountHeight (ref Vector3 v, Point p, int d, Card target=null)
 
- Public Member Functions inherited from TileType
virtual bool CanRotate (bool buildMode)
 
HitResult _HitTest (Point pos, Card target, bool canIgnore=true)
 
virtual int GetDesiredDir (Point p, int d)
 
virtual void GetMountHeight (ref Vector3 v, Point p, int d, Card target=null)
 
Vector3 GetRampFix (int dir, SourcePref pref=null)
 

Static Public Attributes

static bool[] DIRS = new bool[4]
 
- Static Public Attributes inherited from TileType
static TileTypeNone None = new TileTypeNone()
 
static TileTypeInvisibleBlock InvisiBlock = new TileTypeInvisibleBlock()
 
static TileTypeBlock Block = new TileTypeBlock()
 
static TileTypeBlockShip BlockShip = new TileTypeBlockShip()
 
static TileTypeSlope Slope = new TileTypeSlope()
 
static TileTypeSlopeFlat SlopeFlat = new TileTypeSlopeFlat()
 
static TileTypeHalfBlock HalfBlock = new TileTypeHalfBlock()
 
static TileTypeStairs Stairs = new TileTypeStairs()
 
static TileTypeStairs StairsHalf = new TileTypeStairsHalf()
 
static TileTypeRooftop Rooftop = new TileTypeRooftop()
 
static TileTypeScaffold Scaffold = new TileTypeScaffold()
 
static TileTypeLadder Ladder = new TileTypeLadder()
 
static TileTypePillar Pillar = new TileTypePillar()
 
static TileTypeWaterfall Waterfall = new TileTypeWaterfall()
 
static TileTypeWall Wall = new TileTypeWall()
 
static TileTypeWallOpen WallOpen = new TileTypeWallOpen()
 
static TileTypeFence Fence = new TileTypeFence()
 
static TileTypeFenceClosed FenceClosed = new TileTypeFenceClosed()
 
static TileTypeFloor Floor = new TileTypeFloor()
 
static TileTypeFloorScaffold FloorScaffold = new TileTypeFloorScaffold()
 
static TileTypeWater FloorWater = new TileTypeWater()
 
static TileTypeWaterShallow FloorWaterShallow = new TileTypeWaterShallow()
 
static TileTypeWaterDeep FloorWaterDeep = new TileTypeWaterDeep()
 
static TileTypeBridge Bridge = new TileTypeBridge()
 
static TileTypeBridgeDeco BridgeDeco = new TileTypeBridgeDeco()
 
static TileTypeBridgePillar BridgePillar = new TileTypeBridgePillar()
 
static TileTypeSky Sky = new TileTypeSky()
 
static TileTypeObj Obj = new TileTypeObj()
 
static TileTypeObjBig ObjBig = new TileTypeObjBig()
 
static TileTypeObjHuge ObjHuge = new TileTypeObjHuge()
 
static TileTypeObjCeil ObjCeil = new TileTypeObjCeil()
 
static TileTypeObjFloat ObjFloat = new TileTypeObjFloat()
 
static TileTypeObjWater ObjWater = new TileTypeObjWater()
 
static TileTypeObjWaterTop ObjWaterTop = new TileTypeObjWaterTop()
 
static TileTypeIllumination Illumination = new TileTypeIllumination()
 
static TileTypeTent Tent = new TileTypeTent()
 
static TileTypeSeed Seed = new TileTypeSeed()
 
static TileTypeTree Tree = new TileTypeTree()
 
static TileTypeDoor Door = new TileTypeDoor()
 
static TileTypeWallHang WallHang = new TileTypeWallHang()
 
static TileTypeWallHangSign WallHangSign = new TileTypeWallHangSign()
 
static TileTypeVine Vine = new TileTypeVine()
 
static TileTypeWallMount WallMount = new TileTypeWallMount()
 
static TileTypePaint Paint = new TileTypePaint()
 
static TileTypeWindow Window = new TileTypeWindow()
 
static TileTypeRoof Roof = new TileTypeRoof()
 
static TileTypeRoad Road = new TileTypeRoad()
 
static TileTypeChasm Chasm = new TileTypeChasm()
 
static TileTypeBoat Boat = new TileTypeBoat()
 
static TileTypeLiquid Liquid = new TileTypeLiquid()
 
static TileTypeMarker Marker = new TileTypeMarker()
 
static Dictionary< string, TileTypedict = new Dictionary<string, TileType>()
 
- Static Public Attributes inherited from EClass
static Core core
 

Protected Member Functions

override HitResult HitTest (Point pos)
 
virtual HitResult HitTest (Point pos)
 

Properties

override string LangPlaceType [get]
 
override bool CanStack [get]
 
override bool IsBlockMount [get]
 
override bool UseMountHeight [get]
 
override bool UseHangZFix [get]
 
virtual bool NoBackSide [get]
 
- Properties inherited from TileTypeObj
override bool CanBuiltOnThing [get]
 
override bool CanBuiltOnWater [get]
 
override bool FreeStyle [get]
 
override bool CanStack [get]
 
- Properties inherited from TileType
virtual string LangPlaceType [get]
 
virtual bool CanStack [get]
 
virtual bool ChangeBlockDir [get]
 
virtual bool IsSkipLowBlock [get]
 
virtual bool IsSkipFloor [get]
 
virtual bool IsUseBlockDir [get]
 
virtual bool IsFloorOrBridge [get]
 
virtual bool IsWall [get]
 
virtual bool IsFloor [get]
 
virtual bool IsBridge [get]
 
virtual bool IsWallOrFence [get]
 
virtual bool IsWallOrFullBlock [get]
 
bool IsRamp [get]
 
virtual RampType Ramp [get]
 
virtual bool IsLadder [get]
 
virtual bool IsBlockPass [get]
 
virtual bool IsOccupyCell [get]
 
virtual bool IsBlockSight [get]
 
virtual bool IsOpenSight [get]
 
virtual bool IsBlockLiquid [get]
 
virtual bool IsWater [get]
 
virtual bool IsDeepWater [get]
 
virtual bool IsBlockMount [get]
 
virtual bool IsFullBlock [get]
 
virtual bool IsFence [get]
 
virtual bool IsFloodBlock [get]
 
virtual bool IsPlayFootSound [get]
 
virtual bool CanSpawnOnWater [get]
 
virtual bool IsWaterTop [get]
 
virtual bool CastShadowSelf [get]
 
virtual bool CastShadowBack [get]
 
virtual bool CastAmbientShadow [get]
 
virtual bool CastAmbientShadowBack [get]
 
virtual bool CanBuiltOnArea [get]
 
virtual bool CanBuiltOnWater [get]
 
virtual bool CanBuiltOnThing [get]
 
virtual bool CanBuiltOnBlock [get]
 
virtual bool IsDoor [get]
 
virtual bool CanBuiltOnFloor [get]
 
virtual bool CanBuiltOnBridge [get]
 
virtual bool CanInstaComplete [get]
 
virtual int MinAltitude [get]
 
virtual int MaxAltitude [get]
 
virtual bool AltitudeAsDir [get]
 
virtual bool UseLowWallTiles [get]
 
virtual bool UseMountHeight [get]
 
virtual bool UseHangZFix [get]
 
virtual bool UseLowBlock [get]
 
virtual bool RemoveOnFloorChange [get]
 
virtual bool AllowObj [get]
 
virtual bool AllowMultiInstall [get]
 
virtual bool FreeStyle [get]
 
virtual byte slopeHeight [get]
 
virtual float MountHeight [get]
 
virtual float FloorHeight [get]
 
virtual float RepeatSize [get]
 
virtual int FloorAltitude [get]
 
virtual int LiquidLV [get]
 
virtual bool AllowLitter [get]
 
virtual bool AllowBlood [get]
 
virtual bool ShowPillar [get]
 
virtual bool AlwaysShowShadow [get]
 
virtual bool RepeatBlock [get]
 
virtual bool ForceRpeatBlock [get]
 
virtual bool CanBeHeld [get]
 
virtual bool EditorTile [get]
 
virtual bool IsFloodDoor [get]
 
virtual bool Invisible [get]
 
virtual bool IgnoreBuildRule [get]
 
virtual bool RenderWaterBlock [get]
 
virtual BaseTileSelector.SelectType SelectType [get]
 
virtual BaseTileSelector.BoxType BoxType [get]
 
virtual BaseTileSelector.HitType HitType [get]
 
virtual BlockRenderMode blockRenderMode [get]
 
bool IsMountBlock [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

- Public Types inherited from TileType
enum  RampType { None , Full , Half , Flat }
 
- Static Public Member Functions inherited from TileType
static void Init ()
 
- 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)
 

Detailed Description

Definition at line 3 of file TileTypeWallHang.cs.

Member Function Documentation

◆ GetDesiredDir()

override int TileTypeWallHang.GetDesiredDir ( Point  p,
int  d 
)
inlinevirtual

Reimplemented from TileType.

Definition at line 19 of file TileTypeWallHang.cs.

20 {
22 {
23 return -1;
24 }
25 Cell cell = p.cell;
26 DIRS[0] = cell.Back.sourceBlock.tileType.IsMountBlock && (!cell.Back.sourceBlock.tileType.IsWallOrFence || cell.Back.blockDir != 1);
27 DIRS[1] = cell.Left.sourceBlock.tileType.IsMountBlock && (!cell.Left.sourceBlock.tileType.IsWallOrFence || cell.Left.blockDir != 0);
28 if (NoBackSide)
29 {
30 DIRS[2] = false;
31 DIRS[3] = false;
32 }
33 else
34 {
35 DIRS[2] = cell.Front.sourceBlock.tileType.IsMountBlock && (!cell.Front.sourceBlock.tileType.IsWallOrFence || cell.Front.blockDir != 1);
36 DIRS[3] = cell.Right.sourceBlock.tileType.IsMountBlock && (!cell.Right.sourceBlock.tileType.IsWallOrFence || cell.Right.blockDir != 0);
37 }
38 if (d == -1 || !DIRS[d])
39 {
40 if (d == -1)
41 {
42 d = 0;
43 }
44 for (int i = 0; i < 4; i++)
45 {
46 if (DIRS[(i + d) % 4])
47 {
48 return (i + d) % 4;
49 }
50 }
51 }
52 if (DIRS[d])
53 {
54 return d;
55 }
56 return -1;
57 }
virtual bool IsRoofEditMode(Card c=null)
Definition: ActionMode.cs:311
Definition: Cell.cs:7
Definition: EClass.cs:5
static Scene scene
Definition: EClass.cs:30
Cell cell
Definition: Point.cs:51
ActionMode actionMode
Definition: Scene.cs:77
virtual bool NoBackSide
static bool[] DIRS

References Scene.actionMode, Point.cell, DIRS, ActionMode.IsRoofEditMode(), NoBackSide, and EClass.scene.

Referenced by HitTest().

◆ GetMountHeight()

override void TileTypeWallHang.GetMountHeight ( ref Vector3  v,
Point  p,
int  d,
Card  target = null 
)
inlinevirtual

Reimplemented from TileType.

Definition at line 59 of file TileTypeWallHang.cs.

60 {
61 if (d == 0 && p.z < EClass._map.Size - 1)
62 {
63 Point.shared2.Set(p.x, p.z + 1);
64 Vector3 vector = Point.shared2.Position();
65 v.x = vector.x;
66 v.y = vector.y + Point.shared2.sourceBlock.tileType.MountHeight;
67 v.z = vector.z;
69 {
71 }
72 v += EClass.screen.tileMap.altitudeFix * target.altitude;
73 }
74 else if (d == 1 && p.x > 0)
75 {
76 Point.shared2.Set(p.x - 1, p.z);
77 Vector3 vector2 = Point.shared2.Position();
78 v.x = vector2.x;
79 v.y = vector2.y + Point.shared2.sourceBlock.tileType.MountHeight;
80 v.z = vector2.z;
82 {
84 }
85 v += EClass.screen.tileMap.altitudeFix * target.altitude;
86 }
87 else if (d == 2 && p.z > 0)
88 {
89 Point.shared2.Set(p.x, p.z - 1);
90 Vector3 vector3 = p.Position();
91 v.x = vector3.x;
92 v.y = vector3.y + p.sourceBlock.tileType.MountHeight;
93 v.z = vector3.z;
95 {
97 }
98 v += EClass.screen.tileMap.altitudeFix * target.altitude;
99 }
100 else if (d == 3 && p.x < EClass._map.Size - 1)
101 {
102 Point.shared2.Set(p.x + 1, p.z);
103 Vector3 vector4 = p.Position();
104 v.x = vector4.x;
105 v.y = vector4.y + p.sourceBlock.tileType.MountHeight;
106 v.z = vector4.z;
108 {
110 }
111 v += EClass.screen.tileMap.altitudeFix * target.altitude;
112 }
113 else
114 {
115 v.y += p.sourceBlock.tileType.MountHeight;
116 }
117 }
BaseTileMap tileMap
Vector3[] wallHangFix
Definition: BaseTileMap.cs:116
int altitude
Definition: Card.cs:214
static Map _map
Definition: EClass.cs:18
static BaseGameScreen screen
Definition: EClass.cs:32
int Size
Definition: MapBounds.cs:20
Definition: Point.cs:9
SourceBlock.Row sourceBlock
Definition: Point.cs:63
ref Vector3 Position(int height)
Definition: Point.cs:524
static Point shared2
Definition: Point.cs:22
Point Set(int _x, int _z)
Definition: Point.cs:479
int x
Definition: Point.cs:36
bool HasWallOrFence
Definition: Point.cs:155
int z
Definition: Point.cs:39

References EClass._map, Point.HasWallOrFence, Point.Position(), EClass.screen, Point.Set(), Point.shared2, MapBounds.Size, Point.sourceBlock, BaseGameScreen.tileMap, BaseTileMap.wallHangFix, Point.x, and Point.z.

◆ HitTest()

override HitResult TileTypeWallHang.HitTest ( Point  pos)
inlineprotectedvirtual

Reimplemented from TileType.

Definition at line 119 of file TileTypeWallHang.cs.

120 {
121 if (GetDesiredDir(pos, -1) == -1)
122 {
123 return HitResult.Invalid;
124 }
125 return base.HitTest(pos);
126 }
HitResult
Definition: HitResult.cs:2
override int GetDesiredDir(Point p, int d)

References GetDesiredDir().

Member Data Documentation

◆ DIRS

bool [] TileTypeWallHang.DIRS = new bool[4]
static

Definition at line 5 of file TileTypeWallHang.cs.

Referenced by GetDesiredDir().

Property Documentation

◆ CanStack

override bool TileTypeWallHang.CanStack
get

Definition at line 9 of file TileTypeWallHang.cs.

◆ IsBlockMount

override bool TileTypeWallHang.IsBlockMount
get

Definition at line 11 of file TileTypeWallHang.cs.

◆ LangPlaceType

override string TileTypeWallHang.LangPlaceType
get

Definition at line 7 of file TileTypeWallHang.cs.

◆ NoBackSide

virtual bool TileTypeWallHang.NoBackSide
get

Definition at line 17 of file TileTypeWallHang.cs.

Referenced by GetDesiredDir().

◆ UseHangZFix

override bool TileTypeWallHang.UseHangZFix
get

Definition at line 15 of file TileTypeWallHang.cs.

◆ UseMountHeight

override bool TileTypeWallHang.UseMountHeight
get

Definition at line 13 of file TileTypeWallHang.cs.


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