Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
Merge branch 'PR-199-Fix-GlobDefine' of https://github.com/aloeneverd…
Browse files Browse the repository at this point in the history
…ie/wyccerrabay220 into PR-199-Fix-GlobDefine
  • Loading branch information
Furrior committed Apr 7, 2024
2 parents c06ff5d + 6fee0cb commit 1108447
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion code/modules/detectivework/forensics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//the print must be there for it to be complete. (Prints are 32 digits)
GLOBAL_VAR_CONST(FINGERPRINT_COMPLETE, 6)
/proc/is_complete_print(print)
return stringpercent(print) <= FINGERPRINT_COMPLETE
return stringpercent(print) <= GLOB.FINGERPRINT_COMPLETE

/// LAZYLIST of mobs that have touched/used the atom. Used for staff investigation. Each entry includes a timestamp and name of the mob that generated the fingerprint. Do not modify directly. See `add_hiddenprint()`.
/atom/var/list/fingerprintshidden
Expand Down
4 changes: 2 additions & 2 deletions code/modules/error_handler/error_reporting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#ifdef DEBUG

/hook/roundend/proc/send_runtimes_to_ircbot()
if(!revdata.revision) return // we can't do much useful if we don't know what we are
if(!GLOB.revdata.revision) return // we can't do much useful if we don't know what we are
var/list/errors = list()
for(var/erruid in GLOB.error_cache.error_sources)
var/datum/error_viewer/error_source/e = GLOB.error_cache.error_sources[erruid]
Expand All @@ -16,7 +16,7 @@

errors[LIST_PRE_INC(errors)] = list2params(data)

runtimes2irc(list2params(errors), revdata.revision)
runtimes2irc(list2params(errors), GLOB.revdata.revision)

return 1

Expand Down
8 changes: 4 additions & 4 deletions code/modules/events/camera_damage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
if(prob(2*severity))
cam.kill_health()
else
if(!cam.wires.IsIndexCut(CAMERA_WIRE_POWER))
cam.wires.CutWireIndex(CAMERA_WIRE_POWER)
if(!cam.wires.IsIndexCut(CAMERA_WIRE_ALARM) && prob(5*severity))
cam.wires.CutWireIndex(CAMERA_WIRE_ALARM)
if(!cam.wires.IsIndexCut(GLOB.CAMERA_WIRE_POWER))
cam.wires.CutWireIndex(GLOB.CAMERA_WIRE_POWER)
if(!cam.wires.IsIndexCut(GLOB.CAMERA_WIRE_ALARM) && prob(5*severity))
cam.wires.CutWireIndex(GLOB.CAMERA_WIRE_ALARM)

/datum/event/camera_damage/proc/acquire_random_camera(remaining_attempts = 5)
if(!length(GLOB.cameranet.cameras))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/holodeck/HolodeckControl.dm
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
for(var/obj/holo_obj in holographic_objs)
holo_obj.alpha *= 0.8 //give holodeck objs a slight transparency
holo_obj.holographic = TRUE
holo_obj.SetupChameleonExtension(CHAMELEON_FLEXIBLE_OPTIONS_PARENT_TYPE, TRUE, FALSE)
holo_obj.SetupChameleonExtension(GLOB.CHAMELEON_FLEXIBLE_OPTIONS_PARENT_TYPE, TRUE, FALSE)

if(HP.ambience)
linkedholodeck.forced_ambience = HP.ambience.Copy()
Expand Down
26 changes: 13 additions & 13 deletions code/modules/mechs/mech_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
/datum/movement_handler/mob/delay/exosuit/MayMove(mover, is_external)
var/mob/living/exosuit/exosuit = host
if(mover && (mover != exosuit) && (!(mover in exosuit.pilots)) && is_external)
return MOVEMENT_PROCEED
return GLOB.MOVEMENT_PROCEED
else if(world.time >= next_move)
return MOVEMENT_PROCEED
return MOVEMENT_STOP
return GLOB.MOVEMENT_PROCEED
return GLOB.MOVEMENT_STOP

