Class EconomyUtils
Inheritance
System.Object
EconomyUtils
Assembly: Eco.Gameplay.dll
Syntax
public static class EconomyUtils : Object
Methods
GetRandomCurrencyName(String)
Declaration
public static string GetRandomCurrencyName(string userName)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
Returns
Type |
Description |
System.String |
|
SpawnEconomy(Player, Int32, Int32, Int32)
Declaration
public static Task<Task> SpawnEconomy(Player player, int ordersPerStore = 20, int categoriesPerStore = 4, int stores = 5)
Parameters
Type |
Name |
Description |
Player |
player |
|
System.Int32 |
ordersPerStore |
|
System.Int32 |
categoriesPerStore |
|
System.Int32 |
stores |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Threading.Tasks.Task> |
|
SpawnStoreAndFillAndClaim(User, User, Vector3i, Deed, Int32, Int32, Nullable<Single>)
Spawns [store, stockpile, chest], links them and fills with some random items.
Declaration
public static Task<(StoreComponent, StorageComponent, StorageComponent)> SpawnStoreAndFillAndClaim(User mainUser, User otherUser, Vector3i pos, Deed deed, int offersPerStore = 0, int categoriesPerStore = 0, Nullable<float> fixedPrice = null)
Parameters
Type |
Name |
Description |
User |
mainUser |
|
User |
otherUser |
|
Vector3i |
pos |
|
Deed |
deed |
|
System.Int32 |
offersPerStore |
|
System.Int32 |
categoriesPerStore |
|
System.Nullable<System.Single> |
fixedPrice |
|
Returns
Spawns [store, stockpile, chest], links them and fills with tools.
Declaration
public static Task<StoreComponent> SpawnToolsStore(User mainUser, User otherUser, Vector3i pos)
Parameters
Returns
SubtotalAndTax(Single, Single)
Declaration
public static (float, float) SubtotalAndTax(float total, float taxRate)
Parameters
Type |
Name |
Description |
System.Single |
total |
|
System.Single |
taxRate |
|
Returns
Type |
Description |
System.ValueTuple<System.Single, System.Single> |
|