From 60d58d5b37f8740467855bdeae59c5475c67773d Mon Sep 17 00:00:00 2001 From: farie82 Date: Sat, 15 Feb 2020 02:22:10 +0100 Subject: [PATCH] Fixes 4 runtimes (#12974) * Fixes proc: /datum/money_account/proc/charge * Fixes necropolis_chests.dm,214 proc: /obj/item/rod_of_asclepius/attack_self * fixes: give.dm,25 proc: /mob/living/carbon/verb/give * Fixes: game.dm,495 proc: /proc/pollCandidates --- code/__HELPERS/game.dm | 5 ++++- code/modules/economy/ATM.dm | 2 +- code/modules/mining/lavaland/necropolis_chests.dm | 2 +- code/modules/mob/living/carbon/give.dm | 7 ++++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 744b8b86a9a..0ab10447f8c 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -478,7 +478,10 @@ proc/pollCandidates(Question, be_special_type, antag_age_check = FALSE, poll_tim G << 'sound/misc/notice2.ogg'//Alerting them to their consideration if(flashwindow) window_flash(G.client) - switch(alert(G,Question,"Please answer in [poll_time/10] seconds!","No","Yes","Not This Round")) + var/ans = alert(G,Question,"Please answer in [poll_time/10] seconds!","No","Yes","Not This Round") + if(!G?.client) + return + switch(ans) if("Yes") to_chat(G, "Choice registered: Yes.") if((world.time-time_passed)>poll_time)//If more than 30 game seconds passed. diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index eafd038977d..df542964163 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -71,7 +71,7 @@ log transactions playsound(loc, pick('sound/items/polaroid1.ogg', 'sound/items/polaroid2.ogg'), 50, 1) for(var/obj/item/stack/spacecash/S in T) S.use(S.amount) - authenticated_account.charge(-cash_amount, null, "Credit deposit", terminal_id = machine_id, dest_name = "Terminal") + authenticated_account.charge(-cash_amount, null, "Credit deposit", machine_id, "Terminal") /obj/machinery/atm/proc/reconnect_database() for(var/obj/machinery/computer/account_database/DB in GLOB.machines) diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index ffe7a062bbe..904a3462808 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -189,7 +189,7 @@ return var/failText = "The snake seems unsatisfied with your incomplete oath and returns to its previous place on the rod, returning to its dormant, wooden state. You must stand still while completing your oath!" to_chat(itemUser, "The wooden snake that was carved into the rod seems to suddenly come alive and begins to slither down your arm! The compulsion to help others grows abnormally strong...") - if(do_after(itemUser, 40, target = itemUser)) + if(do_after_once(itemUser, 40, target = itemUser)) itemUser.say("I swear to fulfill, to the best of my ability and judgment, this covenant:") else to_chat(itemUser, failText) diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index c0dba9b77e5..a53c4af4563 100644 --- a/code/modules/mob/living/carbon/give.dm +++ b/code/modules/mob/living/carbon/give.dm @@ -18,10 +18,11 @@ to_chat(usr, "That's not exactly something you can give.") return if(target.r_hand == null || target.l_hand == null) - switch(alert(target,"[usr] wants to give you \a [I]?",,"Yes","No")) + var/ans = alert(target,"[usr] wants to give you \a [I]?",,"Yes","No") + if(!I || !target) + return + switch(ans) if("Yes") - if(!I) - return if(target.incapacitated() || usr.incapacitated()) return if(!Adjacent(target))