Elin Modding Docs Doc
Loading...
Searching...
No Matches
ThingContainer Class Reference
Inheritance diagram for ThingContainer:

Classes

struct  DestData
 

Public Member Functions

void SetOwner (Card owner)
 
void ChangeSize (int w, int h)
 
void RefreshGridRecursive ()
 
void RefreshGrid ()
 
void RefreshGrid (UIMagicChest magic, Window.SaveData data)
 
bool IsOccupied (int x, int y)
 
bool ShouldShowOnGrid (Thing t)
 
void OnAdd (Thing t)
 
bool IsFull (int y=0)
 
bool IsOverflowing ()
 
int GetFreeGridIndex ()
 
void OnRemove (Thing t)
 
void SetSize (int w, int h)
 
Thing TryStack (Thing target, int destInvX=-1, int destInvY=-1)
 
Thing CanStack (Thing target, int destInvX=-1, int destInvY=-1)
 
ThingContainer.DestData GetDest (Thing t, bool tryStack=true)
 
bool IsFull (Thing t, bool recursive=true, bool tryStack=true)
 
void AddCurrency (Card owner, string id, int a, SourceMaterial.Row mat=null)
 
void DestroyAll (Func< Thing, bool > funcExclude=null)
 
Thing Find (int uid)
 
Thing Find< T > ()
 
Thing Find (Func< Thing, bool > func, bool recursive=true)
 
Thing Find (string id, string idMat)
 
Thing Find (string id, int idMat=-1, int refVal=-1)
 
Thing FindStealable ()
 
ThingStack GetThingStack (string id, int refVal=-1)
 
ThingStack GetThingStack (string id, ThingStack s, bool isOrigin, int refVal=-1)
 
ThingStack GetThingStack (string id)
 
ThingStack GetThingStack (string id, ThingStack s, bool isOrigin)
 
int GetCurrency (string id, ref int sum, SourceMaterial.Row mat=null)
 
List< ThingListCurrency (string id)
 
List< ThingList (Func< Thing, bool > func, bool onlyAccessible=false)
 
void _List (Func< Thing, bool > func, bool onlyAccessible=false)
 
void AddFactory (HashSet< string > hash)
 
void Foreach (Action< Thing > action, bool onlyAccessible=true)
 
void Foreach (Func< Thing, bool > action, bool onlyAccessible=true)
 

Public Attributes

int width
 
int height
 
Card owner
 
List< Thinggrid
 

Static Public Attributes

static List< ThinglistUnassigned = new List<Thing>()
 
const int InvYHotbar = 1
 

Properties

int GridSize [get]
 
bool HasGrid [get]
 
bool IsMagicChest [get]
 
int MaxCapacity [get]
 

Detailed Description

Definition at line 8 of file ThingContainer.cs.

Member Function Documentation

◆ _List()

void ThingContainer._List ( Func< Thing, bool > func,
bool onlyAccessible = false )

Definition at line 693 of file ThingContainer.cs.

◆ AddCurrency()

void ThingContainer.AddCurrency ( Card owner,
string id,
int a,
SourceMaterial.Row mat = null )

Definition at line 425 of file ThingContainer.cs.

◆ AddFactory()

void ThingContainer.AddFactory ( HashSet< string > hash)

Definition at line 709 of file ThingContainer.cs.

◆ CanStack()

Thing ThingContainer.CanStack ( Thing target,
int destInvX = -1,
int destInvY = -1 )

Definition at line 359 of file ThingContainer.cs.

◆ ChangeSize()

void ThingContainer.ChangeSize ( int w,
int h )

Definition at line 72 of file ThingContainer.cs.

◆ DestroyAll()

void ThingContainer.DestroyAll ( Func< Thing, bool > funcExclude = null)

Definition at line 464 of file ThingContainer.cs.

◆ Find() [1/4]

Thing ThingContainer.Find ( Func< Thing, bool > func,
bool recursive = true )

Definition at line 527 of file ThingContainer.cs.

◆ Find() [2/4]

Thing ThingContainer.Find ( int uid)

Definition at line 485 of file ThingContainer.cs.

◆ Find() [3/4]

Thing ThingContainer.Find ( string id,
int idMat = -1,
int refVal = -1 )

Definition at line 554 of file ThingContainer.cs.

◆ Find() [4/4]

Thing ThingContainer.Find ( string id,
string idMat )

Definition at line 548 of file ThingContainer.cs.

◆ Find< T >()

Thing ThingContainer.Find< T > ( )
Type Constraints
T :Trait 

Definition at line 506 of file ThingContainer.cs.

◆ FindStealable()

Thing ThingContainer.FindStealable ( )

Definition at line 575 of file ThingContainer.cs.

◆ Foreach() [1/2]

void ThingContainer.Foreach ( Action< Thing > action,
bool onlyAccessible = true )

Definition at line 729 of file ThingContainer.cs.

◆ Foreach() [2/2]

