From 8ea3632a96577d2bd27c63c37f32635638eebdd4 Mon Sep 17 00:00:00 2001 From: Rob Bailey Date: Wed, 6 Nov 2019 10:49:20 -0800 Subject: [PATCH] global to static (#47580) * global to static * get rid of a dead var --- code/game/area/areas.dm | 3 --- code/game/gamemodes/sandbox/h_sandbox.dm | 4 ++-- code/game/turfs/open/space/space.dm | 2 +- code/modules/antagonists/cult/cult_items.dm | 4 ++-- code/modules/atmospherics/machinery/atmosmachinery.dm | 4 ++-- code/modules/cargo/exports/seeds.dm | 2 +- code/modules/mining/mine_items.dm | 2 +- code/modules/modular_computers/hardware/network_card.dm | 2 +- 8 files changed, 10 insertions(+), 13 deletions(-) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index df44cfe1576..8d0f669a036 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -65,8 +65,6 @@ var/parallax_movedir = 0 - var/global/global_uid = 0 - var/uid var/list/ambientsounds = GENERIC flags_1 = CAN_BE_DIRTY_1 | CULT_PERMITTED_1 @@ -134,7 +132,6 @@ GLOBAL_LIST_EMPTY(teleportlocs) /area/Initialize() icon_state = "" layer = AREA_LAYER - uid = ++global_uid map_name = name // Save the initial (the name set in the map) name of the area. canSmoothWithAreas = typecacheof(canSmoothWithAreas) diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index c30ab23fce7..1975e35cb65 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -21,14 +21,14 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE) var/canisterinfo = null var/hsbinfo = null //items that shouldn't spawn on the floor because they would bug or act weird - var/global/list/spawn_forbidden = list( + var/static/list/spawn_forbidden = list( /obj/item/tk_grab, /obj/item/implant, // not implanter, the actual thing that is inside you /obj/item/assembly, /obj/item/onetankbomb, /obj/item/pda/ai, /obj/item/smallDelivery, /obj/projectile, /obj/item/borg/sight, /obj/item/borg/stun, /obj/item/robot_module) /datum/hSB/proc/update() - var/global/list/hrefs = list( + var/static/list/hrefs = list( "Space Gear", "Suit Up (Space Travel Gear)" = "hsbsuit", "Spawn Gas Mask" = "hsbspawn&path=[/obj/item/clothing/mask/gas]", diff --git a/code/game/turfs/open/space/space.dm b/code/game/turfs/open/space/space.dm index c25ef34bf3b..8b7df53e482 100644 --- a/code/game/turfs/open/space/space.dm +++ b/code/game/turfs/open/space/space.dm @@ -12,7 +12,7 @@ var/destination_x var/destination_y - var/global/datum/gas_mixture/immutable/space/space_gas = new + var/static/datum/gas_mixture/immutable/space/space_gas = new plane = PLANE_SPACE layer = SPACE_LAYER light_power = 0.25 diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm index ad99b6d53ec..48b5c3dd2d7 100644 --- a/code/modules/antagonists/cult/cult_items.dm +++ b/code/modules/antagonists/cult/cult_items.dm @@ -449,7 +449,7 @@ desc = "You peer within this smokey orb and glimpse terrible fates befalling the escape shuttle." icon = 'icons/obj/cult.dmi' icon_state ="shuttlecurse" - var/global/curselimit = 0 + var/static/curselimit = 0 /obj/item/shuttle_curse/attack_self(mob/living/user) if(!iscultist(user)) @@ -484,7 +484,7 @@ playsound(user.loc, 'sound/effects/glassbr1.ogg', 50, TRUE) qdel(src) sleep(20) - var/global/list/curses + var/static/list/curses if(!curses) curses = list("A fuel technician just slit his own throat and begged for death.", "The shuttle's navigation programming was replaced by a file containing just two words: IT COMES.", diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index 8afaff9a1e7..764a119f306 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -26,8 +26,8 @@ var/piping_layer = PIPING_LAYER_DEFAULT var/pipe_flags = NONE - var/global/list/iconsetids = list() - var/global/list/pipeimages = list() + var/static/list/iconsetids = list() + var/static/list/pipeimages = list() var/image/pipe_vision_img = null diff --git a/code/modules/cargo/exports/seeds.dm b/code/modules/cargo/exports/seeds.dm index d8375028e06..d90fb3afbe0 100644 --- a/code/modules/cargo/exports/seeds.dm +++ b/code/modules/cargo/exports/seeds.dm @@ -4,7 +4,7 @@ unit_name = "new plant species sample" export_types = list(/obj/item/seeds) var/needs_discovery = FALSE // Only for undiscovered species - var/global/list/discoveredPlants = list() + var/static/list/discoveredPlants = list() /datum/export/seed/get_cost(obj/O) var/obj/item/seeds/S = O diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 920e9c6ea90..344f8b926aa 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -72,7 +72,7 @@ shuttleId = "mining" possible_destinations = "mining_home;mining_away;landing_zone_dock;mining_public" no_destination_swap = 1 - var/global/list/dumb_rev_heads = list() + var/static/list/dumb_rev_heads = list() //ATTACK HAND IGNORING PARENT RETURN VALUE /obj/machinery/computer/shuttle/mining/attack_hand(mob/user) diff --git a/code/modules/modular_computers/hardware/network_card.dm b/code/modules/modular_computers/hardware/network_card.dm index da108000558..fe1b1879cb3 100644 --- a/code/modules/modular_computers/hardware/network_card.dm +++ b/code/modules/modular_computers/hardware/network_card.dm @@ -9,7 +9,7 @@ var/ethernet = 0 // Hard-wired, therefore always on, ignores NTNet wireless checks. malfunction_probability = 1 device_type = MC_NET - var/global/ntnet_card_uid = 1 + var/static/ntnet_card_uid = 1 /obj/item/computer_hardware/network_card/diagnostics(var/mob/user) ..()