From 9591bb5471214e71b17d518edb7574415a2015bc Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Sat, 9 Nov 2019 22:53:56 +0100 Subject: [PATCH 1/2] porting "global to static" --- code/game/area/areas.dm | 3 --- code/game/gamemodes/sandbox/h_sandbox.dm | 4 ++-- code/game/turfs/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/jobs/job_types/janitor.dm | 2 +- code/modules/mining/mine_items.dm | 2 +- code/modules/modular_computers/hardware/network_card.dm | 2 +- code/modules/vending/_vending.dm | 2 +- 10 files changed, 12 insertions(+), 15 deletions(-) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index dfbb59811b..612c3cba42 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -53,8 +53,6 @@ var/parallax_movedir = 0 - var/global/global_uid = 0 - var/uid var/list/ambientsounds = GENERIC flags_1 = CAN_BE_DIRTY_1 @@ -96,7 +94,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 64aaeebacd..d54dda5353 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -25,14 +25,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/item/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/space/space.dm b/code/game/turfs/space/space.dm index 9ebe8f3c19..a5931abf9d 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/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 06ea2cbe0a..943e76b4ee 100644 --- a/code/modules/antagonists/cult/cult_items.dm +++ b/code/modules/antagonists/cult/cult_items.dm @@ -493,7 +493,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)) @@ -530,7 +530,7 @@ playsound(user.loc, 'sound/effects/glassbr1.ogg', 50, 1) 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 7d095869cb..702c31b55c 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -28,8 +28,8 @@ Pipelines + Other Objects -> Pipe network 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 a879b0c4fe..1a2a18c46b 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/jobs/job_types/janitor.dm b/code/modules/jobs/job_types/janitor.dm index d0a06ca0e0..0cff2233f8 100644 --- a/code/modules/jobs/job_types/janitor.dm +++ b/code/modules/jobs/job_types/janitor.dm @@ -8,7 +8,7 @@ spawn_positions = 1 supervisors = "the head of personnel" selection_color = "#bbe291" - var/global/janitors = 0 + var/static/janitors = 0 outfit = /datum/outfit/job/janitor diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 0abb1cfa9e..8de5f76a56 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -73,7 +73,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 da10800055..fe1b1879cb 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) ..() diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 5165343993..7089845dce 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -66,7 +66,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C var/obj/item/coin/coin var/obj/item/stack/spacecash/bill - var/global/vending_cache = list() //used for storing the icons of items being vended + var/static/vending_cache = list() //used for storing the icons of items being vended var/dish_quants = list() //used by the snack machine's custom compartment to count dishes. From d2b1ce4181a9cfc901247abc5a8366d80a06c668 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Sat, 9 Nov 2019 23:05:16 +0100 Subject: [PATCH 2/2] Unused. --- code/modules/jobs/job_types/janitor.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/jobs/job_types/janitor.dm b/code/modules/jobs/job_types/janitor.dm index 0cff2233f8..e42da10362 100644 --- a/code/modules/jobs/job_types/janitor.dm +++ b/code/modules/jobs/job_types/janitor.dm @@ -8,7 +8,6 @@ spawn_positions = 1 supervisors = "the head of personnel" selection_color = "#bbe291" - var/static/janitors = 0 outfit = /datum/outfit/job/janitor