summaryrefslogtreecommitdiffstats
path: root/Server/Plugins/Debuggers
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Server/Plugins/Debuggers/Debuggers.lua18
-rw-r--r--Server/Plugins/Debuggers/Info.lua6
2 files changed, 24 insertions, 0 deletions
diff --git a/Server/Plugins/Debuggers/Debuggers.lua b/Server/Plugins/Debuggers/Debuggers.lua
index 4dfc55030..8e2bd0156 100644
--- a/Server/Plugins/Debuggers/Debuggers.lua
+++ b/Server/Plugins/Debuggers/Debuggers.lua
@@ -987,6 +987,24 @@ end;
+function HandleGenRailsCmd(a_Split, a_Player)
+ local MAX_RAIL_META = 9
+ local pos = a_Player:GetPosition()
+ local ba = cBlockArea:new()
+ ba:Create(2 * MAX_RAIL_META + 3, 4, 3, cBlockArea.baTypes + cBlockArea.baMetas)
+ ba:FillRelCuboid(0, 2 * MAX_RAIL_META + 2, 0, 0, 0, 2, cBlockArea.baTypes, E_BLOCK_STONE)
+ ba:FillRelCuboid(0, 2 * MAX_RAIL_META + 2, 1, 3, 0, 2, cBlockArea.baTypes, E_BLOCK_AIR)
+ for x = 0, MAX_RAIL_META do
+ ba:SetRelBlockTypeMeta(2 * x + 1, 1, 1, E_BLOCK_RAIL, x)
+ end
+ ba:Write(a_Player:GetWorld(), pos:Floor())
+ return true
+end
+
+
+
+
+
function HandleGetCustomNameCmd(a_Split, a_Player)
local item = a_Player:GetInventory():GetEquippedItem()
if (not(item.m_CustomName) or (item.m_CustomName == "")) then
diff --git a/Server/Plugins/Debuggers/Info.lua b/Server/Plugins/Debuggers/Info.lua
index c21865218..ea1a60a56 100644
--- a/Server/Plugins/Debuggers/Info.lua
+++ b/Server/Plugins/Debuggers/Info.lua
@@ -100,6 +100,12 @@ g_PluginInfo =
Handler = HandleGCCmd,
HelpString = "Activates the Lua garbage collector"
},
+ ["/genrails"] =
+ {
+ Permission = "debuggers",
+ Handler = HandleGenRailsCmd,
+ HelpString = "Generates rail blocks with all metas from current block towards X+",
+ },
["/getcustomname"] =
{
Permission = "debuggers",