deterministic explosion system (#13392)
* wae explosions * okay * changes * fixes * fix * ok * ok * kills more dead code * okay * fix * ok * tiles * ok * okay * woops * ok * fix * okay * mob damage * fixes * insanity * more * more * fixes * more * woot * don't commit that * YES * fix
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
SUBSYSTEM_DEF(explosions)
|
||||
name = "Explosions"
|
||||
wait = 1
|
||||
flags = SS_TICKER
|
||||
priority = FIRE_PRIORITY_EXPLOSIONS
|
||||
var/static/list/datum/wave_explosion/wave_explosions = list()
|
||||
var/static/list/datum/wave_explosion/active_wave_explosions = list()
|
||||
var/static/list/datum/wave_explosion/currentrun = list()
|
||||
|
||||
/datum/controller/subsystem/explosions/fire(resumed)
|
||||
if(!resumed)
|
||||
currentrun = active_wave_explosions.Copy()
|
||||
var/datum/wave_explosion/E
|
||||
var/ran = 0
|
||||
while(length(currentrun) && !MC_TICK_CHECK)
|
||||
ran = 0
|
||||
for(var/i in currentrun)
|
||||
E = i
|
||||
if(E.tick())
|
||||
currentrun -= E
|
||||
ran++
|
||||
if(!ran)
|
||||
break
|
||||
Reference in New Issue
Block a user