Skip to main content

TradeCommandModule

A static class in Root.Township, the global namespace.

The trade console command module: emptying trade decks and sending spawned items to a player's post box. The commands are server-only.

Fields​

1 private and internal field
MemberWhat it is
private static Logger loggerNLog logger for the module.

Methods​

5 private and internal methods
MemberWhat it is
private static void EmptyTradeDecks()Server: wipes every TradeVendor, respawns each one fresh in place, and finishes the post box wipe.
private static async Task<PlayerPostboxStorage> GetContent(UserInfoAccess user)Looks up a player's post box storage, logging an error and returning null if the player or storage is not found.
private static async Task PostBox(UserInfoAccess user, NetworkPrefab prefab, params string[] arguments)Server: spawns a prefab (count taken from the first numeric argument) and pushes it into the player's post box. Kinematic or rigidbody-less prefabs are refused.
private static Task PostBoxString(UserInfoAccess user)Server: spawns an item from a saved-object string (or the clipboard if none given) and pushes it into the player's post box.
private static async Task PostBoxString(UserInfoAccess user, string value)Server: spawns an item from a saved-object string (or the clipboard if none given) and pushes it into the player's post box.