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

Inheritance: Terraria.Plugins.Common.UserInteractionHandlerBase, IDisposable
ファイルを表示 Open project: CoderCow/Protector-Plugin Class Usage Examples

Public Methods

Method Description
CheckRefillChestLootability ( Terraria.Plugins.CoderCow.Protector.RefillChestMetadata refillChest, TShockAPI.TSPlayer player, bool sendReasonMessages = true ) : bool
EnsureProtectionData ( TShockAPI.TSPlayer player ) : void
HandleChestGetContents ( TShockAPI.TSPlayer player, System.Drawing.Point location ) : bool
HandleChestGetContents ( TShockAPI.TSPlayer player, System.Drawing.Point location, bool skipInteractions ) : bool
HandleChestModifySlot ( TShockAPI.TSPlayer player, int chestIndex, int slotIndex, Terraria.Plugins.Common.ItemData newItem ) : bool
HandleChestOpen ( TShockAPI.TSPlayer player, int chestIndex, System.Drawing.Point chestLocation ) : bool
HandleChestPlace ( TShockAPI.TSPlayer player, System.Drawing.Point location, int storageType, int storageStyle ) : bool
HandleChestRename ( TShockAPI.TSPlayer player, int chestIndex, string newName ) : bool
HandleChestUnlock ( TShockAPI.TSPlayer player, System.Drawing.Point chestLocation ) : bool
HandleDoorUse ( TShockAPI.TSPlayer player, System.Drawing.Point location, bool isOpening, Direction direction ) : bool
HandleHitSwitch ( TShockAPI.TSPlayer player, System.Drawing.Point location ) : bool
HandleObjectPlacement ( TShockAPI.TSPlayer player, System.Drawing.Point location, int blockType, int objectStyle, int alternative, int random, bool direction ) : bool
HandlePlayerSpawn ( TShockAPI.TSPlayer player, System.Drawing.Point spawnTileLocation ) : bool
HandleQuickStackNearby ( TShockAPI.TSPlayer player, int playerSlotIndex ) : bool
HandleSignEdit ( TShockAPI.TSPlayer player, int signIndex, System.Drawing.Point location, string newText ) : bool
HandleTileEdit ( TShockAPI.TSPlayer player, TileEditType editType, BlockType blockType, System.Drawing.Point location, int objectStyle ) : bool
RemoveChestData ( IChest chest ) : void
TryLockChest ( TSPlayer player, System.Drawing.Point anyChestTileLocation, bool sendMessages = true ) : bool
TrySetUpBankChest ( TSPlayer player, System.Drawing.Point tileLocation, int bankChestIndex, bool sendMessages = true ) : bool
TrySetUpRefillChest ( TSPlayer player, System.Drawing.Point tileLocation, TimeSpan refillTime, bool oneLootPerPlayer, int lootLimit, bool autoLock, bool autoEmpty, bool sendMessages = true ) : bool
TrySetUpTradeChest ( TSPlayer player, System.Drawing.Point tileLocation, int sellAmount, int sellItemId, int payAmount, int payItemId, int lootLimit, bool sendMessages = true ) : bool
TrySwapChestData ( TSPlayer player, System.Drawing.Point anyChestTileLocation, IChest &newChest ) : bool
UserInteractionHandler ( PluginTrace trace, PluginInfo pluginInfo, Configuration config, ServerMetadataHandler serverMetadataHandler, WorldMetadata worldMetadata, ProtectionManager protectionManager, ChestManager chestManager, PluginCooperationHandler pluginCooperationHandler, Func reloadConfigurationCallback ) : System

Protected Methods

Method Description
Dispose ( bool isDisposing ) : void

Private Methods

