9e1ef0ffe2
* Add the system for managed global variables * Travis ban old globals * So you CAN inline proccall, that's neat * Fix that * master.dm * Remove the hack procs * Move InitGlobals to the proper spot * configuration.dm * Fix the missing pre-slash * clockcult.dm * This is probably for the best * Doy * Fix shit * Rest of the DEFINES tree * Fix * Use global. for access * Update find_references_in_globals Always hated that proc Whoever made it must've bee a r e a l idiot... * __HELPERS tree * Move global initialization to master. Fix the declaration * database.dm * Dat newline * I said DECLARATIVE order! * Here's something you can chew on @Iamgoofball * game_modes.dm * Fix this * genetics.dm * flavor_misc.dm * More stuff * Do it mso's way. Keep the controllers as global * Make master actually see it * Fix * Finish _globalvars/lists * Finish the rest of the _globalvars tree * This is weird * Migrate the controllers * SLOTH -> GLOB * Lighting globals * round_start_time -> ticker * PAI card list -> pai SS * record_id_num -> static * Diseases list -> SSdisease * More disease globals to the SS * More disease stuff * Emote list * Better and better * Bluh * So much stuff * Ahh * Wires * dview * station_areas * Teleportlocs * blood_splatter_icons * Stuff and such * More stuff * RAD IO * More stuff and such * Blob shit * Changeling stuff * Add "Balance" to changelogs * Balance for changelog compiler + Auto Tagging * Update the PR template * hivemind_bank * Bip * sacrificed * Good shit * Better define * More cult shit * Devil shit * Gang shit * > borers Fix shit * Rename the define * Nuke * Objectives * Sandbox * Multiverse sword * Announce systems * Stuff and such * TC con * Airlock * doppllllerrrrrr * holopads * Shut up byond you inconsistent fuck * Sneaky fuck * Burp * Bip * Fixnshit * Port without regard * askdlfjs; * asdfjasoidojfi * Protected globals and more * SO MANY * ajsimkvahsaoisd * akfdsiaopwimfeoiwafaw * gsdfigjosidjfgiosdg * AHHHHHHHHHHHHHHHHHHHHHHH!!!!! * facerolll * ASDFASDFASDF * Removes the unused parts of dmm_suite * WIP * Fix quote * asdfjauwfnkjs * afwlunhskjfda * asfjlaiwuefhaf * SO CLOSE * wwwweeeeeewwwww * agdgmoewranwg * HOLY MOTHER OF FUCK AND THATS JUST HALF THE JOB?!? * Fix syntax errors * 100 errors * Another 100 * So many... * Ugh * More shit * kilme * Stuuuuuufffff * ajrgmrlshio;djfa;sdkl * jkbhkhjbmjvjmh * soi soi soi * butt * TODAY WE LEARNED THAT GLOBAL AND STATIC ARE THE EXACT SAME FUCKING THING * lllllllllllllllllllllllllllllllllllllllllll * afsdijfiawhnflnjhnwsdfs * yugykihlugk,kj * time to go * STUFFF!!! * AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!! * ngoaijdjlfkamsdlkf * Break time * aufjsdklfalsjfi * CONTROL KAY AND PRAY * IT COMPILEELEELELAKLJFKLDAFJLKFDJLADKJHFLJKAJGAHIEJALDFJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * Goteem * Fix testing mode * This does not belong in this PR * Convert it to a controller * Eh, fuck this option * Revert controllerization Ill do it some other time * Fix * Working controllerization * FOR THE LOVE OF CHRIST PROTECT THE LOGS * Protect admins and deadmins * Use the inbuilt proc
124 lines
3.2 KiB
Plaintext
124 lines
3.2 KiB
Plaintext
/atom/var/CanAtmosPass = ATMOS_PASS_YES
|
|
/atom/proc/CanAtmosPass(turf/T)
|
|
switch (CanAtmosPass)
|
|
if (ATMOS_PASS_PROC)
|
|
return ATMOS_PASS_YES
|
|
if (ATMOS_PASS_DENSITY)
|
|
return !density
|
|
else
|
|
return CanAtmosPass
|
|
|
|
/turf/closed/CanAtmosPass = ATMOS_PASS_NO
|
|
|
|
/turf/open/CanAtmosPass = ATMOS_PASS_PROC
|
|
/turf/open/CanAtmosPass(turf/T)
|
|
var/R
|
|
if(blocks_air || T.blocks_air)
|
|
R = 1
|
|
|
|
for(var/obj/O in contents+T.contents)
|
|
var/turf/other = (O.loc == src ? T : src)
|
|
if(!CANATMOSPASS(O, other))
|
|
R = 1
|
|
if(O.BlockSuperconductivity()) //the direction and open/closed are already checked on CanAtmosPass() so there are no arguments
|
|
var/D = get_dir(src, T)
|
|
atmos_supeconductivity |= D
|
|
D = get_dir(T, src)
|
|
T.atmos_supeconductivity |= D
|
|
return 0 //no need to keep going, we got all we asked
|
|
|
|
atmos_supeconductivity &= ~get_dir(src, T)
|
|
T.atmos_supeconductivity &= ~get_dir(T, src)
|
|
|
|
return !R
|
|
|
|
|
|
|
|
/atom/movable/proc/BlockSuperconductivity() // objects that block air and don't let superconductivity act. Only firelocks atm.
|
|
return 0
|
|
|
|
/turf/proc/CalculateAdjacentTurfs()
|
|
var/list/atmos_adjacent_turfs = src.atmos_adjacent_turfs
|
|
for(var/direction in GLOB.cardinal)
|
|
var/turf/T = get_step(src, direction)
|
|
if(!T)
|
|
continue
|
|
if(CANATMOSPASS(T, src))
|
|
LAZYINITLIST(atmos_adjacent_turfs)
|
|
LAZYINITLIST(T.atmos_adjacent_turfs)
|
|
atmos_adjacent_turfs[T] = TRUE
|
|
T.atmos_adjacent_turfs[src] = TRUE
|
|
else
|
|
if (atmos_adjacent_turfs)
|
|
atmos_adjacent_turfs -= T
|
|
if (T.atmos_adjacent_turfs)
|
|
T.atmos_adjacent_turfs -= src
|
|
UNSETEMPTY(T.atmos_adjacent_turfs)
|
|
UNSETEMPTY(atmos_adjacent_turfs)
|
|
src.atmos_adjacent_turfs = atmos_adjacent_turfs
|
|
|
|
//returns a list of adjacent turfs that can share air with this one.
|
|
//alldir includes adjacent diagonal tiles that can share
|
|
// air with both of the related adjacent cardinal tiles
|
|
/turf/proc/GetAtmosAdjacentTurfs(alldir = 0)
|
|
var/adjacent_turfs
|
|
if (atmos_adjacent_turfs)
|
|
adjacent_turfs = atmos_adjacent_turfs.Copy()
|
|
else
|
|
adjacent_turfs = list()
|
|
|
|
if (!alldir)
|
|
return adjacent_turfs
|
|
|
|
var/turf/curloc = src
|
|
|
|
for (var/direction in GLOB.diagonals)
|
|
var/matchingDirections = 0
|
|
var/turf/S = get_step(curloc, direction)
|
|
|
|
for (var/checkDirection in GLOB.cardinal)
|
|
var/turf/checkTurf = get_step(S, checkDirection)
|
|
if(!S.atmos_adjacent_turfs || !S.atmos_adjacent_turfs[checkTurf])
|
|
continue
|
|
|
|
if (adjacent_turfs[checkTurf])
|
|
matchingDirections++
|
|
|
|
if (matchingDirections >= 2)
|
|
adjacent_turfs += S
|
|
break
|
|
|
|
return adjacent_turfs
|
|
|
|
/atom/proc/air_update_turf(command = 0)
|
|
if(!isturf(loc) && command)
|
|
return
|
|
var/turf/T = get_turf(loc)
|
|
T.air_update_turf(command)
|
|
|
|
/turf/air_update_turf(command = 0)
|
|
if(command)
|
|
CalculateAdjacentTurfs()
|
|
SSair.add_to_active(src,command)
|
|
|
|
/atom/movable/proc/move_update_air(turf/T)
|
|
if(isturf(T))
|
|
T.air_update_turf(1)
|
|
air_update_turf(1)
|
|
|
|
/atom/proc/atmos_spawn_air(text) //because a lot of people loves to copy paste awful code lets just make a easy proc to spawn your plasma fires
|
|
var/turf/open/T = get_turf(src)
|
|
if(!istype(T))
|
|
return
|
|
T.atmos_spawn_air(text)
|
|
|
|
/turf/open/atmos_spawn_air(text)
|
|
if(!text || !air)
|
|
return
|
|
|
|
var/datum/gas_mixture/G = new
|
|
G.parse_gas_string(text)
|
|
|
|
air.merge(G)
|
|
SSair.add_to_active(src, 0)
|