mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
[MIRROR] Fixes CTF completely breaking on restart (#7377)
* Fixes CTF completely breaking on restart (#60662) Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com> * Fixes CTF completely breaking on restart Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
This commit is contained in:
co-authored by
Watermelon914
Watermelon914
parent
12a36116a9
commit
e298591525
@@ -231,9 +231,17 @@
|
||||
var/static/list/people_who_want_to_play = list()
|
||||
var/game_area = /area/ctf
|
||||
|
||||
/// This variable is needed because of ctf shitcode + we need to make sure we're deleting the current ctf landmark that spawned us in and not a new one.
|
||||
var/obj/effect/landmark/ctf/ctf_landmark
|
||||
|
||||
/obj/machinery/capture_the_flag/Initialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/point_of_interest)
|
||||
ctf_landmark = GLOB.ctf_spawner
|
||||
|
||||
/obj/machinery/capture_the_flag/Destroy()
|
||||
ctf_landmark = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/capture_the_flag/process(delta_time)
|
||||
for(var/i in spawned_mobs)
|
||||
@@ -453,7 +461,11 @@
|
||||
notify_ghosts("[name] has been activated!", source = src, action=NOTIFY_ORBIT, header = "CTF has been activated")
|
||||
|
||||
/obj/machinery/capture_the_flag/proc/reset_the_arena()
|
||||
new /obj/effect/landmark/ctf(get_turf(GLOB.ctf_spawner))
|
||||
if(!ctf_landmark)
|
||||
return
|
||||
|
||||
if(ctf_landmark == GLOB.ctf_spawner)
|
||||
new /obj/effect/landmark/ctf(get_turf(GLOB.ctf_spawner))
|
||||
|
||||
|
||||
/obj/machinery/capture_the_flag/proc/stop_ctf()
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
. = ..()
|
||||
toggle_id_ctf(null, game_id, automated = TRUE)//only one machine runs the victory proc, start_ctf proc would break the other machine
|
||||
|
||||
// We don't clean up for the medisim.
|
||||
/obj/machinery/capture_the_flag/medisim/reset_the_arena()
|
||||
return
|
||||
|
||||
/obj/machinery/capture_the_flag/medisim/spawn_team_member(client/new_team_member)
|
||||
. = ..()
|
||||
if(!.)
|
||||
|
||||
Reference in New Issue
Block a user