mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-03-03 14:53:01 +02:00
Integrate apocalypse as an admin command
This commit is contained in:
parent
ae03b94fc8
commit
8b10cd44b5
@ -3,6 +3,7 @@ local Token = require 'utils.token'
|
||||
local Global = require 'utils.global'
|
||||
local Rank = require 'features.rank_system'
|
||||
local Report = require 'features.report'
|
||||
local Apocalypse = require 'features.apocalypse'
|
||||
local Utils = require 'utils.core'
|
||||
local Game = require 'utils.game'
|
||||
local Event = require 'utils.event'
|
||||
@ -485,3 +486,15 @@ Command.add(
|
||||
},
|
||||
revive_ghosts
|
||||
)
|
||||
|
||||
-- Commands with no functions, only calls to other modules
|
||||
|
||||
Command.add(
|
||||
'apocalypse',
|
||||
{
|
||||
description = 'Calls for the endtimes.',
|
||||
admin_only = true,
|
||||
allowed_by_server = true
|
||||
},
|
||||
Apocalypse.begin_apocalypse
|
||||
)
|
||||
|
@ -1,4 +1,3 @@
|
||||
local Command = require 'utils.command'
|
||||
local table = require 'utils.table'
|
||||
local Task = require 'utils.task'
|
||||
local Token = require 'utils.token'
|
||||
@ -8,6 +7,8 @@ local HailHydra = require 'map_gen.shared.hail_hydra'
|
||||
|
||||
local clear_table = table.clear_table
|
||||
|
||||
local Public = {}
|
||||
|
||||
local hydra_config = {
|
||||
['behemoth-spitter'] = {['behemoth-spitter'] = 0.01},
|
||||
['behemoth-biter'] = {['behemoth-biter'] = 0.01}
|
||||
@ -42,7 +43,7 @@ local biter_spawn_token =
|
||||
end
|
||||
)
|
||||
|
||||
local function begin_apocalypse(_, player)
|
||||
function Public.begin_apocalypse(_, player)
|
||||
if global.apocalypse_now then
|
||||
return
|
||||
end
|
||||
@ -83,12 +84,4 @@ local function begin_apocalypse(_, player)
|
||||
)
|
||||
end
|
||||
|
||||
Command.add(
|
||||
'apocalypse',
|
||||
{
|
||||
description = 'Calls for the endtimes.',
|
||||
admin_only = true,
|
||||
allowed_by_server = true
|
||||
},
|
||||
begin_apocalypse
|
||||
)
|
||||
return Public
|
||||
|
Loading…
x
Reference in New Issue
Block a user