From caee8d45b42bf6cc8670ccf560c5f3ad878a1b12 Mon Sep 17 00:00:00 2001 From: MarinaGryphon Date: Thu, 8 Jul 2021 12:45:55 -0500 Subject: [PATCH] Changes existing do_afters to new exclusive flags. --- code/game/objects/items/devices/denecrotizer_vr.dm | 6 +++--- code/game/objects/items/stacks/medical.dm | 2 +- code/game/objects/items/stacks/nanopaste.dm | 6 +++--- code/game/objects/items/weapons/storage/pouches.dm | 4 ++-- .../human/species/station/station_special_abilities_vr.dm | 4 ++-- code/modules/mob/living/simple_mob/subtypes/vore/softdog.dm | 2 +- code/modules/vore/eating/living_vr.dm | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/code/game/objects/items/devices/denecrotizer_vr.dm b/code/game/objects/items/devices/denecrotizer_vr.dm index 5881598550..8aeaba5b0d 100644 --- a/code/game/objects/items/devices/denecrotizer_vr.dm +++ b/code/game/objects/items/devices/denecrotizer_vr.dm @@ -145,7 +145,7 @@ return FALSE if(!target.mind) user.visible_message("[user] gently presses [src] to [target]...", runemessage = "presses [src] to [target]") - if(do_after(user, revive_time, exclusive = 1, target = target)) + if(do_after(user, revive_time, exclusive = TASK_USER_EXCLUSIVE, target = target)) target.faction = user.faction target.revivedby = user.name target.ghostjoin = 1 @@ -166,7 +166,7 @@ /obj/item/device/denecrotizer/proc/ghostjoin_rez(mob/living/simple_mob/target, mob/living/user) user.visible_message("[user] gently presses [src] to [target]...", runemessage = "presses [src] to [target]") - if(do_after(user, revive_time, exclusive = 1, target = target)) + if(do_after(user, revive_time, exclusive = TASK_ALL_EXCLUSIVE, target = target)) target.faction = user.faction target.revivedby = user.name target.ai_holder.returns_home = FALSE @@ -190,7 +190,7 @@ /obj/item/device/denecrotizer/proc/basic_rez(mob/living/simple_mob/target, mob/living/user) //so medical can have a way to bring back people's pets or whatever, does not change any settings about the mob or offer it to ghosts. user.visible_message("[user] presses [src] to [target]...", runemessage = "presses [src] to [target]") - if(do_after(user, revive_time, exclusive = 1, target = target)) + if(do_after(user, revive_time, exclusive = TASK_ALL_EXCLUSIVE, target = target)) target.revive() target.sight = initial(target.sight) target.see_in_dark = initial(target.see_in_dark) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 629a383433..f065ec3ea1 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -408,7 +408,7 @@ to_chat(user, "You can't apply a splint to the arm you're using!") return user.visible_message("[user] starts to apply \the [src] to their [limb].", "You start to apply \the [src] to your [limb].", "You hear something being wrapped.") - if(do_after(user, 50, M, exclusive = TRUE)) + if(do_after(user, 50, M, exclusive = TASK_USER_EXCLUSIVE)) if(affecting.splinted) to_chat(user, "[M]'s [limb] is already splinted!") return diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index 10c85fa7e4..ba5db2b33b 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -16,7 +16,7 @@ if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs var/mob/living/silicon/robot/R = M if (R.getBruteLoss() || R.getFireLoss()) - if(do_after(user, 7 * toolspeed, exclusive = TRUE)) + if(do_after(user, 7 * toolspeed, R, exclusive = TASK_ALL_EXCLUSIVE)) R.adjustBruteLoss(-15) R.adjustFireLoss(-15) R.updatehealth() @@ -51,9 +51,9 @@ else if(can_use(1)) user.setClickCooldown(user.get_attack_speed(src)) if(S.open >= 2) - if(do_after(user, 5 * toolspeed, exclusive = TRUE)) + if(do_after(user, 5 * toolspeed, S, exclusive = TASK_ALL_EXCLUSIVE)) S.heal_damage(restoration_internal, restoration_internal, robo_repair = 1) - else if(do_after(user, 5 * toolspeed, exclusive = TRUE)) + else if(do_after(user, 5 * toolspeed, S, exclusive = TASK_ALL_EXCLUSIVE)) S.heal_damage(restoration_external,restoration_external, robo_repair =1) H.updatehealth() use(1) diff --git a/code/game/objects/items/weapons/storage/pouches.dm b/code/game/objects/items/weapons/storage/pouches.dm index 38d0660894..24a81f4112 100644 --- a/code/game/objects/items/weapons/storage/pouches.dm +++ b/code/game/objects/items/weapons/storage/pouches.dm @@ -23,7 +23,7 @@ if(user.get_active_hand() == src || user.get_inactive_hand() == src) return TRUE // Skip delay - if(insert_delay && !do_after(user, 2 SECONDS, src, needhand = TRUE, exclusive = TRUE)) + if(insert_delay && !do_after(user, 2 SECONDS, src, needhand = TRUE, exclusive = TASK_USER_EXCLUSIVE)) return FALSE // Moved or whatever if(W in src) @@ -36,7 +36,7 @@ if(user.get_active_hand() == src || user.get_inactive_hand() == src) return TRUE // Skip delay - if(remove_delay && !do_after(user, 2 SECONDS, src, needhand = TRUE, exclusive = TRUE)) + if(remove_delay && !do_after(user, 2 SECONDS, src, needhand = TRUE, exclusive = TASK_USER_EXCLUSIVE)) return FALSE // Moved or whatever if(W in src) diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm index f34a18af3e..7194e4f1fc 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm @@ -910,7 +910,7 @@ to_chat(src, "You can't weave here!") return - if(do_after(src, desired_result.time, exclusive = TRUE)) + if(do_after(src, desired_result.time, exclusive = TASK_USER_EXCLUSIVE)) if(desired_result.cost > species.silk_reserve) to_chat(src, "You don't have enough silk to weave that!") return @@ -969,7 +969,7 @@ to_chat(src, "You can't weave here!") return - if(do_after(src, desired_result.time, exclusive = TRUE)) + if(do_after(src, desired_result.time, exclusive = TASK_USER_EXCLUSIVE)) if(desired_result.cost > species.silk_reserve) to_chat(src, "You don't have enough silk to weave that!") return diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/softdog.dm b/code/modules/mob/living/simple_mob/subtypes/vore/softdog.dm index 61147bf9b4..2d06fc187a 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/softdog.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/softdog.dm @@ -252,7 +252,7 @@ return ..() if(M.a_intent == I_HELP) M.visible_message("[M] pets [src].", runemessage = "pets [src]") - if(do_after(M, 30 SECONDS, exclusive = 1, target = src)) + if(do_after(M, 30 SECONDS, exclusive = TASK_USER_EXCLUSIVE, target = src)) faction = M.faction revive() sight = initial(sight) diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index fe9a02adc1..0a430cf044 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -521,7 +521,7 @@ prey.ai_holder?.react_to_attack(user) //Timer and progress bar - if(!do_after(user, swallow_time, prey, exclusive = TRUE)) + if(!do_after(user, swallow_time, prey, exclusive = TASK_USER_EXCLUSIVE)) return FALSE // Prey escpaed (or user disabled) before timer expired. // If we got this far, nom successful! Announce it! @@ -798,7 +798,7 @@ playsound(src, 'sound/items/eatfood.ogg', rand(10,50), 1) var/T = (istype(M) ? M.hardness/40 : 1) SECONDS //1.5 seconds to eat a sheet of metal. 2.5 for durasteel and diamond & 1 by default (applies to some ores like raw carbon, slag, etc. to_chat(src, "You start crunching on [I] with your powerful jaws, attempting to tear it apart...") - if(do_after(feeder, T, ignore_movement = TRUE, exclusive = TRUE)) //Eat on the move, but not multiple things at once. + if(do_after(feeder, T, ignore_movement = TRUE, exclusive = TASK_ALL_EXCLUSIVE)) //Eat on the move, but not multiple things at once. if(feeder != src) to_chat(feeder, "You feed [I] to [src].") log_admin("VORE: [feeder] fed [src] [I].")