Skip to content

H7ResourceSet

Class in MMH7Game · MMH7Game.H7ResourceSet · native

Object › H7ResourceSet

Using it from Lua
h7.find_all("H7ResourceSet")            -- live instances
h7.find_class("MMH7Game.H7ResourceSet")   -- the class
h7.hook("MMH7Game.H7ResourceSet.ApplyDifficultyMultiplier", fn)

Properties

NameTypeNotes
mCurrencyResourceResourceStockpileprotected
mNamestringprotected
mPlayerH7Player
mResourcesarray<ResourceStockpile>protected
mResourcesGatheredarray<H7ResourceGatherData>

Functions

NameDeclaration
ApplyDifficultyMultiplierfunction ApplyDifficultyMultiplier()
CanSpendResourcefunction bool CanSpendResource(H7ResourceQuantity Cost)
CanSpendResourcesnative function bool CanSpendResources(array<H7ResourceQuantity> Resources)
CanSpendResourcesTimesfunction int CanSpendResourcesTimes(array<H7ResourceQuantity> Resources)
ClearIncomefunction ClearIncome(H7Resource resName)
ClearPreviousIncomefunction ClearPreviousIncome()
ClearQuantityfunction ClearQuantity(H7Resource resName)
GetAllResourceAmountsfunction array GetAllResourceAmounts()
GetAllResourcesAsArrayevent array<ResourceStockpile> GetAllResourcesAsArray()
GetCurrencyfunction int GetCurrency()
GetCurrencyIDStringfunction string GetCurrencyIDString()
GetCurrencyResourcefunction string GetCurrencyResource()
GetCurrencyResourceTypefunction H7Resource GetCurrencyResourceType()
GetGatheredResourcesfunction array<H7ResourceGatherData> GetGatheredResources()
GetIconByStrfunction Texture2D GetIconByStr(string Str)
GetIncomefunction int GetIncome(H7Resource Resource)
GetNamefunction string GetName()
GetPlayerfunction H7Player GetPlayer()
GetResourcenative function int GetResource(H7Resource Resource)
GetResourceByAIDfunction H7Resource GetResourceByAID(string aid)
GetResourceByIDStringfunction H7Resource GetResourceByIDString(string resourceName)
GetResourceByNamefunction H7Resource GetResourceByName(string resourceName)
GetResourceByResourceTypeIdentifierfunction H7Resource GetResourceByResourceTypeIdentifier(string resourceName)
GetResourcesfunction array<ResourceStockpile> GetResources()
HandleIncomefunction HandleIncome(bool updateGui)
HasResourceInSetfunction bool HasResourceInSet(H7Resource Resource)
IsCurrencyResourcefunction bool IsCurrencyResource(H7Resource Resource)
LogGatheredResourcefunction LogGatheredResource(H7Resource Resource, int modAmount, optional bool Currency)
ModifiedIncomeevent ModifiedIncome(H7Resource Resource)
ModifyCurrencyfunction ModifyCurrency(int modAmount, optional bool updateGui = false)
ModifyCurrencySilentfunction ModifyCurrencySilent(int modAmount)
ModifyIncomenative function ModifyIncome(H7Resource Resource, int modAmount)
ModifyResourcefunction ModifyResource(H7Resource Resource, int modAmount, optional bool updateGui = true)
PrintDebugStockpileForAIfunction PrintDebugStockpileForAI()
ResourceCompareGUIfunction int ResourceCompareGUI(ResourceStockpile A, ResourceStockpile B)
SetCurrencySilentfunction SetCurrencySilent(int Amount)
SetGatheredResourcesfunction SetGatheredResources(array<H7ResourceGatherData> gatheredResources)
SetPlayerfunction SetPlayer(H7Player Player)
SetResourcefunction SetResource(H7Resource Resource, int Amount, optional bool updateGui = true)
SetResourcesfunction SetResources(array<ResourceStockpile> stockpiles)
SortByGUIPriorityfunction SortByGUIPriority()
spendResourcesfunction spendResources(array<H7ResourceQuantity> Resources, optional bool updateGui = true, optional bool doMultiplayerSynchro = false)
SpendResourcesCompletenative function SpendResourcesComplete()
TradeResourcesWithPlayerstatic function TradeResourcesWithPlayer(H7Player sourcePlayer, H7Player targetPlayer, array<H7ResourceQuantity> Resources)
TradeResourceWithPlayerstatic function bool TradeResourceWithPlayer(H7Player sourcePlayer, H7Player targetPlayer, H7Resource Resource, int Amount)

Default values

mName="Resource Set"
mCurrencyResource=(Type=H7Resource'H7Resources.ResourceTypes.A_Resource_Generic',Quantity=0,Income=0)

Inherited

FromMembers
Object13 properties, 308 functions