From df4ca4b503a92c09f3b706834ab823438d55bf82 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sat, 25 Jan 2020 19:29:03 -0700 Subject: [PATCH] do after --- code/modules/pool/pool_controller.dm | 58 ++++++++++++++-------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/code/modules/pool/pool_controller.dm b/code/modules/pool/pool_controller.dm index 07a982e412..a044bbb070 100644 --- a/code/modules/pool/pool_controller.dm +++ b/code/modules/pool/pool_controller.dm @@ -105,34 +105,36 @@ if(stat & (BROKEN)) return if(istype(W,/obj/item/reagent_containers)) - if(!W.reagents.total_volume) //check if there's reagent - for(var/datum/reagent/R in W.reagents.reagent_list) - if(R.type in GLOB.blacklisted_pool_reagents) - to_chat(user, "[src] cannot accept [R.name].") - return - if(R.reagent_state == SOLID) - to_chat(user, "The pool cannot accept reagents in solid form!.") - return - reagents.clear_reagents() - // This also reacts them. No nitroglycerin deathpools, sorry gamers :( - W.reagents.trans_to(reagents, max_beaker_transfer) - user.visible_message("[src] makes a slurping noise.", "All of the contents of [W] are quickly suctioned out by the machine!= min_reagent_amount) - reagent_names += R.name - else - reagents.remove_reagent(R.type, INFINITY) - rejected += R.name - if(length(reagent_names)) - reagent_names = english_list(reagent_names) - log_game("[key_name(user)] has changed the [src] chems to [reagent_names]") - message_admins("[key_name_admin(user)] has changed the [src] chems to [reagent_names].") - if(length(rejected)) - rejected = english_list(rejected) - to_chat(user, "[src] rejects the following chemicals as they do not have at least [min_reagent_amount] units of volume: [rejected]") + if(W.reagents.total_volume) //check if there's reagent + user.visible_message("[user] is feeding [src] some chemicals from [w].") + if(do_after(user, 50, target = src)) + for(var/datum/reagent/R in W.reagents.reagent_list) + if(R.type in GLOB.blacklisted_pool_reagents) + to_chat(user, "[src] cannot accept [R.name].") + return + if(R.reagent_state == SOLID) + to_chat(user, "The pool cannot accept reagents in solid form!.") + return + reagents.clear_reagents() + // This also reacts them. No nitroglycerin deathpools, sorry gamers :( + W.reagents.trans_to(reagents, max_beaker_transfer) + user.visible_message("[src] makes a slurping noise.", "All of the contents of [W] are quickly suctioned out by the machine!= min_reagent_amount) + reagent_names += R.name + else + reagents.remove_reagent(R.type, INFINITY) + rejected += R.name + if(length(reagent_names)) + reagent_names = english_list(reagent_names) + log_game("[key_name(user)] has changed the [src] chems to [reagent_names]") + message_admins("[key_name_admin(user)] has changed the [src] chems to [reagent_names].") + if(length(rejected)) + rejected = english_list(rejected) + to_chat(user, "[src] rejects the following chemicals as they do not have at least [min_reagent_amount] units of volume: [rejected]") else to_chat(user, "[src] beeps unpleasantly as it rejects the beaker. Why are you trying to feed it an empty beaker?") return