Method Description
BankChestCommand_Exec ( TShockAPI.CommandArgs args ) : void
BankChestCommand_HelpCallback ( TShockAPI.CommandArgs args ) : bool
CheckProtected ( TShockAPI.TSPlayer player, System.Drawing.Point tileLocation, bool fullAccessRequired ) : bool
DeprotectCommand_Exec ( TShockAPI.CommandArgs args ) : void
DeprotectCommand_HelpCallback ( TShockAPI.CommandArgs args ) : bool
DestroyBlockOrObject ( System.Drawing.Point tileLocation ) : void
DumpBankChestCommand_Exec ( TShockAPI.CommandArgs args ) : void
DumpBankChestCommand_HelpCallback ( TShockAPI.CommandArgs args ) : bool
GetUserName ( int userId ) : string
InitTrade ( TShockAPI.TSPlayer player, IChest chest, ProtectionEntry protection ) : void
IsChestInUse ( TShockAPI.TSPlayer player, IChest chest ) : bool
LastOpenedChest ( TShockAPI.TSPlayer player ) : IChest
LockChestCommand_Exec ( TShockAPI.CommandArgs args ) : void
LockChestCommand_HelpCallback ( TShockAPI.CommandArgs args ) : bool
PerformTrade ( TShockAPI.TSPlayer player, ProtectionEntry protection, Terraria.Plugins.Common.Collections.Inventory chestInventory, System.Item sellItem, System.Item payItem ) : void
ProtectCommand_Exec ( TShockAPI.CommandArgs args ) : void
ProtectCommand_HelpCallback ( TShockAPI.CommandArgs args ) : bool
ProtectionInfoCommand_Exec ( TShockAPI.CommandArgs args ) : void
ProtectionInfoCommand_HelpCallback ( TShockAPI.CommandArgs args ) : bool
PutItemInNearbyChest ( TShockAPI.TSPlayer player, System.Item itemToStore, Vector2 position ) : System.Item
RefillChestCommand_Exec ( TShockAPI.CommandArgs args ) : void
RefillChestCommand_HelpCallback ( TShockAPI.CommandArgs args ) : bool
RefillChestManyCommand_Exec ( TShockAPI.CommandArgs args ) : void
RefillChestManyCommand_HelpCallback ( TShockAPI.CommandArgs args ) : bool
RootCommand_Exec ( TShockAPI.CommandArgs args ) : void
RootCommand_HelpCallback ( TShockAPI.CommandArgs args ) : bool
ShareCommandHelpCallback ( TShockAPI.CommandArgs args ) : bool
ShareCommand_Exec ( TShockAPI.CommandArgs args ) : void
ShareGroupCommand_Exec ( TShockAPI.CommandArgs args ) : void
ShareGroupCommand_HelpCallback ( TShockAPI.CommandArgs args ) : bool
SharePublicCommandHelpCallback ( TShockAPI.CommandArgs args ) : bool
SharePublicCommand_Exec ( TShockAPI.CommandArgs args ) : void
StartShareCommandInteraction ( TShockAPI.TSPlayer player, bool isPersistent, bool isShareOrUnshare, bool isGroup, bool isShareAll, object shareTarget = null, string shareTargetName = null ) : void
SwapChestCommand_Exec ( TShockAPI.CommandArgs args ) : void
SwapChestCommand_HelpCallback ( TShockAPI.CommandArgs args ) : bool
TradeChestCommand_Exec ( TShockAPI.CommandArgs args ) : void
TradeChestCommand_HelpCallback ( TShockAPI.CommandArgs args ) : bool
TryAlterProtectionShare ( TShockAPI.TSPlayer player, System.Drawing.Point tileLocation, bool isShareOrUnshare, bool isGroup, bool isShareAll, object shareTarget, string shareTargetName, bool sendFailureMessages = true ) : bool
TryCreateAutoProtection ( TShockAPI.TSPlayer forPlayer, System.Drawing.Point location ) : bool
TryCreateProtection ( TShockAPI.TSPlayer player, System.Drawing.Point tileLocation, bool sendFailureMessages = true ) : bool
TryExecuteSubCommand ( string commandNameLC, TShockAPI.CommandArgs args ) : bool
TryGetProtectionInfo ( TShockAPI.TSPlayer player, System.Drawing.Point tileLocation, bool sendFailureMessages = true ) : bool
TryRemoveProtection ( TSPlayer player, System.Drawing.Point tileLocation, bool sendFailureMessages = true ) : bool
TryToStoreItemInNearbyChest ( TSPlayer player, Vector2 playerPosition, Item itemToStore, IChest chest ) : bool
UnshareCommand_Exec ( CommandArgs args ) : void
UnshareCommand_HelpCallback ( CommandArgs args ) : bool
UnshareGroupCommand_Exec ( CommandArgs args ) : void
UnshareGroup_HelpCallback ( CommandArgs args ) : bool
UnsharePublicCommand_Exec ( CommandArgs args ) : void
UnsharePublicCommand_HelpCallback ( CommandArgs args ) : bool

