remove most top-level vardecls (#23946)

This commit is contained in:
warriorstar-orion
2024-02-05 17:12:08 -05:00
committed by GitHub
parent 60433a70b6
commit ed9842b730
24 changed files with 44 additions and 40 deletions
-1
View File
@@ -582,7 +582,6 @@ GLOBAL_LIST_EMPTY(do_after_once_tracker)
to_chat(user, "<span class='warning'>No mob located in [A].</span>")
// Suppress the mouse macros
/client/var/next_mouse_macro_warning
/mob/proc/LogMouseMacro(verbused, params)
if(!client)
return
@@ -37,8 +37,6 @@ SUBSYSTEM_DEF(processing)
if(MC_TICK_CHECK)
return
/datum/var/isprocessing = FALSE
/datum/proc/process()
set waitfor = 0
return PROCESS_KILL
-3
View File
@@ -376,9 +376,6 @@
// Atom procs/vars
///////////////////////////////////
/// UID for the atom which the current atom is orbiting
/atom/movable/var/orbiting_uid = null
/**
* Set an atom to orbit around another one. This atom will follow the base atom's movement and rotate around it.
*
+3
View File
@@ -9,6 +9,9 @@
var/var_edited = FALSE //Warranty void if seal is broken
var/tmp/unique_datum_id = null
/// Used by SSprocessing
var/isprocessing = FALSE
/**
* A cached version of our \ref
* The brunt of \ref costs are in creating entries in the string tree (a tree of immutable strings)
+2
View File
@@ -36,6 +36,8 @@
//Detective Work, used for the duplicate data points kept in the scanners
var/list/original_atom
/// Materials scannable by detective
var/list/suit_fibers
var/admin_spawned = FALSE //was this spawned by an admin? used for stat tracking stuff.
+7
View File
@@ -38,6 +38,13 @@
/// Icon state for thought bubbles. Normally set by mobs.
var/thought_bubble_image = "thought_bubble"
// Atmos
var/pressure_resistance = 10
var/last_high_pressure_movement_air_cycle = 0
/// UID for the atom which the current atom is orbiting
var/orbiting_uid = null
/atom/movable/attempt_init(loc, ...)
var/turf/T = get_turf(src)
if(T && SSatoms.initialized != INITIALIZATION_INSSATOMS && GLOB.space_manager.is_zlevel_dirty(T.z))
-5
View File
@@ -1,8 +1,3 @@
/obj/var/list/req_access = null
/obj/var/req_access_txt = "0"
/obj/var/list/req_one_access = null
/obj/var/req_one_access_txt = "0"
//returns 1 if this mob has sufficient access to use this object
/obj/proc/allowed(mob/M)
//check if we don't require any access at all
+6
View File
@@ -33,6 +33,12 @@
/// Is it emagged or not?
var/emagged = FALSE
// Access-related fields
var/list/req_access = null
var/req_access_txt = "0"
var/list/req_one_access = null
var/req_one_access_txt = "0"
/obj/New()
..()
if(obj_integrity == null)
-2
View File
@@ -64,8 +64,6 @@ GLOBAL_LIST_EMPTY(frozen_atom_list) // A list of admin-frozen atoms.
else
revive()
/mob/living/simple_animal/var/admin_prev_health = null
/mob/living/simple_animal/admin_Freeze(admin)
if(..()) // The result of the parent call here will be the value of the mob's `frozen` variable after they get (un)frozen.
admin_prev_health = health
@@ -335,10 +335,6 @@
/atom/movable/var/pressure_resistance = 10
/atom/movable/var/last_high_pressure_movement_air_cycle = 0
/atom/movable/proc/experience_pressure_difference(pressure_difference, direction, pressure_resistance_prob_delta = 0)
var/const/PROBABILITY_OFFSET = 25
var/const/PROBABILITY_BASE_PRECENT = 75
+3
View File
@@ -127,6 +127,9 @@
///A lazy list of atoms we've examined in the last RECENT_EXAMINE_MAX_WINDOW (default 2) seconds, so that we will call [/atom/proc/examine_more] instead of [/atom/proc/examine] on them when examining
var/list/recent_examines
/// When to next alert admins that mouse macro use was attempted
var/next_mouse_macro_warning
/client/vv_edit_var(var_name, var_value)
switch(var_name)
// I know we will never be in a world where admins are editing client vars to let people bypass TOS
@@ -1,7 +1,5 @@
//CONTAINS: Suit fibers and Detective's Scanning Computer
/atom/var/list/suit_fibers
/atom/proc/add_fibers(mob/living/carbon/human/M)
if(M.gloves && isclothing(M.gloves))
var/obj/item/clothing/gloves/G = M.gloves
@@ -16,6 +16,7 @@
var/alien_disarm_damage = 30 //Aliens deal a good amount of stamina damage on disarm intent
var/alien_slash_damage = 20 //Aliens deal a good amount of damage on harm intent
var/alien_movement_delay = 0 //This can be + or -, how fast an alien moves
var/temperature_resistance = T0C+75
pass_flags = PASSTABLE
//This is fine right now, if we're adding organ specific damage this needs to be updated
@@ -73,8 +74,6 @@
return 0
/mob/living/carbon/alien/humanoid/var/temperature_resistance = T0C+75
/mob/living/carbon/alien/humanoid/movement_delay() //Aliens have a varied movespeed
. = ..()
. += alien_movement_delay
@@ -9,6 +9,7 @@
health = 25
density = FALSE
var/temperature_resistance = T0C+75
var/amount_grown = 0
var/max_grown = 200
var/time_of_birth
@@ -78,8 +79,6 @@
/mob/living/carbon/alien/larva/restrained()
return FALSE
/mob/living/carbon/alien/larva/var/temperature_resistance = T0C+75
// new damage icon system
// now constructs damage icon for each organ from mask * damage field
-2
View File
@@ -49,8 +49,6 @@
#define STOMACH_ATTACK_DELAY 4
/mob/living/carbon/var/last_stomach_attack //defining this here because no one would look in carbon_defines for it
/mob/living/carbon/relaymove(mob/user, direction)
if(LAZYLEN(stomach_contents))
if(user in stomach_contents)
@@ -1,7 +1,10 @@
/mob/living/carbon
gender = MALE
pressure_resistance = 15
var/list/stomach_contents
var/last_stomach_attack
var/list/processing_patches
var/list/internal_organs = list()
var/list/internal_organs_slot = list() //Same as above, but stores "slot ID" - "organ" pairs for easy access.
@@ -86,3 +86,9 @@
var/list/splinted_limbs = list() //limbs we know are splinted
var/original_eye_color = "#000000"
var/list/bodyparts = list()
/// map organ names to organs
var/list/bodyparts_by_name = list()
var/temperature_resistance = T0C+75
@@ -293,9 +293,6 @@
if(!. && istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
. = wear_suit
/mob/living/carbon/human/var/temperature_resistance = T0C+75
/mob/living/carbon/human/show_inv(mob/user)
user.set_machine(src)
var/has_breathable_mask = istype(wear_mask, /obj/item/clothing/mask) || get_organ_slot("breathing_tube")
@@ -4,9 +4,6 @@
eyes.update_colour()
update_body()
/mob/living/carbon/human/var/list/bodyparts = list()
/mob/living/carbon/human/var/list/bodyparts_by_name = list() // map organ names to organs
// Takes care of organ related updates, such as broken and missing limbs
/mob/living/carbon/human/handle_organs()
..()
@@ -139,6 +139,9 @@
/// Can this simple mob crawl or not? If FALSE, it won't get immobilized by crawling
var/can_crawl = FALSE
/// Health of the mob before being admin-frozen, restored afterwards
var/admin_prev_health = null
/mob/living/simple_animal/Initialize(mapload)
. = ..()
GLOB.simple_animals[AIStatus] += src
+4 -4
View File
@@ -119,28 +119,28 @@
* Associative list of JSON-encoded shared states that were set by
* tgui clients.
*/
/datum/var/list/tgui_shared_states
/* check_grep:ignore */ /datum/var/list/tgui_shared_states
/**
* global
*
* Tracks open UIs for a user.
*/
/mob/var/list/tgui_open_uis = list()
/* check_grep:ignore */ /mob/var/list/tgui_open_uis = list()
/**
* global
*
* Tracks open windows for a user.
*/
/client/var/list/tgui_windows = list()
/* check_grep:ignore */ /client/var/list/tgui_windows = list()
/**
* global
*
* TRUE if cache was reloaded by tgui dev server at least once.
*/
/client/var/tgui_cache_reloaded = FALSE
/* check_grep:ignore */ /client/var/tgui_cache_reloaded = FALSE
/**
* public
+1 -1
View File
@@ -4,7 +4,7 @@
*/
/// Admin music volume, from 0 to 1.
/client/var/admin_music_volume = 1
/* check_grep:ignore */ /client/var/admin_music_volume = 1
/**
* public
+3 -3
View File
@@ -15,11 +15,11 @@
#define TGUI_TELEMETRY_RESPONSE_WINDOW 30 SECONDS
/// Time of telemetry request
/datum/tgui_panel/var/telemetry_requested_at
/* check_grep:ignore */ /datum/tgui_panel/var/telemetry_requested_at
/// Time of telemetry analysis completion
/datum/tgui_panel/var/telemetry_analyzed_at
/* check_grep:ignore */ /datum/tgui_panel/var/telemetry_analyzed_at
/// List of previous client connections
/datum/tgui_panel/var/list/telemetry_connections
/* check_grep:ignore */ /datum/tgui_panel/var/list/telemetry_connections
/**
* private
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: MIT
*/
/client/var/datum/tgui_panel/tgui_panel
/* check_grep:ignore */ /client/var/datum/tgui_panel/tgui_panel
/**
* tgui panel / chat troubleshooting verb