use static for shared member vars

This commit is contained in:
spookerton
2022-04-24 07:52:32 +01:00
parent 757fecf223
commit ee67e174fb
24 changed files with 47 additions and 48 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ Pipelines + Other Objects -> Pipe network
var/initialize_directions = 0
var/pipe_color
var/global/datum/pipe_icon_manager/icon_manager
var/static/datum/pipe_icon_manager/icon_manager
var/obj/machinery/atmospherics/node1
var/obj/machinery/atmospherics/node2
+1 -1
View File
@@ -27,7 +27,7 @@
#define GLOBAL_REAL(X, Typepath) var/global##Typepath/##X
// Defines a global var on the controller, do not use outside this file.
#define GLOBAL_RAW(X) /datum/controller/global_vars/var/global##X
#define GLOBAL_RAW(X) /datum/controller/global_vars/var/static##X
// Create an untyped global with an initializer expression
#define GLOBAL_VAR_INIT(X, InitValue) GLOBAL_RAW(/##X); GLOBAL_MANAGED(X, InitValue)
+3 -3
View File
@@ -23,9 +23,9 @@
var/world_startup_time
/proc/get_game_time()
var/global/time_offset = 0
var/global/last_time = 0
var/global/last_usage = 0
var/static/time_offset = 0
var/static/last_time = 0
var/static/last_usage = 0
var/wtime = world.time
var/wusage = TICK_USAGE * 0.01
+2 -3
View File
@@ -423,7 +423,7 @@ var/global/list/all_objectives = list()
var/obj/item/steal_target
var/target_name
var/global/possible_items[] = list(
var/static/possible_items[] = list(
"the Site Manager's antique laser gun" = /obj/item/gun/energy/captain,
"a hand teleporter" = /obj/item/hand_tele,
"an RCD" = /obj/item/rcd,
@@ -446,8 +446,7 @@ var/global/list/all_objectives = list()
"an ablative armor vest" = /obj/item/clothing/suit/armor/laserproof,
)
var/global/possible_items_special[] = list(
/*"nuclear authentication disk" = /obj/item/disk/nuclear,*///Broken with the change to nuke disk making it respawn on z level change.
var/static/possible_items_special[] = list(
"nuclear gun" = /obj/item/gun/energy/gun/nuclear,
"diamond drill" = /obj/item/pickaxe/diamonddrill,
"bag of holding" = /obj/item/storage/backpack/holding,
+1 -1
View File
@@ -159,7 +159,7 @@
idle_power_usage = 500 //internal circuitry, friction losses and stuff
active_power_usage = 100000 //100 kW ~ 135 HP
var/global/gid = 1
var/static/gid = 1
var/id = 0
/obj/machinery/portable_atmospherics/powered/scrubber/huge/Initialize()
+1 -1
View File
@@ -106,7 +106,7 @@ Class Procs:
var/list/component_parts = null //list of all the parts used to build it, if made from certain kinds of frames.
var/uid
var/panel_open = 0
var/global/gl_uid = 1
var/static/gl_uid = 1
var/clicksound // sound played on succesful interface. Just put it in the list of vars at the start.
var/clickvol = 40 // volume
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
+1 -1
View File
@@ -20,7 +20,7 @@
var/client/user_client //since making sure overlays are properly added and removed is pretty important, so we track the current user explicitly
var/flicker = 0
var/global/list/overlay_cache = list() //cache recent overlays
var/static/list/overlay_cache = list() //cache recent overlays
/obj/item/t_scanner/update_icon()
icon_state = "t-ray[on]"
+1 -1
View File
@@ -9,7 +9,7 @@
active_power_usage = 5
var/interference = FALSE
var/icon/plant = null
var/global/list/possible_plants = list(
var/static/list/possible_plants = list(
"plant-1",
"plant-10",
"plant-09",
@@ -17,7 +17,7 @@
// the specific order matters to get a usable icon_state, it is
// copied here so that, in the unlikely case that alldirs is changed,
// this continues to work.
var/global/list/tube_dir_list = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
var/static/list/tube_dir_list = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
// A place where tube pods stop, and people can get in or out.
@@ -520,7 +520,7 @@
// but it is probably safer to assume the existence of, and
// rely on, a sufficiently smart compiler/optimizer.
/obj/structure/transit_tube/proc/parse_dirs(text)
var/global/list/direction_table = list()
var/static/list/direction_table = list()
if(text in direction_table)
return direction_table[text]
+1 -1
View File
@@ -11,7 +11,7 @@
var/damage = 0
var/damage_overlay = 0
var/global/damage_overlays[16]
var/static/damage_overlays[16]
var/active
var/can_open = 0
var/datum/material/girder_material
+1 -1
View File
@@ -58,7 +58,7 @@
preload_rsc = PRELOAD_RSC
var/global/obj/screen/click_catcher/void
var/static/obj/screen/click_catcher/void
// List of all asset filenames sent to this client by the asset cache, along with their assoicated md5s
var/list/sent_assets = list()
+10 -10
View File
@@ -42,7 +42,7 @@
worn_state = "black"
desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist."
origin_tech = list(TECH_ILLEGAL = 3)
var/global/list/clothing_choices
var/static/list/clothing_choices
/obj/item/clothing/under/chameleon/Initialize()
. = ..()
@@ -79,7 +79,7 @@
desc = "It looks like a plain hat, but upon closer inspection, there's an advanced holographic array installed inside. It seems to have a small dial inside."
origin_tech = list(TECH_ILLEGAL = 3)
body_parts_covered = 0
var/global/list/clothing_choices
var/static/list/clothing_choices
/obj/item/clothing/head/chameleon/Initialize()
. = ..()
@@ -114,7 +114,7 @@
icon_state = "armor"
desc = "It appears to be a vest of standard armor, except this is embedded with a hidden holographic cloaker, allowing it to change it's appearance, but offering no protection.. It seems to have a small dial inside."
origin_tech = list(TECH_ILLEGAL = 3)
var/global/list/clothing_choices
var/static/list/clothing_choices
/obj/item/clothing/suit/chameleon/Initialize()
. = ..()
@@ -148,7 +148,7 @@
icon_state = "black"
desc = "They're comfy black shoes, with clever cloaking technology built in. It seems to have a small dial on the back of each shoe."
origin_tech = list(TECH_ILLEGAL = 3)
var/global/list/clothing_choices
var/static/list/clothing_choices
/obj/item/clothing/shoes/chameleon/Initialize()
. = ..()
@@ -182,7 +182,7 @@
icon_state = "backpack"
desc = "A backpack outfitted with cloaking tech. It seems to have a small dial inside, kept away from the storage."
origin_tech = list(TECH_ILLEGAL = 3)
var/global/list/clothing_choices
var/static/list/clothing_choices
/obj/item/storage/backpack/chameleon/Initialize()
. = ..()
@@ -235,7 +235,7 @@
icon_state = "black"
desc = "It looks like a pair of gloves, but it seems to have a small dial inside."
origin_tech = list(TECH_ILLEGAL = 3)
var/global/list/clothing_choices
var/static/list/clothing_choices
/obj/item/clothing/gloves/chameleon/Initialize()
. = ..()
@@ -269,7 +269,7 @@
icon_state = "gas_alt"
desc = "It looks like a plain gask mask, but on closer inspection, it seems to have a small dial inside."
origin_tech = list(TECH_ILLEGAL = 3)
var/global/list/clothing_choices
var/static/list/clothing_choices
/obj/item/clothing/mask/chameleon/Initialize()
. = ..()
@@ -339,7 +339,7 @@
icon = 'icons/obj/clothing/belts.dmi'
icon_state = "utilitybelt"
origin_tech = list(TECH_ILLEGAL = 3)
var/global/list/clothing_choices
var/static/list/clothing_choices
/obj/item/storage/belt/chameleon/Initialize()
. = ..()
@@ -379,7 +379,7 @@
icon = 'icons/obj/clothing/ties.dmi'
icon_state = "blacktie"
origin_tech = list(TECH_ILLEGAL = 3)
var/global/list/clothing_choices
var/static/list/clothing_choices
/obj/item/clothing/accessory/chameleon/Initialize()
. = ..()
@@ -423,7 +423,7 @@
battery_lock = 1
var/obj/item/projectile/copy_projectile
var/global/list/gun_choices
var/static/list/gun_choices
/obj/item/gun/energy/chameleon/Initialize()
. = ..()
+1 -1
View File
@@ -11,7 +11,7 @@
icon_state = "monitor"
var/monitor_state_index = "blank"
var/global/list/monitor_states = list()
var/static/list/monitor_states = list()
/obj/item/clothing/mask/monitor/set_dir()
dir = SOUTH
+4 -4
View File
@@ -18,11 +18,11 @@
var/broken = 0 // ={0,1,2} How broken is it???
var/circuit_item_capacity = 1 //how many items does the circuit add to max number of items
var/item_level = 0 // items microwave can handle, 0 foodstuff, 1 materials
var/global/list/acceptable_items // List of the items you can put in
var/global/list/available_recipes // List of the recipes you can use
var/global/list/acceptable_reagents // List of the reagents you can put in
var/static/list/acceptable_items // List of the items you can put in
var/static/list/available_recipes // List of the recipes you can use
var/static/list/acceptable_reagents // List of the reagents you can put in
var/global/max_n_of_items = 20
var/static/max_n_of_items = 20
var/appliancetype = MICROWAVE
var/datum/looping_sound/microwave/soundloop
+1 -1
View File
@@ -24,7 +24,7 @@
var/pinging = FALSE
var/updating = FALSE
var/global/icon/mask_icon
var/static/icon/mask_icon
var/obj/screen/mapper/extras_holder/extras_holder
var/hud_frame_hint
+1 -1
View File
@@ -32,7 +32,7 @@
var/is_manifest = 0 //If set to 1, the ghost is able to whisper. Usually only set if a cultist drags them through the veil.
var/ghost_sprite = null
var/global/list/possible_ghost_sprites = list(
var/static/list/possible_ghost_sprites = list(
"Clear" = "blank",
"Green Blob" = "otherthing",
"Bland" = "ghost",
+1 -1
View File
@@ -34,7 +34,7 @@
var/turf/home
var/homeName
var/global/amount = 0
var/static/amount = 0
/mob/living/bot/mulebot/Initialize()
. = ..()
+2 -2
View File
@@ -26,7 +26,7 @@
var/obj/item/communicator/integrated/communicator // Our integrated communicator.
var/chassis = "pai-repairbot" // A record of your chosen chassis.
var/global/list/possible_chassis = list(
var/static/list/possible_chassis = list(
"Drone" = "pai-repairbot",
"Cat" = "pai-cat",
"Mouse" = "pai-mouse",
@@ -41,7 +41,7 @@
"Rabbit" = "pai-rabbit",
)
var/global/list/possible_say_verbs = list(
var/static/list/possible_say_verbs = list(
"Robotic" = list("states","declares","queries"),
"Natural" = list("says","yells","asks"),
"Beep" = list("beeps","beeps loudly","boops"),
@@ -25,7 +25,7 @@
meat_type = /obj/item/reagent_containers/food/snacks/carpmeat/fish
// By default they can be in any water turf. Subtypes might restrict to deep/shallow etc
var/global/list/suitable_turf_types = list(
var/static/list/suitable_turf_types = list(
/turf/simulated/floor/beach/water,
/turf/simulated/floor/beach/coastline,
/turf/simulated/floor/holofloor/beach/water,
+6 -6
View File
@@ -124,15 +124,15 @@ GLOBAL_LIST_EMPTY(apcs)
var/update_state = -1
var/update_overlay = -1
var/is_critical = 0
var/global/status_overlays = 0
var/static/status_overlays = 0
var/failure_timer = 0
var/force_update = 0
var/updating_icon = 0
var/global/list/status_overlays_lock
var/global/list/status_overlays_charging
var/global/list/status_overlays_equipment
var/global/list/status_overlays_lighting
var/global/list/status_overlays_environ
var/static/list/status_overlays_lock
var/static/list/status_overlays_charging
var/static/list/status_overlays_equipment
var/static/list/status_overlays_lighting
var/static/list/status_overlays_environ
var/alarms_hidden = FALSE //If power alarms from this APC are visible on consoles
var/nightshift_lights = FALSE
@@ -252,7 +252,7 @@
load_method = SINGLE_CASING
max_shells = 1 //literally just a barrel
var/global/list/ammo_types = list(
var/static/list/ammo_types = list(
/obj/item/ammo_casing/a357 = ".357",
/obj/item/ammo_casing/a9mm = "9mm",
/obj/item/ammo_casing/a45 = ".45",
+1 -1
View File
@@ -136,7 +136,7 @@
var/check_delay = 60 //periodically recheck if we need to rebuild a shield
use_power = USE_POWER_OFF
idle_power_usage = 0
var/global/list/blockedturfs = list(
var/static/list/blockedturfs = list(
/turf/space,
/turf/simulated/floor/outdoors,
)
@@ -3,7 +3,7 @@
/obj/machinery/shield_gen/external
name = "hull shield generator"
var/global/list/blockedturfs = list(
var/static/list/blockedturfs = list(
/turf/space,
/turf/simulated/floor/outdoors,
)
+2 -2
View File
@@ -7,8 +7,8 @@
var/supplied_law = "SuppliedLaw"
var/supplied_law_position = MIN_SUPPLIED_LAW_NUMBER
var/global/list/datum/ai_laws/admin_laws
var/global/list/datum/ai_laws/player_laws
var/static/list/datum/ai_laws/admin_laws
var/static/list/datum/ai_laws/player_laws
var/mob/living/silicon/owner = null
/datum/tgui_module/law_manager/New(mob/living/silicon/S)