Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ObjInfo Class Reference
Inheritance diagram for ObjInfo:
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 ObjInfo GetTemp (Point _pos)
 
static ObjInfo GetTempList (Point _pos)
 
static bool _CanInspect (Point pos)
 

Static Public Attributes

static ObjInfo Temp = new ObjInfo()
 
static ObjInfo TempList = new ObjInfo()
 
static VirtualDate TempDate = new VirtualDate()
 

Properties

SourceObj.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 ObjInfo.cs.

Member Function Documentation

◆ _CanInspect()

static bool ObjInfo._CanInspect ( Point  pos)
inlinestatic

Definition at line 67 of file ObjInfo.cs.

68 {
69 if (pos.HasObj)
70 {
72 {
73 return pos.sourceObj.tileType.IsBlockMount;
74 }
75 return true;
76 }
77 return false;
78 }
bool HasFullBlock
Definition: Cell.cs:817
SourceObj.Row sourceObj
Definition: Point.cs:69
bool HasObj
Definition: Point.cs:137
Cell cell
Definition: Point.cs:51

References Point.cell, Cell.HasFullBlock, Point.HasObj, BaseInspectPos.pos, and Point.sourceObj.

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

◆ GetTemp()

static ObjInfo ObjInfo.GetTemp ( Point  _pos)
inlinestatic

Definition at line 47 of file ObjInfo.cs.

48 {
49 if (!Temp.pos.Equals(_pos))
50 {
51 TempDate = new VirtualDate();
52 }
53 Temp.pos.Set(_pos);
54 return Temp;
55 }
static VirtualDate TempDate
Definition: ObjInfo.cs:9
static ObjInfo Temp
Definition: ObjInfo.cs:5
Point Set(int _x, int _z)
Definition: Point.cs:479
bool Equals(int _x, int _z)
Definition: Point.cs:924

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

Referenced by PointTarget.Update().

◆ GetTempList()

static ObjInfo ObjInfo.GetTempList ( Point  _pos)
inlinestatic

Definition at line 57 of file ObjInfo.cs.

58 {
59 if (!TempList.pos.Equals(_pos))
60 {
61 TempList = new ObjInfo();
62 }
63 TempList.pos.Set(_pos);
64 return TempList;
65 }
static ObjInfo TempList
Definition: ObjInfo.cs:7

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

Referenced by Point.ListInspectorTargets().

◆ WriteNote()

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

Reimplemented from BaseInspectPos.

Definition at line 80 of file ObjInfo.cs.

81 {
82 n.Clear();
83 UIItem uIItem = n.AddHeaderCard(source.GetName());
84 source.SetImage(uIItem.image2, null, source.GetColorInt(pos.cell.matObj));
85 n.AddText("isMadeOf".lang(source.GetText()));
86 n.Build();
87 }
SourceMaterial.Row matObj
Definition: Cell.cs:1036
SourceObj.Row source
Definition: ObjInfo.cs:11
string GetName(int id)
Definition: SourceObj.cs:149
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(), SourceObj.GetName(), UIItem.image2, Cell.matObj, BaseInspectPos.pos, and source.

Member Data Documentation

◆ Temp

ObjInfo ObjInfo.Temp = new ObjInfo()
static

Definition at line 5 of file ObjInfo.cs.

Referenced by GetTemp().

◆ TempDate

VirtualDate ObjInfo.TempDate = new VirtualDate()
static

Definition at line 9 of file ObjInfo.cs.

Referenced by GetTemp().

◆ TempList

ObjInfo ObjInfo.TempList = new ObjInfo()
static

Definition at line 7 of file ObjInfo.cs.

Referenced by GetTempList().

Property Documentation

◆ CanInspect

override bool ObjInfo.CanInspect
get

Implements IInspect.

Definition at line 13 of file ObjInfo.cs.

◆ InspectName

override string ObjInfo.InspectName
get

Implements IInspect.

Definition at line 15 of file ObjInfo.cs.

16 {
17 get
18 {
19 string text = pos.cell.GetObjName() + (EClass.debug.showExtra ? (" " + pos.cell.matObj.alias) : "");
20 if (pos.growth != null)
21 {
22 if (pos.growth.CanHarvest())
23 {
24 text = "growth_harvest".lang(text);
25 }
26 else if (pos.growth.IsWithered())
27 {
28 text = "growth_withered".lang(text);
29 }
30 else if (pos.growth.IsMature)
31 {
32 text = "growth_mature".lang(text);
33 }
34 if ((EClass._zone.IsPCFaction || EClass._zone is Zone_Tent) && pos.growth.NeedSunlight && !pos.growth.CanGrow(TempDate))
35 {
36 text = "growth_nosun".lang(text);
37 if (pos.cell.HasRoof)
38 {
39 text = "growth_roof".lang(text);
40 }
41 }
42 }
43 return text;
44 }
45 }
bool HasRoof
Definition: Cell.cs:648
string GetObjName()
Definition: Cell.cs:1600
Definition: EClass.cs:5
static Zone _zone
Definition: EClass.cs:20
bool CanHarvest()
Definition: GrowSystem.cs:482
bool IsWithered()
Definition: GrowSystem.cs:473
virtual bool IsMature
Definition: GrowSystem.cs:99
bool CanGrow(VirtualDate date)
Definition: GrowSystem.cs:264
GrowSystem growth
Definition: Point.cs:77
bool IsPCFaction
Definition: Zone.cs:464

◆ source

SourceObj.Row ObjInfo.source
get

Definition at line 11 of file ObjInfo.cs.

Referenced by WriteNote().


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