From de41e2a04cfae499e89f7edd96e160d854f6602c Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 8 Oct 2014 21:04:26 +0100 Subject: Removed ChunkWorx --- MCServer/Plugins/ChunkWorx/chunkworx_web.lua | 274 --------------------------- 1 file changed, 274 deletions(-) delete mode 100644 MCServer/Plugins/ChunkWorx/chunkworx_web.lua (limited to 'MCServer/Plugins/ChunkWorx/chunkworx_web.lua') diff --git a/MCServer/Plugins/ChunkWorx/chunkworx_web.lua b/MCServer/Plugins/ChunkWorx/chunkworx_web.lua deleted file mode 100644 index 9aec38b12..000000000 --- a/MCServer/Plugins/ChunkWorx/chunkworx_web.lua +++ /dev/null @@ -1,274 +0,0 @@ - --- chunkworx_web.lua - --- WebAdmin-related functions - - - - - -local function Buttons_Player( Name ) - return "
" -end - - - - - -local function Button_World( Name ) - return "
" -end - - - - - -local function SaveSettings() - local SettingsIni = cIniFile() - SettingsIni:SetValueI("Area data", "StartX", AreaStartX) - SettingsIni:SetValueI("Area data", "StartZ", AreaStartZ) - SettingsIni:SetValueI("Area data", "EndX", AreaEndX) - SettingsIni:SetValueI("Area data", "EndZ", AreaEndZ) - SettingsIni:SetValueI("Radial data", "RadialX", RadialX) - SettingsIni:SetValueI("Radial data", "RadialZ", RadialZ) - SettingsIni:SetValueI("Radial data", "Radius", Radius) - SettingsIni:WriteFile("ChunkWorx.ini") -end - - - - - -function HandleRequest_Generation( Request ) - local Content = "" - if (Request.PostParams["AGHRRRR"] ~= nil) then - GENERATION_STATE = 0 - WW_instance:QueueSaveAllChunks() - WW_instance:QueueUnloadUnusedChunks() - LOGERROR("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": works ABORTED by admin") - end - --Content = Content .. "" - -- PROCESSING - -------------------------------------------------------------------------------------------------- - local function ProcessingContent() - local _small_content = "" - _small_content = _small_content .. "" - _small_content = _small_content .. "

World for operations:

"..WORK_WORLD - if (OPERATION_CODE == 0) then - _small_content = _small_content .. "

Operation:

Generation" - elseif (OPERATION_CODE == 1) then - _small_content = _small_content .. "

Operation:

Regeneration" - end - _small_content = _small_content .. "

Area:

["..AreaStartX..":"..AreaStartZ.."] ["..AreaEndX..":"..AreaEndZ.."]" - _small_content = _small_content .. "

Progress:

"..CURRENT.."/"..TOTAL - _small_content = _small_content .. "
" - _small_content = _small_content .. "
" - _small_content = _small_content .. "" - _small_content = _small_content .. "
" - return _small_content - end - if (GENERATION_STATE == 2 or GENERATION_STATE == 4) then - Content = ProcessingContent() - return Content - end - -- SELECTING - -------------------------------------------------------------------------------------------------- - if ( Request.PostParams["FormSetWorld"] ) then - WORK_WORLD = Request.PostParams["FormWorldName"] - WW_instance = cRoot:Get():GetWorld(WORK_WORLD) - end - - if( Request.PostParams["SelectWorld"] ~= nil - and Request.PostParams["WorldName"] ~= nil ) then -- World is selected! - WORK_WORLD = Request.PostParams["WorldName"] - WW_instance = cRoot:Get():GetWorld(WORK_WORLD) - end - - 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"]) - SaveSettings(); - if (OPERATION_CODE == 0) then - GENERATION_STATE = 1 - elseif (OPERATION_CODE == 1) then - GENERATION_STATE = 3 - end - 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"]) or 0 - RadialZ = tonumber(Request.PostParams["FormRadialZ"]) or 0 - Radius = tonumber(Request.PostParams["FormRadius"]) or 10 - AreaStartX = RadialX - Radius - AreaStartZ = RadialZ - Radius - AreaEndX = RadialX + Radius - AreaEndZ = RadialZ + Radius - SaveSettings() - if (OPERATION_CODE == 0) then - GENERATION_STATE = 1 - elseif (OPERATION_CODE == 1) then - GENERATION_STATE = 3 - end - 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 - AreaEndZ = AreaStartZ - GENERATION_STATE = 3 - Content = ProcessingContent() - return Content - end - if( Request.PostParams["Player3x3"] ~= nil - and Request.PostParams["PlayerName"] ~= nil ) then -- Making BOOM! I meant, regenereate... - cRoot:Get():GetWorld(WORK_WORLD):DoWithPlayer(Request.PostParams["PlayerName"],GetAreaByPlayer) - AreaStartX = AreaStartX - 1 - AreaStartZ = AreaStartZ - 1 - AreaEndX = AreaStartX + 2 - AreaEndZ = AreaStartZ + 2 - GENERATION_STATE = 3 - Content = ProcessingContent() - return Content - end - end - - --Content = Content .. "

