From bd9df398792ee2b2106fbe1224b9b23d5afc7ff9 Mon Sep 17 00:00:00 2001 From: Leshana Date: Mon, 3 Feb 2020 10:17:09 -0500 Subject: [PATCH 1/3] Fix Runtime in areas.dm,307: Cannot read null.len area.ambience is never expected to be null. --- maps/RandomZLevels/labyrinth.dm | 2 +- maps/RandomZLevels/snowfield.dm | 2 +- maps/tether/submaps/gateway/snowfield.dm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/maps/RandomZLevels/labyrinth.dm b/maps/RandomZLevels/labyrinth.dm index 86d1f15214..4ded38897f 100644 --- a/maps/RandomZLevels/labyrinth.dm +++ b/maps/RandomZLevels/labyrinth.dm @@ -10,7 +10,7 @@ /area/awaymission/labyrinth/temple icon_state = "away" - ambience = null // Todo: Add better ambience. + ambience = list() // Todo: Add better ambience. /area/awaymission/labyrinth/temple/entry icon_state = "chapel" diff --git a/maps/RandomZLevels/snowfield.dm b/maps/RandomZLevels/snowfield.dm index 8cfed032f5..fddee39173 100644 --- a/maps/RandomZLevels/snowfield.dm +++ b/maps/RandomZLevels/snowfield.dm @@ -40,7 +40,7 @@ /area/awaymission/snowfield/base icon_state = "away" - ambience = null // Todo: Add better ambience. + ambience = list() // Todo: Add better ambience. // -- Mobs -- // diff --git a/maps/tether/submaps/gateway/snowfield.dm b/maps/tether/submaps/gateway/snowfield.dm index 80f3e07f74..bf72d5b299 100644 --- a/maps/tether/submaps/gateway/snowfield.dm +++ b/maps/tether/submaps/gateway/snowfield.dm @@ -40,7 +40,7 @@ /area/awaymission/snowfield/base icon_state = "away" - ambience = null // Todo: Add better ambience. + ambience = list() // Todo: Add better ambience. // -- Mobs -- // From b7da2218566490c462f5b62ec84e52999b01e668 Mon Sep 17 00:00:00 2001 From: Leshana Date: Mon, 3 Feb 2020 13:27:45 -0500 Subject: [PATCH 2/3] Fixes Runtime in living_vr.dm,428: Cannot read null.name This was happening when null is passed for belly. Now it will print *null* Also fixed root cause (at least one of them). Animals can't have vore attributes enabled when vore_active = 0 because then they don't get a belly. --- .../mob/living/simple_mob/subtypes/animal/passive/fish_vr.dm | 1 + code/modules/vore/eating/living_vr.dm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish_vr.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish_vr.dm index c1cef3831a..adb180f9fe 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish_vr.dm @@ -69,6 +69,7 @@ icon_dead = "measelshark-dead" meat_amount = 6 //Big fish, tons of meat. Great for feasts. meat_type = /obj/item/weapon/reagent_containers/food/snacks/sliceable/sharkchunk + vore_active = 1 vore_bump_chance = 100 vore_default_mode = DM_HOLD //docile shark vore_capacity = 5 diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 6582a840c4..c70a18d2dd 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -425,7 +425,7 @@ /mob/living/proc/perform_the_nom(var/mob/living/user, var/mob/living/prey, var/mob/living/pred, var/obj/belly/belly, var/delay) //Sanity if(!user || !prey || !pred || !istype(belly) || !(belly in pred.vore_organs)) - log_debug("[user] attempted to feed [prey] to [pred], via [lowertext(belly.name)] but it went wrong.") + log_debug("[user] attempted to feed [prey] to [pred], via [belly ? lowertext(belly.name) : "*null*"] but it went wrong.") return // The belly selected at the time of noms From fffd922cde463be9a5a246b9ef8371384b81ecf5 Mon Sep 17 00:00:00 2001 From: Leshana Date: Tue, 4 Feb 2020 15:56:20 -0500 Subject: [PATCH 3/3] Fix character setup preview icons rendering prior to SSAtoms initialization - Rendering the characters involved creating mannequin mobs, prior to SSAtoms init these would not be initialized and thus have no DNA. This prints many warning messages, causes runtimes, and ultimately the icon does not render correctly. - Its fixed here since it seems that needing to use mobs prior to initialization is a pretty unique edge case. Comment added to explain to future us. --- code/modules/mob/new_player/preferences_setup_vr.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob/new_player/preferences_setup_vr.dm b/code/modules/mob/new_player/preferences_setup_vr.dm index 8b1760c65c..04910731c1 100644 --- a/code/modules/mob/new_player/preferences_setup_vr.dm +++ b/code/modules/mob/new_player/preferences_setup_vr.dm @@ -1,5 +1,7 @@ /datum/preferences/update_preview_icon() // Lines up and un-overlaps character edit previews. Also un-splits taurs. var/mob/living/carbon/human/dummy/mannequin/mannequin = get_mannequin(client_ckey) + if(!mannequin.dna) // Special handling for preview icons before SSAtoms has initailized. + mannequin.dna = new /datum/dna(null) mannequin.delete_inventory(TRUE) dress_preview_mob(mannequin) COMPILE_OVERLAYS(mannequin)