Created
December 18, 2016 12:31
-
-
Save BlueNexus/80f61c31fd3cb593b603904c3ddf2db4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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