void ThingContainer.Foreach ( Func< Thing, bool > action,
bool onlyAccessible = true )

Definition at line 742 of file ThingContainer.cs.

◆ GetCurrency()

int ThingContainer.GetCurrency ( string id,
ref int sum,
SourceMaterial.Row mat = null )

Definition at line 644 of file ThingContainer.cs.

◆ GetDest()

ThingContainer.DestData ThingContainer.GetDest ( Thing t,
bool tryStack = true )

Definition at line 372 of file ThingContainer.cs.

◆ GetFreeGridIndex()

int ThingContainer.GetFreeGridIndex ( )

Definition at line 304 of file ThingContainer.cs.

◆ GetThingStack() [1/4]

ThingStack ThingContainer.GetThingStack ( string id)

Definition at line 619 of file ThingContainer.cs.

◆ GetThingStack() [2/4]

ThingStack ThingContainer.GetThingStack ( string id,
int refVal = -1 )

Definition at line 594 of file ThingContainer.cs.

◆ GetThingStack() [3/4]

ThingStack ThingContainer.GetThingStack ( string id,
ThingStack s,
bool isOrigin )

Definition at line 627 of file ThingContainer.cs.

◆ GetThingStack() [4/4]

ThingStack ThingContainer.GetThingStack ( string id,
ThingStack s,
bool isOrigin,
int refVal = -1 )

Definition at line 602 of file ThingContainer.cs.

◆ IsFull() [1/2]

bool ThingContainer.IsFull ( int y = 0)

Definition at line 264 of file ThingContainer.cs.

◆ IsFull() [2/2]

bool ThingContainer.IsFull ( Thing t,
bool recursive = true,
bool tryStack = true )

Definition at line 419 of file ThingContainer.cs.

◆ IsOccupied()

bool ThingContainer.IsOccupied ( int x,
int y )

Definition at line 222 of file ThingContainer.cs.

◆ IsOverflowing()

bool ThingContainer.IsOverflowing ( )

Definition at line 286 of file ThingContainer.cs.

◆ List()

List< Thing > ThingContainer.List ( Func< Thing, bool > func,
bool onlyAccessible = false )

Definition at line 685 of file ThingContainer.cs.

◆ ListCurrency()

List< Thing > ThingContainer.ListCurrency ( string id)

Definition at line 661 of file ThingContainer.cs.

◆ OnAdd()

void ThingContainer.OnAdd ( Thing t)

Definition at line 245 of file ThingContainer.cs.

◆ OnRemove()

void ThingContainer.OnRemove ( Thing t)

Definition at line 317 of file ThingContainer.cs.

◆ RefreshGrid() [1/2]

void ThingContainer.RefreshGrid ( )

Definition at line 104 of file ThingContainer.cs.

◆ RefreshGrid() [2/2]

void ThingContainer.RefreshGrid ( UIMagicChest magic,
Window.SaveData data )

Definition at line 139 of file ThingContainer.cs.

◆ RefreshGridRecursive()

void ThingContainer.RefreshGridRecursive ( )

Definition at line 91 of file ThingContainer.cs.

◆ SetOwner()

void ThingContainer.SetOwner ( Card owner)

Definition at line 59 of file ThingContainer.cs.

◆ SetSize()

void ThingContainer.SetSize ( int w,
int h )

Definition at line 331 of file ThingContainer.cs.

◆ ShouldShowOnGrid()

bool ThingContainer.ShouldShowOnGrid ( Thing t)

Definition at line 235 of file ThingContainer.cs.

◆ TryStack()

Thing ThingContainer.TryStack ( Thing target,
int destInvX = -1,
int destInvY = -1 )

Definition at line 338 of file ThingContainer.cs.

Member Data Documentation

◆ grid

List<Thing> ThingContainer.grid

Definition at line 870 of file ThingContainer.cs.

◆ height

int ThingContainer.height

Definition at line 862 of file ThingContainer.cs.

◆ InvYHotbar

const int ThingContainer.InvYHotbar = 1
static

Definition at line 854 of file ThingContainer.cs.

◆ listUnassigned

List<Thing> ThingContainer.listUnassigned = new List<Thing>()
static

Definition at line 850 of file ThingContainer.cs.

◆ owner

Card ThingContainer.owner

Definition at line 866 of file ThingContainer.cs.

◆ width

int ThingContainer.width

Definition at line 858 of file ThingContainer.cs.

Property Documentation

◆ GridSize

int ThingContainer.GridSize
get

Definition at line 13 of file ThingContainer.cs.

◆ HasGrid

bool ThingContainer.HasGrid
get

Definition at line 24 of file ThingContainer.cs.

◆ IsMagicChest

bool ThingContainer.IsMagicChest
get

Definition at line 35 of file ThingContainer.cs.

◆ MaxCapacity

int ThingContainer.MaxCapacity
get

Definition at line 46 of file ThingContainer.cs.


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