Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
InvOwnerEquip Class Reference
Inheritance diagram for InvOwnerEquip:
InvOwner EClass

Public Member Functions

override bool AllowDrop (Thing t)
 
 InvOwnerEquip (Card owner, BodySlot slot, Card container=null, CurrencyType _currency=CurrencyType.None)
 
override void ListInteractions (ListInteraction list, Thing t, Trait trait, ButtonGrid b, bool context)
 
override bool IsFailByCurse (Thing t)
 
override void OnWriteNote (ButtonGrid button, UINote n)
 
- Public Member Functions inherited from InvOwner
virtual bool AllowHold (Thing t)
 
virtual bool AllowMoved (Thing t)
 
virtual bool ShouldShowGuide (Thing t)
 
virtual bool AllowDrop (Thing t)
 
virtual Thing CreateDefaultContainer ()
 
virtual void BuildUICurrency (UICurrency uiCurrency, bool canReroll=false)
 
bool IsWeightOver (Thing t)
 
 InvOwner (Card owner, Card container=null, CurrencyType _currency=CurrencyType.None, PriceType _price=PriceType.Default)
 
void Init ()
 
virtual void OnInit ()
 
virtual void OnClick (ButtonGrid button)
 
virtual void OnRightClick (ButtonGrid button)
 
virtual void OnRightPressed (ButtonGrid button)
 
InvOwner GetShitDestOwner (ButtonGrid b, bool rightMouse=false)
 
virtual void OnShiftClick (ButtonGrid b, bool rightMouse=false)
 
virtual bool CanShiftClick (ButtonGrid b, bool rightMouse=false)
 
virtual string GetTextShiftClick (ButtonGrid b)
 
virtual void OnCtrlClick (ButtonGrid button)
 
virtual bool CanCtrlClick (ButtonGrid b)
 
virtual string GetTextCtrlClick (ButtonGrid b)
 
virtual void OnAltClick (ButtonGrid button)
 
virtual bool CanAltClick (ButtonGrid b)
 
virtual string GetTextAltClick (ButtonGrid b)
 
void Grab (DragItemCard.DragInfo from)
 
Thing PutBack (DragItemCard.DragInfo from)
 
void OnStartDrag (DragItemCard.DragInfo from)
 
virtual bool OnCancelDrag (DragItemCard.DragInfo from)
 
virtual bool OnDrag (DragItemCard.DragInfo from, DragItemCard.DragInfo to, bool execute, bool cancel=false)
 
virtual void OnProcess (Thing t)
 
bool CanOpenContainer (Thing t)
 
ListInteraction ListInteractions (ButtonGrid b, bool context)
 
bool TryHold (Thing t)
 
virtual void ListInteractions (ListInteraction list, Thing t, Trait trait, ButtonGrid b, bool context)
 
virtual string GetAutoUseLang (ButtonGrid button)
 
void AutoUse (ButtonGrid button, bool repeat=false)
 
void ShowContextMenu (ButtonGrid button)
 
virtual int GetPrice (Thing t, CurrencyType currency, int num, bool sell)
 
virtual string GetTextDetail (Thing t, CurrencyType currency, int num, bool sell)
 
virtual void OnWriteNote (ButtonGrid button, UINote n)
 
virtual string IDCostIcon (Thing t)
 
virtual bool IsFailByCurse (Thing t)
 

Public Attributes

BodySlot slot
 
- Public Attributes inherited from InvOwner
bool includeChildren
 
CurrencyType currency
 
PriceType priceType
 
HomeResource homeResource
 
Card owner
 
Card Container
 
List< ButtonGridbuttons = new List<ButtonGrid>()
 

Properties

override bool AlwaysShowTooltip [get]
 
override bool ShowNew [get]
 
- Properties inherited from InvOwner
static bool HasTrader [get]
 
static bool FreeTransfer [get]
 
virtual bool AllowAutouse [get]
 
virtual bool AllowContext [get]
 
virtual bool AllowSell [get]
 
virtual bool AlwaysShowTooltip [get]
 
virtual bool UseGuide [get]
 
virtual bool AllowTransfer [get]
 
virtual bool AllowDropOnDrag [get]
 
virtual string langTransfer [get]
 
virtual int destInvY [get]
 
virtual bool HasTransaction [get]
 
virtual bool CopyOnTransfer [get]
 
virtual bool SingleTarget [get]
 
bool UseHomeResource [get]
 
bool IsMagicChest [get]
 
List< ThingThings [get]
 
Chara Chara [get]
 
ContainerType ContainerType [get]
 
virtual bool InvertSell [get]
 
virtual int numDragGrid [get]
 
virtual bool ShowNew [get]
 
