From 6a191cce0af0056ecde69efe1679a084aadd810c Mon Sep 17 00:00:00 2001
From: madmaxoft
Date: Fri, 28 Feb 2014 08:26:39 +0100
Subject: Fixed compatibility with ZeroBraneStudio and LuaRocks.
Lua now compiles into lua51.dll and there's a lua5.1.dll that acts as a export-forwarding proxy to lua51.dll.
---
MCServer/lua5.1.dll | Bin 0 -> 6722 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 MCServer/lua5.1.dll
(limited to 'MCServer')
diff --git a/MCServer/lua5.1.dll b/MCServer/lua5.1.dll
new file mode 100644
index 000000000..cca0bcb25
Binary files /dev/null and b/MCServer/lua5.1.dll differ
--
cgit v1.2.3
From e4c3d3eb6decddddc986f1020f3fb30af48bbe4b Mon Sep 17 00:00:00 2001
From: madmaxoft
Date: Fri, 28 Feb 2014 10:37:09 +0100
Subject: Added a MobDebug enabler script.
This file is to be copied to a plugin's folder in order to debug that plugin with MobDebug.
---
MCServer/Plugins/@EnableMobDebug.lua | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 MCServer/Plugins/@EnableMobDebug.lua
(limited to 'MCServer')
diff --git a/MCServer/Plugins/@EnableMobDebug.lua b/MCServer/Plugins/@EnableMobDebug.lua
new file mode 100644
index 000000000..48d4c36b7
--- /dev/null
+++ b/MCServer/Plugins/@EnableMobDebug.lua
@@ -0,0 +1,29 @@
+
+-- @EnableMobDebug.lua
+
+-- Enables the MobDebug debugger, used by ZeroBrane Studio, for a plugin
+-- Needs to be named with a @ at the start so that it's loaded as the first file of the plugin
+
+--[[
+Usage:
+Copy this file to your plugin's folder when you want to debug that plugin
+You should neither check this file into the plugin's version control system,
+nor distribute it in the final release.
+--]]
+
+
+
+
+
+-- Try to load the debugger, be silent about failures:
+local IsSuccess, MobDebug = pcall(require, "mobdebug")
+if (IsSuccess) then
+ MobDebug.start()
+
+ -- The debugger will automatically put a breakpoint on this line, use this opportunity to set more breakpoints in your code
+ LOG(cPluginManager:GetCurrentPlugin():GetName() .. ": MobDebug enabled")
+end
+
+
+
+
--
cgit v1.2.3
From d97363a1b39fd94a77bb84a4d9732ab4f46b08b7 Mon Sep 17 00:00:00 2001
From: madmaxoft
Date: Fri, 28 Feb 2014 15:41:46 +0100
Subject: Documented the changes in cJukeboxEntity.
---
MCServer/Plugins/APIDump/Classes/BlockEntities.lua | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/Classes/BlockEntities.lua b/MCServer/Plugins/APIDump/Classes/BlockEntities.lua
index cf258160c..61a8e8d22 100644
--- a/MCServer/Plugins/APIDump/Classes/BlockEntities.lua
+++ b/MCServer/Plugins/APIDump/Classes/BlockEntities.lua
@@ -196,9 +196,11 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
Inherits = "cBlockEntity",
Functions =
{
- EjectRecord = { Params = "", Return = "", Notes = "Ejects the current record as a {{cPickup|pickup}}. No action if there's no current record. To remove record without generating the pickup, use SetRecord(0)" },
+ EjectRecord = { Params = "", Return = "bool", Notes = "Ejects the current record as a {{cPickup|pickup}}. No action if there's no current record. To remove record without generating the pickup, use SetRecord(0). Returns true if pickup ejected." },
GetRecord = { Params = "", Return = "number", Notes = "Returns the record currently present. Zero for no record, E_ITEM_*_DISC for records." },
- PlayRecord = { Params = "", Return = "", Notes = "Plays the currently present record. No action if there's no current record." },
+ IsPlayingRecord = { Params = "", Return = "bool", Notes = "Returns true if the jukebox is playing a record." },
+ IsRecordItem = { Params = "ItemType", Return = "bool", Notes = "Returns true if the specified item is a record that can be played." },
+ PlayRecord = { Params = "RecordItemType", Return = "bool", Notes = "Plays the specified Record. Return false if the parameter isn't a playable Record (E_ITEM_XXX_DISC). If there is a record already playing, ejects it first." },
SetRecord = { Params = "number", Return = "", Notes = "Sets the currently present record. Use zero for no record, or E_ITEM_*_DISC for records." },
},
}, -- cJukeboxEntity
--
cgit v1.2.3
From ce07a22fe6f210cd6461d54cd7fd8eaaaa47be4f Mon Sep 17 00:00:00 2001
From: STRWarrior
Date: Sat, 1 Mar 2014 10:44:34 +0100
Subject: APIDump: Documented cRoot:CreateAndInitializeWorld.
---
MCServer/Plugins/APIDump/APIDesc.lua | 1 +
1 file changed, 1 insertion(+)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index c6221f30d..241aa05ad 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -1773,6 +1773,7 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage);
BroadcastChatInfo = { Params = "Message", Return = "", Notes = "Prepends Yellow [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For informational messages, such as command usage." },
BroadcastChatSuccess = { Params = "Message", Return = "", Notes = "Prepends Green [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For success messages." },
BroadcastChatWarning = { Params = "Message", Return = "", Notes = "Prepends Rose [WARN] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For concerning events, such as plugin reload etc." },
+ CreateAndInitializeWorld = { Params = "WorldName", Return = "{{cWorld|cWorld}}", Notes = "Creates a new world and initializes it. If there is a world whith the same name it returns nil." },
FindAndDoWithPlayer = { Params = "PlayerName, CallbackFunction", Return = "", Notes = "Calls the given callback function for the given player." },
ForEachPlayer = { Params = "CallbackFunction", Return = "", Notes = "Calls the given callback function for each player. The callback function has the following signature: function Callback({{cPlayer|cPlayer}})
" },
ForEachWorld = { Params = "CallbackFunction", Return = "", Notes = "Calls the given callback function for each world. The callback function has the following signature: function Callback({{cWorld|cWorld}})
" },
--
cgit v1.2.3
From 5c449452871340eeae9df8f34c5e145fda991d92 Mon Sep 17 00:00:00 2001
From: andrew
Date: Sat, 1 Mar 2014 12:06:19 +0200
Subject: Exported and documented cScoreboard
---
MCServer/Plugins/APIDump/APIDesc.lua | 90 ++++++++++++++++++++++++++++++++++++
1 file changed, 90 insertions(+)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index c6221f30d..c2dd6ba99 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -1115,6 +1115,42 @@ local Item5 = cItem(E_ITEM_DIAMOND_CHESTPLATE, 1, 0, "thorns=1;unbreaking=3");
},
}, -- cItem
+ cObjective =
+ {
+ Desc = [[
+ This class represents a single scoreboard objective.
+ ]],
+ Functions =
+ {
+ AddScore = { Params = "string, number", Return = "Score", Notes = "Adds a value to the score of the specified player and returns the new value." },
+ GetDisplayName = { Params = "", Return = "string", Notes = "Returns the display name of the objective. This name will be shown to the connected players." },
+ GetName = { Params = "", Return = "string", Notes = "Returns the internal name of the objective." },
+ GetScore = { Params = "string", Return = "Score", Notes = "Returns the score of the specified player." },
+ GetType = { Params = "", Return = "eType", Notes = "Returns the type of the objective. (i.e what is being tracked)" },
+ Reset = { Params = "", Return = "", Notes = "Resets the scores of the tracked players." },
+ ResetScore = { Params = "string", Return = "", Notes = "Reset the score of the specified player." },
+ SetDisplayName = { Params = "string", Return = "", Notes = "Sets the display name of the objective." },
+ SetScore = { Params = "string, Score", Return = "", Notes = "Sets the score of the specified player." },
+ SubScore = { Params = "string, number", Return = "Score", Notes = "Subtracts a value from the score of the specified player and returns the new value." },
+ },
+ Constants =
+ {
+ E_TYPE_ACHIEVEMENT = { Notes = "" },
+ E_TYPE_DEATH_COUNT = { Notes = "" },
+ E_TYPE_DUMMY = { Notes = "" },
+ E_TYPE_HEALTH = { Notes = "" },
+ E_TYPE_PLAYER_KILL_COUNT = { Notes = "" },
+ E_TYPE_STAT = { Notes = "" },
+ E_TYPE_STAT_BLOCK_MINE = { Notes = "" },
+ E_TYPE_STAT_ENTITY_KILL = { Notes = "" },
+ E_TYPE_STAT_ENTITY_KILLED_BY = { Notes = "" },
+ E_TYPE_STAT_ITEM_BREAK = { Notes = "" },
+ E_TYPE_STAT_ITEM_CRAFT = { Notes = "" },
+ E_TYPE_STAT_ITEM_USE = { Notes = "" },
+ E_TYPE_TOTAL_KILL_COUNT = { Notes = "" },
+ },
+ }, -- cObjective
+
cPainting =
{
Desc = "This class represents a painting in the world. These paintings are special and different from Vanilla in that they can be critical-hit.",
@@ -1821,6 +1857,34 @@ end
},
}, -- cRoot
+ cScoreboard =
+ {
+ Desc = [[
+ This class manages the objectives and teams of a single world.
+ ]],
+ Functions =
+ {
+ AddPlayerScore = { Params = "Name, Type, Value", Return = "", Notes = "Adds a value to all player scores of the specified objective type." },
+ GetNumObjectives = { Params = "", Return = "number", Notes = "Returns the nuber of registered objectives." },
+ GetNumTeams = { Params = "", Return = "number", Notes = "Returns the number of registered teams." },
+ GetObjective = { Params = "string", Return = "{{cObjective}}", Notes = "Returns the objective with the specified name." },
+ GetObjectiveIn = { Params = "DisplaySlot", Return = "{{cObjective}}", Notes = "Returns the objective in the specified display slot. Can be nil." },
+ GetTeam = { Params = "string", Return = "{{cTeam}}", Notes = "Returns the team with the specified name." },
+ RegisterObjective = { Params = "Name, DisplayName, Type", Return = "{{cObjective}}", Notes = "Registers a new scoreboard objective. Returns the {{cObjective}} instance, nil on error." },
+ RegisterTeam = { Params = "Name, DisplayName, Prefix, Suffix", Return = "{{cTeam}}", Notes = "Registers a new team. Returns the {{cTeam}} instance, nil on error." },
+ RemoveObjective = { Params = "string", Return = "bool", Notes = "Removes the objective with the specified name. Returns true if operation was successful." },
+ RemoveTeam = { Params = "string", Return = "bool", Notes = "Removes the team with the specified name. Returns true if operation was successful." },
+ SetDisplay = { Params = "Name, DisplaySlot", Return = "", Notes = "Updates the currently displayed objective." },
+ },
+ Constants =
+ {
+ E_DISPLAY_SLOT_COUNT = { Notes = "" },
+ E_DISPLAY_SLOT_LIST = { Notes = "" },
+ E_DISPLAY_SLOT_NAME = { Notes = "" },
+ E_DISPLAY_SLOT_SIDEBAR = { Notes = "" },
+ },
+ }, -- cScoreboard
+
cServer =
{
Desc = [[
@@ -1841,6 +1905,32 @@ end
},
}, -- cServer
+ cTeam =
+ {
+ Desc = [[
+ This class manages a single player team.
+ ]],
+ Functions =
+ {
+ AddPlayer = { Params = "string", Returns = "bool", Notes = "Adds a player to this team. Returns true if the operation was successful." },
+ AllowsFriendlyFire = { Params = "", Return = "bool", Notes = "Returns whether team friendly fire is allowed." },
+ CanSeeFriendlyInvisible = { Params = "", Return = "bool", Notes = "Returns whether players can see invisible teammates." },
+ HasPlayer = { Params = "string", Returns = "bool", Notes = "Returns whether the specified player is a member of this team." },
+ GetDisplayName = { Params = "", Return = "string", Notes = "Returns the display name of the team." },
+ GetName = { Params = "", Return = "string", Notes = "Returns the internal name of the team." },
+ GetNumPlayers = { Params = "", Return = "number", Notes = "Returns the number of registered players." },
+ GetPrefix = { Params = "", Return = "string", Notes = "Returns the prefix prepended to the names of the members of this team." },
+ RemovePlayer = { Params = "string", Returns = "bool", Notes = "Removes the player with the specified name from this team. Returns true if the operation was successful." },
+ Reset = { Params = "", Returns = "", Notes = "Removes all players from this team." },
+ GetSuffix = { Params = "", Return = "string", Notes = "Returns the suffix appended to the names of the members of this team." },
+ SetCanSeeFriendlyInvisible = { Params = "bool", Return = "", Notes = "Set whether players can see invisible teammates." },
+ SetDisplayName = { Params = "string", Return = "", Notes = "Sets the display name of this team. (i.e. what will be shown to the players)" },
+ SetFriendlyFire = { Params = "bool", Return = "", Notes = "Sets whether team friendly fire is allowed." },
+ SetPrefix = { Params = "string", Return = "", Notes = "Sets the prefix prepended to the names of the members of this team." },
+ SetSuffix = { Params = "string", Return = "", Notes = "Sets the suffix appended to the names of the members of this team." },
+ },
+ }, -- cTeam
+
cTNTEntity =
{
Desc = "This class manages a TNT entity.",
--
cgit v1.2.3
From a28e5eca1835e1be868c3bcd22d87e3cfae2f547 Mon Sep 17 00:00:00 2001
From: andrew
Date: Sat, 1 Mar 2014 14:03:16 +0200
Subject: Exported cScoreboard::ForEachObjective
---
MCServer/Plugins/APIDump/APIDesc.lua | 1 +
1 file changed, 1 insertion(+)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index c2dd6ba99..5bc69eb24 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -1865,6 +1865,7 @@ end
Functions =
{
AddPlayerScore = { Params = "Name, Type, Value", Return = "", Notes = "Adds a value to all player scores of the specified objective type." },
+ ForEachObjective = { Params = "CallBackFunction, [CallbackData]", Return = "bool", Notes = "Calls the specified callback for each objective in the scoreboard. Returns true if all objectives have been processed (including when there are zero objectives), or false if the callback function has aborted the enumeration by returning true. The callback function has the following signature: function Callback({{cObjective|Objective}}, [CallbackData])
The callback should return false or no value to continue with the next objective, or true to abort the enumeration." },
GetNumObjectives = { Params = "", Return = "number", Notes = "Returns the nuber of registered objectives." },
GetNumTeams = { Params = "", Return = "number", Notes = "Returns the number of registered teams." },
GetObjective = { Params = "string", Return = "{{cObjective}}", Notes = "Returns the objective with the specified name." },
--
cgit v1.2.3
From 39c8e68ef030b70f1f50165e74d26100bc1988cc Mon Sep 17 00:00:00 2001
From: andrew
Date: Sat, 1 Mar 2014 14:27:55 +0200
Subject: Exported cScoreboard::ForEachTeam
---
MCServer/Plugins/APIDump/APIDesc.lua | 1 +
1 file changed, 1 insertion(+)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 5bc69eb24..e45c5c475 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -1866,6 +1866,7 @@ end
{
AddPlayerScore = { Params = "Name, Type, Value", Return = "", Notes = "Adds a value to all player scores of the specified objective type." },
ForEachObjective = { Params = "CallBackFunction, [CallbackData]", Return = "bool", Notes = "Calls the specified callback for each objective in the scoreboard. Returns true if all objectives have been processed (including when there are zero objectives), or false if the callback function has aborted the enumeration by returning true. The callback function has the following signature: function Callback({{cObjective|Objective}}, [CallbackData])
The callback should return false or no value to continue with the next objective, or true to abort the enumeration." },
+ ForEachTeam = { Params = "CallBackFunction, [CallbackData]", Return = "bool", Notes = "Calls the specified callback for each team in the scoreboard. Returns true if all teams have been processed (including when there are zero teams), or false if the callback function has aborted the enumeration by returning true. The callback function has the following signature: function Callback({{cObjective|Objective}}, [CallbackData])
The callback should return false or no value to continue with the next team, or true to abort the enumeration." },
GetNumObjectives = { Params = "", Return = "number", Notes = "Returns the nuber of registered objectives." },
GetNumTeams = { Params = "", Return = "number", Notes = "Returns the number of registered teams." },
GetObjective = { Params = "string", Return = "{{cObjective}}", Notes = "Returns the objective with the specified name." },
--
cgit v1.2.3
From add9955255ffc3dba012d4adfa743b244b240ea5 Mon Sep 17 00:00:00 2001
From: andrew
Date: Sat, 1 Mar 2014 15:03:27 +0200
Subject: APIDump: Fixed cScoreboard enums
---
MCServer/Plugins/APIDump/APIDesc.lua | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index e45c5c475..ea89d04af 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -1135,19 +1135,19 @@ local Item5 = cItem(E_ITEM_DIAMOND_CHESTPLATE, 1, 0, "thorns=1;unbreaking=3");
},
Constants =
{
- E_TYPE_ACHIEVEMENT = { Notes = "" },
- E_TYPE_DEATH_COUNT = { Notes = "" },
- E_TYPE_DUMMY = { Notes = "" },
- E_TYPE_HEALTH = { Notes = "" },
- E_TYPE_PLAYER_KILL_COUNT = { Notes = "" },
- E_TYPE_STAT = { Notes = "" },
- E_TYPE_STAT_BLOCK_MINE = { Notes = "" },
- E_TYPE_STAT_ENTITY_KILL = { Notes = "" },
- E_TYPE_STAT_ENTITY_KILLED_BY = { Notes = "" },
- E_TYPE_STAT_ITEM_BREAK = { Notes = "" },
- E_TYPE_STAT_ITEM_CRAFT = { Notes = "" },
- E_TYPE_STAT_ITEM_USE = { Notes = "" },
- E_TYPE_TOTAL_KILL_COUNT = { Notes = "" },
+ otAchievement = { Notes = "" },
+ otDeathCount = { Notes = "" },
+ otDummy = { Notes = "" },
+ otHealth = { Notes = "" },
+ otPlayerKillCount = { Notes = "" },
+ otStat = { Notes = "" },
+ otStatBlockMine = { Notes = "" },
+ otStatEntityKill = { Notes = "" },
+ otStatEntityKilledBy = { Notes = "" },
+ otStatItemBreak = { Notes = "" },
+ otStatItemCraft = { Notes = "" },
+ otStatItemUse = { Notes = "" },
+ otTotalKillCount = { Notes = "" },
},
}, -- cObjective
@@ -1880,10 +1880,10 @@ end
},
Constants =
{
- E_DISPLAY_SLOT_COUNT = { Notes = "" },
- E_DISPLAY_SLOT_LIST = { Notes = "" },
- E_DISPLAY_SLOT_NAME = { Notes = "" },
- E_DISPLAY_SLOT_SIDEBAR = { Notes = "" },
+ dsCount = { Notes = "" },
+ dsList = { Notes = "" },
+ dsName = { Notes = "" },
+ dsSidebar = { Notes = "" },
},
}, -- cScoreboard
--
cgit v1.2.3
From 6129b6edf161c61db91d91145e9b1f23db688529 Mon Sep 17 00:00:00 2001
From: STRWarrior
Date: Sat, 1 Mar 2014 14:29:40 +0100
Subject: If there is a SourceLocation available the InfoDump will note it in
the forum version.
---
MCServer/Plugins/InfoDump.lua | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua
index 8fac09d60..03ce46d99 100644
--- a/MCServer/Plugins/InfoDump.lua
+++ b/MCServer/Plugins/InfoDump.lua
@@ -578,7 +578,10 @@ local function DumpPluginInfoForum(a_PluginFolder, a_PluginInfo)
DumpAdditionalInfoForum(a_PluginInfo, f);
DumpCommandsForum(a_PluginInfo, f);
DumpPermissionsForum(a_PluginInfo, f);
-
+ if (a_PluginInfo.SourceLocation ~= nil) then
+ f:write("[b][color=blue]Source:[/color] [url=" .. a_PluginInfo.SourceLocation .. "]Link[/url][/b]");
+ end
+
f:close();
end
--
cgit v1.2.3
From 854cf9df999691463aa382bc760d3a4322d015a5 Mon Sep 17 00:00:00 2001
From: STRWarrior
Date: Sat, 1 Mar 2014 14:45:38 +0100
Subject: Using comma instead of string concatenation.
---
MCServer/Plugins/InfoDump.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua
index 03ce46d99..e7ed157e3 100644
--- a/MCServer/Plugins/InfoDump.lua
+++ b/MCServer/Plugins/InfoDump.lua
@@ -579,7 +579,7 @@ local function DumpPluginInfoForum(a_PluginFolder, a_PluginInfo)
DumpCommandsForum(a_PluginInfo, f);
DumpPermissionsForum(a_PluginInfo, f);
if (a_PluginInfo.SourceLocation ~= nil) then
- f:write("[b][color=blue]Source:[/color] [url=" .. a_PluginInfo.SourceLocation .. "]Link[/url][/b]");
+ f:write("[b][color=blue]Source:[/color] [url=", a_PluginInfo.SourceLocation, "]Link[/url][/b]");
end
f:close();
--
cgit v1.2.3
From 29cc1ed05160955d1a17e63a0e9b26b9203e5d0f Mon Sep 17 00:00:00 2001
From: madmaxoft
Date: Sat, 1 Mar 2014 20:51:58 +0100
Subject: Ignoring all plugin subfolders.
Plugins developed directly with MCS have been added explicitly; other plugins are ignored.
---
MCServer/Plugins/.gitignore | 1 +
1 file changed, 1 insertion(+)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/.gitignore b/MCServer/Plugins/.gitignore
index 89eab800a..8553945b5 100644
--- a/MCServer/Plugins/.gitignore
+++ b/MCServer/Plugins/.gitignore
@@ -1,2 +1,3 @@
*.txt
*.md
+*/
--
cgit v1.2.3
From 3ca56b39bce5ad59625d2ffb5ae730858fed8bcd Mon Sep 17 00:00:00 2001
From: andrew
Date: Sun, 2 Mar 2014 10:50:24 +0200
Subject: Exported cBlockInfo
---
MCServer/Plugins/APIDump/APIDesc.lua | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 4d0113223..695d1a853 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -290,6 +290,38 @@ g_APIDesc =
}, -- AdditionalInfo
}, -- cBlockArea
+ cBlockInfo =
+ {
+ Desc = [[
+ This class is used to query and register block properties.
+ ]],
+ Functions =
+ {
+ FullyOccupiesVoxel = { Params = "ID", Return = "bool", Notes = "Returns whether the specified block fully occupies its voxel." },
+ GetById = { Params = "ID", Return = "{{cBlockInfo}}", Notes = "Returns the {{cBlockInfo}} structure for the block with the specified ID." },
+ GetLightValue = { Params = "ID", Return = "number", Notes = "Returns how much light the specified block emits on its own." },
+ GetSpreadLightFalloff = { Params = "ID", Return = "number", Notes = "Returns how much light the specified block consumes." },
+ IsOneHitDig = { Params = "ID", Return = "bool", Notes = "Returns whether the specified block will be destroyed after a single hit." },
+ IsPistonBreakable = { Params = "ID", Return = "bool", Notes = "Returns whether a piston can break the specified block." },
+ IsSnowable = { Params = "ID", Return = "bool", Notes = "Returns whether the specified block can hold snow atop." },
+ IsSolid = { Params = "ID", Return = "bool", Notes = "Returns whether the specified block is solid." },
+ IsTransparent = { Params = "ID", Return = "bool", Notes = "Returns whether the specified block is transparent." },
+ RequiresSpecialTool = { Params = "ID", Return = "bool", Notes = "Returns whether the specified block requires a special tool to drop." },
+ },
+ Variables =
+ {
+ m_FullyOccupiesVoxel = { Type = "bool", Notes = "Does this block fully occupy its voxel - is it a 'full' block?" },
+ m_IsSnowable = { Type = "bool", Notes = "Can this block hold snow atop?" },
+ m_IsSolid = { Type = "bool", Notes = "Is this block solid (player cannot walk through)?" },
+ m_LightValue = { Type = "number", Notes = "How much light do the blocks emit on their own?" },
+ m_OneHitDig = { Type = "bool", Notes = "Is a block destroyed after a single hit?" },
+ m_PistonBreakable = { Type = "bool", Notes = "Can a piston break this block?" },
+ m_RequiresSpecialTool = { Type = "bool", Notes = "Does this block require a tool to drop?" },
+ m_SpreadLightFalloff = { Type = "number", Notes = "How much light do the blocks consume?" },
+ m_Transparent = { Type = "bool", Notes = "Is a block completely transparent? (light doesn't get decreased(?))" },
+ },
+ }, -- cBlockInfo
+
cChatColor =
{
Desc = [[
--
cgit v1.2.3
From f40f2ad9283bd5aa587cd0943adc5f8c7a3b41c1 Mon Sep 17 00:00:00 2001
From: andrew
Date: Sun, 2 Mar 2014 12:59:09 +0200
Subject: APIDump: ID -> Type
---
MCServer/Plugins/APIDump/APIDesc.lua | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 695d1a853..ed9c32d32 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -297,16 +297,16 @@ g_APIDesc =
]],
Functions =
{
- FullyOccupiesVoxel = { Params = "ID", Return = "bool", Notes = "Returns whether the specified block fully occupies its voxel." },
- GetById = { Params = "ID", Return = "{{cBlockInfo}}", Notes = "Returns the {{cBlockInfo}} structure for the block with the specified ID." },
- GetLightValue = { Params = "ID", Return = "number", Notes = "Returns how much light the specified block emits on its own." },
- GetSpreadLightFalloff = { Params = "ID", Return = "number", Notes = "Returns how much light the specified block consumes." },
- IsOneHitDig = { Params = "ID", Return = "bool", Notes = "Returns whether the specified block will be destroyed after a single hit." },
- IsPistonBreakable = { Params = "ID", Return = "bool", Notes = "Returns whether a piston can break the specified block." },
- IsSnowable = { Params = "ID", Return = "bool", Notes = "Returns whether the specified block can hold snow atop." },
- IsSolid = { Params = "ID", Return = "bool", Notes = "Returns whether the specified block is solid." },
- IsTransparent = { Params = "ID", Return = "bool", Notes = "Returns whether the specified block is transparent." },
- RequiresSpecialTool = { Params = "ID", Return = "bool", Notes = "Returns whether the specified block requires a special tool to drop." },
+ FullyOccupiesVoxel = { Params = "Type", Return = "bool", Notes = "Returns whether the specified block fully occupies its voxel." },
+ GetById = { Params = "Type", Return = "{{cBlockInfo}}", Notes = "Returns the {{cBlockInfo}} structure for the specified type." },
+ GetLightValue = { Params = "Type", Return = "number", Notes = "Returns how much light the specified block emits on its own." },
+ GetSpreadLightFalloff = { Params = "Type", Return = "number", Notes = "Returns how much light the specified block consumes." },
+ IsOneHitDig = { Params = "Type", Return = "bool", Notes = "Returns whether the specified block will be destroyed after a single hit." },
+ IsPistonBreakable = { Params = "Type", Return = "bool", Notes = "Returns whether a piston can break the specified block." },
+ IsSnowable = { Params = "Type", Return = "bool", Notes = "Returns whether the specified block can hold snow atop." },
+ IsSolid = { Params = "Type", Return = "bool", Notes = "Returns whether the specified block is solid." },
+ IsTransparent = { Params = "Type", Return = "bool", Notes = "Returns whether the specified block is transparent." },
+ RequiresSpecialTool = { Params = "Type", Return = "bool", Notes = "Returns whether the specified block requires a special tool to drop." },
},
Variables =
{
--
cgit v1.2.3
From 0c87341631198386c765bc18848fbd93e66c1aab Mon Sep 17 00:00:00 2001
From: andrew
Date: Sun, 2 Mar 2014 16:24:09 +0200
Subject: GetById => Get
---
MCServer/Plugins/APIDump/APIDesc.lua | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index ed9c32d32..0b6f33b37 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -297,16 +297,16 @@ g_APIDesc =
]],
Functions =
{
- FullyOccupiesVoxel = { Params = "Type", Return = "bool", Notes = "Returns whether the specified block fully occupies its voxel." },
- GetById = { Params = "Type", Return = "{{cBlockInfo}}", Notes = "Returns the {{cBlockInfo}} structure for the specified type." },
- GetLightValue = { Params = "Type", Return = "number", Notes = "Returns how much light the specified block emits on its own." },
- GetSpreadLightFalloff = { Params = "Type", Return = "number", Notes = "Returns how much light the specified block consumes." },
- IsOneHitDig = { Params = "Type", Return = "bool", Notes = "Returns whether the specified block will be destroyed after a single hit." },
- IsPistonBreakable = { Params = "Type", Return = "bool", Notes = "Returns whether a piston can break the specified block." },
- IsSnowable = { Params = "Type", Return = "bool", Notes = "Returns whether the specified block can hold snow atop." },
- IsSolid = { Params = "Type", Return = "bool", Notes = "Returns whether the specified block is solid." },
- IsTransparent = { Params = "Type", Return = "bool", Notes = "Returns whether the specified block is transparent." },
- RequiresSpecialTool = { Params = "Type", Return = "bool", Notes = "Returns whether the specified block requires a special tool to drop." },
+ FullyOccupiesVoxel = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns whether the specified block fully occupies its voxel." },
+ Get = { Params = "Type", Return = "{{cBlockInfo}}", Notes = "(STATIC) Returns the {{cBlockInfo}} structure for the specified type." },
+ GetLightValue = { Params = "Type", Return = "number", Notes = "(STATIC) Returns how much light the specified block emits on its own." },
+ GetSpreadLightFalloff = { Params = "Type", Return = "number", Notes = "(STATIC) Returns how much light the specified block consumes." },
+ IsOneHitDig = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns whether the specified block will be destroyed after a single hit." },
+ IsPistonBreakable = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns whether a piston can break the specified block." },
+ IsSnowable = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns whether the specified block can hold snow atop." },
+ IsSolid = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns whether the specified block is solid." },
+ IsTransparent = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns whether the specified block is transparent." },
+ RequiresSpecialTool = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns whether the specified block requires a special tool to drop." },
},
Variables =
{
--
cgit v1.2.3
From 0c8d08cb0962640bb3688f80ff782245daa2747c Mon Sep 17 00:00:00 2001
From: STRWarrior
Date: Sun, 2 Mar 2014 16:48:55 +0100
Subject: Simplified and more clearer infodump for Github.
---
MCServer/Plugins/InfoDump.lua | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua
index e7ed157e3..ede4c0e8b 100644
--- a/MCServer/Plugins/InfoDump.lua
+++ b/MCServer/Plugins/InfoDump.lua
@@ -317,26 +317,19 @@ local function WriteCommandsCategoryGithub(a_Category, f)
if (CategoryName == "") then
CategoryName = "General";
end
- f:write("\n## ", GithubizeString(a_Category.DisplayName or CategoryName), "\n");
+ f:write("\n### ", GithubizeString(a_Category.DisplayName or CategoryName), "\n");
-- Write description:
if (a_Category.Description ~= "") then
- f:write(GithubizeString(a_Category.Description), "\n");
+ f:write(GithubizeString(a_Category.Description), "\n\n");
end
+ f:write("| Command | Permission | Discription | \n")
+ f:write("| ------- | ---------- | ----------- | \n")
+
-- Write commands:
- f:write("\n");
for idx2, cmd in ipairs(a_Category.Commands) do
- f:write("\n### ", cmd.CommandString, "\n", GithubizeString(cmd.Info.HelpString or "UNDOCUMENTED"), "\n\n");
- if (cmd.Info.Permission ~= nil) then
- f:write("Permission required: **", cmd.Info.Permission, "**\n\n");
- end
- if (cmd.Info.DetailedDescription ~= nil) then
- f:write(GithubizeString(cmd.Info.DetailedDescription));
- end
- if (cmd.Info.ParameterCombinations ~= nil) then
- WriteCommandParameterCombinationsGithub(cmd.CommandString, cmd.Info.ParameterCombinations, f);
- end
+ f:write("|", cmd.CommandString, " | ", cmd.Info.Permission or "", " | ", GithubizeString(cmd.Info.HelpString or "UNDOCUMENTED"), "| \n")
end
f:write("\n\n")
end
@@ -601,7 +594,7 @@ local function DumpPluginInfoGithub(a_PluginFolder, a_PluginInfo)
f:write(GithubizeString(a_PluginInfo.Description), "\n");
DumpAdditionalInfoGithub(a_PluginInfo, f);
DumpCommandsGithub(a_PluginInfo, f);
- DumpPermissionsGithub(a_PluginInfo, f);
+ --DumpPermissionsGithub(a_PluginInfo, f); -- Seems a little overkill since they are already mentioned in the commands.
f:close();
end
--
cgit v1.2.3
From 20e377ea7b64f60bd5565b8c97ce26750e0eeb5e Mon Sep 17 00:00:00 2001
From: STRWarrior
Date: Sun, 2 Mar 2014 16:55:04 +0100
Subject: Fixed typo Discription => Description
---
MCServer/Plugins/InfoDump.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua
index ede4c0e8b..59263d056 100644
--- a/MCServer/Plugins/InfoDump.lua
+++ b/MCServer/Plugins/InfoDump.lua
@@ -324,7 +324,7 @@ local function WriteCommandsCategoryGithub(a_Category, f)
f:write(GithubizeString(a_Category.Description), "\n\n");
end
- f:write("| Command | Permission | Discription | \n")
+ f:write("| Command | Permission | Description | \n")
f:write("| ------- | ---------- | ----------- | \n")
-- Write commands:
--
cgit v1.2.3
From ab30d94b2fed330bb487e30960d82c0bedff37b4 Mon Sep 17 00:00:00 2001
From: madmaxoft
Date: Tue, 4 Mar 2014 22:17:47 +0100
Subject: Debuggers: Added simple test for cCompositeChat.
---
MCServer/Plugins/Debuggers/Debuggers.lua | 15 +++++++++++++++
1 file changed, 15 insertions(+)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 66894d835..329a652cd 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -30,6 +30,7 @@ function Initialize(Plugin)
PM:AddHook(cPluginManager.HOOK_CHUNK_GENERATED, OnChunkGenerated);
PM:AddHook(cPluginManager.HOOK_PLUGINS_LOADED, OnPluginsLoaded);
PM:AddHook(cPluginManager.HOOK_PLUGIN_MESSAGE, OnPluginMessage);
+ PM:AddHook(cPluginManager.HOOK_PLAYER_JOINED, OnPlayerJoined)
PM:BindCommand("/le", "debuggers", HandleListEntitiesCmd, "- Shows a list of all the loaded entities");
PM:BindCommand("/ke", "debuggers", HandleKillEntitiesCmd, "- Kills all the loaded entities");
@@ -1258,3 +1259,17 @@ end
+
+function OnPlayerJoined(a_Player)
+ -- Test composite chat chaining:
+ a_Player:SendMessage(cCompositeChat()
+ :AddTextPart("Hello, ")
+ :AddUrlPart(a_Player:GetName(), "www.mc-server.org", "u@2")
+ :AddSuggestCommandPart(", and welcome.", "/help", "u")
+ :AddRunCommandPart(" SetDay", "/time set 0")
+ )
+end
+
+
+
+
--
cgit v1.2.3
From 86615428cd3d967c8bd73628fe8946405060d24c Mon Sep 17 00:00:00 2001
From: madmaxoft
Date: Wed, 5 Mar 2014 18:28:42 +0100
Subject: APIDump: Ignoring classes by exact match.
"cCompositeChat" was ignored because it matched "os".
---
MCServer/Plugins/APIDump/APIDesc.lua | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 0b6f33b37..1d30ea72d 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -2701,16 +2701,16 @@ end
IgnoreClasses =
{
- "coroutine",
- "debug",
- "io",
- "math",
- "package",
- "os",
- "string",
- "table",
- "g_Stats",
- "g_TrackedPages",
+ "^coroutine$",
+ "^debug$",
+ "^io$",
+ "^math$",
+ "^package$",
+ "^os$",
+ "^string$",
+ "^table$",
+ "^g_Stats$",
+ "^g_TrackedPages$",
},
IgnoreFunctions =
--
cgit v1.2.3
From 036608c6453857e7faf3b32f05fa5d9f62b93fa0 Mon Sep 17 00:00:00 2001
From: madmaxoft
Date: Wed, 5 Mar 2014 18:56:32 +0100
Subject: APIDump: Documented the cCompositeChat class.
---
MCServer/Plugins/APIDump/APIDesc.lua | 52 ++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 1d30ea72d..94cdd0063 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -483,6 +483,58 @@ end
},
}, -- cClientHandle
+ cCompositeChat =
+ {
+ Desc = [[
+ Encapsulates a chat message that can contain various formatting, URLs, commands executed on click
+ and commands suggested on click. The chat message can be sent by the regular chat-sending functions,
+ {{cPlayer}}:SendMessage(), {{cWorld}}:BroadcastChat() and {{cRoot}}:BroadcastChat().
+
+ Note that most of the functions in this class are so-called modifiers - they modify the object and
+ then return the object itself, so that they can be chained one after another.
+ ]],
+ Functions =
+ {
+ constructor =
+ {
+ { Params = "", Return = "", Notes = "Creates an empty chat message" },
+ { Params = "Text", Return = "", Notes = "Creates a chat message containing the specified text, parsed by the ParseText() function. This allows easy migration from old chat messages." },
+ },
+ AddRunCommandPart = { Params = "Text, Command, [Style]", Return = "self", Notes = "Adds a text which, when clicked, runs the specified command. Chaining." },
+ AddSuggestCommandPart = { Params = "Text, Command, [Style]", Return = "self", Notes = "Adds a text which, when clicked, puts the specified command into the player's chat input area. Chaining." },
+ AddTextPart = { Params = "Text, [Style]", Return = "self", Notes = "Adds a regular text. Chaining." },
+ AddUrlPart = { Params = "Text, Url, [Style]", Return = "self", Notes = "Adds a text which, when clicked, opens up a browser at the specified URL. Chaining." },
+ Clear = { Params = "", Return = "", Notes = "Removes all parts from this object" },
+ GetMessageType = { Params = "", Return = "MessageType", Notes = "Returns the MessageType (mtXXX constant) that is associated with this message. When sent to a player, the message will be formatted according to this message type and the player's settings (adding \"[INFO]\" prefix etc.)" },
+ ParseText = { Params = "Text", Return = "self", Notes = "Adds text, while recognizing http and https URLs and old-style formatting codes (\"@2\"). Chaining." },
+ SetMessageType = { Params = "MessageType", Return = "self", Notes = "Sets the MessageType (mtXXX constant) that is associated with this message. When sent to a player, the message will be formatted according to this message type and the player's settings (adding \"[INFO]\" prefix etc.) Chaining." },
+ UnderlineUrls = { Params = "", Return = "self", Notes = "Makes all URL parts contained in the message underlined. Doesn't affect parts added in the future. Chaining." },
+ },
+
+ AdditionalInfo =
+ {
+ {
+ Header = "Chaining example",
+ Contents = [[
+ Sending a chat message that is composed of multiple different parts has been made easy thanks to
+ chaining. Consider the following example that shows how a message containing all kinds of parts
+ is sent (adapted from the Debuggers plugin):
+
+function OnPlayerJoined(a_Player)
+ -- Send an example composite chat message to the player:
+ a_Player:SendMessage(cCompositeChat()
+ :AddTextPart("Hello, ")
+ :AddUrlPart(a_Player:GetName(), "www.mc-server.org", "u@2") -- Colored underlined link
+ :AddSuggestCommandPart(", and welcome.", "/help", "u") -- Underlined suggest-command
+ :AddRunCommandPart(" SetDay", "/time set 0") -- Regular text that will execute command when clicked
+ :SetMessageType(mtJoin) -- It is a join-message
+ )
+end
+ ]],
+ },
+ }, -- AdditionalInfo
+ }, -- cCompositeChat
+
cCraftingGrid =
{
Desc = [[
--
cgit v1.2.3
From dc0cbd594c05395b5d71af8a8a1f24b10c2d0d50 Mon Sep 17 00:00:00 2001
From: STRWarrior
Date: Wed, 5 Mar 2014 19:17:59 +0100
Subject: The APIDump generates a list of all the permissions again.
---
MCServer/Plugins/InfoDump.lua | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua
index 59263d056..c61f9c9e6 100644
--- a/MCServer/Plugins/InfoDump.lua
+++ b/MCServer/Plugins/InfoDump.lua
@@ -530,12 +530,13 @@ local function DumpPermissionsGithub(a_PluginInfo, f)
-- Dump the permissions:
f:write("\n# Permissions\n");
+ f:write("| Permissions | Description | Commands | Recommended groups |\n")
+ f:write("| ----------- | ----------- | -------- | ------------------ |\n")
for idx, perm in ipairs(Permissions) do
- f:write("### ", perm.Name, "\n");
- f:write(GithubizeString(perm.Info.Description or ""));
+ f:write(perm.Name, " | ");
+ f:write(GithubizeString(perm.Info.Description or ""), " | ");
local CommandsAffected = perm.Info.CommandsAffected or {};
if (#CommandsAffected > 0) then
- f:write("\n\nCommands affected:\n - ");
local Affects = {};
for idx2, cmd in ipairs(CommandsAffected) do
if (type(cmd) == "string") then
@@ -544,11 +545,10 @@ local function DumpPermissionsGithub(a_PluginInfo, f)
table.insert(Affects, GetCommandRefGithub(cmd.Name, cmd));
end
end
- f:write(table.concat(Affects, "\n - "));
- f:write("\n");
+ f:write(table.concat(Affects, ", "), " | ");
end
if (perm.Info.RecommendedGroups ~= nil) then
- f:write("\n\nRecommended groups: ", perm.Info.RecommendedGroups, "\n");
+ f:write(perm.Info.RecommendedGroups, " |");
end
f:write("\n");
end
@@ -594,7 +594,7 @@ local function DumpPluginInfoGithub(a_PluginFolder, a_PluginInfo)
f:write(GithubizeString(a_PluginInfo.Description), "\n");
DumpAdditionalInfoGithub(a_PluginInfo, f);
DumpCommandsGithub(a_PluginInfo, f);
- --DumpPermissionsGithub(a_PluginInfo, f); -- Seems a little overkill since they are already mentioned in the commands.
+ DumpPermissionsGithub(a_PluginInfo, f);
f:close();
end
--
cgit v1.2.3
From 166ab59582d90194a6fcd6849afe8f2e60d64019 Mon Sep 17 00:00:00 2001
From: madmaxoft
Date: Fri, 7 Mar 2014 09:17:42 +0100
Subject: APIDump: Documented cBlockArea string-serialization functions.
---
MCServer/Plugins/APIDump/APIDesc.lua | 2 ++
1 file changed, 2 insertions(+)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 94cdd0063..30ce4cc2b 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -134,6 +134,7 @@ g_APIDesc =
HasBlockSkyLights = { Params = "", Return = "bool", Notes = "Returns true if current datatypes include skylight" },
HasBlockTypes = { Params = "", Return = "bool", Notes = "Returns true if current datatypes include block types" },
LoadFromSchematicFile = { Params = "FileName", Return = "", Notes = "Clears current content and loads new content from the specified schematic file. Returns true if successful. Returns false and logs error if unsuccessful, old content is preserved in such a case." },
+ LoadFromSchematicString = { Params = "SchematicData", Return = "", Notes = "Clears current content and loads new content from the specified string (assumed to contain .schematic data). Returns true if successful. Returns false and logs error if unsuccessful, old content is preserved in such a case." },
Merge =
{
{ Params = "BlockAreaSrc, {{Vector3i|RelMinCoords}}, Strategy", Return = "", Notes = "Merges BlockAreaSrc into this object at the specified relative coords, using the specified strategy" },
@@ -161,6 +162,7 @@ g_APIDesc =
RotateCW = { Params = "", Return = "", Notes = "Rotates the block area around the Y axis, clockwise (north -> east). Modifies blocks' metas (if present) to match." },
RotateCWNoMeta = { Params = "", Return = "", Notes = "Rotates the block area around the Y axis, clockwise (north -> east). Doesn't modify blocks' metas." },
SaveToSchematicFile = { Params = "FileName", Return = "", Notes = "Saves the current contents to a schematic file. Returns true if successful." },
+ SaveToSchematicString = { Params = "", Return = "string", Notes = "Saves the current contents to a string (in a .schematic file format). Returns the data if successful, empty string if failed." },
SetBlockLight = { Params = "BlockX, BlockY, BlockZ, BlockLight", Return = "", Notes = "Sets the blocklight at the specified absolute coords" },
SetBlockMeta = { Params = "BlockX, BlockY, BlockZ, BlockMeta", Return = "", Notes = "Sets the block meta at the specified absolute coords" },
SetBlockSkyLight = { Params = "BlockX, BlockY, BlockZ, SkyLight", Return = "", Notes = "Sets the skylight at the specified absolute coords" },
--
cgit v1.2.3
From f6aaeb74a9bb50488c2c5b5732f43dae4beef15c Mon Sep 17 00:00:00 2001
From: madmaxoft
Date: Fri, 7 Mar 2014 09:18:10 +0100
Subject: Debuggers: Added a test of the cBlockArea string-serialization.
---
MCServer/Plugins/Debuggers/Debuggers.lua | 38 ++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 329a652cd..f99c48242 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -71,6 +71,8 @@ function Initialize(Plugin)
-- TestExpatBindings();
-- TestPluginCalls();
+ TestBlockAreasString()
+
return true
end;
@@ -202,6 +204,42 @@ end
+function TestBlockAreasString()
+ -- Write one area to string, then to file:
+ local BA1 = cBlockArea()
+ BA1:Create(5, 5, 5, cBlockArea.baTypes + cBlockArea.baMetas)
+ BA1:Fill(cBlockArea.baTypes, E_BLOCK_DIAMOND_BLOCK)
+ BA1:FillRelCuboid(1, 3, 1, 3, 1, 3, cBlockArea.baTypes, E_BLOCK_GOLD_BLOCK)
+ local Data = BA1:SaveToSchematicString()
+ if ((type(Data) ~= "string") or (Data == "")) then
+ LOG("Cannot save schematic to string")
+ return
+ end
+ cFile:CreateFolder("schematics")
+ local f = io.open("schematics/StringTest.schematic", "w")
+ f:write(Data)
+ f:close()
+
+ -- Load a second area from that file:
+ local BA2 = cBlockArea()
+ if not(BA2:LoadFromSchematicFile("schematics/StringTest.schematic")) then
+ LOG("Cannot read schematic from string test file")
+ return
+ end
+ BA2:Clear()
+
+ -- Load another area from a string in that file:
+ f = io.open("schematics/StringTest.schematic", "r")
+ Data = f:read("*all")
+ if not(BA2:LoadFromSchematicString(Data)) then
+ LOG("Cannot load schematic from string")
+ end
+end
+
+
+
+
+
function TestSQLiteBindings()
LOG("Testing SQLite bindings...");
--
cgit v1.2.3
From 8fdffbb48caa527b83b40baf88e841d1593e79b6 Mon Sep 17 00:00:00 2001
From: Howaner
Date: Fri, 7 Mar 2014 16:14:11 +0100
Subject: Add missing documentation files
---
MCServer/Plugins/APIDump/APIDesc.lua | 2 ++
MCServer/Plugins/APIDump/Classes/BlockEntities.lua | 14 ++++++++++++++
2 files changed, 16 insertions(+)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 94cdd0063..9df9d0e77 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -2150,7 +2150,9 @@ end
DoWithDropSpenserAt = { Params = "X, Y, Z, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a dropper or a dispenser at the specified coords, calls the CallbackFunction with the {{cDropSpenserEntity}} parameter representing the dropper or dispenser. The CallbackFunction has the following signature: function Callback({{cDropSpenserEntity|DropSpenserEntity}}, [CallbackData])
Note that this can be used to access both dispensers and droppers in a similar way. The function returns false if there is neither dispenser nor dropper, or if there is, it returns the bool value that the callback has returned." },
DoWithDropperAt = { Params = "X, Y, Z, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a dropper at the specified coords, calls the CallbackFunction with the {{cDropperEntity}} parameter representing the dropper. The CallbackFunction has the following signature: function Callback({{cDropperEntity|DropperEntity}}, [CallbackData])
The function returns false if there is no dropper, or if there is, it returns the bool value that the callback has returned." },
DoWithEntityByID = { Params = "EntityID, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If an entity with the specified ID exists, calls the callback with the {{cEntity}} parameter representing the entity. The CallbackFunction has the following signature: function Callback({{cEntity|Entity}}, [CallbackData])
The function returns false if the entity was not found, and it returns the same bool value that the callback has returned if the entity was found." },
+ DoWithFlowerPotAt = { Params = "X, Y, Z, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a flower pot at the specified coords, calls the CallbackFunction with the {{cFlowerPotEntity}} parameter representing the flower pot. The CallbackFunction has the following signature: function Callback({{cFlowerPotEntity|FlowerPotEntity}}, [CallbackData])
The function returns false if there is no flower pot, or if there is, it returns the bool value that the callback has returned." },
DoWithFurnaceAt = { Params = "X, Y, Z, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a furnace at the specified coords, calls the CallbackFunction with the {{cFurnaceEntity}} parameter representing the furnace. The CallbackFunction has the following signature: function Callback({{cFurnaceEntity|FurnaceEntity}}, [CallbackData])
The function returns false if there is no furnace, or if there is, it returns the bool value that the callback has returned." },
+ DoWithModHeadAt = { Params = "X, Y, Z, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a mob head at the specified coords, calls the CallbackFunction with the {{cMobHeadEntity}} parameter representing the furnace. The CallbackFunction has the following signature: function Callback({{cMobHeadEntity|MobHeadEntity}}, [CallbackData])
The function returns false if there is no mob head, or if there is, it returns the bool value that the callback has returned." },
DoWithNoteBlockAt = { Params = "BlockX, BlockY, BlockZ, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a note block at the specified coords, calls the CallbackFunction with the {{cNoteEntity}} parameter representing the note block. The CallbackFunction has the following signature: function Callback({{cNoteEntity|NoteEntity}}, [CallbackData])
The function returns false if there is no note block, or if there is, it returns the bool value that the callback has returned." },
DoWithPlayer = { Params = "PlayerName, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a player of the specified name (exact match), calls the CallbackFunction with the {{cPlayer}} parameter representing the player. The CallbackFunction has the following signature: function Callback({{cPlayer|Player}}, [CallbackData])
The function returns false if the player was not found, or whatever bool value the callback returned if the player was found." },
FastSetBlock =
diff --git a/MCServer/Plugins/APIDump/Classes/BlockEntities.lua b/MCServer/Plugins/APIDump/Classes/BlockEntities.lua
index 61a8e8d22..3deb50ade 100644
--- a/MCServer/Plugins/APIDump/Classes/BlockEntities.lua
+++ b/MCServer/Plugins/APIDump/Classes/BlockEntities.lua
@@ -238,6 +238,20 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
},
Inherits = "cBlockEntity";
}, -- cSignEntity
+
+ cFlowerPotEntity =
+ {
+ Desc = [[
+ This class represents a flower pot entity in the world.
+ ]],
+ Functions =
+ {
+ IsItemInPot = { Params = "", Return = "bool", Notes = "Is a flower in the pot?" },
+ GetItem = { Params = "", Return = "cItem", Notes = "Returns the item in the flower pot." },
+ SetItem = { Params = "cItem", Return = "", Notes = "Set the item in the flower pot" },
+ },
+ Inherits = "cBlockEntity";
+ }, -- cFlowerPotEntity
}
--
cgit v1.2.3
From eff054027face23320f55a01fe5884fe285204b6 Mon Sep 17 00:00:00 2001
From: Howaner
Date: Fri, 7 Mar 2014 17:51:43 +0100
Subject: Link cItem in the documentation
---
MCServer/Plugins/APIDump/APIDesc.lua | 2 +-
MCServer/Plugins/APIDump/Classes/BlockEntities.lua | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 9df9d0e77..39f7cbcd7 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -2152,7 +2152,7 @@ end
DoWithEntityByID = { Params = "EntityID, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If an entity with the specified ID exists, calls the callback with the {{cEntity}} parameter representing the entity. The CallbackFunction has the following signature: function Callback({{cEntity|Entity}}, [CallbackData])
The function returns false if the entity was not found, and it returns the same bool value that the callback has returned if the entity was found." },
DoWithFlowerPotAt = { Params = "X, Y, Z, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a flower pot at the specified coords, calls the CallbackFunction with the {{cFlowerPotEntity}} parameter representing the flower pot. The CallbackFunction has the following signature: function Callback({{cFlowerPotEntity|FlowerPotEntity}}, [CallbackData])
The function returns false if there is no flower pot, or if there is, it returns the bool value that the callback has returned." },
DoWithFurnaceAt = { Params = "X, Y, Z, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a furnace at the specified coords, calls the CallbackFunction with the {{cFurnaceEntity}} parameter representing the furnace. The CallbackFunction has the following signature: function Callback({{cFurnaceEntity|FurnaceEntity}}, [CallbackData])
The function returns false if there is no furnace, or if there is, it returns the bool value that the callback has returned." },
- DoWithModHeadAt = { Params = "X, Y, Z, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a mob head at the specified coords, calls the CallbackFunction with the {{cMobHeadEntity}} parameter representing the furnace. The CallbackFunction has the following signature: function Callback({{cMobHeadEntity|MobHeadEntity}}, [CallbackData])
The function returns false if there is no mob head, or if there is, it returns the bool value that the callback has returned." },
+ DoWithMobHeadAt = { Params = "X, Y, Z, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a mob head at the specified coords, calls the CallbackFunction with the {{cMobHeadEntity}} parameter representing the furnace. The CallbackFunction has the following signature: function Callback({{cMobHeadEntity|MobHeadEntity}}, [CallbackData])
The function returns false if there is no mob head, or if there is, it returns the bool value that the callback has returned." },
DoWithNoteBlockAt = { Params = "BlockX, BlockY, BlockZ, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a note block at the specified coords, calls the CallbackFunction with the {{cNoteEntity}} parameter representing the note block. The CallbackFunction has the following signature: function Callback({{cNoteEntity|NoteEntity}}, [CallbackData])
The function returns false if there is no note block, or if there is, it returns the bool value that the callback has returned." },
DoWithPlayer = { Params = "PlayerName, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a player of the specified name (exact match), calls the CallbackFunction with the {{cPlayer}} parameter representing the player. The CallbackFunction has the following signature: function Callback({{cPlayer|Player}}, [CallbackData])
The function returns false if the player was not found, or whatever bool value the callback returned if the player was found." },
FastSetBlock =
diff --git a/MCServer/Plugins/APIDump/Classes/BlockEntities.lua b/MCServer/Plugins/APIDump/Classes/BlockEntities.lua
index 3deb50ade..de42f66df 100644
--- a/MCServer/Plugins/APIDump/Classes/BlockEntities.lua
+++ b/MCServer/Plugins/APIDump/Classes/BlockEntities.lua
@@ -247,8 +247,8 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
Functions =
{
IsItemInPot = { Params = "", Return = "bool", Notes = "Is a flower in the pot?" },
- GetItem = { Params = "", Return = "cItem", Notes = "Returns the item in the flower pot." },
- SetItem = { Params = "cItem", Return = "", Notes = "Set the item in the flower pot" },
+ GetItem = { Params = "", Return = "{{cItem|Item}}", Notes = "Returns the item in the flower pot." },
+ SetItem = { Params = "{{cItem|Item}}", Return = "", Notes = "Set the item in the flower pot" },
},
Inherits = "cBlockEntity";
}, -- cFlowerPotEntity
--
cgit v1.2.3
From ffdf5f2022cbeb568cb6ff28448aad98876334b1 Mon Sep 17 00:00:00 2001
From: madmaxoft
Date: Fri, 7 Mar 2014 21:28:52 +0100
Subject: Fixed cBlockArea schematic string saving signature.
---
MCServer/Plugins/APIDump/APIDesc.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 5f1b11a4c..1e572492b 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -162,7 +162,7 @@ g_APIDesc =
RotateCW = { Params = "", Return = "", Notes = "Rotates the block area around the Y axis, clockwise (north -> east). Modifies blocks' metas (if present) to match." },
RotateCWNoMeta = { Params = "", Return = "", Notes = "Rotates the block area around the Y axis, clockwise (north -> east). Doesn't modify blocks' metas." },
SaveToSchematicFile = { Params = "FileName", Return = "", Notes = "Saves the current contents to a schematic file. Returns true if successful." },
- SaveToSchematicString = { Params = "", Return = "string", Notes = "Saves the current contents to a string (in a .schematic file format). Returns the data if successful, empty string if failed." },
+ SaveToSchematicString = { Params = "", Return = "string", Notes = "Saves the current contents to a string (in a .schematic file format). Returns the data if successful, nil if failed." },
SetBlockLight = { Params = "BlockX, BlockY, BlockZ, BlockLight", Return = "", Notes = "Sets the blocklight at the specified absolute coords" },
SetBlockMeta = { Params = "BlockX, BlockY, BlockZ, BlockMeta", Return = "", Notes = "Sets the block meta at the specified absolute coords" },
SetBlockSkyLight = { Params = "BlockX, BlockY, BlockZ, SkyLight", Return = "", Notes = "Sets the skylight at the specified absolute coords" },
--
cgit v1.2.3
From d872f2e41dfe141e1b04cdfb73c915b9bcdb55ea Mon Sep 17 00:00:00 2001
From: Tiger Wang
Date: Sun, 9 Mar 2014 01:49:32 +0000
Subject: Updated Core
---
MCServer/Plugins/Core | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'MCServer')
diff --git a/MCServer/Plugins/Core b/MCServer/Plugins/Core
index 3b416b07a..013a32a7f 160000
--- a/MCServer/Plugins/Core
+++ b/MCServer/Plugins/Core
@@ -1 +1 @@
-Subproject commit 3b416b07a339b3abcbc127070d56eea05b05373d
+Subproject commit 013a32a7fb3c8a6cfe0aef892d4c7394d4e1be59
--
cgit v1.2.3