Initialize and GC failure fixes #1 (#13190)

This commit is contained in:
mikomyazaki
2022-02-15 23:45:30 +01:00
committed by GitHub
parent ab1833fe86
commit 08ea043e69
12 changed files with 31 additions and 27 deletions
@@ -104,7 +104,7 @@
var/list/viruses = list()
/obj/effect/decal/cleanable/vomit/Initialize()
..()
. = ..()
create_reagents(20, src)
/obj/effect/decal/cleanable/tomato_smudge
+5 -8
View File
@@ -214,11 +214,15 @@
/obj/item/glass_jar/gumball
contains = JAR_GUMBALL
var/gumball_path = /obj/item/clothing/mask/chewable/candy/gum/gumball
/obj/item/glass_jar/gumball/medical
gumball_path = /obj/item/clothing/mask/chewable/candy/gum/gumball/medical
/obj/item/glass_jar/gumball/Initialize()
..()
for(var/i = 1 to GUMBALL_MAX)
var/obj/item/clothing/mask/chewable/candy/gum/gumball/G = new(src)
var/obj/item/clothing/mask/chewable/candy/gum/gumball/G = new gumball_path(src)
contained += G
return INITIALIZE_HINT_LATELOAD
@@ -226,13 +230,6 @@
/obj/item/glass_jar/gumball/LateInitialize()
update_icon()
/obj/item/glass_jar/gumball/medical/Initialize()
for(var/i = 1 to GUMBALL_MAX)
var/obj/item/clothing/mask/chewable/candy/gum/gumball/medical/G = new(src)
contained += G
return INITIALIZE_HINT_LATELOAD
#undef JAR_NOTHING
#undef JAR_MONEY
#undef JAR_ANIMAL
+1 -1
View File
@@ -25,7 +25,7 @@
var/mob/living/pulling
/obj/structure/janitorialcart/full/Initialize()
..()
. = ..()
mybag = new /obj/item/storage/bag/trash(src)
mymop = new /obj/item/mop(src)
myspray = new /obj/item/reagent_containers/spray/cleaner(src)
@@ -354,7 +354,7 @@
slowdown = 0
/obj/structure/bed/roller/Initialize()
..()
. = ..()
LAZYADD(can_buckle, /obj/structure/closet/body_bag)
/obj/structure/bed/roller/Destroy()
+6
View File
@@ -104,6 +104,7 @@
changing_turf = FALSE
turfs -= src
remove_cleanables()
cleanup_roof()
if (ao_queued)
@@ -524,3 +525,8 @@ var/const/enterloopsanity = 100
/turf/proc/is_floor()
return FALSE
/turf/proc/remove_cleanables()
for(var/obj/effect/O in src)
if(istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable))
qdel(O)
+4
View File
@@ -178,6 +178,10 @@
listening_objects += src
/obj/item/device/assembly_holder/Destroy()
if(a_left)
a_left.holder = null
if(a_right)
a_right.holder = null
listening_objects -= src
return ..()
@@ -7,14 +7,14 @@
var/label_text = ""
/obj/item/sample/Initialize(var/newloc, var/atom/supplied)
..(newloc)
. = ..(newloc)
if(supplied)
copy_evidence(supplied)
name = "[initial(name)] ([supplied.get_swab_name()])"
LAZYADD(source, supplied.get_swab_name())
/obj/item/sample/print/Initialize(var/newloc, var/atom/supplied)
..(newloc, supplied)
. = ..(newloc, supplied)
if(LAZYLEN(evidence))
icon_state = "fingerprint1"
@@ -68,12 +68,6 @@
else
name = "[initial(name)] ([label_text])"
/obj/item/sample/Initialize(var/newloc, var/atom/supplied)
..(newloc)
if(supplied)
copy_evidence(supplied)
name = "[initial(name)] ([supplied.get_swab_name()])"
LAZYADD(source, supplied.get_swab_name())
/atom/proc/get_swab_name()
return "\the [initial(name)]"
@@ -222,7 +222,7 @@
..()
/mob/living/heavy_vehicle/premade/random/boring/Initialize(mapload, var/obj/structure/heavy_vehicle_frame/source_frame)
..(mapload, source_frame, using_boring_colours = TRUE)
. = ..(mapload, source_frame, using_boring_colours = TRUE)
/mob/living/heavy_vehicle/premade/random/extra/Initialize(mapload, var/obj/structure/heavy_vehicle_frame/source_frame)
..(mapload, source_frame, super_random = TRUE)
. = ..(mapload, source_frame, super_random = TRUE)
+1 -1
View File
@@ -441,7 +441,7 @@
anchored = TRUE
/obj/item/stack/flag/red/planted/Initialize()
..()
. = ..()
base_state = "redflag"
set_light(2)
+1 -1
View File
@@ -271,7 +271,7 @@
announce_ghost_joinleave(src)
var/mob/living/carbon/human/dummy/mannequin/mannequin = new
client.prefs.dress_preview_mob(mannequin)
observer.appearance = mannequin
observer.appearance = mannequin.appearance
observer.appearance_flags = KEEP_TOGETHER
observer.alpha = 127
observer.layer = initial(observer.layer)
@@ -276,14 +276,12 @@
. =..()
if(!.)
return
if(!stat && prob(3) && eggsleft > 0)
if(!stat && prob(3) && eggsleft > 0 && chicken_count < MAX_CHICKENS)
visible_message("[src] [pick("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.")]")
eggsleft--
var/obj/item/reagent_containers/food/snacks/egg/E = new(get_turf(src))
E.pixel_x = rand(-6,6)
E.pixel_y = rand(-6,6)
if(chicken_count < MAX_CHICKENS && prob(10))
START_PROCESSING(SSprocessing, E)
// Penguins
+6 -1
View File
@@ -344,11 +344,16 @@
pointing_effect = new /obj/effect/decal/point(tile)
pointing_effect.invisibility = invisibility
addtimer(CALLBACK(GLOBAL_PROC, /proc/qdel, pointing_effect), 2 SECONDS)
addtimer(CALLBACK(.proc/end_pointing_effect), 2 SECONDS)
face_atom(A)
return 1
/mob/proc/end_pointing_effect()
if(pointing_effect)
qdel(pointing_effect)
pointing_effect = null
/mob/verb/mode()
set name = "Activate Held Object"
set category = "Object"