/datum/movement_handler/mob/delay/exosuit/DoMove(direction, mover, is_external) //Delay must be handled by other handlers.
return
Expand All @@ -59,26 +59,26 @@
/datum/movement_handler/mob/exosuit/MayMove(mob/mover, is_external)
var/mob/living/exosuit/exosuit = host
if((!(mover in exosuit.pilots) && mover != exosuit) || exosuit.incapacitated() || mover.incapacitated())
return MOVEMENT_STOP
return GLOB.MOVEMENT_STOP
if(!exosuit.legs)
to_chat(mover, SPAN_WARNING("\The [exosuit] has no means of propulsion!"))
exosuit.SetMoveCooldown(3)
return MOVEMENT_STOP
return GLOB.MOVEMENT_STOP
if(!exosuit.legs.motivator || !exosuit.legs.motivator.is_functional())
to_chat(mover, SPAN_WARNING("Your motivators are damaged! You can't move!"))
exosuit.SetMoveCooldown(15)
return MOVEMENT_STOP
return GLOB.MOVEMENT_STOP
if(exosuit.maintenance_protocols)
to_chat(mover, SPAN_WARNING("Maintenance protocols are in effect."))
exosuit.SetMoveCooldown(3)
return MOVEMENT_STOP
return GLOB.MOVEMENT_STOP
var/obj/item/cell/C = exosuit.get_cell()
if(!C || !C.check_charge(exosuit.legs.power_use * CELLRATE))
to_chat(mover, SPAN_WARNING("The power indicator flashes briefly."))
exosuit.SetMoveCooldown(3) //On fast exosuits this got annoying fast
return MOVEMENT_STOP
return GLOB.MOVEMENT_STOP

return MOVEMENT_PROCEED
return GLOB.MOVEMENT_PROCEED

/datum/movement_handler/mob/exosuit/DoMove(direction, mob/mover, is_external)
var/mob/living/exosuit/exosuit = host
Expand Down Expand Up @@ -109,20 +109,20 @@
var/turf/target_loc = get_step(exosuit, direction)
if(target_loc && exosuit.legs && exosuit.legs.can_move_on(exosuit.loc, target_loc) && exosuit.MayEnterTurf(target_loc))
exosuit.Move(target_loc)
return MOVEMENT_HANDLED
return GLOB.MOVEMENT_HANDLED
/datum/movement_handler/mob/space/exosuit
expected_host_type = /mob/living/exosuit

/datum/movement_handler/mob/space/exosuit/MayMove(mob/mover, is_external)
if((mover != host) && is_external)
return MOVEMENT_PROCEED
return GLOB.MOVEMENT_PROCEED

if(!mob.has_gravity())
allow_move = mob.Process_Spacemove(1)
if(!allow_move)
return MOVEMENT_STOP
return GLOB.MOVEMENT_STOP

return MOVEMENT_PROCEED
return GLOB.MOVEMENT_PROCEED

/mob/living/exosuit/Check_Shoegrip()//mechs are always magbooting
return TRUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,4 +252,4 @@
id_card.access |= accesses

/datum/computer_file/program/card_mod/proc/authorized(obj/item/card/id/id_card)
return id_card && (access_change_ids in id_card.access)
return id_card && (GLOB.access_change_ids in id_card.access)
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

var/datum/comm_message_listener/l = obtain_message_listener()
data["messages"] = l.messages
data["message_deletion_allowed"] = l != global_message_listener
data["message_deletion_allowed"] = l != GLOB.global_message_listener
data["message_current_id"] = current_viewing_message_id
if(current_viewing_message)
data["message_current"] = current_viewing_message
Expand Down Expand Up @@ -117,7 +117,7 @@
if(program)
var/datum/computer_file/program/comm/P = program
return P.message_core
return global_message_listener
return GLOB.global_message_listener

/datum/nano_module/program/comm/Topic(href, href_list)
if(..())
Expand Down Expand Up @@ -239,7 +239,7 @@
current_status = STATE_VIEWMESSAGE
if("delmessage")
. = TOPIC_HANDLED
if(is_authenticated(user) && ntn_comm && l != global_message_listener)
if(is_authenticated(user) && ntn_comm && l != GLOB.global_message_listener)
l.Remove(current_viewing_message)
current_status = STATE_MESSAGELIST
if("printmessage")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@

else if(href_list["switch_network"])
// Either security access, or access to the specific camera network's department is required in order to access the network.
if(can_GLOB.access_network(usr, get_camera_access(href_list["switch_network"])))
if(GLOB.access_network(usr, get_camera_access(href_list["switch_network"])))
current_network = href_list["switch_network"]
else
to_chat(usr, "\The [nano_host()] shows an \"Network Access Denied\" error message.")
Expand Down

0 comments on commit 1108447

Please sign in to comment.