Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
InvOwnerDraglet Class Reference
Inheritance diagram for InvOwnerDraglet:
InvOwner EClass InvOwnerBlend InvOwnerChaosOffering InvOwnerCraft InvOwnerDeliver InvOwnerDeliverBox InvOwnerEffect InvOwnerGacha InvOwnerGene InvOwnerGive InvOwnerMod InvOwnerOffering InvOwnerRecycle InvOwnerRefuel

Public Types

enum  ProcessType { None , Consume }
 

Public Member Functions

override bool AllowHold (Thing t)
 
 InvOwnerDraglet (Card owner=null, Card container=null, CurrencyType _currency=CurrencyType.Money)
 
override void OnInit ()
 
override void OnClick (ButtonGrid button)
 
override void OnRightClick (ButtonGrid button)
 
override int GetPrice (Thing t, CurrencyType currency, int num, bool sell)
 
override string GetTextDetail (Thing t, CurrencyType currency, int num, bool sell)
 
virtual void OnWriteNote (Thing t, UINote n)
 
sealed override void OnProcess (Thing t)
 
virtual void _OnProcess (Thing t)
 
virtual void OnAfterRefuel ()
 
void RedrawButton ()
 
override void BuildUICurrency (UICurrency uiCurrency, bool canReroll=false)
 
- 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

int count = -1
 
BlessedState state
 
int price
 
- Public Attributes inherited from InvOwner
bool includeChildren
 
CurrencyType currency
 
PriceType priceType
 
HomeResource homeResource
 
Card owner
 
Card Container
 
List< ButtonGridbuttons = new List<ButtonGrid>()
 

Properties

virtual ProcessType processType [get]
 
virtual bool ShowFuel [get]
 
virtual bool CanTargetAlly [get]
 
virtual string langWhat [get]
 
virtual bool AllowStockIngredients [get]
 
override bool AllowTransfer [get]
 
override bool AllowAutouse [get]
 
override bool AllowContext [get]
 
override bool UseGuide [get]
 
override bool CopyOnTransfer [get]
 
override bool InvertSell [get]
 
override bool DenyImportant [get]
 
