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
import string | |
charset = list(string.ascii_lowercase) | |
def rem_numbers(source): | |
new_string = [] | |
to_remove = list(string.digits) | |
source = list(source.lower()) | |
for char in source: | |
if char not in to_remove: |
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
import string | |
index_codes = { | |
"C":"Cork", "CE":"Clare", | |
"CN":"Cavan", "CW":"Carlow", | |
"D":"Dublin", "DL":"Donegal", | |
"G":"Galway", "KE":"Kildare", | |
"KK":"Kilkenny", "KY":"Kerry", | |
"L":"Limerick", "LD":"Longford", | |
"LH":"Louth", "LM":"Leitrim", |
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
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id | |
/proc/initialize_chemical_reagents() | |
var/paths = typesof(/datum/reagent) - /datum/reagent | |
chemical_reagents_list = list() | |
for(var/path in paths) | |
var/datum/reagent/D = new path() | |
if(!D.name) | |
continue | |
chemical_reagents_list[D.id] = D |
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
#define DECAY_RATE 0.1 | |
var/list/to_process = list( | |
datum/rad_handler | |
var/list/sources = list() | |
var/list/irradiated = list() | |
datum/rad_handler/process() |
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
/proc/trange(rad = 0, turf/centre = null) //alternative to range (ONLY processes turfs and thus less intensive) | |
if(!centre) | |
return | |
var/turf/x1y1 = locate(((centre.x-rad)<1 ? 1 : centre.x-rad),((centre.y-rad)<1 ? 1 : centre.y-rad),centre.z) | |
var/turf/x2y2 = locate(((centre.x+rad)>world.maxx ? world.maxx : centre.x+rad),((centre.y+rad)>world.maxy ? world.maxy : centre.y+rad),centre.z) | |
return block(x1y1,x2y2) |
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
#define DECAY_RATE 0.1 | |
#define RADDBG | |
var/repository/radiation/radiation_repository = new() | |
var/list/to_process = list() | |
/repository/radiation | |
var/list/sources = list() | |
var/list/irradiated = list() |
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
#define DECAY_RATE 0.1 | |
#define RADDBG | |
var/repository/radiation/radiation_repository = new() | |
var/list/to_process = list() | |
/repository/radiation | |
var/list/sources = list() | |
var/list/irradiated = list() |
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
#define DECAY_RATE 0.1 | |
#define RADDBG | |
var/repository/radiation/radiation_repository = new() | |
var/list/to_process = list() | |
/repository/radiation | |
var/list/sources = list() | |
var/list/irradiated = list() |
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 |
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
var/radiation_level = rand(15, 35) | |
for(var/area/A in all_areas) | |
if(!(A.z in using_map.station_levels)) | |
continue | |
if(A.flags & RAD_SHIELDED) | |
continue | |
for(var/turf/T in A) | |
radiation_repository.irradiated_turfs[T] = radiation_level |
OlderNewer