From b5a40a4472e9a3d4e33d527559f6fb8a74a7cc77 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Thu, 7 Dec 2017 21:46:45 -0700 Subject: [PATCH] Comment OnPlaceObject related hook stuff --- TShockAPI/GetDataHandlers.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 1997c554..99c3e8be 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -613,30 +613,48 @@ namespace TShockAPI TileX = tilex, TileY = tiley, }; - + SendTileSquare.Invoke(null, args); return args.Handled; } + /// The arguments to the PlaceObject hook. public class PlaceObjectEventArgs : HandledEventArgs { + /// The calling Player. public TSPlayer Player { get; set; } + /// The X location where the object was placed. public short X { get; set ; } + /// The Y location where the object was placed. public short Y { get; set; } + /// The type of object that was placed. public short Type { get; set; } + /// The style of the object was placed. public short Style { get; set; } + /// Alternate variation of the object placed. public byte Alternate { get; set; } + /// The direction the object was placed. public bool Direction { get; set; } } + /// Fired when an object is placed in the world. public static HandlerList PlaceObject; + /// Fires the PlaceObject hook. To be called when an object is placed in the world. + /// The originating player. + /// The x position where the object is placed. + /// The y position where the object is placed. + /// The type of object. + /// The object's style data. + /// The object's alternate data. + /// The direction of the object. + /// bool private static bool OnPlaceObject(TSPlayer player, short x, short y, short type, short style, byte alternate, bool direction) { if (PlaceObject == null)