virtual bool DenyImportant [get]
 
InvOwner destInvOwner [get]
 
string IDCurrency [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 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)
 
- Static Public Attributes inherited from InvOwner
static ForceGiveData forceGive = new ForceGiveData()
 
static InvOwner Trader
 
static InvOwner Main
 
static float clickTimer
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 1 of file InvOwnerEquip.cs.

Constructor & Destructor Documentation

◆ InvOwnerEquip()

InvOwnerEquip.InvOwnerEquip ( Card  owner,
BodySlot  slot,
Card  container = null,
CurrencyType  _currency = CurrencyType::None 
)
inline

Definition at line 14 of file InvOwnerEquip.cs.

15 : base(owner, container, _currency)
16 {
17 this.slot = slot;
18 }
BodySlot slot
Definition: InvOwnerEquip.cs:3
Card owner
Definition: InvOwner.cs:538

References slot.

Member Function Documentation

◆ AllowDrop()

override bool InvOwnerEquip.AllowDrop ( Thing  t)
inlinevirtual

Reimplemented from InvOwner.

Definition at line 9 of file InvOwnerEquip.cs.

10 {
11 return t.blessedState >= BlessedState.Normal;
12 }
BlessedState
Definition: BlessedState.cs:2

◆ IsFailByCurse()

override bool InvOwnerEquip.IsFailByCurse ( Thing  t)
inlinevirtual

Reimplemented from InvOwner.

Definition at line 40 of file InvOwnerEquip.cs.

41 {
42 if (t != null && t.blessedState <= BlessedState.Cursed)
43 {
44 Msg.Say("unequipCursed", t);
45 SE.Play("curse3");
46 return true;
47 }
48 return false;
49 }
BlessedState blessedState
Definition: Card.cs:262
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58

References Card.blessedState, and Msg.Say().

Referenced by ListInteractions().

◆ ListInteractions()

override void InvOwnerEquip.ListInteractions ( ListInteraction  list,
Thing  t,
Trait  trait,
ButtonGrid  b,
bool  context 
)
inlinevirtual

Reimplemented from InvOwner.

Definition at line 20 of file InvOwnerEquip.cs.

21 {
22 list.Add("actUnequip", 0, delegate
23 {
24 if (!IsFailByCurse(t))
25 {
26 if (EClass.pc.things.IsFull())
27 {
28 Msg.Say("backpack_full");
29 SE.BeepSmall();
30 }
31 else
32 {
33 EClass.pc.body.Unequip(t);
34 EClass.Sound.Play("equip");
35 }
36 }
37 });
38 }
ThingContainer things
Definition: Card.cs:34
Definition: EClass.cs:5
static Chara pc
Definition: EClass.cs:14
override bool IsFailByCurse(Thing t)
bool IsFull(int y=0)

References InvOwner.ListInteraction.Add(), IsFailByCurse(), ThingContainer.IsFull(), EClass.pc, and Card.things.

◆ OnWriteNote()

override void InvOwnerEquip.OnWriteNote ( ButtonGrid  button,
UINote  n 
)
inlinevirtual

Reimplemented from InvOwner.

Definition at line 51 of file InvOwnerEquip.cs.

52 {
53 if (button.card == null)
54 {
55 n.Clear();
57 n.AddText("noEQ".lang());
58 if (slot.elementId == 35)
59 {
60 Thing.AddAttackEvaluation(n, base.Chara);
61 }
62 }
63 else
64 {
65 base.OnWriteNote(button, n);
66 }
67 }
string name
Definition: BodySlot.cs:14
int elementId
Definition: BodySlot.cs:6
Card card
Definition: ButtonGrid.cs:24
Definition: Thing.cs:8
static void AddAttackEvaluation(UINote n, Chara chara, Thing current=null)
Definition: Thing.cs:1373
void Clear()
Definition: UINote.cs:35
UIItem AddHeader(string text, Sprite sprite=null)
Definition: UINote.cs:79
UIItem AddText(string text, FontColor color=FontColor.DontChange)
Definition: UINote.cs:113

References Thing.AddAttackEvaluation(), UINote.AddHeader(), UINote.AddText(), ButtonGrid.card, UINote.Clear(), BodySlot.elementId, BodySlot.name, and slot.

Member Data Documentation

◆ slot

BodySlot InvOwnerEquip.slot

Property Documentation

◆ AlwaysShowTooltip

override bool InvOwnerEquip.AlwaysShowTooltip
get

Definition at line 5 of file InvOwnerEquip.cs.

◆ ShowNew

override bool InvOwnerEquip.ShowNew
get

Definition at line 7 of file InvOwnerEquip.cs.


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