C# Class Terraria.Plugins.CoderCow.Protector.ChestManager

Show file Open project: CoderCow/Protector-Plugin Class Usage Examples

Public Properties

Property Type Description
DummyChest Chest
DummyChestIndex int

Public Methods

Method Description
ChestFromLocation ( System.Drawing.Point chestLocation, TShockAPI.TSPlayer reportToPlayer = null ) : IChest
ChestManager ( Terraria.Plugins.Common.PluginTrace pluginTrace, Configuration config, ServerMetadataHandler serverMetadataHandler, WorldMetadata worldMetadata, PluginCooperationHandler cooperationHandler ) : System
CreateChestData ( System.Drawing.Point chestLocation ) : IChest
DestroyChest ( IChest chest ) : void
DestroyChest ( System.Drawing.Point anyTileLocation ) : void
EnsureBankChest ( ProtectionEntry protection, bool resetContent ) : bool
EnsureRefillChest ( ProtectionEntry protection ) : bool
EnumerateAllChests ( ) : IEnumerable
EnumerateProtectorChests ( ) : IEnumerable
HandleGameSecondUpdate ( ) : void
PlaceChest ( ushort tileType, int style, System.Drawing.Point placeLocation ) : IChest
SetUpBankChest ( TShockAPI.TSPlayer player, System.Drawing.Point tileLocation, int bankChestIndex, bool checkPermissions = false ) : void
SetUpRefillChest ( TShockAPI.TSPlayer player, System.Drawing.Point tileLocation, System.TimeSpan refillTime, bool oneLootPerPlayer = null, int lootLimit = null, bool autoLock = null, bool autoEmpty = null, bool fairLoot = false, bool checkPermissions = false ) : bool
SetUpTradeChest ( TShockAPI.TSPlayer player, System.Drawing.Point tileLocation, int sellAmount, int sellItemId, int payAmount, int payItemId, int lootLimit, bool checkPermissions = false ) : void
TryRefillChest ( IChest chest, Terraria.Plugins.CoderCow.Protector.RefillChestMetadata refillChestData ) : bool
TryRefillChest ( System.Drawing.Point chestLocation, Terraria.Plugins.CoderCow.Protector.RefillChestMetadata refillChestData ) : bool

Private Methods

Method Description
ChestManager ( ) : System
RefillChestTimer_Callback ( Terraria.Plugins.Common.TimerBase timer ) : bool

Method Details

ChestFromLocation() public method

public ChestFromLocation ( System.Drawing.Point chestLocation, TShockAPI.TSPlayer reportToPlayer = null ) : IChest
chestLocation System.Drawing.Point
reportToPlayer TShockAPI.TSPlayer
return IChest

ChestManager() public method

public ChestManager ( Terraria.Plugins.Common.PluginTrace pluginTrace, Configuration config, ServerMetadataHandler serverMetadataHandler, WorldMetadata worldMetadata, PluginCooperationHandler cooperationHandler ) : System
pluginTrace Terraria.Plugins.Common.PluginTrace
config Configuration
serverMetadataHandler ServerMetadataHandler
worldMetadata WorldMetadata
cooperationHandler PluginCooperationHandler
return System

CreateChestData() public method

public CreateChestData ( System.Drawing.Point chestLocation ) : IChest
chestLocation System.Drawing.Point
return IChest

DestroyChest() public method

public DestroyChest ( IChest chest ) : void
chest IChest
return void

DestroyChest() public method

public DestroyChest ( System.Drawing.Point anyTileLocation ) : void
anyTileLocation System.Drawing.Point
return void

EnsureBankChest() public method

public EnsureBankChest ( ProtectionEntry protection, bool resetContent ) : bool
protection ProtectionEntry
resetContent bool
return bool

EnsureRefillChest() public method

public EnsureRefillChest ( ProtectionEntry protection ) : bool
protection ProtectionEntry
return bool

EnumerateAllChests() public method

public EnumerateAllChests ( ) : IEnumerable
return IEnumerable

EnumerateProtectorChests() public method

public EnumerateProtectorChests ( ) : IEnumerable
return IEnumerable

HandleGameSecondUpdate() public method

public HandleGameSecondUpdate ( ) : void
return void

PlaceChest() public method

public PlaceChest ( ushort tileType, int style, System.Drawing.Point placeLocation ) : IChest
tileType ushort
style int
placeLocation System.Drawing.Point
return IChest

SetUpBankChest() public method

public SetUpBankChest ( TShockAPI.TSPlayer player, System.Drawing.Point tileLocation, int bankChestIndex, bool checkPermissions = false ) : void
player TShockAPI.TSPlayer
tileLocation System.Drawing.Point
bankChestIndex int
checkPermissions bool
return void

SetUpRefillChest() public method

public SetUpRefillChest ( TShockAPI.TSPlayer player, System.Drawing.Point tileLocation, System.TimeSpan refillTime, bool oneLootPerPlayer = null, int lootLimit = null, bool autoLock = null, bool autoEmpty = null, bool fairLoot = false, bool checkPermissions = false ) : bool
player TShockAPI.TSPlayer
tileLocation System.Drawing.Point
refillTime System.TimeSpan
oneLootPerPlayer bool
lootLimit int
autoLock bool
autoEmpty bool
fairLoot bool
checkPermissions bool
return bool

SetUpTradeChest() public method

public SetUpTradeChest ( TShockAPI.TSPlayer player, System.Drawing.Point tileLocation, int sellAmount, int sellItemId, int payAmount, int payItemId, int lootLimit, bool checkPermissions = false ) : void
player TShockAPI.TSPlayer
tileLocation System.Drawing.Point
sellAmount int
sellItemId int
payAmount int
payItemId int
lootLimit int
checkPermissions bool
return void

TryRefillChest() public method

public TryRefillChest ( IChest chest, Terraria.Plugins.CoderCow.Protector.RefillChestMetadata refillChestData ) : bool
chest IChest
refillChestData Terraria.Plugins.CoderCow.Protector.RefillChestMetadata
return bool

TryRefillChest() public method

public TryRefillChest ( System.Drawing.Point chestLocation, Terraria.Plugins.CoderCow.Protector.RefillChestMetadata refillChestData ) : bool
chestLocation System.Drawing.Point
refillChestData Terraria.Plugins.CoderCow.Protector.RefillChestMetadata
return bool

Property Details

DummyChest public static property

public static Chest DummyChest
return Chest

DummyChestIndex public static property

public static int DummyChestIndex
return int