mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-30 15:38:02 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user