mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 03:27:46 +01:00
code/global.dm => code/_global_vars/ (#17244)
* 1 * Full conversion * . * . --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -145,7 +145,7 @@
|
||||
if(get_dist(linked_node, src) > linked_node.node_range)
|
||||
return
|
||||
|
||||
for(var/dirn in cardinal)
|
||||
for(var/dirn in GLOB.cardinal)
|
||||
var/turf/T1 = get_turf(src)
|
||||
var/turf/T2 = get_step(src, dirn)
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
chemholder.reagents.trans_to_obj(smoke, chemholder.reagents.total_volume / dist, copy = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents
|
||||
smoke.icon = I
|
||||
smoke.plane = ABOVE_PLANE
|
||||
smoke.set_dir(pick(cardinal))
|
||||
smoke.set_dir(pick(GLOB.cardinal))
|
||||
smoke.pixel_x = -32 + rand(-8, 8)
|
||||
smoke.pixel_y = -32 + rand(-8, 8)
|
||||
walk_to(smoke, T)
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
while(pending.len)
|
||||
for(var/turf/current in pending)
|
||||
for(var/D in cardinal)
|
||||
for(var/D in GLOB.cardinal)
|
||||
var/turf/target = get_step(current, D)
|
||||
if(wallList)
|
||||
if(istype(target, /turf/simulated/wall))
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
if(--amount < 0)
|
||||
return
|
||||
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
var/turf/T = get_step(src, direction)
|
||||
if(!T)
|
||||
continue
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
src.total_sparks++
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
direction = pick(cardinal)
|
||||
direction = pick(GLOB.cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
direction = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
sleep(5)
|
||||
step(confetti,direction)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if(amount < 15) return //lets suppose welder fuel is fairly thick and sticky. For something like water, 5 or less would be more appropriate.
|
||||
var/turf/simulated/S = loc
|
||||
if(!istype(S)) return
|
||||
for(var/d in cardinal)
|
||||
for(var/d in GLOB.cardinal)
|
||||
var/turf/simulated/target = get_step(src,d)
|
||||
var/turf/simulated/origin = get_turf(src)
|
||||
if(origin.CanPass(src, target) && target.CanPass(src, origin))
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
return
|
||||
|
||||
var/placement_dir = get_dir(user, W)
|
||||
if (!(placement_dir in cardinal))
|
||||
if (!(placement_dir in GLOB.cardinal))
|
||||
to_chat(user, span_warning("You must stand directly in front of the wall you wish to place that on."))
|
||||
return
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
stuff_on_wall = 1
|
||||
|
||||
//crude, but will cover most cases. We could do stuff like check pixel_x/y but it's not really worth it.
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
var/turf/T = get_step(W, dir)
|
||||
if (locate(/obj/structure/sign/poster) in T)
|
||||
stuff_on_wall = 1
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
return FALSE
|
||||
|
||||
var/placement_dir = get_dir(user, W)
|
||||
if(!(placement_dir in cardinal))
|
||||
if(!(placement_dir in GLOB.cardinal))
|
||||
to_chat(user, span_warning("You must stand directly in front of the wall you wish to place that on."))
|
||||
return FALSE
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
stuff_on_wall = 1
|
||||
|
||||
//crude, but will cover most cases. We could do stuff like check pixel_x/y but it's not really worth it.
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
var/turf/T = get_step(W, dir)
|
||||
if (locate(/obj/structure/sign/poster) in T)
|
||||
stuff_on_wall = 1
|
||||
|
||||
@@ -79,9 +79,9 @@ steam.start() -- spawns the effect
|
||||
var/obj/effect/effect/steam/steam = new /obj/effect/effect/steam(src.location)
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
direction = pick(cardinal)
|
||||
direction = pick(GLOB.cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
direction = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
sleep(5)
|
||||
step(steam,direction)
|
||||
@@ -147,9 +147,9 @@ steam.start() -- spawns the effect
|
||||
src.total_sparks++
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
direction = pick(cardinal)
|
||||
direction = pick(GLOB.cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
direction = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
sleep(5)
|
||||
step(sparks,direction)
|
||||
@@ -382,9 +382,9 @@ steam.start() -- spawns the effect
|
||||
var/direction = src.direction
|
||||
if(!direction)
|
||||
if(src.cardinals)
|
||||
direction = pick(cardinal)
|
||||
direction = pick(GLOB.cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
direction = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(0,1,1,1,2,2,2,3), i++)
|
||||
sleep(10)
|
||||
step(smoke,direction)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
for(i=0, i<src.number, i++)
|
||||
spawn(0)
|
||||
var/obj/effect/expl_particles/expl = new /obj/effect/expl_particles(src.location)
|
||||
var/direct = pick(alldirs)
|
||||
var/direct = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(1;25,2;50,3,4;200), i++)
|
||||
sleep(1)
|
||||
step(expl,direct)
|
||||
|
||||
@@ -15,49 +15,49 @@
|
||||
|
||||
switch(name) //some of these are probably obsolete
|
||||
if("monkey")
|
||||
monkeystart += loc
|
||||
GLOB.monkeystart += loc
|
||||
delete_me = TRUE
|
||||
if("start")
|
||||
newplayer_start += loc
|
||||
GLOB.newplayer_start += loc
|
||||
delete_me = TRUE
|
||||
if("JoinLate") // Bit difference, since we need the spawn point to move.
|
||||
latejoin += src
|
||||
GLOB.latejoin += src
|
||||
simulated = TRUE
|
||||
//delete_me = TRUE // see above, moving, always use this list with get_turf
|
||||
if("JoinLateGateway")
|
||||
latejoin_gateway += loc
|
||||
latejoin += loc //VOREStation Addition
|
||||
GLOB.latejoin_gateway += loc
|
||||
GLOB.latejoin += loc //VOREStation Addition
|
||||
delete_me = TRUE
|
||||
if("JoinLateElevator")
|
||||
latejoin_elevator += loc
|
||||
GLOB.latejoin_elevator += loc
|
||||
delete_me = TRUE
|
||||
if("JoinLateCryo")
|
||||
latejoin_cryo += loc
|
||||
GLOB.latejoin_cryo += loc
|
||||
delete_me = TRUE
|
||||
if("JoinLateCyborg")
|
||||
latejoin_cyborg += loc
|
||||
GLOB.latejoin_cyborg += loc
|
||||
delete_me = TRUE
|
||||
if("prisonwarp")
|
||||
prisonwarp += loc
|
||||
GLOB.prisonwarp += loc
|
||||
delete_me = TRUE
|
||||
if("Holding Facility")
|
||||
holdingfacility += loc
|
||||
GLOB.holdingfacility += loc
|
||||
if("tdome1")
|
||||
tdome1 += loc
|
||||
GLOB.tdome1 += loc
|
||||
if("tdome2")
|
||||
tdome2 += loc
|
||||
GLOB.tdome2 += loc
|
||||
if("tdomeadmin")
|
||||
tdomeadmin += loc
|
||||
GLOB.tdomeadmin += loc
|
||||
if("tdomeobserve")
|
||||
tdomeobserve += loc
|
||||
GLOB.tdomeobserve += loc
|
||||
if("prisonsecuritywarp")
|
||||
prisonsecuritywarp += loc
|
||||
GLOB.prisonsecuritywarp += loc
|
||||
delete_me = TRUE
|
||||
if("blobstart")
|
||||
blobstart += loc
|
||||
GLOB.blobstart += loc
|
||||
delete_me = TRUE
|
||||
if("xeno_spawn")
|
||||
xeno_spawn += loc
|
||||
GLOB.xeno_spawn += loc
|
||||
delete_me = TRUE
|
||||
if("endgame_exit")
|
||||
endgame_safespawns += loc
|
||||
@@ -67,7 +67,7 @@
|
||||
delete_me = TRUE
|
||||
//VOREStation Add Start
|
||||
if("vinestart")
|
||||
vinestart += loc
|
||||
GLOB.vinestart += loc
|
||||
delete_me = TRUE
|
||||
//VORE Station Add End
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
var/effect_system_type = null // Which effect system to attach.
|
||||
|
||||
var/effect_amount = 10 // How many effect objects to create on each interval. Note that there's a hard cap on certain effect_systems.
|
||||
var/effect_cardinals_only = FALSE // If true, effects only move in cardinal directions.
|
||||
var/effect_cardinals_only = FALSE // If true, effects only move in GLOB.cardinal directions.
|
||||
var/effect_forced_dir = null // If set, effects emitted will always move in this direction.
|
||||
|
||||
/obj/effect/map_effect/interval/effect_emitter/Initialize(mapload)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
gibamounts = list(1,1,1,1,1,1,1)
|
||||
|
||||
/obj/effect/gibspawner/human/Initialize(mapload)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
. = ..()
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
gibamounts = list(1,1,1,1,1,1)
|
||||
|
||||
/obj/effect/gibspawner/robot/Initialize(mapload)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs)
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
. = ..()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/effect/temp_visual/Initialize(mapload)
|
||||
. = ..()
|
||||
if(randomdir)
|
||||
set_dir(pick(global.cardinal))
|
||||
set_dir(pick(global.GLOB.cardinal))
|
||||
|
||||
spawn(duration)
|
||||
qdel(src)
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
var/took = (world.timeofday-start)/10
|
||||
//You need to press the DebugGame verb to see these now....they were getting annoying and we've collected a fair bit of data. Just -test- changes to explosion code using this please so we can compare
|
||||
if(Debug2) to_world_log("## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds.")
|
||||
if(GLOB.Debug2) to_world_log("## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds.")
|
||||
|
||||
//Machines which report explosions.
|
||||
for(var/i, i <= GLOB.doppler_arrays.len, i++)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
explosion_turfs[epicenter] = power
|
||||
|
||||
//This steap handles the gathering of turfs which will be ex_act() -ed in the next step. It also ensures each turf gets the maximum possible amount of power dealt to it.
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
var/turf/T = get_step(epicenter, direction)
|
||||
T.explosion_spread(power - epicenter.explosion_resistance, direction, explosion_turfs)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
if (get_dist(on_wall, user)>1)
|
||||
return
|
||||
var/ndir = get_dir(user, on_wall)
|
||||
if (!(ndir in cardinal))
|
||||
if (!(ndir in GLOB.cardinal))
|
||||
return
|
||||
var/turf/loc = get_turf(user)
|
||||
var/area/A = loc.loc
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
return ROOM_ERR_TOOLARGE
|
||||
var/turf/T = pending[1] //why byond havent list::pop()?
|
||||
pending -= T
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
var/turf/NT = get_step(T,dir)
|
||||
if (!isturf(NT) || (NT in found) || (NT in pending))
|
||||
continue
|
||||
|
||||
@@ -535,7 +535,7 @@
|
||||
var/list/zLevels = using_map.station_levels.Copy()
|
||||
for(var/datum/planet/P in SSplanets.planets)
|
||||
zLevels -= P.expected_z_levels
|
||||
for(var/obj/machinery/gravity_generator/main/GG in machines)
|
||||
for(var/obj/machinery/gravity_generator/main/GG in GLOB.machines)
|
||||
if(GG.z in zLevels)
|
||||
GG.update_areas()
|
||||
return TRUE
|
||||
@@ -678,7 +678,7 @@
|
||||
return ROOM_ERR_TOOLARGE
|
||||
var/turf/T = pending[1] //why byond havent list::pop()?
|
||||
pending -= T
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
var/turf/NT = get_step(T,dir)
|
||||
if (!isturf(NT) || (NT in found) || (NT in pending))
|
||||
continue
|
||||
@@ -835,7 +835,7 @@
|
||||
return 1 //TOOLARGE
|
||||
var/turf/T = pending[1]
|
||||
pending -= T
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
var/turf/NT = get_step(T,dir)
|
||||
if (!isturf(NT) || (NT in found) || (NT in pending))
|
||||
continue
|
||||
@@ -936,7 +936,7 @@
|
||||
var/list/zLevels = using_map.station_levels.Copy()
|
||||
for(var/datum/planet/P in SSplanets.planets)
|
||||
zLevels -= P.expected_z_levels
|
||||
for(var/obj/machinery/gravity_generator/main/GG in machines)
|
||||
for(var/obj/machinery/gravity_generator/main/GG in GLOB.machines)
|
||||
if(GG.z in zLevels)
|
||||
GG.update_areas()
|
||||
return
|
||||
|
||||
@@ -305,8 +305,8 @@
|
||||
/obj/item/communicator/tgui_static_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
|
||||
var/list/data = ..()
|
||||
// Update manifest'
|
||||
if(data_core)
|
||||
data_core.get_manifest_list()
|
||||
if(GLOB.data_core)
|
||||
GLOB.data_core.get_manifest_list()
|
||||
data["manifest"] = GLOB.PDA_Manifest
|
||||
data["mapRef"] = map_name
|
||||
return data
|
||||
|
||||
@@ -26,15 +26,15 @@
|
||||
/obj/item/holowarrant/attack_self(mob/living/user as mob)
|
||||
active = null
|
||||
var/list/warrants = list()
|
||||
if(!isnull(data_core.general))
|
||||
for(var/datum/data/record/warrant/W in data_core.warrants)
|
||||
if(!isnull(GLOB.data_core.general))
|
||||
for(var/datum/data/record/warrant/W in GLOB.data_core.warrants)
|
||||
warrants += W.fields["namewarrant"]
|
||||
if(warrants.len == 0)
|
||||
to_chat(user,span_notice("There are no warrants available"))
|
||||
return
|
||||
var/temp
|
||||
temp = tgui_input_list(user, "Which warrant would you like to load?", "Warrant Selection", warrants)
|
||||
for(var/datum/data/record/warrant/W in data_core.warrants)
|
||||
for(var/datum/data/record/warrant/W in GLOB.data_core.warrants)
|
||||
if(W.fields["namewarrant"] == temp)
|
||||
active = W
|
||||
update_icon()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
A.holder = src
|
||||
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
|
||||
|
||||
bombers += "[key_name(user)] attached a [item] to a transfer valve."
|
||||
GLOB.bombers += "[key_name(user)] attached a [item] to a transfer valve."
|
||||
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve. [ADMIN_JMP(location)]")
|
||||
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
|
||||
attacher = user
|
||||
@@ -208,7 +208,7 @@
|
||||
last_touch_info = ADMIN_QUE(mob)
|
||||
|
||||
log_str += " Last touched by: [src.fingerprintslast][last_touch_info]"
|
||||
bombers += log_str
|
||||
GLOB.bombers += log_str
|
||||
message_admins(log_str, 0, 1)
|
||||
log_game(log_str)
|
||||
merge_gases()
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
data["locked_records"] = null
|
||||
|
||||
if(exploit_id)
|
||||
for(var/datum/data/record/L in data_core.locked)
|
||||
for(var/datum/data/record/L in GLOB.data_core.locked)
|
||||
if(L.fields["id"] == exploit_id)
|
||||
data["exploit"] = list() // Setting this to equal L.fields passes it's variables that are lists as reference instead of value.
|
||||
// We trade off being able to automatically add shit for more control over what gets passed to json
|
||||
@@ -155,7 +155,7 @@
|
||||
break
|
||||
else
|
||||
var/list/permanentData = list()
|
||||
for(var/datum/data/record/L in sortRecord(data_core.locked))
|
||||
for(var/datum/data/record/L in sortRecord(GLOB.data_core.locked))
|
||||
permanentData.Add(list(list(
|
||||
"name" = L.fields["name"],
|
||||
"id" = L.fields["id"]
|
||||
|
||||
@@ -849,15 +849,15 @@
|
||||
to_chat(user, span_warning("A snake popped out of [src]!"))
|
||||
if(real == 0)
|
||||
var/obj/item/toy/C = new /obj/item/toy/plushie/snakeplushie(get_turf(loc))
|
||||
C.throw_at(get_step(src, pick(alldirs)), 9, 1, src)
|
||||
C.throw_at(get_step(src, pick(GLOB.alldirs)), 9, 1, src)
|
||||
|
||||
if(real == 1)
|
||||
var/mob/living/simple_mob/C = new /mob/living/simple_mob/animal/passive/snake(get_turf(loc))
|
||||
C.throw_at(get_step(src, pick(alldirs)), 9, 1, src)
|
||||
C.throw_at(get_step(src, pick(GLOB.alldirs)), 9, 1, src)
|
||||
|
||||
if(real == 2)
|
||||
var/mob/living/simple_mob/C = new /mob/living/simple_mob/vore/aggressive/giant_snake(get_turf(loc))
|
||||
C.throw_at(get_step(src, pick(alldirs)), 9, 1, src)
|
||||
C.throw_at(get_step(src, pick(GLOB.alldirs)), 9, 1, src)
|
||||
|
||||
playsound(src, 'sound/items/confetti.ogg', 50, 0)
|
||||
icon_state = "tastybread_popped"
|
||||
@@ -882,15 +882,15 @@
|
||||
to_chat(user, span_warning("A snake popped out of [src]!"))
|
||||
if(real == 0)
|
||||
var/obj/item/toy/C = new /obj/item/toy/plushie/snakeplushie(get_turf(loc))
|
||||
C.throw_at(get_step(src, pick(alldirs)), 9, 1, src)
|
||||
C.throw_at(get_step(src, pick(GLOB.alldirs)), 9, 1, src)
|
||||
|
||||
if(real == 1)
|
||||
var/mob/living/simple_mob/C = new /mob/living/simple_mob/animal/passive/snake(get_turf(loc))
|
||||
C.throw_at(get_step(src, pick(alldirs)), 9, 1, src)
|
||||
C.throw_at(get_step(src, pick(GLOB.alldirs)), 9, 1, src)
|
||||
|
||||
if(real == 2)
|
||||
var/mob/living/simple_mob/C = new /mob/living/simple_mob/vore/aggressive/giant_snake(get_turf(loc))
|
||||
C.throw_at(get_step(src, pick(alldirs)), 9, 1, src)
|
||||
C.throw_at(get_step(src, pick(GLOB.alldirs)), 9, 1, src)
|
||||
|
||||
playsound(src, 'sound/items/confetti.ogg', 50, 0)
|
||||
icon_state = "tastybread_popped"
|
||||
|
||||
@@ -128,7 +128,7 @@ AI MODULES
|
||||
|
||||
/obj/item/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
|
||||
GLOB.lawchanges.Add("[time] <B>:</B> [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
|
||||
log_and_message_admins("used [src.name] on [target.name]([target.key])")
|
||||
|
||||
/obj/item/aiModule/proc/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
@@ -159,7 +159,7 @@ AI MODULES
|
||||
/obj/item/aiModule/safeguard/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
var/law = text("Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.", targetName, targetName)
|
||||
target.add_supplied_law(9, law)
|
||||
lawchanges.Add("The law specified [targetName]")
|
||||
GLOB.lawchanges.Add("The law specified [targetName]")
|
||||
|
||||
|
||||
/******************** OneMember ********************/
|
||||
@@ -266,7 +266,7 @@ AI MODULES
|
||||
if(!lawpos || lawpos < MIN_SUPPLIED_LAW_NUMBER)
|
||||
lawpos = MIN_SUPPLIED_LAW_NUMBER
|
||||
target.add_supplied_law(lawpos, law)
|
||||
lawchanges.Add("The law was '[newFreeFormLaw]'")
|
||||
GLOB.lawchanges.Add("The law was '[newFreeFormLaw]'")
|
||||
|
||||
/obj/item/aiModule/freeform/install(var/obj/machinery/computer/C, var/mob/living/user)
|
||||
if(!newFreeFormLaw)
|
||||
@@ -382,7 +382,7 @@ AI MODULES
|
||||
/obj/item/aiModule/freeformcore/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
var/law = "[newFreeFormLaw]"
|
||||
target.add_inherent_law(law)
|
||||
lawchanges.Add("The law is '[newFreeFormLaw]'")
|
||||
GLOB.lawchanges.Add("The law is '[newFreeFormLaw]'")
|
||||
|
||||
/obj/item/aiModule/freeformcore/install(var/obj/machinery/computer/C, var/mob/living/user)
|
||||
if(!newFreeFormLaw)
|
||||
@@ -407,7 +407,7 @@ AI MODULES
|
||||
// ..() //We don't want this module reporting to the AI who dun it. --NEO
|
||||
log_law_changes(target, sender)
|
||||
|
||||
lawchanges.Add("The law is '[newFreeFormLaw]'")
|
||||
GLOB.lawchanges.Add("The law is '[newFreeFormLaw]'")
|
||||
to_chat(target, span_danger("BZZZZT"))
|
||||
var/law = "[newFreeFormLaw]"
|
||||
target.add_ion_law(law)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/picnic_blanket_deployed/proc/unfold()
|
||||
var/dirs = alldirs
|
||||
var/dirs = GLOB.alldirs
|
||||
var/isTableTop //Controls whether to spawn things across tables, or on ground
|
||||
var/doWeHaveTable //Helper var set to true if ANY obj is a table
|
||||
var/anti_spam = FALSE //Helper var to avoid spamming people if they are mired in trash.
|
||||
|
||||
@@ -155,13 +155,13 @@ var/list/tape_roll_applications = list()
|
||||
// spread tape in all directions, provided there is a wall/window
|
||||
var/turf/T
|
||||
var/possible_dirs = 0
|
||||
for(var/dir in cardinal)
|
||||
for(var/dir in GLOB.cardinal)
|
||||
T = get_step(start, dir)
|
||||
if(T && T.density)
|
||||
possible_dirs |= dir
|
||||
else
|
||||
for(var/obj/structure/window/W in T)
|
||||
if(W.is_fulltile() || W.dir == reverse_dir[dir])
|
||||
if(W.is_fulltile() || W.dir == GLOB.reverse_dir[dir])
|
||||
possible_dirs |= dir
|
||||
for(var/obj/structure/window/window in start)
|
||||
if(istype(window) && !window.is_fulltile())
|
||||
@@ -215,12 +215,12 @@ var/list/tape_roll_applications = list()
|
||||
else
|
||||
continue
|
||||
else if(cur == end)
|
||||
if(window.dir == reverse_dir[orientation])
|
||||
if(window.dir == GLOB.reverse_dir[orientation])
|
||||
can_place = 0
|
||||
break
|
||||
else
|
||||
continue
|
||||
else if (window.dir == reverse_dir[orientation] || window.dir == orientation)
|
||||
else if (window.dir == GLOB.reverse_dir[orientation] || window.dir == orientation)
|
||||
can_place = 0
|
||||
break
|
||||
else
|
||||
@@ -244,21 +244,21 @@ var/list/tape_roll_applications = list()
|
||||
tapetest = 0
|
||||
tape_dir = dir
|
||||
if(cur == start)
|
||||
var/turf/T = get_step(start, reverse_dir[orientation])
|
||||
var/turf/T = get_step(start, GLOB.reverse_dir[orientation])
|
||||
if(T && !T.density)
|
||||
tape_dir = orientation
|
||||
for(var/obj/structure/window/W in T)
|
||||
if(W.is_fulltile() || W.dir == orientation)
|
||||
tape_dir = dir
|
||||
for(var/obj/structure/window/window in cur)
|
||||
if(istype(window) && !window.is_fulltile() && window.dir == reverse_dir[orientation])
|
||||
if(istype(window) && !window.is_fulltile() && window.dir == GLOB.reverse_dir[orientation])
|
||||
tape_dir = dir
|
||||
else if(cur == end)
|
||||
var/turf/T = get_step(end, orientation)
|
||||
if(T && !T.density)
|
||||
tape_dir = reverse_dir[orientation]
|
||||
tape_dir = GLOB.reverse_dir[orientation]
|
||||
for(var/obj/structure/window/W in T)
|
||||
if(W.is_fulltile() || W.dir == reverse_dir[orientation])
|
||||
if(W.is_fulltile() || W.dir == GLOB.reverse_dir[orientation])
|
||||
tape_dir = dir
|
||||
for(var/obj/structure/window/window in cur)
|
||||
if(istype(window) && !window.is_fulltile() && window.dir == orientation)
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
H.forcesay(hit_appends)
|
||||
H.forcesay(GLOB.hit_appends)
|
||||
powercheck()
|
||||
|
||||
/obj/item/melee/baton/emp_act(severity)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
/obj/item/syndie/c4explosive/proc/do_detonate()
|
||||
SHOULD_NOT_OVERRIDE(TRUE)
|
||||
PRIVATE_PROC(TRUE)
|
||||
for(var/dirn in cardinal) //This is to guarantee that C4 at least breaks down all immediately adjacent walls and doors.
|
||||
for(var/dirn in GLOB.cardinal) //This is to guarantee that C4 at least breaks down all immediately adjacent walls and doors.
|
||||
var/turf/simulated/wall/T = get_step(src,dirn)
|
||||
if(locate(/obj/machinery/door/airlock) in T)
|
||||
var/obj/machinery/door/airlock/D = locate() in T
|
||||
|
||||
@@ -176,7 +176,7 @@ var/list/global/tank_gauge_cache = list()
|
||||
to_chat(user, span_notice("You begin attaching the assembly to \the [src]."))
|
||||
if(do_after(user, 50, src))
|
||||
to_chat(user, span_notice("You finish attaching the assembly to \the [src]."))
|
||||
bombers += "[key_name(user)] attached an assembly to a wired [src]. Temp: [src.air_contents.temperature-T0C]"
|
||||
GLOB.bombers += "[key_name(user)] attached an assembly to a wired [src]. Temp: [src.air_contents.temperature-T0C]"
|
||||
message_admins("[key_name_admin(user)] attached an assembly to a wired [src]. Temp: [src.air_contents.temperature-T0C]")
|
||||
assemble_bomb(W,user)
|
||||
else
|
||||
@@ -195,7 +195,7 @@ var/list/global/tank_gauge_cache = list()
|
||||
src.valve_welded = 1
|
||||
src.leaking = 0
|
||||
else
|
||||
bombers += "[key_name(user)] attempted to weld a [src]. [src.air_contents.temperature-T0C]"
|
||||
GLOB.bombers += "[key_name(user)] attempted to weld a [src]. [src.air_contents.temperature-T0C]"
|
||||
message_admins("[key_name_admin(user)] attempted to weld a [src]. [src.air_contents.temperature-T0C]")
|
||||
if(WT.welding)
|
||||
to_chat(user, span_danger("You accidentally rake \the [W] across \the [src]!"))
|
||||
|
||||
@@ -171,8 +171,8 @@
|
||||
var/dir_offset = 0
|
||||
if(target_turf != source_turf)
|
||||
dir_offset = get_dir(source_turf, target_turf)
|
||||
if(!(dir_offset in cardinal))
|
||||
to_chat(user, "You cannot reach that from here.") // can only place stuck papers in cardinal directions, to
|
||||
if(!(dir_offset in GLOB.cardinal))
|
||||
to_chat(user, "You cannot reach that from here.") // can only place stuck papers in GLOB.cardinal directions, to
|
||||
return // reduce papers around corners issue.
|
||||
|
||||
user.drop_from_inventory(src)
|
||||
|
||||
@@ -138,13 +138,13 @@ Frequency:
|
||||
to_chat(user, span_notice("\The [src] is malfunctioning."))
|
||||
return
|
||||
var/list/L = list( )
|
||||
for(var/obj/machinery/teleport/hub/R in machines)
|
||||
for(var/obj/machinery/teleport/hub/R in GLOB.machines)
|
||||
var/obj/machinery/computer/teleporter/com
|
||||
var/obj/machinery/teleport/station/station
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
station = locate(/obj/machinery/teleport/station, get_step(R, direction))
|
||||
if(station)
|
||||
for(direction in cardinal)
|
||||
for(direction in GLOB.cardinal)
|
||||
com = locate(/obj/machinery/computer/teleporter, get_step(station, direction))
|
||||
if(com)
|
||||
break
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
other_connections = list("0", "0", "0", "0")
|
||||
return FALSE
|
||||
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
var/turf/T = get_step(src, direction)
|
||||
var/success = 0
|
||||
for(var/b_type in blend_objects)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
O.update() //Will cause anything on the open turf to fall if it should
|
||||
|
||||
/obj/structure/catwalk/proc/redraw_nearby_catwalks()
|
||||
for(var/direction in alldirs)
|
||||
for(var/direction in GLOB.alldirs)
|
||||
var/obj/structure/catwalk/L = locate() in get_step(src, direction)
|
||||
if(L)
|
||||
L.update_connections()
|
||||
|
||||
@@ -178,14 +178,14 @@ two tiles on initialization, and which way a cliff is facing may change during m
|
||||
return FALSE
|
||||
|
||||
var/turf/T = get_turf(L)
|
||||
if(T && get_dir(T, loc) & reverse_dir[dir]) // dir points 'up' the cliff, e.g. cliff pointing NORTH will cause someone to fall if moving SOUTH into it.
|
||||
if(T && get_dir(T, loc) & GLOB.reverse_dir[dir]) // dir points 'up' the cliff, e.g. cliff pointing NORTH will cause someone to fall if moving SOUTH into it.
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/cliff/proc/fall_off_cliff(mob/living/L)
|
||||
if(!istype(L))
|
||||
return FALSE
|
||||
var/turf/T = get_step(src, reverse_dir[dir])
|
||||
var/turf/T = get_step(src, GLOB.reverse_dir[dir])
|
||||
var/displaced = FALSE
|
||||
|
||||
if(dir in list(EAST, WEST)) // Apply an offset if flying sideways, to help maintain the illusion of depth.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/obj/structure/fitness/boxing_ropes/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/obj/structure/gravemarker/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
if(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
else
|
||||
if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for cardinal directions.
|
||||
if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for GLOB.cardinal directions.
|
||||
if( x == user.x )
|
||||
if( y > user.y )
|
||||
dir_to_set = 2
|
||||
@@ -130,7 +130,7 @@
|
||||
dir_to_set = 4
|
||||
else
|
||||
to_chat(user, span_notice("You can't reach."))
|
||||
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
|
||||
return //Only works for GLOB.cardinal direcitons, diagonals aren't supposed to work like this.
|
||||
for(var/obj/structure/window/WINDOW in loc)
|
||||
if(WINDOW.dir == dir_to_set)
|
||||
to_chat(user, span_notice("There is already a window facing this way there."))
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
icon = 'icons/obj/smoothlattice.dmi'
|
||||
icon_state = "latticeblank"
|
||||
updateOverlays()
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
var/obj/structure/lattice/L
|
||||
if(locate(/obj/structure/lattice, get_step(src, dir)))
|
||||
L = locate(/obj/structure/lattice, get_step(src, dir))
|
||||
L.updateOverlays()
|
||||
|
||||
/obj/structure/lattice/Destroy()
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
var/obj/structure/lattice/L
|
||||
if(locate(/obj/structure/lattice, get_step(src, dir)))
|
||||
L = locate(/obj/structure/lattice, get_step(src, dir))
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
var/dir_sum = 0
|
||||
|
||||
for (var/direction in cardinal)
|
||||
for (var/direction in GLOB.cardinal)
|
||||
if(locate(/obj/structure/lattice, get_step(src, direction)))
|
||||
dir_sum += direction
|
||||
else
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/obj/structure/ledge/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(solidledge && get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
if(solidledge && get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
else
|
||||
src.icon_state = "morgue3"
|
||||
if(broadcast)
|
||||
global_announcer.autosay("[src] was able to establish a mental interface with occupant.", "[src]", "Medical")
|
||||
GLOB.global_announcer.autosay("[src] was able to establish a mental interface with occupant.", "[src]", "Medical")
|
||||
else
|
||||
src.icon_state = "morgue1"
|
||||
return
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
/obj/structure/railing/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -1543,7 +1543,7 @@
|
||||
return
|
||||
|
||||
var/placement_dir = get_dir(user, A)
|
||||
if (!(placement_dir in cardinal))
|
||||
if (!(placement_dir in GLOB.cardinal))
|
||||
to_chat(user, span_warning("You must stand directly in front of the location you wish to place that on."))
|
||||
return
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
var/exit_delay = 2
|
||||
var/enter_delay = 1
|
||||
|
||||
// alldirs in global.dm is the same list of directions, but since
|
||||
// GLOB.alldirs in global.dm is the same list of directions, but since
|
||||
// the specific order matters to get a usable icon_state, it is
|
||||
// copied here so that, in the unlikely case that alldirs is changed,
|
||||
// copied here so that, in the unlikely case that GLOB.alldirs is changed,
|
||||
// this continues to work.
|
||||
var/global/list/tube_dir_list = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
|
||||
|
||||
|
||||
@@ -102,10 +102,10 @@
|
||||
return
|
||||
|
||||
var/timedifference = world.time - user.client.time_died_as_mouse
|
||||
if(user.client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600)
|
||||
if(user.client.time_died_as_mouse && timedifference <= CONFIG_GET(number/mouse_respawn_time) MINUTES)
|
||||
var/timedifference_text
|
||||
timedifference_text = time2text(mouse_respawn_time * 600 - timedifference,"mm:ss")
|
||||
to_chat(user, span_warning("You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death. You have [timedifference_text] left."))
|
||||
timedifference_text = time2text(CONFIG_GET(number/mouse_respawn_time) MINUTES - timedifference,"mm:ss")
|
||||
to_chat(user, span_warning("You may only spawn again as a mouse more than [CONFIG_GET(number/mouse_respawn_time)] minutes after your death. You have [timedifference_text] left."))
|
||||
return
|
||||
|
||||
var/response = tgui_alert(user, "Are you -sure- you want to become a mouse?","Are you sure you want to squeek?",list("Squeek!","Nope!"))
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
|
||||
/obj/item/bikehorn/rubberducky/grey/attack_self(mob/user as mob)
|
||||
if(spam_flag == 0)
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
if(L.z != user.z || get_dist(user,L) > 10)
|
||||
continue
|
||||
else
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
return TRUE
|
||||
if(is_fulltile())
|
||||
return FALSE //full tile window, you can't move into it!
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
else
|
||||
return TRUE
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
var/obj/structure/grille/G = new /obj/structure/grille(src.loc)
|
||||
handle_grille_spawn(G)
|
||||
var/list/neighbours = list()
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
var/turf/T = get_step(src, dir)
|
||||
var/obj/effect/wingrille_spawn/other = locate(/obj/effect/wingrille_spawn) in T
|
||||
if(!other)
|
||||
|
||||
Reference in New Issue
Block a user