LayerDragGrid dragGrid [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 4 of file InvOwnerDraglet.cs.

Member Enumeration Documentation

◆ ProcessType

Enumerator
None 
Consume 

Definition at line 6 of file InvOwnerDraglet.cs.

Constructor & Destructor Documentation

◆ InvOwnerDraglet()

InvOwnerDraglet.InvOwnerDraglet ( Card  owner = null,
Card  container = null,
CurrencyType  _currency = CurrencyType::Money 
)
inline

Definition at line 49 of file InvOwnerDraglet.cs.

50 : base(owner, container, _currency)
51 {
52 }
Card owner
Definition: InvOwner.cs:538

Member Function Documentation

◆ _OnProcess()

◆ AllowHold()

override bool InvOwnerDraglet.AllowHold ( Thing  t)
inlinevirtual

Reimplemented from InvOwner.

Definition at line 44 of file InvOwnerDraglet.cs.

45 {
46 return false;
47 }

◆ BuildUICurrency()

override void InvOwnerDraglet.BuildUICurrency ( UICurrency  uiCurrency,
bool  canReroll = false 
)
inlinevirtual

Reimplemented from InvOwner.

Reimplemented in InvOwnerRecycle.

Definition at line 171 of file InvOwnerDraglet.cs.

172 {
173 base.BuildUICurrency(uiCurrency);
174 uiCurrency.SetActive(price != 0);
175 }

References price.

Referenced by LayerDragGrid.SetInv().

◆ GetPrice()

override int InvOwnerDraglet.GetPrice ( Thing  t,
CurrencyType  currency,
int  num,
bool  sell 
)
inlinevirtual

Reimplemented from InvOwner.

Definition at line 94 of file InvOwnerDraglet.cs.

95 {
96 return price;
97 }

References price.

Referenced by GetTextDetail().

◆ GetTextDetail()

override string InvOwnerDraglet.GetTextDetail ( Thing  t,
CurrencyType  currency,
int  num,
bool  sell 
)
inlinevirtual

Reimplemented from InvOwner.

Definition at line 99 of file InvOwnerDraglet.cs.

100 {
101 int num2 = GetPrice(t, currency, num, sell);
102 return "invInteraction2".lang(num.ToString() ?? "", langTransfer.lang()) + ((num2 == 0) ? "" : "invInteraction3".lang(num2.ToString() ?? "", EClass.sources.things.map[base.IDCurrency].GetName()));
103 }
Definition: EClass.cs:5
static SourceManager sources
Definition: EClass.cs:42
override int GetPrice(Thing t, CurrencyType currency, int num, bool sell)
CurrencyType currency
Definition: InvOwner.cs:532
virtual string langTransfer
Definition: InvOwner.cs:592
SourceThing things

References InvOwner.currency, GetPrice(), InvOwner.langTransfer, EClass.sources, and SourceManager.things.

◆ OnAfterRefuel()

virtual void InvOwnerDraglet.OnAfterRefuel ( )
inlinevirtual

Reimplemented in InvOwnerCraft.

Definition at line 161 of file InvOwnerDraglet.cs.

162 {
163 }

◆ OnClick()

override void InvOwnerDraglet.OnClick ( ButtonGrid  button)
inlinevirtual

Reimplemented from InvOwner.

Definition at line 66 of file InvOwnerDraglet.cs.

67 {
68 if (button.card != null)
69 {
70 if (button.index == 0)
71 {
73 }
74 else
75 {
76 button.SetCard(null);
78 }
81 SE.Equip();
83 {
85 }
86 }
87 }
Status Success(Action action=null)
Definition: AIAct.cs:252
virtual bool IsRunning
Definition: AIAct.cs:31
Card card
Definition: ButtonGrid.cs:24
void SetCard(Card c, Mode mode=Mode.Default, Action< UINote > onWriteNote=null)
Definition: ButtonGrid.cs:184
AIAct ai
Definition: Chara.cs:187
static Chara pc
Definition: EClass.cs:14
LayerDragGrid dragGrid
override void ClearButtons()
UIDragGridIngredients uiIngredients
override void RefreshCurrentGrid()

References Chara.ai, ButtonGrid.card, LayerDragGrid.ClearButtons(), dragGrid, ButtonGrid.index, AIAct.IsRunning, EClass.pc, UIDragGridIngredients.Refresh(), LayerDragGrid.RefreshCurrentGrid(), ButtonGrid.SetCard(), AIAct.Success(), LayerDragGrid.TryPutBack(), and LayerDragGrid.uiIngredients.

Referenced by OnRightClick().

◆ OnInit()

override void InvOwnerDraglet.OnInit ( )
inlinevirtual

Reimplemented from InvOwner.

Definition at line 54 of file InvOwnerDraglet.cs.

55 {
56 if (price == 0)
57 {
59 }
60 if (!langWhat.IsEmpty())
61 {
63 }
64 }
CurrencyType
Definition: CurrencyType.cs:2
virtual string langWhat
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 InvOwner.currency, langWhat, price, and Msg.Say().

◆ OnProcess()

sealed override void InvOwnerDraglet.OnProcess ( Thing  t)
inlinevirtual

Reimplemented from InvOwner.

Definition at line 109 of file InvOwnerDraglet.cs.

110 {
111 if (!dragGrid.IsAllGridSet())
112 {
115 t.PlaySoundDrop(spatial: false);
116 return;
117 }
118 _OnProcess(t);
121 if (processType == ProcessType.Consume)
122 {
123 EInput.haltInput = true;
124 foreach (ButtonGrid b in dragGrid.buttons)
125 {
126 b.icon.rectTransform.DOScale(0f, 0.3f).SetEase(Ease.InBack).OnComplete(delegate
127 {
128 if (b.transform != null)
129 {
130 b.icon.rectTransform.localScale = Vector3.one;
131 b.SetCardGrid(null, b.invOwner);
132 RedrawButton();
133 }
134 EInput.haltInput = false;
135 });
136 }
137 }
138 else
139 {
140 RedrawButton();
141 }
143 if (count > 0)
144 {
145 count--;
146 if (count == 0)
147 {
148 dragGrid.Close();
149 }
150 else if (!langWhat.IsEmpty())
151 {
153 }
154 }
155 }
void PlaySoundDrop(bool spatial=true)
Definition: Card.cs:5389
Definition: EInput.cs:8
static bool haltInput
Definition: EInput.cs:275
virtual void _OnProcess(Thing t)
virtual ProcessType processType
List< ButtonGrid > buttons
bool IsAllGridSet()
static void SetDirty(Thing t)
virtual void Close()
Definition: Layer.cs:463
Image icon
Definition: UIButton.cs:110
static void TryShowTip(Transform root=null, bool highlight=true, bool ignoreWhenRightClick=true)
Definition: UIButton.cs:778

References _OnProcess(), LayerDragGrid.buttons, Layer.Close(), count, dragGrid, EInput.haltInput, UIButton.icon, LayerDragGrid.IsAllGridSet(), langWhat, Card.PlaySoundDrop(), processType, RedrawButton(), UIDragGridIngredients.Refresh(), LayerDragGrid.RefreshCurrentGrid(), Msg.Say(), LayerInventory.SetDirty(), UIButton.TryShowTip(), and LayerDragGrid.uiIngredients.

Referenced by UIDragGridIngredients.Refresh(), and UIDragGridIngredients.Update().

◆ OnRightClick()

override void InvOwnerDraglet.OnRightClick ( ButtonGrid  button)
inlinevirtual

Reimplemented from InvOwner.

Definition at line 89 of file InvOwnerDraglet.cs.

90 {
91 OnClick(button);
92 }
override void OnClick(ButtonGrid button)

References OnClick().

◆ OnWriteNote()

virtual void InvOwnerDraglet.OnWriteNote ( Thing  t,
UINote  n 
)
inlinevirtual

Reimplemented in InvOwnerGene.

Definition at line 105 of file InvOwnerDraglet.cs.

106 {
107 }

◆ RedrawButton()

void InvOwnerDraglet.RedrawButton ( )
inline

Definition at line 165 of file InvOwnerDraglet.cs.

166 {
169 }
void RefreshCost()

References dragGrid, LayerDragGrid.RefreshCost(), and LayerDragGrid.RefreshCurrentGrid().

Referenced by OnProcess().

Member Data Documentation

◆ count

◆ price

int InvOwnerDraglet.price

Definition at line 16 of file InvOwnerDraglet.cs.

Referenced by BuildUICurrency(), LayerDragGrid.GetPrice(), GetPrice(), and OnInit().

◆ state

Property Documentation

◆ AllowAutouse

override bool InvOwnerDraglet.AllowAutouse
get

Definition at line 30 of file InvOwnerDraglet.cs.

◆ AllowContext

override bool InvOwnerDraglet.AllowContext
get

Definition at line 32 of file InvOwnerDraglet.cs.

◆ AllowStockIngredients

virtual bool InvOwnerDraglet.AllowStockIngredients
get

Definition at line 26 of file InvOwnerDraglet.cs.

Referenced by UIDragGridIngredients.Refresh(), and LayerDragGrid.SetInv().

◆ AllowTransfer

override bool InvOwnerDraglet.AllowTransfer
get

Definition at line 28 of file InvOwnerDraglet.cs.

◆ CanTargetAlly

virtual bool InvOwnerDraglet.CanTargetAlly
get

Definition at line 22 of file InvOwnerDraglet.cs.

Referenced by LayerDragGrid.SetInv().

◆ CopyOnTransfer

override bool InvOwnerDraglet.CopyOnTransfer
get

Definition at line 36 of file InvOwnerDraglet.cs.

◆ DenyImportant

override bool InvOwnerDraglet.DenyImportant
get

Definition at line 40 of file InvOwnerDraglet.cs.

◆ dragGrid

LayerDragGrid InvOwnerDraglet.dragGrid
get

Definition at line 42 of file InvOwnerDraglet.cs.

Referenced by OnClick(), OnProcess(), and RedrawButton().

◆ InvertSell

override bool InvOwnerDraglet.InvertSell
get

Definition at line 38 of file InvOwnerDraglet.cs.

◆ langWhat

virtual string InvOwnerDraglet.langWhat
get

Definition at line 24 of file InvOwnerDraglet.cs.

Referenced by OnInit(), and OnProcess().

◆ processType

virtual ProcessType InvOwnerDraglet.processType
get

Definition at line 18 of file InvOwnerDraglet.cs.

Referenced by OnProcess().

◆ ShowFuel

virtual bool InvOwnerDraglet.ShowFuel
get

Definition at line 20 of file InvOwnerDraglet.cs.

Referenced by LayerDragGrid.SetInv().

◆ UseGuide

override bool InvOwnerDraglet.UseGuide
get

Definition at line 34 of file InvOwnerDraglet.cs.


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