Skip to content

Instantly share code, notes, and snippets.

@BlueNexus
Created December 18, 2016 12:31
Show Gist options
  • Save BlueNexus/80f61c31fd3cb593b603904c3ddf2db4 to your computer and use it in GitHub Desktop.
Save BlueNexus/80f61c31fd3cb593b603904c3ddf2db4 to your computer and use it in GitHub Desktop.
for(var/turf/spot in to_process)
var/turf/origin = get_turf(epicentre)
var/turf/dest = spot
var/working = power
while(origin != dest)
origin = get_step_towards(origin, dest)
if(!to_process[origin])
to_process[origin] = working
working -= origin.rad_resistance
else
to_process[origin] = max(to_process[origin], working)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment