Changes over all instances of new/list() to something more sensible (#25569)

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
DGamerL
2024-06-06 22:23:33 +02:00
committed by GitHub
parent 25d0e71004
commit 3db0b5d98d
30 changed files with 57 additions and 57 deletions
+1 -1
View File
@@ -716,7 +716,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
return
var/list/types = typesof(/atom)
var/list/matches = new()
var/list/matches = list()
var/include_subtypes = TRUE
if(copytext(object, -1) == ".")
@@ -5,7 +5,7 @@
icon_keyboard = "atmos_key"
circuit = /obj/item/circuitboard/area_atmos
var/list/connectedscrubbers = new()
var/list/connectedscrubbers = list()
var/status = ""
var/range = 25
+1 -1
View File
@@ -72,7 +72,7 @@
var/list/organ_data = list()
var/list/rlimb_data = list()
var/list/player_alt_titles = new() // the default name of a job like "Medical Doctor"
var/list/player_alt_titles = list() // the default name of a job like "Medical Doctor"
var/flavor_text = ""
var/med_record = ""
var/sec_record = ""
@@ -348,7 +348,7 @@
SEND_SIGNAL(src, COMSIG_HUMAN_UPDATE_DNA)
/mob/living/carbon/human/proc/generate_valid_species(check_whitelist = TRUE, list/whitelist = list(), list/blacklist = list())
var/list/valid_species = new()
var/list/valid_species = list()
for(var/current_species_name in GLOB.all_species)
if(check_whitelist && !check_rights(R_ADMIN, FALSE, src)) //If we're using the whitelist, make sure to check it!
if(length(whitelist) && !(current_species_name in whitelist))
@@ -363,7 +363,7 @@
return sortTim(valid_species, GLOBAL_PROC_REF(cmp_text_asc))
/mob/living/carbon/human/proc/generate_valid_hairstyles()
var/list/valid_hairstyles = new()
var/list/valid_hairstyles = list()
var/obj/item/organ/external/head/H = get_organ("head")
if(!H)
return //No head, no hair.
@@ -389,7 +389,7 @@
return sortTim(valid_hairstyles, GLOBAL_PROC_REF(cmp_text_asc))
/mob/living/carbon/human/proc/generate_valid_facial_hairstyles()
var/list/valid_facial_hairstyles = new()
var/list/valid_facial_hairstyles = list()
var/obj/item/organ/external/head/H = get_organ("head")
if(!H)
return //No head, no hair.
@@ -416,7 +416,7 @@
return sortTim(valid_facial_hairstyles, GLOBAL_PROC_REF(cmp_text_asc))
/mob/living/carbon/human/proc/generate_valid_head_accessories()
var/list/valid_head_accessories = new()
var/list/valid_head_accessories = list()
var/obj/item/organ/external/head/H = get_organ("head")
if(!H)
return //No head, no head accessory.
@@ -431,7 +431,7 @@
return sortTim(valid_head_accessories, GLOBAL_PROC_REF(cmp_text_asc))
/mob/living/carbon/human/proc/generate_valid_markings(location = "body")
var/list/valid_markings = new()
var/list/valid_markings = list()
var/obj/item/organ/external/head/H = get_organ("head")
if(!H && location == "head")
return //No head, no head markings.
@@ -1492,7 +1492,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
update_body()
/mob/living/carbon/human/proc/get_overlays_copy(list/unwantedLayers)
var/list/out = new
var/list/out = list()
for(var/i=1;i<=TOTAL_LAYERS;i++)
if(overlays_standing[i])
if(i in unwantedLayers)
@@ -439,7 +439,7 @@
/datum/species/golem/bluespace/proc/reactive_teleport(mob/living/carbon/human/H)
H.visible_message("<span class='warning'>[H] teleports!</span>", "<span class='danger'>You destabilize and teleport!</span>")
var/list/turfs = new/list()
var/list/turfs = list()
for(var/turf/T in orange(tele_range, H))
if(T.density)
continue
@@ -521,7 +521,7 @@
/datum/action/innate/unstable_teleport/proc/teleport(mob/living/carbon/human/H)
activated = FALSE
H.visible_message("<span class='warning'>[H] teleports!</span>", "<span class='danger'>You teleport!</span>")
var/list/turfs = new/list()
var/list/turfs = list()
for(var/turf/T in orange(tele_range, H))
if(isspaceturf(T))
continue
@@ -49,7 +49,7 @@
return parts
/mob/living/silicon/robot/proc/get_damageable_components()
var/list/rval = new
var/list/rval = list()
for(var/V in components)
var/datum/robot_component/C = components[V]
if(C.installed)
@@ -112,7 +112,7 @@
return 0
/mob/living/silicon/proc/law_channels()
var/list/channels = new()
var/list/channels = list()
channels += MAIN_CHANNEL
var/obj/item/radio/radio = get_radio()
channels += radio.channels
@@ -476,7 +476,7 @@
pulse2.anchored = TRUE
pulse2.dir = pick(GLOB.cardinal)
QDEL_IN(pulse2, 1 SECONDS)
var/list/mob/living/carbon/targets = new
var/list/mob/living/carbon/targets = list()
for(var/mob/living/carbon/C in view(12,src))
if(C.stat==2)
continue
+2 -2
View File
@@ -190,7 +190,7 @@
// based on say code
var/omsg = replacetext(message, "<B>[src]</B> ", "")
var/list/listening_obj = new
var/list/listening_obj = list()
for(var/atom/movable/A in view(range, src))
if(ismob(A))
var/mob/M = A
@@ -545,7 +545,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
* Mobs out of view but in range will be listed as unknown. Else they will have their visible name
*/
/mob/proc/get_telepathic_targets()
var/list/validtargets = new /list()
var/list/validtargets = list() /list()
var/turf/T = get_turf(src)
var/list/mobs_in_view = get_visible_mobs()
@@ -8,7 +8,7 @@
throw_speed = 2
throw_range = 10
force = 5
var/list/grenades = new/list()
var/list/grenades = list()
var/max_grenades = 3
materials = list(MAT_METAL=2000)
@@ -21,7 +21,7 @@
*/
/datum/reagents
/// All contained reagents. More specifically, references to the reagent datums.
var/list/datum/reagent/reagent_list = new/list()
var/list/datum/reagent/reagent_list = list()
/// The total volume of all reagents in this holder.
var/total_volume = 0
/// This is the maximum volume of the holder.
@@ -31,8 +31,8 @@
var/chem_temp = T20C
var/temperature_min = 0
var/temperature_max = 10000
var/list/datum/reagent/addiction_list = new/list()
var/list/addiction_threshold_accumulated = new/list()
var/list/datum/reagent/addiction_list = list()
var/list/addiction_threshold_accumulated = list()
var/flags
/datum/reagents/New(maximum = 100, temperature_minimum, temperature_maximum)
@@ -463,7 +463,7 @@
var/total_matching_catalysts = 0
var/matching_container = FALSE
var/matching_other = FALSE
var/list/multipliers = new/list()
var/list/multipliers = list()
var/min_temp = C.min_temp //Minimum temperature required for the reaction to occur (heat to/above this)
var/max_temp = C.max_temp //Maximum temperature allowed for the reaction to occur (cool to/below this)
for(var/B in C.required_reagents)
@@ -819,7 +819,7 @@
if(R.id == id)
return R
return
return
/datum/reagents/proc/remove_all_type(reagent_type, amount, strict = FALSE, safety = TRUE) // Removes all reagent of X type. @strict set to 1 determines whether the childs of the type are included.
if(!isnum(amount))