From 30c8470a524f5d09f157d5c1c59eb72c205d5085 Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Tue, 19 Sep 2017 09:12:54 -0500 Subject: Changed BroadcastSoundEffect, SendSoundEffect, and CastThunderbolt parameters to vectors (#3959) * Made BroadcastSoundEffect take vector parameters. * Added docs for new vectored methods * Removed old code * Fixed lua warnings * Made old BroadcastSoundEffect not an override. * m_Block to m_BlockPos, used Vector3d constructor where prettier. * a_Block to a_BlockPos * Changed thunderbolt a_Block to a_BlockPos --- Server/Plugins/APIDump/APIDesc.lua | 25 ++++++++++- Server/Plugins/APIDump/Classes/World.lua | 73 ++++++++++++++++++++++++++++++-- 2 files changed, 94 insertions(+), 4 deletions(-) (limited to 'Server') diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index 334fed378..1548cf97d 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -1633,6 +1633,29 @@ end Notes = "Sends the raw title to the client. Doesn't make the client display it yet, use SendTitleTimes() to show both the title and the subtitle." }, SendSoundEffect = + { + Params = + { + { + Name = "SoundName", + Type = "string", + }, + { + Name = "Position", + Type = "Vector3d", + }, + { + Name = "Volume", + Type = "number", + }, + { + Name = "Pitch", + Type = "number", + }, + }, + Notes = "Sends a sound effect request to the client. The sound is played at the specified coords, with the specified volume (a float, 1.0 is full volume, can be more) and pitch (0-255, 63 is 100%)", + }, + SendSoundEffect = { Params = { @@ -1661,7 +1684,7 @@ end Type = "number", }, }, - Notes = "Sends a sound effect request to the client. The sound is played at the specified coords, with the specified volume (a float, 1.0 is full volume, can be more) and pitch (0-255, 63 is 100%)", + Notes = "Sends a sound effect request to the client. The sound is played at the specified coords, with the specified volume (a float, 1.0 is full volume, can be more) and pitch (0-255, 63 is 100%) (DEPRECATED, use vector-parametered version instead)", }, SendTitleTimes = { diff --git a/Server/Plugins/APIDump/Classes/World.lua b/Server/Plugins/APIDump/Classes/World.lua index 82f31febe..648bf5aa4 100644 --- a/Server/Plugins/APIDump/Classes/World.lua +++ b/Server/Plugins/APIDump/Classes/World.lua @@ -47,6 +47,34 @@ return Notes = "Returns whether command blocks are enabled on the (entire) server", }, BroadcastBlockAction = + { + Params = + { + { + Name = "BlockPos", + Type = "Vector3i", + }, + { + Name = "ActionByte1", + Type = "number", + }, + { + Name = "ActionByte2", + Type = "number", + }, + { + Name = "BlockType", + Type = "number", + }, + { + Name = "ExcludeClient", + Type = "cClientHandle", + IsOptional = true, + }, + }, + Notes = "Broadcasts the BlockAction packet to all clients who have the appropriate chunk loaded (except ExcludeClient). The contents of the packet are specified by the parameters for the call, the blocktype needn't match the actual block that is present in the world data at the specified location.", + }, + BroadcastBlockAction = { Params = { @@ -80,7 +108,7 @@ return IsOptional = true, }, }, - Notes = "Broadcasts the BlockAction packet to all clients who have the appropriate chunk loaded (except ExcludeClient). The contents of the packet are specified by the parameters for the call, the blocktype needn't match the actual block that is present in the world data at the specified location.", + Notes = "Broadcasts the BlockAction packet to all clients who have the appropriate chunk loaded (except ExcludeClient). The contents of the packet are specified by the parameters for the call, the blocktype needn't match the actual block that is present in the world data at the specified location. (DEPRECATED)", }, BroadcastChat = { @@ -268,6 +296,34 @@ return Notes = "Spawns the specified particles to all players in the world exept the optional ExeptClient. A list of available particles by thinkofdeath can be found {{https://gist.github.com/thinkofdeath/5110835|Here}}", }, BroadcastSoundEffect = + { + Params = + { + { + Name = "SoundName", + Type = "string", + }, + { + Name = "Position", + Type = "Vector3d", + }, + { + Name = "Volume", + Type = "number", + }, + { + Name = "Pitch", + Type = "number", + }, + { + Name = "ExcludeClient", + Type = "cClientHandle", + IsOptional = true, + }, + }, + Notes = "Sends the specified sound effect to all players in this world, except the optional ExceptClient", + }, + BroadcastSoundEffect = { Params = { @@ -301,7 +357,7 @@ return IsOptional = true, }, }, - Notes = "Sends the specified sound effect to all players in this world, except the optional ExceptClient", + Notes = "Sends the specified sound effect to all players in this world, except the optional ExceptClient (DEPRECATED, use vector-parametered version instead)", }, BroadcastSoundParticleEffect = { @@ -336,6 +392,17 @@ return Notes = "Sends the specified effect to all players in this world, except the optional ExceptClient", }, CastThunderbolt = + { + Params = + { + { + Name = "Position", + Type = "Vector3d", + }, + }, + Notes = "Creates a thunderbolt at the specified coords", + }, + CastThunderbolt = { Params = { @@ -352,7 +419,7 @@ return Type = "number", }, }, - Notes = "Creates a thunderbolt at the specified coords", + Notes = "Creates a thunderbolt at the specified coords (DEPRECATED, use vector-parametered version instead)", }, ChangeWeather = { -- cgit v1.2.3