Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
InvOwnerAlly.cs
Go to the documentation of this file.
1public class InvOwnerAlly : InvOwner
2{
3 public override bool AllowTransfer => false;
4
5 public InvOwnerAlly(Card owner, Card container = null, CurrencyType _currency = CurrencyType.Money)
6 : base(owner, container, _currency)
7 {
8 }
9
10 public override void ListInteractions(ListInteraction list, Thing t, Trait trait, ButtonGrid b, bool context)
11 {
12 }
13
14 public override bool OnCancelDrag(DragItemCard.DragInfo from)
15 {
16 return false;
17 }
18
19 public override void OnClick(ButtonGrid button)
20 {
21 SE.BeepSmall();
22 }
23
24 public override void OnRightClick(ButtonGrid button)
25 {
26 Process(button);
27 }
28
29 public override void OnRightPressed(ButtonGrid button)
30 {
31 }
32
33 public bool Process(ButtonGrid button)
34 {
35 if (!button || button.card == null)
36 {
37 return false;
38 }
40 {
41 return false;
42 }
44 if (currentButton.card != null)
45 {
46 currentButton.card = null;
47 }
48 return new Transaction(new DragItemCard.DragInfo(button), new DragItemCard.DragInfo(currentButton)).Process(startTransaction: true);
49 }
50
51 public override string GetAutoUseLang(ButtonGrid button)
52 {
53 if (!button || button.card == null)
54 {
55 return null;
56 }
58 {
59 return null;
60 }
62 }
63}
CurrencyType
Definition: CurrencyType.cs:2
Card card
Definition: ButtonGrid.cs:24
Definition: Card.cs:11
override bool OnCancelDrag(DragItemCard.DragInfo from)
Definition: InvOwnerAlly.cs:14
override void OnClick(ButtonGrid button)
Definition: InvOwnerAlly.cs:19
bool Process(ButtonGrid button)
Definition: InvOwnerAlly.cs:33
override void ListInteractions(ListInteraction list, Thing t, Trait trait, ButtonGrid b, bool context)
Definition: InvOwnerAlly.cs:10
override bool AllowTransfer
Definition: InvOwnerAlly.cs:3
override void OnRightClick(ButtonGrid button)
Definition: InvOwnerAlly.cs:24
InvOwnerAlly(Card owner, Card container=null, CurrencyType _currency=CurrencyType.Money)
Definition: InvOwnerAlly.cs:5
override void OnRightPressed(ButtonGrid button)
Definition: InvOwnerAlly.cs:29
override string GetAutoUseLang(ButtonGrid button)
Definition: InvOwnerAlly.cs:51
bool Process(bool startTransaction=false)
Definition: InvOwner.cs:135
Card owner
Definition: InvOwner.cs:538
virtual string langTransfer
Definition: InvOwner.cs:592
ButtonGrid CurrentButton
InvOwnerDraglet owner
List< ButtonGrid > buttons
static LayerDragGrid Instance
Definition: Thing.cs:8
Definition: Trait.cs:7