Method Details

CheckRefillChestLootability() public method

public CheckRefillChestLootability ( Terraria.Plugins.CoderCow.Protector.RefillChestMetadata refillChest, TShockAPI.TSPlayer player, bool sendReasonMessages = true ) : bool
refillChest Terraria.Plugins.CoderCow.Protector.RefillChestMetadata
player TShockAPI.TSPlayer
sendReasonMessages bool
return bool

Dispose() protected method

protected Dispose ( bool isDisposing ) : void
isDisposing bool
return void

EnsureProtectionData() public method

public EnsureProtectionData ( TShockAPI.TSPlayer player ) : void
player TShockAPI.TSPlayer
return void

HandleChestGetContents() public method

public HandleChestGetContents ( TShockAPI.TSPlayer player, System.Drawing.Point location ) : bool
player TShockAPI.TSPlayer
location System.Drawing.Point
return bool

HandleChestGetContents() public method

public HandleChestGetContents ( TShockAPI.TSPlayer player, System.Drawing.Point location, bool skipInteractions ) : bool
player TShockAPI.TSPlayer
location System.Drawing.Point
skipInteractions bool
return bool

HandleChestModifySlot() public method

public HandleChestModifySlot ( TShockAPI.TSPlayer player, int chestIndex, int slotIndex, Terraria.Plugins.Common.ItemData newItem ) : bool
player TShockAPI.TSPlayer
chestIndex int
slotIndex int
newItem Terraria.Plugins.Common.ItemData
return bool

HandleChestOpen() public method

public HandleChestOpen ( TShockAPI.TSPlayer player, int chestIndex, System.Drawing.Point chestLocation ) : bool
player TShockAPI.TSPlayer
chestIndex int
chestLocation System.Drawing.Point
return bool

HandleChestPlace() public method

public HandleChestPlace ( TShockAPI.TSPlayer player, System.Drawing.Point location, int storageType, int storageStyle ) : bool
player TShockAPI.TSPlayer
location System.Drawing.Point
storageType int
storageStyle int
return bool

HandleChestRename() public method

public HandleChestRename ( TShockAPI.TSPlayer player, int chestIndex, string newName ) : bool
player TShockAPI.TSPlayer
chestIndex int
newName string
return bool

HandleChestUnlock() public method

public HandleChestUnlock ( TShockAPI.TSPlayer player, System.Drawing.Point chestLocation ) : bool
player TShockAPI.TSPlayer
chestLocation System.Drawing.Point
return bool

HandleDoorUse() public method

public HandleDoorUse ( TShockAPI.TSPlayer player, System.Drawing.Point location, bool isOpening, Direction direction ) : bool
player TShockAPI.TSPlayer
location System.Drawing.Point
isOpening bool
direction Direction
return bool

HandleHitSwitch() public method

public HandleHitSwitch ( TShockAPI.TSPlayer player, System.Drawing.Point location ) : bool
player TShockAPI.TSPlayer
location System.Drawing.Point
return bool

HandleObjectPlacement() public method

