1
0

Updated to V6 - "Stop" and "Progress report" functionality

git-svn-id: http://mc-server.googlecode.com/svn/trunk@807 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
tau.tihon@gmail.com 2012-08-30 15:54:51 +00:00
parent d2469d857a
commit d5f8701f63
2 changed files with 233 additions and 190 deletions

View File

@ -5,6 +5,7 @@ OPERATION_CODE = 0 -- 0 = generation
CX = 0 CX = 0
CZ = 0 CZ = 0
CURRENT = 0 CURRENT = 0
TOTAL = 0
-- AREA Variables -- AREA Variables
AreaStartX = -10 AreaStartX = -10
AreaStartZ = -10 AreaStartZ = -10
@ -23,7 +24,7 @@ function Initialize(Plugin)
PLUGIN = Plugin PLUGIN = Plugin
PLUGIN:SetName("ChunkWorx") PLUGIN:SetName("ChunkWorx")
PLUGIN:SetVersion(5) PLUGIN:SetVersion(6)
PluginManager = cRoot:Get():GetPluginManager() PluginManager = cRoot:Get():GetPluginManager()
PluginManager:AddHook(PLUGIN, cPluginManager.E_PLUGIN_TICK) PluginManager:AddHook(PLUGIN, cPluginManager.E_PLUGIN_TICK)
@ -95,8 +96,8 @@ function Tick( DeltaTime )
CURRENT = 0 CURRENT = 0
if (WW_instance == nil) then if (WW_instance == nil) then
LOG("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": works ABORTED") LOGERROR("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": works ABORTED")
LOG("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": NO WORLD found :(") LOGERROR("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": NO WORLD found :(")
GENERATION_STATE = 0 GENERATION_STATE = 0
end end
end end
@ -108,6 +109,7 @@ function Tick( DeltaTime )
and WW_instance:GetLightingQueueLength() < 200 and WW_instance:GetLightingQueueLength() < 200
and (WW_instance:GetStorageSaveQueueLength() + WW_instance:GetStorageLoadQueueLength()) < 80) then and (WW_instance:GetStorageSaveQueueLength() + WW_instance:GetStorageLoadQueueLength()) < 80) then
local chunk_sum = (1+ AreaEndX - AreaStartX) * (1+ AreaEndZ - AreaStartZ) local chunk_sum = (1+ AreaEndX - AreaStartX) * (1+ AreaEndZ - AreaStartZ)
TOTAL = chunk_sum
LOG("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": PROCESSING 100 chunks, (" .. CURRENT .. "/" .. chunk_sum .. ")") LOG("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": PROCESSING 100 chunks, (" .. CURRENT .. "/" .. chunk_sum .. ")")
for C = 1, 100 do for C = 1, 100 do
if (GENERATION_STATE == 2) then WW_instance:GenerateChunk(CX, CZ) end if (GENERATION_STATE == 2) then WW_instance:GenerateChunk(CX, CZ) end

View File

