Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
InspectGroupThing.cs
Go to the documentation of this file.
1using System;
2
3public class InspectGroupThing : InspectGroup<Thing>
4{
5 public override string MultiName => "Thing";
6
7 public override void OnSetActions()
8 {
9 Thing first = base.FirstTarget;
10 Add("objInfo", "", (Action)delegate
11 {
12 EClass.ui.AddLayer<LayerInfo>().Set(first);
13 }, sound: false, 0, auto: false);
14 if (first.trait is TraitQuestBoard)
15 {
16 Add("quest", "", (Action)delegate
17 {
18 EClass.ui.AddLayer<LayerQuestBoard>();
19 }, sound: false, 20, auto: true);
20 Add("hire", "", (Action)delegate
21 {
22 EClass.ui.AddLayer<LayerHire>();
23 }, sound: false, 20, auto: true);
24 }
25 if (first.trait is TraitGacha)
26 {
27 Add("gacha", "", (Action)delegate
28 {
29 EClass.ui.AddLayer<LayerGacha>();
30 }, sound: false, 10, auto: true);
31 }
32 if (first.trait.IsFactory)
33 {
34 Add("craft", "icon_Inspect", (Action)delegate
35 {
36 EClass.ui.AddLayer<LayerCraft>().SetFactory(first);
37 }, sound: false, 100, auto: true);
38 }
39 if (first.IsInstalled)
40 {
41 Add("uninstall", "", (Action)delegate
42 {
43 first.SetPlaceState(PlaceState.roaming);
44 }, sound: false, 0, auto: false);
45 }
46 Add("install", "", (Action)delegate
47 {
49 }, sound: false, 0, auto: false);
50 if (first.isDeconstructing)
51 {
52 Add("cancel".lang() + "\n(" + "Deconstruct".lang() + ")", "", delegate(Thing t)
53 {
54 t.SetDeconstruct(deconstruct: false);
55 }, sound: true);
56 }
57 else
58 {
59 Add("Deconstruct", "", delegate(Thing t)
60 {
61 t.SetDeconstruct(deconstruct: true);
62 }, sound: true);
63 }
65 if (r.IsValid)
66 {
67 Add("Copy", "", (Action)delegate
68 {
70 }, sound: false, 0, auto: false);
71 }
72 }
73}
PlaceState
Definition: PlaceState.cs:2
void Activate(Thing t)
Result TestThing(Thing t)
Definition: AM_Picker.cs:107
new bool Select(Result r)
Definition: AM_Picker.cs:175
static AM_Inspect Inspect
Definition: ActionMode.cs:23
static AM_Picker Picker
Definition: ActionMode.cs:43
void SetPlaceState(PlaceState newState, bool byPlayer=false)
Definition: Card.cs:3454
Trait trait
Definition: Card.cs:49
bool isDeconstructing
Definition: Card.cs:418
bool IsInstalled
Definition: Card.cs:2241
void SetDeconstruct(bool deconstruct)
Definition: Card.cs:6836
Definition: EClass.cs:5
static UI ui
Definition: EClass.cs:16
override string MultiName
override void OnSetActions()
Item Add(string text, string idSprite, Action action, bool sound=false, int priority=0, bool auto=false)
Definition: Thing.cs:8
virtual bool IsFactory
Definition: Trait.cs:135