Elin Decompiled Documentation EA 23.102 Nightly
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
InspectGroup< T > Class Template Reference
Inheritance diagram for InspectGroup< T >:
EClass

Classes

class  Item
 

Public Member Functions

bool CanInspect ()
 
virtual bool Contains (IInspect t)
 
string GetName ()
 
virtual void SetActions ()
 
sealed override void SetActions ()
 
virtual void OnSetActions ()
 
Item Add (string text, string idSprite, Action action, bool sound=false, int priority=0, bool auto=false)
 
Item Add (string text, string idSprite, Action< T > action, bool sound=false, int priority=0, bool auto=false)
 

Static Public Member Functions

static InspectGroup Create (IInspect t)
 
- 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)
 

Public Attributes

Type type
 
List< Itemactions = new List<Item>()
 
List< IInspecttargets = new List<IInspect>()
 

Properties

IInspect FirstTarget [get]
 
bool Solo [get]
 
virtual string MultiName [get]
 
new T FirstTarget [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 Attributes inherited from EClass
static Core core
 

Detailed Description

Type Constraints
T :IInspect 

Definition at line 107 of file InspectGroup.cs.

Member Function Documentation

◆ Add() [1/2]

Item InspectGroup< T >.Add ( string  text,
string  idSprite,
Action  action,
bool  sound = false,
int  priority = 0,
bool  auto = false 
)
inline

Definition at line 121 of file InspectGroup.cs.

122 {
123 Item item = new Item
124 {
125 text = text,
126 idSprite = idSprite,
127 action = delegate
128 {
129 action();
130 },
131 sound = sound,
132 priority = priority,
133 auto = auto
134 };
135 actions.Add(item);
136 return item;
137 }
List< Item > actions
Definition: InspectGroup.cs:27

References InspectGroup< T >.actions, and item.

Referenced by AM_Select.OnRefreshSummary().

◆ Add() [2/2]

Item InspectGroup< T >.Add ( string  text,
string  idSprite,
Action< T >  action,
bool  sound = false,
int  priority = 0,
bool  auto = false 
)
inline

Definition at line 139 of file InspectGroup.cs.

140 {
141 Item item = new Item
142 {
143 text = text,
144 idSprite = idSprite,
145 action = delegate(IInspect a)
146 {
147 action((T)a);
148 },
149 sound = sound,
150 priority = priority,
151 auto = auto,
152 multi = true
153 };
154 actions.Add(item);
155 return item;
156 }

References InspectGroup< T >.actions, and item.

◆ CanInspect()

bool InspectGroup< T >.CanInspect ( )
inline

Definition at line 73 of file InspectGroup.cs.

74 {
75 for (int num = targets.Count - 1; num >= 0; num--)
76 {
77 if (!targets[num].CanInspect)
78 {
79 targets.RemoveAt(num);
80 }
81 }
82 if (targets.Count > 0)
83 {
85 }
86 return false;
87 }
bool CanInspect()
Definition: InspectGroup.cs:73
IInspect FirstTarget
Definition: InspectGroup.cs:31
List< IInspect > targets
Definition: InspectGroup.cs:29
bool CanInspect
Definition: IInspect.cs:14

References IInspect.CanInspect, InspectGroup< T >.CanInspect(), InspectGroup< T >.FirstTarget, and InspectGroup< T >.targets.

Referenced by InspectGroup< T >.CanInspect(), UIInspector.OnUpdate(), and UIInspector.Refresh().

◆ Contains()

virtual bool InspectGroup< T >.Contains ( IInspect  t)
inlinevirtual

Definition at line 89 of file InspectGroup.cs.

90 {
91 return targets.Contains(t);
92 }

References InspectGroup< T >.targets.

◆ Create()

static InspectGroup InspectGroup< T >.Create ( IInspect  t)
inlinestatic

Definition at line 37 of file InspectGroup.cs.

38 {
39 InspectGroup inspectGroup = null;
40 if (t is Area)
41 {
42 inspectGroup = new InspectGroupArea();
43 }
44 else if (t is Chara)
45 {
46 inspectGroup = new InspectGroupChara();
47 }
48 else if (t is Thing)
49 {
50 inspectGroup = new InspectGroupThing();
51 }
52 else if (t is TaskPoint)
53 {
54 inspectGroup = new InspectGroupTask();
55 }
56 else if (t is ObjInfo)
57 {
58 inspectGroup = new InspectGroupObj();
59 }
60 else if (t is BlockInfo)
61 {
62 inspectGroup = new InspectGroupBlock();
63 }
64 else if (t is EloPos)
65 {
66 inspectGroup = new InspectGroupEloPos();
67 }
68 inspectGroup.type = t.GetType();
69 inspectGroup.targets.Add(t);
70 return inspectGroup;
71 }
Definition: Area.cs:4
Definition: Chara.cs:10
Definition: EloPos.cs:5
Definition: Thing.cs:8

References InspectGroup< T >.targets.

Referenced by UIInspector.Inspect(), and AM_Select.OnRefreshSummary().

◆ GetName()

string InspectGroup< T >.GetName ( )
inline

Definition at line 94 of file InspectGroup.cs.

95 {
96 if (!Solo)
97 {
98 return MultiName + " x " + targets.Count;
99 }
101 }
virtual string MultiName
Definition: InspectGroup.cs:35
string InspectName
Definition: IInspect.cs:16

References InspectGroup< T >.FirstTarget, IInspect.InspectName, InspectGroup< T >.MultiName, InspectGroup< T >.Solo, and InspectGroup< T >.targets.

Referenced by AM_Select.SetMouseInfo().

◆ OnSetActions()

virtual void InspectGroup< T >.OnSetActions ( )
inlinevirtual

◆ SetActions() [1/2]

virtual void InspectGroup< T >.SetActions ( )
inlinevirtual

Definition at line 103 of file InspectGroup.cs.

104 {
105 }

Referenced by UIInspector.Refresh().

◆ SetActions() [2/2]

sealed override void InspectGroup< T >.SetActions ( )
inline

Definition at line 111 of file InspectGroup.cs.

112 {
113 actions.Clear();
114 OnSetActions();
115 }
virtual void OnSetActions()

References InspectGroup< T >.actions, and InspectGroup< T >.OnSetActions().

Member Data Documentation

◆ actions

List<Item> InspectGroup< T >.actions = new List<Item>()

◆ targets

◆ type

Type InspectGroup< T >.type

Definition at line 25 of file InspectGroup.cs.

Referenced by AM_Select.OnRefreshSummary().

Property Documentation

◆ FirstTarget [1/2]

◆ FirstTarget [2/2]

new T InspectGroup< T >.FirstTarget
get

Definition at line 109 of file InspectGroup.cs.

◆ MultiName

virtual string InspectGroup< T >.MultiName
get

Definition at line 35 of file InspectGroup.cs.

Referenced by InspectGroup< T >.GetName().

◆ Solo

bool InspectGroup< T >.Solo
get

Definition at line 33 of file InspectGroup.cs.

Referenced by InspectGroup< T >.GetName(), and UIInspector.Refresh().


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