@ -8,209 +8,250 @@ end
function HandleRequest_Generation( Request ) function HandleRequest_Generation( Request )
local Content = "" local Content = ""
if (Request.PostParams["AGHRRRR"] ~= nil) then
if ( Request.PostParams["FormSetWorld"] ) then GENERATION_STATE = 0
WORK_WORLD = Request.PostParams["FormWorldName"] WW_instance:SaveAllChunks()
WW_instance = cRoot:Get():GetWorld(WORK_WORLD) WW_instance:UnloadUnusedChunks()
LOGERROR("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": works ABORTED by admin")
end end
--Content = Content .. "<head><meta http-equiv=\"refresh\" content=\"2;\"></head>"
if( Request.PostParams["SelectWorld"] ~= nil -- PROCESSING
and Request.PostParams["WorldName"] ~= nil ) then -- World is selected! --------------------------------------------------------------------------------------------------
WORK_WORLD = Request.PostParams["WorldName"] local function ProcessingContent()
WW_instance = cRoot:Get():GetWorld(WORK_WORLD) local _small_content = ""
end _small_content = _small_content .. "<head><meta http-equiv=\"refresh\" content=\"2;\"></head>"
_small_content = _small_content .. "<h4>World for operations:</h4>"..WORK_WORLD
if(Request.PostParams["OperationGenerate"] ~= nil) then if (OPERATION_CODE == 0) then
OPERATION_CODE = 0 _small_content = _small_content .. "<h4>Operation:</h4>Generation"
end elseif (OPERATION_CODE == 1) then
if(Request.PostParams["OperationReGenerate"] ~= nil) then _small_content = _small_content .. "<h4>Operation:</h4>Regeneration"
OPERATION_CODE = 1
end
if (GENERATION_STATE == 0) then
if( Request.PostParams["FormAreaStartX"] ~= nil
and Request.PostParams["FormAreaStartZ"] ~= nil
and Request.PostParams["FormAreaEndX"] ~= nil
and Request.PostParams["FormAreaEndZ"] ~= nil ) then --(Re)Generation valid!
-- COMMON (Re)gen
if( Request.PostParams["StartArea"]) then
AreaStartX = tonumber(Request.PostParams["FormAreaStartX"])
AreaStartZ = tonumber(Request.PostParams["FormAreaStartZ"])
AreaEndX = tonumber(Request.PostParams["FormAreaEndX"])
AreaEndZ = tonumber(Request.PostParams["FormAreaEndZ"])
PLUGIN.IniFile:DeleteValue("Area data", "StartX")
PLUGIN.IniFile:DeleteValue("Area data", "StartZ")
PLUGIN.IniFile:DeleteValue("Area data", "EndX")
PLUGIN.IniFile:DeleteValue("Area data", "EndZ")
PLUGIN.IniFile:SetValueI("Area data", "StartX", AreaStartX)
PLUGIN.IniFile:SetValueI("Area data", "StartZ", AreaStartZ)
PLUGIN.IniFile:SetValueI("Area data", "EndX", AreaEndX)
PLUGIN.IniFile:SetValueI("Area data", "EndZ", AreaEndZ)
if (OPERATION_CODE == 0) then
GENERATION_STATE = 1
elseif (OPERATION_CODE == 1) then
GENERATION_STATE = 3
end
PLUGIN.IniFile:WriteFile()
end
end end
if( Request.PostParams["FormRadialX"] ~= nil _small_content = _small_content .. "<h4>Area: </h4>["..AreaStartX..":"..AreaStartZ.."] ["..AreaEndX..":"..AreaEndZ.."]"
and Request.PostParams["FormRadialZ"] ~= nil _small_content = _small_content .. "<h4>Progress:</h4>"..CURRENT.."/"..TOTAL
and Request.PostParams["FormRadius"] ~= nil ) then --(Re)Generation valid! _small_content = _small_content .. "<br>"
-- COMMON (Re)gen _small_content = _small_content .. "<form method='POST'>"
if( Request.PostParams["StartRadial"]) then _small_content = _small_content .. "<input type='submit' name='AGHRRRR' value='Stop'>"
RadialX = tonumber(Request.PostParams["FormRadialX"]) _small_content = _small_content .. "</form>"
RadialZ = tonumber(Request.PostParams["FormRadialZ"]) return _small_content
Radius = tonumber(Request.PostParams["FormRadius"]) end
AreaStartX = RadialX - Radius if (GENERATION_STATE == 2 or GENERATION_STATE == 4) then
AreaStartZ = RadialZ - Radius Content = ProcessingContent()
AreaEndX = RadialX + Radius return Content
AreaEndZ = RadialZ + Radius end
-- SELECTING
PLUGIN.IniFile:DeleteValue("Radial data", "RadialX") --------------------------------------------------------------------------------------------------
PLUGIN.IniFile:DeleteValue("Radial data", "RadialZ") if ( Request.PostParams["FormSetWorld"] ) then
PLUGIN.IniFile:DeleteValue("Radial data", "Radius") WORK_WORLD = Request.PostParams["FormWorldName"]
PLUGIN.IniFile:SetValueI("Radial data", "RadialX", RadialX) WW_instance = cRoot:Get():GetWorld(WORK_WORLD)
PLUGIN.IniFile:SetValueI("Radial data", "RadialZ", RadialZ)
PLUGIN.IniFile:SetValueI("Radial data", "Radius", Radius)
if (OPERATION_CODE == 0) then
GENERATION_STATE = 1
elseif (OPERATION_CODE == 1) then
GENERATION_STATE = 3
end
PLUGIN.IniFile:WriteFile()
end
end end
-- POINT REGEN!
if( Request.PostParams["FormPointX"] ~= nil if( Request.PostParams["SelectWorld"] ~= nil
and Request.PostParams["FormPointZ"] ~= nil ) then --ReGeneration valid! and Request.PostParams["WorldName"] ~= nil ) then -- World is selected!
-- EXACT WORK_WORLD = Request.PostParams["WorldName"]
if ( Request.PostParams["PointExact"] ~= nil) then WW_instance = cRoot:Get():GetWorld(WORK_WORLD)
AreaStartX = tonumber(Request.PostParams["FormPointX"]) end
AreaStartZ = tonumber(Request.PostParams["FormPointZ"])
if(Request.PostParams["OperationGenerate"] ~= nil) then
OPERATION_CODE = 0
end
if(Request.PostParams["OperationReGenerate"] ~= nil) then
OPERATION_CODE = 1
end
if (GENERATION_STATE == 0) then
if( Request.PostParams["FormAreaStartX"] ~= nil
and Request.PostParams["FormAreaStartZ"] ~= nil
and Request.PostParams["FormAreaEndX"] ~= nil
and Request.PostParams["FormAreaEndZ"] ~= nil ) then --(Re)Generation valid!
-- COMMON (Re)gen
if( Request.PostParams["StartArea"]) then
AreaStartX = tonumber(Request.PostParams["FormAreaStartX"])
AreaStartZ = tonumber(Request.PostParams["FormAreaStartZ"])
AreaEndX = tonumber(Request.PostParams["FormAreaEndX"])
AreaEndZ = tonumber(Request.PostParams["FormAreaEndZ"])
PLUGIN.IniFile:DeleteValue("Area data", "StartX")
PLUGIN.IniFile:DeleteValue("Area data", "StartZ")
PLUGIN.IniFile:DeleteValue("Area data", "EndX")
PLUGIN.IniFile:DeleteValue("Area data", "EndZ")
PLUGIN.IniFile:SetValueI("Area data", "StartX", AreaStartX)
PLUGIN.IniFile:SetValueI("Area data", "StartZ", AreaStartZ)
PLUGIN.IniFile:SetValueI("Area data", "EndX", AreaEndX)
PLUGIN.IniFile:SetValueI("Area data", "EndZ", AreaEndZ)
if (OPERATION_CODE == 0) then
GENERATION_STATE = 1
elseif (OPERATION_CODE == 1) then
GENERATION_STATE = 3
end
PLUGIN.IniFile:WriteFile()
Content = ProcessingContent()
return Content
end
end
if( Request.PostParams["FormRadialX"] ~= nil
and Request.PostParams["FormRadialZ"] ~= nil
and Request.PostParams["FormRadius"] ~= nil ) then --(Re)Generation valid!
-- COMMON (Re)gen
if( Request.PostParams["StartRadial"]) then
RadialX = tonumber(Request.PostParams["FormRadialX"])
RadialZ = tonumber(Request.PostParams["FormRadialZ"])
Radius = tonumber(Request.PostParams["FormRadius"])
AreaStartX = RadialX - Radius
AreaStartZ = RadialZ - Radius
AreaEndX = RadialX + Radius
AreaEndZ = RadialZ + Radius
PLUGIN.IniFile:DeleteValue("Radial data", "RadialX")
PLUGIN.IniFile:DeleteValue("Radial data", "RadialZ")
PLUGIN.IniFile:DeleteValue("Radial data", "Radius")
PLUGIN.IniFile:SetValueI("Radial data", "RadialX", RadialX)
PLUGIN.IniFile:SetValueI("Radial data", "RadialZ", RadialZ)
PLUGIN.IniFile:SetValueI("Radial data", "Radius", Radius)
if (OPERATION_CODE == 0) then
GENERATION_STATE = 1
elseif (OPERATION_CODE == 1) then
GENERATION_STATE = 3
end
PLUGIN.IniFile:WriteFile()
Content = ProcessingContent()
return Content
end
end
-- POINT REGEN!
if( Request.PostParams["FormPointX"] ~= nil
and Request.PostParams["FormPointZ"] ~= nil ) then --ReGeneration valid!
-- EXACT
if ( Request.PostParams["PointExact"] ~= nil) then
AreaStartX = tonumber(Request.PostParams["FormPointX"])
AreaStartZ = tonumber(Request.PostParams["FormPointZ"])
AreaEndX = AreaStartX
AreaEndZ = AreaStartZ
GENERATION_STATE = 3
Content = ProcessingContent()
return Content
end
-- 3x3
if ( Request.PostParams["Point3x3"] ~= nil) then
AreaStartX = tonumber(Request.PostParams["FormPointX"]) - 1
AreaStartZ = tonumber(Request.PostParams["FormPointZ"]) - 1
AreaEndX = AreaStartX + 2
AreaEndZ = AreaStartZ + 2
GENERATION_STATE = 3
Content = ProcessingContent()
return Content
end
end
local GetAreaByPlayer = function(Player)
-- Player is valid only within this function, it cannot be stord and used later!
AreaStartX = Player:GetChunkX()
AreaStartZ = Player:GetChunkZ()
end
-- PLAYERS REGEN!
if( Request.PostParams["PlayerExact"] ~= nil
and Request.PostParams["PlayerName"] ~= nil ) then -- Making BOOM! I meant, regenereate...
cRoot:Get():GetWorld(WORK_WORLD):DoWithPlayer(Request.PostParams["PlayerName"],GetAreaByPlayer)
AreaEndX = AreaStartX AreaEndX = AreaStartX
AreaEndZ = AreaStartZ AreaEndZ = AreaStartZ
GENERATION_STATE = 3 GENERATION_STATE = 3
Content = ProcessingContent()
return Content
end end
-- 3x3 if( Request.PostParams["Player3x3"] ~= nil
if ( Request.PostParams["Point3x3"] ~= nil) then and Request.PostParams["PlayerName"] ~= nil ) then -- Making BOOM! I meant, regenereate...
AreaStartX = tonumber(Request.PostParams["FormPointX"]) - 1 cRoot:Get():GetWorld(WORK_WORLD):DoWithPlayer(Request.PostParams["PlayerName"],GetAreaByPlayer)
AreaStartZ = tonumber(Request.PostParams["FormPointZ"]) - 1 AreaStartX = AreaStartX - 1
AreaStartZ = AreaStartZ - 1
AreaEndX = AreaStartX + 2 AreaEndX = AreaStartX + 2
AreaEndZ = AreaStartZ + 2 AreaEndZ = AreaStartZ + 2
GENERATION_STATE = 3 GENERATION_STATE = 3
Content = ProcessingContent()
return Content
end end
end end
local GetAreaByPlayer = function(Player) --Content = Content .. "<h4>World for operations: " .. WORK_WORLD .. "</h4>"
-- Player is valid only within this function, it cannot be stord and used later! --Content = Content .. "<form method='POST'>"
AreaStartX = Player:GetChunkX() --Content = Content .. "<input type='text' name='FormWorldName' value='Input world name here'><input type='submit' name='FormSetWorld' value='Set world'>"
AreaStartZ = Player:GetChunkZ() --Content = Content .. "</form>"
-- SELECTING WORK_WORLD
Content = Content .. "<h4>World for operations: " .. WORK_WORLD .. "</h4>"
Content = Content .. "<table>"
local WorldNum = 0
local AddWorldToTable = function(World)
WorldNum = WorldNum + 1
Content = Content .. "<tr>"
Content = Content .. "<td style='width: 10px;'>" .. WorldNum .. ".</td>"
Content = Content .. "<td>" .. World:GetName() .. "</td>"
Content = Content .. "<td>" .. Button_World(World:GetName()) .. "</td>"
Content = Content .. "</tr>"
end end
-- PLAYERS REGEN! cRoot:Get():ForEachWorld(AddWorldToTable)
if( Request.PostParams["PlayerExact"] ~= nil if( WorldNum == 0 ) then
and Request.PostParams["PlayerName"] ~= nil ) then -- Making BOOM! I meant, regenereate... Content = Content .. "<tr><td>No worlds! O_O</td></tr>"
cRoot:Get():GetWorld(WORK_WORLD):DoWithPlayer(Request.PostParams["PlayerName"],GetAreaByPlayer)
AreaEndX = AreaStartX
AreaEndZ = AreaStartZ
GENERATION_STATE = 3
end end
if( Request.PostParams["Player3x3"] ~= nil Content = Content .. "</table>"
and Request.PostParams["PlayerName"] ~= nil ) then -- Making BOOM! I meant, regenereate... Content = Content .. "<br>"
cRoot:Get():GetWorld(WORK_WORLD):DoWithPlayer(Request.PostParams["PlayerName"],GetAreaByPlayer)
AreaStartX = AreaStartX - 1 -- SELECTING OPERATION
AreaStartZ = AreaStartZ - 1 if (OPERATION_CODE == 0) then
AreaEndX = AreaStartX + 2 Content = Content .. "<h4>Operation: Generation</h4>"
AreaEndZ = AreaStartZ + 2 elseif (OPERATION_CODE == 1) then
GENERATION_STATE = 3 Content = Content .. "<h4>Operation: Regeneration</h4>"
end end
end Content = Content .. "<form method='POST'>"
Content = Content .. "<input type='submit' name='OperationGenerate' value='Generation'>"
--Content = Content .. "<h4>World for operations: " .. WORK_WORLD .. "</h4>" Content = Content .. "<input type='submit' name='OperationReGenerate' value='Regeneration'>"
--Content = Content .. "<form method='POST'>" Content = Content .. "</form>"
--Content = Content .. "<input type='text' name='FormWorldName' value='Input world name here'><input type='submit' name='FormSetWorld' value='Set world'>"
--Content = Content .. "</form>" -- SELECTING AREA
Content = Content .. "<h4>Area: </h4>Start X, Start Z; End X, End Z"
-- SELECTING WORK_WORLD Content = Content .. "<form method='POST'>"
Content = Content .. "<h4>World for operations: " .. WORK_WORLD .. "</h4>" Content = Content .. "<input type='text' name='FormAreaStartX' value='" .. AreaStartX .. "'><input type='text' name='FormAreaStartZ' value='" .. AreaStartZ .. "'>"
Content = Content .. "<table>" Content = Content .. "<input type='text' name='FormAreaEndX' value='" .. AreaEndX .. "'><input type='text' name='FormAreaEndZ' value='" .. AreaEndZ .. "'>"
local WorldNum = 0 Content = Content .. "<input type='submit' name='StartArea' value='Start'>"
local AddWorldToTable = function(World) Content = Content .. "</form>"
WorldNum = WorldNum + 1
Content = Content .. "<tr>" -- SELECTING RADIAL
Content = Content .. "<td style='width: 10px;'>" .. WorldNum .. ".</td>" Content = Content .. "<h4>Radial: </h4>Center X, Center Z, Raduis (0 to any)"
Content = Content .. "<td>" .. World:GetName() .. "</td>" Content = Content .. "<form method='POST'>"
Content = Content .. "<td>" .. Button_World(World:GetName()) .. "</td>" Content = Content .. "<input type='text' name='FormRadialX' value='" .. RadialX .. "'><input type='text' name='FormRadialZ' value='" .. RadialZ .. "'><input type='text' name='FormRadius' value='" .. Radius .. "'>"
Content = Content .. "</tr>" Content = Content .. "<input type='submit' name='StartRadial' value='Start'>"
end Content = Content .. "</form>"
cRoot:Get():ForEachWorld(AddWorldToTable) Content = Content .. "<br>"
if( WorldNum == 0 ) then Content = Content .. "<br>"
Content = Content .. "<tr><td>No worlds! O_O</td></tr>" Content = Content .. "<br>"
end
Content = Content .. "</table>" -- SELECTING POINT
Content = Content .. "<br>" Content = Content .. "<h4>Point regeneration:</h4> X, Z"
Content = Content .. "<form method='POST'>"
-- SELECTING OPERATION Content = Content .. "<input type='text' name='FormPointX' value='0'><input type='text' name='FormPointZ' value='0'>"
if (OPERATION_CODE == 0) then Content = Content .. "<input type='submit' name='PointExact' value='Exact'>"
Content = Content .. "<h4>Operation: Generation</h4>" Content = Content .. "<input type='submit' name='Point3x3' value='3x3'>"
elseif (OPERATION_CODE == 1) then Content = Content .. "</form>"
Content = Content .. "<h4>Operation: Regeneration</h4>"
end -- SELECTING PLAYERS
Content = Content .. "<form method='POST'>" Content = Content .. "<h4>Player-based regeneration:</h4>"
Content = Content .. "<input type='submit' name='OperationGenerate' value='Generation'>" Content = Content .. "<table>"
Content = Content .. "<input type='submit' name='OperationReGenerate' value='Regeneration'>" local PlayerNum = 0
Content = Content .. "</form>" local AddPlayerToTable = function( Player )
PlayerNum = PlayerNum + 1
-- SELECTING AREA Content = Content .. "<tr>"
Content = Content .. "<h4>Area: </h4>Start X, Start Z; End X, End Z" Content = Content .. "<td style='width: 10px;'>" .. PlayerNum .. ".</td>"
Content = Content .. "<form method='POST'>" Content = Content .. "<td>" .. Player:GetName() .. "</td>"
Content = Content .. "<input type='text' name='FormAreaStartX' value='" .. AreaStartX .. "'><input type='text' name='FormAreaStartZ' value='" .. AreaStartZ .. "'>" Content = Content .. "<td>" .. Buttons_Player(Player:GetName()) .. "</td>"
Content = Content .. "<input type='text' name='FormAreaEndX' value='" .. AreaEndX .. "'><input type='text' name='FormAreaEndZ' value='" .. AreaEndZ .. "'>" Content = Content .. "</tr>"
Content = Content .. "<input type='submit' name='StartArea' value='Start'>"
Content = Content .. "</form>"
-- SELECTING RADIAL
Content = Content .. "<h4>Radial: </h4>Center X, Center Z, Raduis (0 to any)"
Content = Content .. "<form method='POST'>"
Content = Content .. "<input type='text' name='FormRadialX' value='" .. RadialX .. "'><input type='text' name='FormRadialZ' value='" .. RadialZ .. "'><input type='text' name='FormRadius' value='" .. Radius .. "'>"
Content = Content .. "<input type='submit' name='StartRadial' value='Start'>"
Content = Content .. "</form>"
Content = Content .. "<br>"
Content = Content .. "<br>"
Content = Content .. "<br>"
-- SELECTING POINT
Content = Content .. "<h4>Point regeneration:</h4> X, Z"
Content = Content .. "<form method='POST'>"
Content = Content .. "<input type='text' name='FormPointX' value='0'><input type='text' name='FormPointZ' value='0'>"
Content = Content .. "<input type='submit' name='PointExact' value='Exact'>"
Content = Content .. "<input type='submit' name='Point3x3' value='3x3'>"
Content = Content .. "</form>"
-- SELECTING PLAYERS
Content = Content .. "<h4>Player-based regeneration:</h4>"
Content = Content .. "<table>"
local PlayerNum = 0
local AddPlayerToTable = function( Player )
PlayerNum = PlayerNum + 1
Content = Content .. "<tr>"
Content = Content .. "<td style='width: 10px;'>" .. PlayerNum .. ".</td>"
Content = Content .. "<td>" .. Player:GetName() .. "</td>"
Content = Content .. "<td>" .. Buttons_Player(Player:GetName()) .. "</td>"
Content = Content .. "</tr>"
end
if (cRoot:Get():GetWorld(WORK_WORLD) == nil) then
Content = Content .. "<tr><td>Incorrect world selection</td></tr>"
else
cRoot:Get():GetWorld(WORK_WORLD):ForEachPlayer( AddPlayerToTable )
if( PlayerNum == 0 ) then
Content = Content .. "<tr><td>No connected players</td></tr>"
end end
end if (cRoot:Get():GetWorld(WORK_WORLD) == nil) then
Content = Content .. "</table>" Content = Content .. "<tr><td>Incorrect world selection</td></tr>"
Content = Content .. "<br>" else
cRoot:Get():GetWorld(WORK_WORLD):ForEachPlayer( AddPlayerToTable )
if( PlayerNum == 0 ) then
Content = Content .. "<tr><td>No connected players</td></tr>"
end
end
Content = Content .. "</table>"
Content = Content .. "<br>"
return Content return Content
end end