TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ LockChest()

virtual bool Terraria.ModLoader.ModTile.LockChest ( int i,
int j,
ref short frameXAdjustment,
ref bool manual )
inlinevirtualinherited

Allows customization of how locking a chest is accomplished. By default, frameXAdjustment will be 36, shifting the frameX over to the right by 1 chest style. If your chests are in a different order, adjust frameXAdjustment accordingly. This hook is called on the client, and if successful will be called on the server and other clients as the action is synced. Make sure that the logic is consistent and not dependent on local player data.

Parameters
iThe x position in tile coordinates.
jThe y position in tile coordinates.
frameXAdjustmentThe adjustment made to each Tile.frameX, defaults to 36
manualSet this to true to bypass the code playing the lock sound and adjusting the tile frame. Network syncing will still happen.
Returns
Return true if this tile truly is an unlocked chest and the chest can be locked

Definition at line 587 of file ModTile.cs.

588 {
589 return false;
590 }