Elin Decompiled Documentation EA 23.287 Stable
Loading...
Searching...
No Matches
TraitMannequin.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2
4{
5 public override bool CanStack => false;
6
7 public override bool CanSearchContent => true;
8
9 public override bool CanUseContent => false;
10
11 public override bool UseAltTiles
12 {
13 get
14 {
15 if (owner.things.Count <= 0)
16 {
17 return owner.c_lockLv != 0;
18 }
19 return true;
20 }
21 }
22
23 public override bool CanUseFromInventory => false;
24
25 public override bool CanName => true;
26
27 public override bool CanUse(Chara c)
28 {
29 if (base.CanUse(c))
30 {
32 {
33 return EClass.debug.enable;
34 }
35 return true;
36 }
37 return false;
38 }
39
40 public override bool OnUse(Chara c)
41 {
42 List<Thing> list = new List<Thing>();
43 foreach (BodySlot slot in EClass.pc.body.slots)
44 {
45 if (slot.elementId != 44 && slot.thing != null && slot.thing.blessedState >= BlessedState.Normal)
46 {
47 list.Add(slot.thing);
48 }
49 }
50 if (owner.things.Count == 0)
51 {
52 foreach (Thing item in list)
53 {
55 }
56 }
57 else
58 {
59 List<Thing> list2 = new List<Thing>();
60 foreach (Thing thing in owner.things)
61 {
62 list2.Add(thing);
63 }
64 foreach (Thing item2 in list)
65 {
66 owner.AddCard(item2);
67 }
68 foreach (Thing item3 in list2)
69 {
70 EClass.pc.PickOrDrop(EClass.pc.pos, item3, msg: false);
71 if (item3.GetRootCard().IsPC)
72 {
73 EClass.pc.body.Equip(item3, null, msg: false);
74 }
75 }
76 }
77 owner.Dye((owner.things.Count > 0) ? owner.things[0].material : null);
78 SE.Equip();
79 return true;
80 }
81}
BlessedState
Definition: BlessedState.cs:2
int elementId
Definition: BodySlot.cs:6
Thing thing
Definition: BodySlot.cs:8
Card AddCard(Card c)
Definition: Card.cs:3166
Point pos
Definition: Card.cs:60
void Dye(string idMat)
Definition: Card.cs:6213
ThingContainer things
Definition: Card.cs:39
virtual bool IsPC
Definition: Card.cs:2183
Card GetRootCard()
Definition: Card.cs:3508
BlessedState blessedState
Definition: Card.cs:279
List< BodySlot > slots
Definition: CharaBody.cs:8
bool Equip(Thing thing, BodySlot slot=null, bool msg=true)
Definition: CharaBody.cs:194
Definition: Chara.cs:10
CharaBody body
Definition: Chara.cs:94
void PickOrDrop(Point p, string idThing, int idMat=-1, int num=1, bool msg=true)
Definition: Chara.cs:4361
bool enable
Definition: CoreDebug.cs:286
Definition: EClass.cs:6
static Zone _zone
Definition: EClass.cs:21
static Chara pc
Definition: EClass.cs:15
static CoreDebug debug
Definition: EClass.cs:49
Definition: Thing.cs:8
override bool CanUseContent
override bool OnUse(Chara c)
override bool UseAltTiles
override bool CanUseFromInventory
override bool CanSearchContent
override bool CanName
override bool CanStack
override bool CanUse(Chara c)
Card owner
Definition: Trait.cs:28
bool IsPCFaction
Definition: Zone.cs:475