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
@@ -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()