diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 5291d0f6fb8..bb0fe09b87b 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -71,9 +71,9 @@ var/global/list/pdachoicelist = list("Default", "Slim", "Old", "Rugged","Minimal var/global/list/exclude_jobs = list(/datum/job/station/ai,/datum/job/station/cyborg) //* Visual nets -var/list/datum/visualnet/visual_nets = list() -var/datum/visualnet/camera/cameranet = new() -var/datum/visualnet/cult/cultnet = new() +GLOBAL_LIST_EMPTY(visual_nets) +GLOBAL_DATUM_INIT(cameranet, /datum/visualnet/camera, new) +GLOBAL_DATUM_INIT(cultnet, /datum/visualnet/cult, new) //* Runes var/global/list/rune_list = new() diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index cf60ce62de2..c47fedda6ce 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -177,4 +177,4 @@ // /mob/living/silicon/ai/TurfAdjacent(var/turf/T) - return (cameranet && cameranet.checkTurfVis(T)) + return (GLOB.cameranet && GLOB.cameranet.checkTurfVis(T)) diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index 1289381bf6d..6d60068a28e 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -94,7 +94,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick) options["LEGACY: air_master"] = air_master options["LEGACY: radio_controller"] = radio_controller options["LEGACY: paiController"] = paiController - options["LEGACY: cameranet"] = cameranet + options["LEGACY: GLOB.cameranet"] = GLOB.cameranet var/pick = input(mob, "Choose a controller to debug/view variables of.", "VV controller:") as null|anything in options if(!pick) diff --git a/code/datums/repositories/cameras.dm b/code/datums/repositories/cameras.dm index 6d3011ac682..cce2a3f4cc9 100644 --- a/code/datums/repositories/cameras.dm +++ b/code/datums/repositories/cameras.dm @@ -24,8 +24,8 @@ var/global/datum/repository/cameras/camera_repository = new() return invalidated = 0 - cameranet.process_sort() - for(var/obj/machinery/camera/C in cameranet.cameras) + GLOB.cameranet.process_sort() + for(var/obj/machinery/camera/C in GLOB.cameranet.cameras) var/cam = C.ui_structure() for(var/network in C.network) if(!networks[network]) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 91fe80ab2fc..5962f46c67b 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -206,8 +206,6 @@ var/turf/T = loc T.has_opaque_atom = TRUE // No need to recalculate it in this case, it's guranteed to be on afterwards anyways. - ComponentInitialize() - return INITIALIZE_HINT_NORMAL /** @@ -224,10 +222,6 @@ /atom/proc/LateInitialize() set waitfor = FALSE -/// Put your [AddComponent] calls here -/atom/proc/ComponentInitialize() - return - /** * Top level of the destroy chain for most atoms * diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm index 99e65586399..d1966e52a4c 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm @@ -3,7 +3,7 @@ // Abilities in this tree allow the AI to physically manipulate systems around the station. // T1 - Electrical Pulse - Sends out pulse that breaks some lights and sometimes even APCs. This can actually break the AI's APC so be careful! // T2 - Hack Camera - Allows the AI to hack a camera. Deactivated areas may be reactivated, and functional cameras can be upgraded. -// T3 - Emergency Forcefield - Allows the AI to project 1 tile forcefield that blocks movement and air flow. Forcefield´dissipates over time. It is also very susceptible to energetic weaponry. +// T3 - Emergency Forcefield - Allows the AI to project 1 tile forcefield that blocks movement and air flow. Forcefield�dissipates over time. It is also very susceptible to energetic weaponry. // T4 - Machine Overload - Detonates machine of choice in a minor explosion. Two of these are usually enough to kill or K/O someone. @@ -54,7 +54,7 @@ AP.set_broken() -/datum/game_mode/malfunction/verb/hack_camera(var/obj/machinery/camera/target in cameranet.cameras) +/datum/game_mode/malfunction/verb/hack_camera(var/obj/machinery/camera/target in GLOB.cameranet.cameras) set name = "Hack Camera" set desc = "100 CPU - Hacks existing camera, allowing you to add upgrade of your choice to it. Alternatively it lets you reactivate broken camera." set category = "Software" diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 2814a2daf16..ad852ca8ad1 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -49,7 +49,7 @@ client_huds |= GLOB.global_hud.whitense /* // Use this to look for cameras that have the same c_tag. - for(var/obj/machinery/camera/C in cameranet.cameras) + for(var/obj/machinery/camera/C in GLOB.cameranet.cameras) var/list/tempnetwork = C.network&src.network if(C != src && C.c_tag == src.c_tag && tempnetwork.len) log_world("[src.c_tag] [src.x] [src.y] [src.z] conflicts with [C.c_tag] [C.x] [C.y] [C.z]") @@ -127,7 +127,7 @@ /obj/machinery/camera/proc/setViewRange(var/num = 7) src.view_range = num - cameranet.updateVisibility(src, 0) + GLOB.cameranet.updateVisibility(src, 0) /obj/machinery/camera/attack_hand(mob/living/carbon/human/user as mob) if(!istype(user)) @@ -446,12 +446,12 @@ var/list/open_networks = difflist(network, restricted_camera_networks) // Add or remove camera from the camera net as necessary if(on_open_network && !open_networks.len) - cameranet.removeCamera(src) + GLOB.cameranet.removeCamera(src) else if(!on_open_network && open_networks.len) on_open_network = 1 - cameranet.addCamera(src) + GLOB.cameranet.addCamera(src) else - cameranet.updateVisibility(src, 0) + GLOB.cameranet.updateVisibility(src, 0) diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 5ee1f607a06..6fcf594f817 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -12,10 +12,10 @@ if(src.stat == 2) return - cameranet.process_sort() + GLOB.cameranet.process_sort() var/list/T = list() - for (var/obj/machinery/camera/C in cameranet.cameras) + for (var/obj/machinery/camera/C in GLOB.cameranet.cameras) var/list/tempnetwork = C.network&src.network if (tempnetwork.len) T[text("[][]", C.c_tag, (C.can_use() ? null : " (Deactivated)"))] = C @@ -216,7 +216,7 @@ /mob/living/proc/near_camera() if (!isturf(loc)) return 0 - else if(!cameranet.checkVis(src)) + else if(!GLOB.cameranet.checkVis(src)) return 0 return 1 diff --git a/code/game/objects/items/devices/ai_detector.dm b/code/game/objects/items/devices/ai_detector.dm index b4665f76c67..ee6fd8ed2dd 100644 --- a/code/game/objects/items/devices/ai_detector.dm +++ b/code/game/objects/items/devices/ai_detector.dm @@ -62,10 +62,10 @@ // Now for the somewhat harder AI cameranet checks. // Check if we are even on the cameranet. - if(!cameranet.checkVis(T)) + if(!GLOB.cameranet.checkVis(T)) return PROXIMITY_OFF_CAMERANET - var/datum/chunk/chunk = cameranet.getChunk(T.x, T.y, T.z) + var/datum/chunk/chunk = GLOB.cameranet.getChunk(T.x, T.y, T.z) if(!chunk) return PROXIMITY_OFF_CAMERANET diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 49c3b36b8ed..9cffa82df22 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -28,10 +28,12 @@ PROFILE_SET . = ..() PROFILE_TICK - levelupdate() + if(mapload) + levelupdate() PROFILE_TICK // HOOK FOR MOB/FREELOOK SYSTEM updateVisibility(src) + #warn above PROFILE_TICK // This is not great. diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 3875d58ff15..36bffb2df10 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -41,7 +41,7 @@ if(!floortype && initial_flooring) floortype = initial_flooring if(floortype) - set_flooring(get_flooring_data(floortype), mapload) + set_flooring(get_flooring_data(floortype), TRUE) else footstep_sounds = base_footstep_sounds PROFILE_TICK @@ -77,7 +77,7 @@ else make_indoors() -/turf/simulated/floor/proc/set_flooring(decl/flooring/newflooring, mapload) +/turf/simulated/floor/proc/set_flooring(decl/flooring/newflooring, init) PROFILE_SET make_plating(null, TRUE, TRUE) PROFILE_TICK @@ -90,9 +90,10 @@ decals = overfloor_decals // VOREStation Edit End PROFILE_TICK - QUEUE_SMOOTH(src) - QUEUE_SMOOTH_NEIGHBORS(src) - levelupdate() + if(!init) + QUEUE_SMOOTH(src) + QUEUE_SMOOTH_NEIGHBORS(src) + levelupdate() PROFILE_TICK //This proc will set floor_type to null and the update_icon() proc will then change the icon_state of the turf diff --git a/code/game/turfs/simulated/floor_icon.dm b/code/game/turfs/simulated/floor_icon.dm index 8c30fe9e907..77a83fe63b7 100644 --- a/code/game/turfs/simulated/floor_icon.dm +++ b/code/game/turfs/simulated/floor_icon.dm @@ -92,25 +92,21 @@ var/list/flooring_cache = list() icon = 'icons/turf/flooring/plating.dmi' icon_state = "dmg[rand(1,4)]" PROFILE_TICK - PROFILE_TICK // Re-apply floor decals if(LAZYLEN(decals)) add_overlay(decals) - PROFILE_TICK // Show 'ceilingless' overlay. var/turf/above = Above(src) if(isopenturf(above) && !istype(src, /turf/simulated/floor/outdoors)) // This won't apply to outdoor turfs since its assumed they don't have a ceiling anyways. add_overlay(GLOB.no_ceiling_image) - PROFILE_TICK // ..() has to be last to prevent trampling managed overlays . = ..() - PROFILE_TICK /** diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 1945cdf3fda..1f38b8cafc3 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -81,12 +81,10 @@ flags |= INITIALIZED // by default, vis_contents is inherited from the turf that was here before - vis_contents.Cut() - + vis_contents.len = 0 PROFILE_TICK assemble_baseturfs() - PROFILE_TICK //atom color stuff @@ -97,12 +95,10 @@ if (canSmoothWith) canSmoothWith = typelist("canSmoothWith", canSmoothWith) */ - PROFILE_TICK for(var/atom/movable/AM in src) Entered(AM) - PROFILE_TICK var/area/A = loc @@ -111,7 +107,6 @@ if (light_power && light_range) update_light() - PROFILE_TICK if (opacity) @@ -120,11 +115,6 @@ //Pathfinding related if(movement_cost && pathweight == 1) // This updates pathweight automatically. pathweight = movement_cost - - PROFILE_TICK - - ComponentInitialize() - PROFILE_TICK return INITIALIZE_HINT_NORMAL diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 94dc5077024..169681c0027 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -58,7 +58,7 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging) qdel(C) if(camera_range_display_status) - for(var/obj/machinery/camera/C in cameranet.cameras) + for(var/obj/machinery/camera/C in GLOB.cameranet.cameras) new/obj/effect/debugging/camera_range(C.loc) feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -86,7 +86,7 @@ GLOBAL_LIST_EMPTY(dirty_vars) var/list/obj/machinery/camera/CL = list() - for(var/obj/machinery/camera/C in cameranet.cameras) + for(var/obj/machinery/camera/C in GLOB.cameranet.cameras) CL += C var/output = {"CAMERA ANNOMALITIES REPORT
diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 017a83e893b..ca1dee6898d 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -544,7 +544,7 @@ BLIND // can't see anything desc = "Sunglasses with a HUD." icon_state = "sunSecHud" -/obj/item/clothing/glasses/sunglasses/sechud/ComponentInitialize() +/obj/item/clothing/glasses/sunglasses/sechud/Initialize(mapload) . = ..() AddElement(/datum/element/clothing/hud_granter, list(DATA_HUD_SECURITY_ADVANCED), list(slot_glasses)) @@ -600,7 +600,7 @@ BLIND // can't see anything desc = "Sunglasses with a HUD." icon_state = "sunMedHud" -/obj/item/clothing/glasses/sunglasses/medhud/ComponentInitialize() +/obj/item/clothing/glasses/sunglasses/medhud/Initialize(mapload) . = ..() AddElement(/datum/element/clothing/hud_granter, list(DATA_HUD_MEDICAL), list(slot_glasses)) diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 4a9e16cbd50..475d770a341 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -11,7 +11,7 @@ item_state_slots = list(slot_r_hand_str = "headset", slot_l_hand_str = "headset") body_parts_covered = 0 -/obj/item/clothing/glasses/hud/health/ComponentInitialize() +/obj/item/clothing/glasses/hud/health/Initialize(mapload) . = ..() AddElement(/datum/element/clothing/hud_granter, list(DATA_HUD_MEDICAL), list(slot_glasses)) @@ -29,7 +29,7 @@ item_state_slots = list(slot_r_hand_str = "headset", slot_l_hand_str = "headset") body_parts_covered = 0 -/obj/item/clothing/glasses/hud/security/ComponentInitialize() +/obj/item/clothing/glasses/hud/security/Iniialize(mapload) . = ..() AddElement(/datum/element/clothing/hud_granter, list(DATA_HUD_SECURITY_ADVANCED), list(slot_glasses)) @@ -65,7 +65,7 @@ enables_planes = list(VIS_AUGMENTED) plane_slots = list(slot_glasses) -/obj/item/clothing/glasses/omnihud/ComponentInitialize() +/obj/item/clothing/glasses/omnihud/Iniialize(mapload) . = ..() AddElement(/datum/element/clothing/hud_granter, list(DATA_HUD_ID_JOB), list(slot_glasses)) @@ -140,7 +140,7 @@ tgarscreen_path = /datum/tgui_module/crew_monitor/glasses enables_planes = list(VIS_AUGMENTED) -/obj/item/clothing/glasses/omnihud/med/ComponentInitialize() +/obj/item/clothing/glasses/omnihud/med/Iniialize(mapload) . = ..() AddElement(/datum/element/clothing/hud_granter, list(DATA_HUD_ID_JOB, DATA_HUD_MEDICAL), list(slot_glasses)) @@ -161,7 +161,7 @@ enables_planes = list(VIS_AUGMENTED) -/obj/item/clothing/glasses/omnihud/sec/ComponentInitialize() +/obj/item/clothing/glasses/omnihud/sec/Iniialize(mapload) . = ..() AddElement(/datum/element/clothing/hud_granter, list(DATA_HUD_SECURITY_ADVANCED, DATA_HUD_MEDICAL), list(slot_glasses)) @@ -257,7 +257,7 @@ flash_protection = FLASH_PROTECTION_MAJOR enables_planes = list(VIS_AUGMENTED) -/obj/item/clothing/glasses/omnihud/all/ComponentInitialize() +/obj/item/clothing/glasses/omnihud/all/Iniialize(mapload) . = ..() AddElement(/datum/element/clothing/hud_granter, list(DATA_HUD_SECURITY_ADVANCED, DATA_HUD_MEDICAL), list(slot_glasses)) diff --git a/code/modules/events/camera_damage.dm b/code/modules/events/camera_damage.dm index c92cd965ed3..9ffb84ac075 100644 --- a/code/modules/events/camera_damage.dm +++ b/code/modules/events/camera_damage.dm @@ -22,12 +22,12 @@ cam.wires.cut(WIRE_CAM_ALARM) /datum/event/camera_damage/proc/acquire_random_camera(var/remaining_attempts = 5) - if(!cameranet.cameras.len) + if(!GLOB.cameranet.cameras.len) return if(!remaining_attempts) return - var/obj/machinery/camera/C = pick(cameranet.cameras) + var/obj/machinery/camera/C = pick(GLOB.cameranet.cameras) if(is_valid_camera(C)) return C return acquire_random_camera(remaining_attempts--) diff --git a/code/modules/gamemaster/actions/camera_damage.dm b/code/modules/gamemaster/actions/camera_damage.dm index c13b81702d9..1aa431e8b0f 100644 --- a/code/modules/gamemaster/actions/camera_damage.dm +++ b/code/modules/gamemaster/actions/camera_damage.dm @@ -33,12 +33,12 @@ cam.wires.cut(WIRE_CAM_ALARM) /datum/gm_action/camera_damage/proc/acquire_random_camera(var/remaining_attempts = 5) - if(!cameranet.cameras.len) + if(!GLOB.cameranet.cameras.len) return if(!remaining_attempts) return - var/obj/machinery/camera/C = pick(cameranet.cameras) + var/obj/machinery/camera/C = pick(GLOB.cameranet.cameras) if(is_valid_camera(C)) return C return acquire_random_camera(remaining_attempts--) diff --git a/code/modules/mob/freelook/ai/eye.dm b/code/modules/mob/freelook/ai/eye.dm index 8bda3e48f91..8b07ea34658 100644 --- a/code/modules/mob/freelook/ai/eye.dm +++ b/code/modules/mob/freelook/ai/eye.dm @@ -9,7 +9,7 @@ /mob/observer/eye/aiEye/Initialize(mapload) . = ..() - visualnet = cameranet + visualnet = GLOB.cameranet /mob/observer/eye/aiEye/setLoc(var/T, var/cancel_tracking = 1) if(..()) diff --git a/code/modules/mob/freelook/ai/update_triggers.dm b/code/modules/mob/freelook/ai/update_triggers.dm index d6edb83b7f3..226326de0f5 100644 --- a/code/modules/mob/freelook/ai/update_triggers.dm +++ b/code/modules/mob/freelook/ai/update_triggers.dm @@ -15,7 +15,7 @@ updating = 1 spawn(BORG_CAMERA_BUFFER) if(oldLoc != src.loc) - cameranet.updatePortableCamera(src.camera) + GLOB.cameranet.updatePortableCamera(src.camera) updating = 0 /mob/living/silicon/AI/Move() @@ -27,8 +27,8 @@ updating = 1 spawn(BORG_CAMERA_BUFFER) if(oldLoc != src.loc) - cameranet.updateVisibility(oldLoc, 0) - cameranet.updateVisibility(loc, 0) + GLOB.cameranet.updateVisibility(oldLoc, 0) + GLOB.cameranet.updateVisibility(loc, 0) updating = 0 #undef BORG_CAMERA_BUFFER @@ -40,24 +40,24 @@ /obj/machinery/camera/deactivate(user as mob, var/choice = 1) ..(user, choice) if(src.can_use()) - cameranet.addCamera(src) + GLOB.cameranet.addCamera(src) else src.set_light(0) - cameranet.removeCamera(src) + GLOB.cameranet.removeCamera(src) /obj/machinery/camera/Initialize(mapload) . = ..() //Camera must be added to global list of all cameras no matter what... - if(cameranet.cameras_unsorted || !SSticker) - cameranet.cameras += src - cameranet.cameras_unsorted = 1 + if(GLOB.cameranet.cameras_unsorted || !SSticker) + GLOB.cameranet.cameras += src + GLOB.cameranet.cameras_unsorted = 1 else - dd_insertObjectList(cameranet.cameras, src) + dd_insertObjectList(GLOB.cameranet.cameras, src) update_coverage(1) /obj/machinery/camera/Destroy() clear_all_networks() - cameranet.cameras -= src + GLOB.cameranet.cameras -= src return ..() // Mobs @@ -66,9 +66,9 @@ ..() if(was_dead && stat != DEAD) // Arise! - cameranet.updateVisibility(src, 0) + GLOB.cameranet.updateVisibility(src, 0) /mob/living/silicon/ai/death(gibbed) if(..()) // If true, the mob went from living to dead (assuming everyone has been overriding as they should...) - cameranet.updateVisibility(src, 0) + GLOB.cameranet.updateVisibility(src, 0) diff --git a/code/modules/mob/freelook/mask/eye.dm b/code/modules/mob/freelook/mask/eye.dm index af378248731..21ed7d12018 100644 --- a/code/modules/mob/freelook/mask/eye.dm +++ b/code/modules/mob/freelook/mask/eye.dm @@ -9,4 +9,4 @@ /mob/observer/eye/maskEye/Initialize(mapload) . = ..() - visualnet = cultnet + visualnet = GLOB.cultnet diff --git a/code/modules/mob/freelook/mask/update_triggers.dm b/code/modules/mob/freelook/mask/update_triggers.dm index d4d24850d30..cc4cd6668d4 100644 --- a/code/modules/mob/freelook/mask/update_triggers.dm +++ b/code/modules/mob/freelook/mask/update_triggers.dm @@ -8,23 +8,23 @@ var/oldLoc = src.loc . = ..() if(.) - if(cultnet.provides_vision(src)) + if(GLOB.cultnet.provides_vision(src)) if(!updating_cult_vision) updating_cult_vision = 1 spawn(CULT_UPDATE_BUFFER) if(oldLoc != src.loc) - cultnet.updateVisibility(oldLoc, 0) - cultnet.updateVisibility(loc, 0) + GLOB.cultnet.updateVisibility(oldLoc, 0) + GLOB.cultnet.updateVisibility(loc, 0) updating_cult_vision = 0 #undef CULT_UPDATE_BUFFER /mob/living/Initialize(mapload) . = ..() - cultnet.updateVisibility(src, 0) + GLOB.cultnet.updateVisibility(src, 0) /mob/living/Destroy() - cultnet.updateVisibility(src, 0) + GLOB.cultnet.updateVisibility(src, 0) return ..() /mob/living/rejuvenate() @@ -32,19 +32,19 @@ ..() if(was_dead && stat != DEAD) // Arise! - cultnet.updateVisibility(src, 0) + GLOB.cultnet.updateVisibility(src, 0) /mob/living/death(gibbed, deathmessage="seizes up and falls limp...") if(..(gibbed, deathmessage)) // If true, the mob went from living to dead (assuming everyone has been overriding as they should...) - cultnet.updateVisibility(src) + GLOB.cultnet.updateVisibility(src) /datum/antagonist/add_antagonist(var/datum/mind/player) . = ..() if(src == cult) - cultnet.updateVisibility(player.current, 0) + GLOB.cultnet.updateVisibility(player.current, 0) /datum/antagonist/remove_antagonist(var/datum/mind/player, var/show_message, var/implanted) ..() if(src == cult) - cultnet.updateVisibility(player.current, 0) + GLOB.cultnet.updateVisibility(player.current, 0) diff --git a/code/modules/mob/freelook/update_triggers.dm b/code/modules/mob/freelook/update_triggers.dm index e472f07850e..630d43d09cd 100644 --- a/code/modules/mob/freelook/update_triggers.dm +++ b/code/modules/mob/freelook/update_triggers.dm @@ -2,10 +2,9 @@ // TURFS -/proc/updateVisibility(atom/A, var/opacity_check = 1) - if(SSticker) - for(var/datum/visualnet/VN in visual_nets) - VN.updateVisibility(A, opacity_check) +/proc/updateVisibility(atom/A, opacity_check = 1) + for(var/datum/visualnet/VN in GLOB.visual_nets) + VN.updateVisibility(A, opacity_check) /turf var/list/image/obfuscations diff --git a/code/modules/mob/freelook/visualnet.dm b/code/modules/mob/freelook/visualnet.dm index 32cf5dae52a..7f544f45746 100644 --- a/code/modules/mob/freelook/visualnet.dm +++ b/code/modules/mob/freelook/visualnet.dm @@ -10,10 +10,10 @@ /datum/visualnet/New() ..() - visual_nets += src + GLOB.visual_nets += src /datum/visualnet/Destroy() - visual_nets -= src + GLOB.visual_nets -= src return ..() // Checks if a chunk has been Generated in x, y, z. @@ -125,7 +125,7 @@ /turf/verb/view_chunk() set src in world - if(cameranet.chunkGenerated(x, y, z)) - var/datum/chunk/chunk = cameranet.getCameraChunk(x, y, z) + if(GLOB.cameranet.chunkGenerated(x, y, z)) + var/datum/chunk/chunk = GLOB.cameranet.getCameraChunk(x, y, z) usr.client.debug_variables(chunk) */ diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index e3095c1aabb..b742f8a73ea 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -478,7 +478,7 @@ var/list/ai_verbs_default = list( unset_machine() src << browse(null, t1) if (href_list["switchcamera"]) - switchCamera(locate(href_list["switchcamera"])) in cameranet.cameras + switchCamera(locate(href_list["switchcamera"])) in GLOB.cameranet.cameras if (href_list["showalerts"]) subsystem_alarm_monitor() //Carn: holopad requests @@ -527,7 +527,7 @@ var/list/ai_verbs_default = list( return var/list/cameralist = new() - for (var/obj/machinery/camera/C in cameranet.cameras) + for (var/obj/machinery/camera/C in GLOB.cameranet.cameras) if(!C.can_use()) continue var/list/tempnetwork = difflist(C.network,restricted_camera_networks,1) @@ -551,7 +551,7 @@ var/list/ai_verbs_default = list( src.network = network - for(var/obj/machinery/camera/C in cameranet.cameras) + for(var/obj/machinery/camera/C in GLOB.cameranet.cameras) if(!C.can_use()) continue if(network in C.network) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 9d3a6478082..23f9bee3070 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -786,7 +786,7 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) stat(null) for(var/datum/controller/subsystem/SS in Master.subsystems) SS.stat_entry() - //GLOB.cameranet.stat_entry() + //GLOB.GLOB.cameranet.stat_entry() if(statpanel("Tickets")) GLOB.ahelp_tickets.stat_entry() if(length(GLOB.sdql2_queries)) diff --git a/code/modules/modular_computers/file_system/programs/engineering/alarm_monitor.dm b/code/modules/modular_computers/file_system/programs/engineering/alarm_monitor.dm index 1115e767131..fc017caa2a2 100644 --- a/code/modules/modular_computers/file_system/programs/engineering/alarm_monitor.dm +++ b/code/modules/modular_computers/file_system/programs/engineering/alarm_monitor.dm @@ -93,7 +93,7 @@ if(..()) return 1 if(href_list["switchTo"]) - var/obj/machinery/camera/C = locate(href_list["switchTo"]) in cameranet.cameras + var/obj/machinery/camera/C = locate(href_list["switchTo"]) in GLOB.cameranet.cameras if(!C) return diff --git a/code/modules/nano/interaction/default.dm b/code/modules/nano/interaction/default.dm index 5e5eb815b42..f1335938fe7 100644 --- a/code/modules/nano/interaction/default.dm +++ b/code/modules/nano/interaction/default.dm @@ -50,7 +50,7 @@ // If we're installed in a chassi, rather than transfered to an inteliCard or other container, then check if we have camera view if(is_in_chassis()) //stop AIs from leaving windows open and using then after they lose vision - if(cameranet && !cameranet.checkTurfVis(get_turf(src_object))) + if(GLOB.cameranet && !GLOB.cameranet.checkTurfVis(get_turf(src_object))) return UI_CLOSE return UI_INTERACTIVE else if(get_dist(src_object, src) <= client.view) // View does not return what one would expect while installed in an inteliCard diff --git a/code/modules/tgui/modules/alarm.dm b/code/modules/tgui/modules/alarm.dm index 035b0f7c8a6..388403ca7b9 100644 --- a/code/modules/tgui/modules/alarm.dm +++ b/code/modules/tgui/modules/alarm.dm @@ -106,7 +106,7 @@ switch(action) if("switchTo") - var/obj/machinery/camera/C = locate(params["camera"]) in cameranet.cameras + var/obj/machinery/camera/C = locate(params["camera"]) in GLOB.cameranet.cameras if(!C) return diff --git a/code/modules/tgui/modules/camera.dm b/code/modules/tgui/modules/camera.dm index c3e6c58a061..cc2927c509f 100644 --- a/code/modules/tgui/modules/camera.dm +++ b/code/modules/tgui/modules/camera.dm @@ -222,7 +222,7 @@ all_networks += additional_networks var/list/D = list() - for(var/obj/machinery/camera/C in cameranet.cameras) + for(var/obj/machinery/camera/C in GLOB.cameranet.cameras) if(!C.network) stack_trace("Camera in a cameranet has no camera network") continue diff --git a/code/modules/tgui/states/default.dm b/code/modules/tgui/states/default.dm index 61e762603fa..8a6c521cf46 100644 --- a/code/modules/tgui/states/default.dm +++ b/code/modules/tgui/states/default.dm @@ -59,7 +59,7 @@ GLOBAL_DATUM_INIT(default_state, /datum/ui_state/default, new) // If we're installed in a chassi, rather than transfered to an inteliCard or other container, then check if we have camera view if(is_in_chassis()) //stop AIs from leaving windows open and using then after they lose vision - if(cameranet && !cameranet.checkTurfVis(get_turf(src_object))) + if(GLOB.cameranet && !GLOB.cameranet.checkTurfVis(get_turf(src_object))) return UI_CLOSE return UI_INTERACTIVE else if(get_dist(src_object, src) <= client.view) // View does not return what one would expect while installed in an inteliCard