Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
BlockInfo Class Reference
Inheritance diagram for BlockInfo:
BaseInspectPos IInspect

Public Member Functions

override void WriteNote (UINote n, Action< UINote > onWriteNote=null, IInspect.NoteMode mode=IInspect.NoteMode.Default, Recipe recipe=null)
 
- Public Member Functions inherited from BaseInspectPos
void OnInspect ()
 
virtual void WriteNote (UINote n, Action< UINote > onWriteNote=null, IInspect.NoteMode mode=IInspect.NoteMode.Default, Recipe recipe=null)
 
void WriteNote (UINote n, Action< UINote > onWriteNote=null, NoteMode mode=NoteMode.Default, Recipe recipe=null)
 
void OnInspect ()
 

Static Public Member Functions

static BlockInfo GetTemp (Point _pos)
 
static BlockInfo GetTempList (Point _pos)
 
static bool _CanInspect (Point pos)
 

Static Public Attributes

static BlockInfo Temp = new BlockInfo()
 
static BlockInfo TempList = new BlockInfo()
 

Properties

SourceBlock.Row source [get]
 
override bool CanInspect [get]
 
override string InspectName [get]
 
- Properties inherited from BaseInspectPos
Point InspectPoint [get]
 
Vector3 InspectPosition [get]
 
virtual bool CanInspect [get]
 
virtual string InspectName [get]
 
- Properties inherited from IInspect
bool CanInspect [get]
 
string InspectName [get]
 
Point InspectPoint [get]
 
Vector3 InspectPosition [get]
 

Additional Inherited Members

- Public Types inherited from IInspect
enum  NoteMode { Default , Recipe , Product , Info }
 
- Public Attributes inherited from BaseInspectPos
Point pos = new Point()
 

Detailed Description

Definition at line 3 of file BlockInfo.cs.

Member Function Documentation

◆ _CanInspect()

static bool BlockInfo._CanInspect ( Point  pos)
inlinestatic

Definition at line 31 of file BlockInfo.cs.

32 {
33 return pos.HasNonWallBlock;
34 }
bool HasNonWallBlock
Definition: Point.cs:182

References Point.HasNonWallBlock, and BaseInspectPos.pos.

Referenced by Point.ListInspectorTargets(), and PointTarget.Update().

◆ GetTemp()

static BlockInfo BlockInfo.GetTemp ( Point  _pos)
inlinestatic

Definition at line 15 of file BlockInfo.cs.

16 {
17 Temp.pos.Set(_pos);
18 return Temp;
19 }
static BlockInfo Temp
Definition: BlockInfo.cs:5
Point Set(int _x, int _z)
Definition: Point.cs:479

References BaseInspectPos.pos, Point.Set(), and Temp.

Referenced by PointTarget.Update().

◆ GetTempList()

static BlockInfo BlockInfo.GetTempList ( Point  _pos)
inlinestatic

Definition at line 21 of file BlockInfo.cs.

22 {
23 if (!TempList.pos.Equals(_pos))
24 {
25 TempList = new BlockInfo();
26 }
27 TempList.pos.Set(_pos);
28 return TempList;
29 }
static BlockInfo TempList
Definition: BlockInfo.cs:7
bool Equals(int _x, int _z)
Definition: Point.cs:924

References Point.Equals(), BaseInspectPos.pos, Point.Set(), and TempList.

Referenced by Point.ListInspectorTargets().

◆ WriteNote()

override void BlockInfo.WriteNote ( UINote  n,
Action< UINote onWriteNote = null,
IInspect::NoteMode  mode = IInspect::NoteMode::Default,
Recipe  recipe = null 
)
inlinevirtual

Reimplemented from BaseInspectPos.

Definition at line 36 of file BlockInfo.cs.

37 {
38 n.Clear();
40 source.SetImage(uIItem.image2, null, source.GetColorInt(pos.matBlock));
41 n.AddText("isMadeOf".lang(pos.cell.matBlock.GetText()));
42 n.Build();
43 }
SourceBlock.Row source
Definition: BlockInfo.cs:9
SourceMaterial.Row matBlock
Definition: Cell.cs:1030
string GetBlockName()
Definition: Cell.cs:1585
SourceMaterial.Row matBlock
Definition: Point.cs:55
Cell cell
Definition: Point.cs:51
Definition: UIItem.cs:5
Image image2
Definition: UIItem.cs:16
UIItem AddHeaderCard(string text, Sprite sprite=null)
Definition: UINote.cs:84
void Clear()
Definition: UINote.cs:35
UIItem AddText(string text, FontColor color=FontColor.DontChange)
Definition: UINote.cs:113
void Build()
Definition: UINote.cs:49

References UINote.AddHeaderCard(), UINote.AddText(), UINote.Build(), Point.cell, UINote.Clear(), Cell.GetBlockName(), UIItem.image2, Cell.matBlock, Point.matBlock, BaseInspectPos.pos, and source.

Member Data Documentation

◆ Temp

BlockInfo BlockInfo.Temp = new BlockInfo()
static

Definition at line 5 of file BlockInfo.cs.

Referenced by GetTemp().

◆ TempList

BlockInfo BlockInfo.TempList = new BlockInfo()
static

Definition at line 7 of file BlockInfo.cs.

Referenced by GetTempList().

Property Documentation

◆ CanInspect

override bool BlockInfo.CanInspect
get

Implements IInspect.

Definition at line 11 of file BlockInfo.cs.

◆ InspectName

override string BlockInfo.InspectName
get

Implements IInspect.

Definition at line 13 of file BlockInfo.cs.

◆ source

SourceBlock.Row BlockInfo.source
get

Definition at line 9 of file BlockInfo.cs.

Referenced by WriteNote().


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