World for operations: " .. WORK_WORLD .. "

" - --Content = Content .. "
" - --Content = Content .. "" - --Content = Content .. "
" - - -- SELECTING WORK_WORLD - Content = Content .. "

World for operations: " .. WORK_WORLD .. "

" - Content = Content .. "" - local WorldNum = 0 - local AddWorldToTable = function(World) - WorldNum = WorldNum + 1 - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - end - cRoot:Get():ForEachWorld(AddWorldToTable) - if( WorldNum == 0 ) then - Content = Content .. "" - end - Content = Content .. "
" .. WorldNum .. "." .. World:GetName() .. "" .. Button_World(World:GetName()) .. "
No worlds! O_O
" - Content = Content .. "
" - - -- SELECTING OPERATION - if (OPERATION_CODE == 0) then - Content = Content .. "

Operation: Generation

" - elseif (OPERATION_CODE == 1) then - Content = Content .. "

Operation: Regeneration

" - end - Content = Content .. "
" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "
" - - -- SELECTING AREA - Content = Content .. "

Area:

Start X, Start Z; End X, End Z" - Content = Content .. "
" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "
" - - -- SELECTING RADIAL - Content = Content .. "

Radial:

Center X, Center Z, Radius" - Content = Content .. "
" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "
" - Content = Content .. "
" - Content = Content .. "
" - Content = Content .. "
" - - -- SELECTING POINT - Content = Content .. "

Point regeneration:

X, Z" - Content = Content .. "
" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "
" - - -- SELECTING PLAYERS - Content = Content .. "

Player-based regeneration:

" - Content = Content .. "" - local PlayerNum = 0 - local AddPlayerToTable = function( Player ) - PlayerNum = PlayerNum + 1 - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - end - if (cRoot:Get():GetWorld(WORK_WORLD) == nil) then - Content = Content .. "" - else - cRoot:Get():GetWorld(WORK_WORLD):ForEachPlayer( AddPlayerToTable ) - if( PlayerNum == 0 ) then - Content = Content .. "" - end - end - Content = Content .. "
" .. PlayerNum .. "." .. Player:GetName() .. "" .. Buttons_Player(Player:GetName()) .. "
Incorrect world selection
No connected players
" - Content = Content .. "
" - return Content -end \ No newline at end of file -- cgit v1.2.3 From ce11888851f7531d23db8aa10045b4babb9def88 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 8 Oct 2014 21:05:24 +0100 Subject: Added chunkWorx. --- MCServer/Plugins/ChunkWorx | 1 + 1 file changed, 1 insertion(+) create mode 160000 MCServer/Plugins/ChunkWorx (limited to 'MCServer/Plugins/ChunkWorx/chunkworx_web.lua') diff --git a/MCServer/Plugins/ChunkWorx b/MCServer/Plugins/ChunkWorx new file mode 160000 index 000000000..894c7e320 --- /dev/null +++ b/MCServer/Plugins/ChunkWorx @@ -0,0 +1 @@ +Subproject commit 894c7e32049e9d2a1e736f7d721aaacd1ae29e53 -- cgit v1.2.3