From fb06547f9728a492a88c5a7cd9630213fcec8226 Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Mon, 19 Apr 2021 14:50:30 +0100 Subject: [PATCH] Various bugfixes (#15873) * pAI Record Fix * AI Respawnability * Wine Reagents * Ghost Repulsing * Agent ID Card Numbers * Maint Drone Lights * Fix fixes Co-authored-by: Farie82 * Headpocket runtimes Co-authored-by: Farie82 --- code/datums/spells/wizard.dm | 2 +- code/game/objects/items/weapons/cards_ids.dm | 2 +- code/modules/hydroponics/grown/citrus.dm | 2 +- code/modules/hydroponics/grown/cocoa_vanilla.dm | 1 - code/modules/hydroponics/grown/tobacco.dm | 2 +- code/modules/mob/living/silicon/ai/latejoin.dm | 2 +- code/modules/mob/living/silicon/robot/drone/drone.dm | 4 ++++ code/modules/mob/living/silicon/robot/robot.dm | 7 +++++-- code/modules/pda/cart_apps.dm | 2 +- code/modules/surgery/organs/subtypes/skrell.dm | 9 ++++++--- 10 files changed, 21 insertions(+), 12 deletions(-) diff --git a/code/datums/spells/wizard.dm b/code/datums/spells/wizard.dm index a954f72cb13..acaeeb41487 100644 --- a/code/datums/spells/wizard.dm +++ b/code/datums/spells/wizard.dm @@ -374,7 +374,7 @@ for(var/am in thrownatoms) var/atom/movable/AM = am - if(AM == user || AM.anchored) + if(AM == user || AM.anchored || AM.move_resist == INFINITY) continue throwtarget = get_edge_target_turf(user, get_dir(user, get_step_away(AM, user))) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 797932190ed..f181233e9ba 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -363,7 +363,7 @@ /obj/item/card/id/syndicate/attack_self(mob/user as mob) if(!src.registered_name) - var/t = reject_bad_name(input(user, "What name would you like to use on this card?", "Agent Card name", ishuman(user) ? user.real_name : user.name)) + var/t = reject_bad_name(input(user, "What name would you like to use on this card?", "Agent Card name", ishuman(user) ? user.real_name : user.name), TRUE) if(!t) to_chat(user, "Invalid name.") return diff --git a/code/modules/hydroponics/grown/citrus.dm b/code/modules/hydroponics/grown/citrus.dm index 72bd5fe8bf7..a937a8a6ebb 100644 --- a/code/modules/hydroponics/grown/citrus.dm +++ b/code/modules/hydroponics/grown/citrus.dm @@ -58,7 +58,7 @@ icon_state = "orange" // Sprite created by https://github.com/binarysudoku for Goonstation, They have relicensed it for our use. tastes = list("orange" = 1) filling_color = "#FFA500" - distill_reagent = "triple_sec" + distill_reagent = "tequilasunrise" // Lemon /obj/item/seeds/lemon diff --git a/code/modules/hydroponics/grown/cocoa_vanilla.dm b/code/modules/hydroponics/grown/cocoa_vanilla.dm index ad80934ca18..136b4c7dbf4 100644 --- a/code/modules/hydroponics/grown/cocoa_vanilla.dm +++ b/code/modules/hydroponics/grown/cocoa_vanilla.dm @@ -26,7 +26,6 @@ filling_color = "#FFD700" bitesize_mod = 2 tastes = list("cocoa" = 1) - distill_reagent = "creme_de_cacao" // Vanilla Pod /obj/item/seeds/cocoapod/vanillapod diff --git a/code/modules/hydroponics/grown/tobacco.dm b/code/modules/hydroponics/grown/tobacco.dm index 3087fa1dddb..36be1599728 100644 --- a/code/modules/hydroponics/grown/tobacco.dm +++ b/code/modules/hydroponics/grown/tobacco.dm @@ -22,7 +22,7 @@ icon_state = "tobacco_leaves" tastes = list("tobacco" = 1) filling_color = "#008000" - distill_reagent = "creme_de_menthe" //Menthol, I guess. + distill_reagent = "menthol" // Space Tobacco /obj/item/seeds/tobacco/space diff --git a/code/modules/mob/living/silicon/ai/latejoin.dm b/code/modules/mob/living/silicon/ai/latejoin.dm index e1be5450811..449df48288a 100644 --- a/code/modules/mob/living/silicon/ai/latejoin.dm +++ b/code/modules/mob/living/silicon/ai/latejoin.dm @@ -28,7 +28,7 @@ GLOBAL_LIST_EMPTY(empty_playable_ai_cores) current_mode.possible_traitors.Remove(src) // Ghost the current player and disallow them to return to the body - ghostize(FALSE) + ghostize() // Delete the old AI shell qdel(src) diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 42c9cd6fe65..00f70a7031a 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -362,6 +362,10 @@ . = ..() density = emagged //this is reset every canmove update otherwise +/mob/living/silicon/robot/drone/add_ventcrawl(obj/machinery/atmospherics/starting_machine) + ..() + update_headlamp(TRUE, 0, FALSE) + /mob/living/silicon/robot/drone/flash_eyes(intensity = 1, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE) if(affect_silicon) return ..() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index caacfc0e34b..c67d64a72b1 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1146,17 +1146,20 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( if(stat || lamp_recharging || low_power_mode) to_chat(src, "This function is currently offline.") return + if(is_ventcrawling(src)) + return //Some sort of magical "modulo" thing which somehow increments lamp power by 2, until it hits the max and resets to 0. lamp_intensity = (lamp_intensity+2) % (lamp_max+2) to_chat(src, "[lamp_intensity ? "Headlamp power set to Level [lamp_intensity/2]" : "Headlamp disabled."]") update_headlamp() -/mob/living/silicon/robot/proc/update_headlamp(turn_off = 0, cooldown = 100) +/mob/living/silicon/robot/proc/update_headlamp(turn_off = 0, cooldown = 100, show_warning = TRUE) set_light(0) if(lamp_intensity && (turn_off || stat || low_power_mode)) - to_chat(src, "Your headlamp has been deactivated.") + if(show_warning) + to_chat(src, "Your headlamp has been deactivated.") lamp_intensity = 0 lamp_recharging = 1 spawn(cooldown) //10 seconds by default, if the source of the deactivation does not keep stat that long. diff --git a/code/modules/pda/cart_apps.dm b/code/modules/pda/cart_apps.dm index 1dbd072b263..4606003b49e 100644 --- a/code/modules/pda/cart_apps.dm +++ b/code/modules/pda/cart_apps.dm @@ -148,7 +148,7 @@ . = TRUE - if(!pda.silent) + if(pda && !pda.silent) playsound(pda, 'sound/machines/terminal_select.ogg', 15, TRUE) switch(action) diff --git a/code/modules/surgery/organs/subtypes/skrell.dm b/code/modules/surgery/organs/subtypes/skrell.dm index 9021e53393b..46ca75b623f 100644 --- a/code/modules/surgery/organs/subtypes/skrell.dm +++ b/code/modules/surgery/organs/subtypes/skrell.dm @@ -51,15 +51,18 @@ held_item = null /obj/item/organ/internal/headpocket/emp_act(severity) - held_item.emp_act(severity) + if(held_item) + held_item.emp_act(severity) ..() /obj/item/organ/internal/headpocket/hear_talk(mob/living/M, list/message_pieces) - held_item.hear_talk(M, message_pieces) + if(held_item) + held_item.hear_talk(M, message_pieces) ..() /obj/item/organ/internal/headpocket/hear_message(mob/living/M, msg) - held_item.hear_message(M, msg) + if(held_item) + held_item.hear_message(M, msg) ..() /obj/item/organ/internal/heart/skrell