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

Public Member Functions

 InvOwnerRecycle (Card owner=null, Card container=null, CurrencyType _currency=CurrencyType.Ecopo)
 
override void BuildUICurrency (UICurrency uiCurrency, bool canReroll=false)
 
override bool ShouldShowGuide (Thing t)
 
override void _OnProcess (Thing t)
 
- Public Member Functions inherited from InvOwnerDraglet
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

TraitRecycle recycle
 
- Public Attributes inherited from InvOwnerDraglet
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

override string langTransfer [get]
 
override ProcessType processType [get]
 
override bool InvertSell [get]
 
override bool DenyImportant [get]
 
- Properties inherited from InvOwnerDraglet
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

- Public Types inherited from InvOwnerDraglet
enum  ProcessType { None , Consume }
 
- 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 3 of file InvOwnerRecycle.cs.

Constructor & Destructor Documentation

◆ InvOwnerRecycle()

InvOwnerRecycle.InvOwnerRecycle ( Card  owner = null,
Card  container = null,
CurrencyType  _currency = CurrencyType::Ecopo 
)
inline

Definition at line 15 of file InvOwnerRecycle.cs.

16 : base(owner, container, _currency)
17 {
18 }
Card owner
Definition: InvOwner.cs:538

Member Function Documentation

◆ _OnProcess()

override void InvOwnerRecycle._OnProcess ( Thing  t)
inlinevirtual

Reimplemented from InvOwnerDraglet.

Definition at line 39 of file InvOwnerRecycle.cs.

40 {
41 SE.Play("trash");
42 Msg.Say("dump", t, Container.Name);
43 int a = t.Num * Mathf.Clamp(t.GetPrice() / 100, 1, 100);
44 a = EClass.rndHalf(a);
45 if (a != 0)
46 {
47 EClass.pc.Pick(ThingGen.Create("ecopo").SetNum(a / 10 + 1));
48 }
49 t.Destroy();
50 }
virtual int GetPrice(CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
Definition: Card.cs:6449
string Name
Definition: Card.cs:2013
Thing SetNum(int a)
Definition: Card.cs:3242
void Destroy()
Definition: Card.cs:4538
Thing Pick(Thing t, bool msg=true, bool tryStack=true)
Definition: Chara.cs:3920
Definition: EClass.cs:5
static int rndHalf(int a)
Definition: EClass.cs:74
static Chara pc
Definition: EClass.cs:14
Card Container
Definition: InvOwner.cs:540
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53

References InvOwner.Container, ThingGen.Create(), Card.Destroy(), Card.GetPrice(), Card.Name, EClass.pc, Chara.Pick(), EClass.rndHalf(), Msg.Say(), and Card.SetNum().

◆ BuildUICurrency()

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

Reimplemented from InvOwnerDraglet.

Definition at line 20 of file InvOwnerRecycle.cs.

21 {
22 uiCurrency.SetActive(enable: true);
23 uiCurrency.Build(new UICurrency.Options
24 {
25 ecopo = true,
26 influence = canReroll
27 });
28 }
void Build(Options _options)
Definition: UICurrency.cs:79

References UICurrency.Build().

◆ ShouldShowGuide()

override bool InvOwnerRecycle.ShouldShowGuide ( Thing  t)
inlinevirtual

Reimplemented from InvOwner.

Definition at line 30 of file InvOwnerRecycle.cs.

31 {
32 if (!t.c_isImportant && t.things.Count == 0 && t.trait.CanBeDestroyed && !t.trait.CanOnlyCarry && t.rarity < Rarity.Artifact && t.category.GetRoot().id != "currency")
33 {
34 return !(t.trait is TraitRecycle);
35 }
36 return false;
37 }
Rarity
Definition: Rarity.cs:2
Rarity rarity
Definition: Card.cs:298
Trait trait
Definition: Card.cs:49
bool c_isImportant
Definition: Card.cs:984
ThingContainer things
Definition: Card.cs:34
SourceCategory.Row category
Definition: Card.cs:1925
virtual bool CanBeDestroyed
Definition: Trait.cs:285
virtual bool CanOnlyCarry
Definition: Trait.cs:283

References Card.c_isImportant, Trait.CanBeDestroyed, Trait.CanOnlyCarry, Card.category, Card.rarity, Card.things, and Card.trait.

Member Data Documentation

◆ recycle

TraitRecycle InvOwnerRecycle.recycle

Definition at line 5 of file InvOwnerRecycle.cs.

Property Documentation

◆ DenyImportant

override bool InvOwnerRecycle.DenyImportant
get

Definition at line 13 of file InvOwnerRecycle.cs.

◆ InvertSell

override bool InvOwnerRecycle.InvertSell
get

Definition at line 11 of file InvOwnerRecycle.cs.

◆ langTransfer

override string InvOwnerRecycle.langTransfer
get

Definition at line 7 of file InvOwnerRecycle.cs.

◆ processType

override ProcessType InvOwnerRecycle.processType
get

Definition at line 9 of file InvOwnerRecycle.cs.


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