Skip to content

Commit

Permalink
[MIRROR] Fixes admin spawned bitrunning events [No GBP] [MDB IGNORE] (#…
Browse files Browse the repository at this point in the history
…710)

* Fixes admin spawned bitrunning events [No GBP] (#79820)
---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: Jeremiah <[email protected]>
  • Loading branch information
3 people authored Nov 19, 2023
1 parent 03d2d75 commit 9abfef9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions code/modules/bitrunning/event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,17 @@

/datum/round_event/ghost_role/bitrunning_glitch/spawn_role()
var/datum/round_event_control/bitrunning_glitch/cyber_control = control
if(!length(cyber_control.active_servers))
return WAITING_FOR_SOMETHING

var/obj/machinery/quantum_server/unlucky_server = pick(cyber_control.active_servers)
cyber_control.active_servers.Cut()
var/datum/weakref/server_ref = pick(cyber_control.active_servers)
var/obj/machinery/quantum_server/unlucky_server = server_ref?.resolve()
if(isnull(unlucky_server))
return WAITING_FOR_SOMETHING

cyber_control.active_servers.Cut()
if(!unlucky_server.validate_mutation_candidates())
return MAP_ERROR
return WAITING_FOR_SOMETHING

spawned_mobs = unlucky_server.setup_glitch(forced_role)

Expand Down

0 comments on commit 9abfef9

Please sign in to comment.