public HandleObjectPlacement ( TShockAPI.TSPlayer player, System.Drawing.Point location, int blockType, int objectStyle, int alternative, int random, bool direction ) : bool
player TShockAPI.TSPlayer
location System.Drawing.Point
blockType int
objectStyle int
alternative int
random int
direction bool
return bool

HandlePlayerSpawn() public method

public HandlePlayerSpawn ( TShockAPI.TSPlayer player, System.Drawing.Point spawnTileLocation ) : bool
player TShockAPI.TSPlayer
spawnTileLocation System.Drawing.Point
return bool

HandleQuickStackNearby() public method

public HandleQuickStackNearby ( TShockAPI.TSPlayer player, int playerSlotIndex ) : bool
player TShockAPI.TSPlayer
playerSlotIndex int
return bool

HandleSignEdit() public method

public HandleSignEdit ( TShockAPI.TSPlayer player, int signIndex, System.Drawing.Point location, string newText ) : bool
player TShockAPI.TSPlayer
signIndex int
location System.Drawing.Point
newText string
return bool

HandleTileEdit() public method

public HandleTileEdit ( TShockAPI.TSPlayer player, TileEditType editType, BlockType blockType, System.Drawing.Point location, int objectStyle ) : bool
player TShockAPI.TSPlayer
editType TileEditType
blockType BlockType
location System.Drawing.Point
objectStyle int
return bool

RemoveChestData() public method

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

TryLockChest() public method

public TryLockChest ( TSPlayer player, System.Drawing.Point anyChestTileLocation, bool sendMessages = true ) : bool
player TSPlayer
anyChestTileLocation System.Drawing.Point
sendMessages bool
return bool

TrySetUpBankChest() public method

public TrySetUpBankChest ( TSPlayer player, System.Drawing.Point tileLocation, int bankChestIndex, bool sendMessages = true ) : bool
player TSPlayer
tileLocation System.Drawing.Point
bankChestIndex int
sendMessages bool
return bool

TrySetUpRefillChest() public method

The format item in is invalid.-or- The index of a format item is not zero.
public TrySetUpRefillChest ( TSPlayer player, System.Drawing.Point tileLocation, TimeSpan refillTime, bool oneLootPerPlayer, int lootLimit, bool autoLock, bool autoEmpty, bool sendMessages = true ) : bool
player TSPlayer
tileLocation System.Drawing.Point
refillTime TimeSpan
oneLootPerPlayer bool
lootLimit int
autoLock bool
autoEmpty bool
sendMessages bool
return bool

TrySetUpTradeChest() public method

public TrySetUpTradeChest ( TSPlayer player, System.Drawing.Point tileLocation, int sellAmount, int sellItemId, int payAmount, int payItemId, int lootLimit, bool sendMessages = true ) : bool
player TSPlayer
tileLocation System.Drawing.Point
sellAmount int
sellItemId int
payAmount int
payItemId int
lootLimit int
sendMessages bool
return bool

TrySwapChestData() public method

public TrySwapChestData ( TSPlayer player, System.Drawing.Point anyChestTileLocation, IChest &newChest ) : bool
player TSPlayer
anyChestTileLocation System.Drawing.Point
newChest IChest
return bool

UserInteractionHandler() public method

public UserInteractionHandler ( PluginTrace trace, PluginInfo pluginInfo, Configuration config, ServerMetadataHandler serverMetadataHandler, WorldMetadata worldMetadata, ProtectionManager protectionManager, ChestManager chestManager, PluginCooperationHandler pluginCooperationHandler, Func reloadConfigurationCallback ) : System
trace PluginTrace
pluginInfo PluginInfo
config Configuration
serverMetadataHandler ServerMetadataHandler
worldMetadata WorldMetadata
protectionManager ProtectionManager
chestManager ChestManager
pluginCooperationHandler PluginCooperationHandler
reloadConfigurationCallback Func
return System