mirror of
https://github.com/a-bad-dev/simple-shooter-game.git
synced 2026-06-08 20:12:11 +00:00
Revert the broken and unwanted feature 'quick and hacky way to automatically start matches'
This commit is contained in:
parent
21eeb6a92e
commit
1755505463
3 changed files with 32 additions and 53 deletions
|
|
@ -1,7 +1,6 @@
|
|||
-- Main mod for SSG
|
||||
|
||||
-- Variables
|
||||
automatic_start = {true, false}
|
||||
alive_players = {}
|
||||
map_data = {}
|
||||
spawn_pos = vector.new(-100, -9.6, -100)
|
||||
|
|
@ -33,24 +32,6 @@ core.register_on_mods_loaded(function()
|
|||
end
|
||||
end)
|
||||
|
||||
core.register_globalstep(function() -- automatically start a match every 30s
|
||||
if (not automatic_start[1]) or automatic_start[2] then
|
||||
return
|
||||
end
|
||||
|
||||
local players = 0
|
||||
for _, _ in ipairs(core.get_connected_players()) do
|
||||
players = players + 1
|
||||
end
|
||||
if players > 1 and match_state == "not_started" then
|
||||
core.chat_send_all(core.colorize("lime", "-!- Automatically starting new match in 30 seconds"))
|
||||
automatic_start[2] = true
|
||||
core.after(30, function()
|
||||
start_match("forest")
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
core.register_on_joinplayer(function(player)
|
||||
core.place_schematic({x=-105, y=-10, z=-108}, core.get_modpath("main") .. "/schems/spawn.mts", 0, nil, true)
|
||||
player:set_pos(spawn_pos)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue