mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-16 09:34:52 +01:00
Refactors do_after w/ TG's do_after (#18282)
* part1 * keeps range ability * no cog vore
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
return
|
||||
|
||||
LAZYADD(tagged_datums, target_datum)
|
||||
RegisterSignal(target_datum, COMSIG_PARENT_QDELETING, PROC_REF(handle_tagged_del), override = TRUE)
|
||||
RegisterSignal(target_datum, COMSIG_QDELETING, PROC_REF(handle_tagged_del), override = TRUE)
|
||||
to_chat(owner, span_notice("[target_datum] has been tagged."))
|
||||
|
||||
/// Get ahead of the curve with deleting
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
if(!holder)
|
||||
return
|
||||
if(holder.marked_datum)
|
||||
holder.UnregisterSignal(holder.marked_datum, COMSIG_PARENT_QDELETING)
|
||||
holder.UnregisterSignal(holder.marked_datum, COMSIG_QDELETING)
|
||||
vv_update_display(holder.marked_datum, "marked", "")
|
||||
holder.marked_datum = D
|
||||
holder.RegisterSignal(holder.marked_datum, COMSIG_PARENT_QDELETING, TYPE_PROC_REF(/datum/admins, handle_marked_del))
|
||||
holder.RegisterSignal(holder.marked_datum, COMSIG_QDELETING, TYPE_PROC_REF(/datum/admins, handle_marked_del))
|
||||
vv_update_display(D, "marked", VV_MSG_MARKED)
|
||||
|
||||
ADMIN_VERB_ONLY_CONTEXT_MENU(mark_datum, R_HOLDER, "Mark Object", datum/target as mob|obj|turf|area in view())
|
||||
@@ -13,5 +13,5 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(mark_datum, R_HOLDER, "Mark Object", datum/target a
|
||||
|
||||
/datum/admins/proc/handle_marked_del(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
UnregisterSignal(marked_datum, COMSIG_PARENT_QDELETING)
|
||||
UnregisterSignal(marked_datum, COMSIG_QDELETING)
|
||||
marked_datum = null
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
target = new_target
|
||||
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(remove_target))
|
||||
RegisterSignal(target, COMSIG_QDELETING, PROC_REF(remove_target))
|
||||
|
||||
if(target != null)
|
||||
lose_target_time = 0
|
||||
@@ -195,7 +195,7 @@
|
||||
ai_log("lose_target() : Entering.", AI_LOG_TRACE)
|
||||
if(target)
|
||||
ai_log("lose_target() : Had a target, setting to null and LTT.", AI_LOG_DEBUG)
|
||||
UnregisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(remove_target))
|
||||
UnregisterSignal(target, COMSIG_QDELETING, PROC_REF(remove_target))
|
||||
target = null
|
||||
lose_target_time = world.time
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
SIGNAL_HANDLER
|
||||
ai_log("remove_target() : Entering.", AI_LOG_TRACE)
|
||||
if(target)
|
||||
UnregisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(remove_target))
|
||||
UnregisterSignal(target, COMSIG_QDELETING, PROC_REF(remove_target))
|
||||
target = null
|
||||
|
||||
lose_target_time = 0
|
||||
|
||||
@@ -116,7 +116,7 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
|
||||
|
||||
// The delay, and test for if the scan succeeds or not.
|
||||
var/scan_start_time = world.time
|
||||
if(do_after(user, scan_delay, target, ignore_movement = TRUE, max_distance = scan_range))
|
||||
if(do_after(user, scan_delay, target, timed_action_flags = IGNORE_USER_LOC_CHANGE|IGNORE_TARGET_LOC_CHANGE, max_distance = scan_range))
|
||||
if(target.can_catalogue(user))
|
||||
to_chat(user, span_notice("You successfully scan \the [target] with \the [src]."))
|
||||
playsound(src, 'sound/machines/ping.ogg', 50)
|
||||
|
||||
@@ -371,7 +371,7 @@
|
||||
|
||||
// Yes this is the same as what's found in qdel(). Yes it does need to be here
|
||||
// Get off my back
|
||||
SEND_SIGNAL(src, COMSIG_PARENT_QDELETING, TRUE)
|
||||
SEND_SIGNAL(src, COMSIG_QDELETING, TRUE)
|
||||
Destroy() //Clean up signals and timers.
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
busy_bank = FALSE
|
||||
icon_state = "item_bank"
|
||||
return
|
||||
else if(!do_after(user, 10 SECONDS, src, exclusive = TASK_ALL_EXCLUSIVE) || inoperable())
|
||||
else if(!do_after(user, 10 SECONDS, src) || inoperable())
|
||||
busy_bank = FALSE
|
||||
icon_state = "item_bank"
|
||||
return
|
||||
@@ -145,7 +145,7 @@
|
||||
return
|
||||
user.visible_message(span_notice("\The [user] begins storing \the [O] in \the [src]."),span_notice("You begin storing \the [O] in \the [src]."))
|
||||
icon_state = "item_bank_o"
|
||||
if(!do_after(user, 10 SECONDS, src, exclusive = TASK_ALL_EXCLUSIVE) || inoperable())
|
||||
if(!do_after(user, 10 SECONDS, src) || inoperable())
|
||||
busy_bank = FALSE
|
||||
icon_state = "item_bank"
|
||||
return
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
|
||||
if(!failed_to_seal && (M.back == src || M.belt == src) && piece == compare_piece)
|
||||
|
||||
if(seal_delay && !instant && !do_after(M,seal_delay,needhand=0))
|
||||
if(seal_delay && !instant && !do_after(M,seal_delay,timed_action_flags = IGNORE_SLOWDOWNS))
|
||||
failed_to_seal = 1
|
||||
|
||||
piece.icon_state = "[suit_state][!seal_target ? "_sealed" : ""]"
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
if(M.nutrition <= 100)
|
||||
to_chat(user, span_notice("You are too hungry to exercise right now."))
|
||||
return 0
|
||||
if(!do_after(user, 3 SECONDS, src, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(user, 3 SECONDS, src))
|
||||
return 0
|
||||
M.adjust_nutrition(-10)
|
||||
to_chat(user, span_notice("You successfully perform a [src] exercise!"))
|
||||
@@ -362,7 +362,7 @@
|
||||
to_chat(user, span_notice("You need some sort of glass, bottle or cup to contact the spirit world."))
|
||||
return 0
|
||||
var/result = 0
|
||||
if(!do_after(user, 3 SECONDS, src, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(user, 3 SECONDS, src))
|
||||
return 0
|
||||
if(next_result)
|
||||
result = next_result
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(activatable_hand)
|
||||
if(!on)
|
||||
if(delay_time)
|
||||
if(!do_after(user, delay_time, src, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(user, delay_time, src))
|
||||
return 0
|
||||
on = 1
|
||||
if(icon_on)
|
||||
@@ -76,7 +76,7 @@
|
||||
playsound(src, sound_activated, 50, 1)
|
||||
else if(togglable)
|
||||
if(delay_time)
|
||||
if(!do_after(user, delay_time, src, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(user, delay_time, src))
|
||||
return 0
|
||||
on = 0
|
||||
icon_state = icon_state_off
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
if(activatable_hand)
|
||||
if(!on)
|
||||
if(delay_time)
|
||||
if(!do_after(user, delay_time, src, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(user, delay_time, src))
|
||||
return 0
|
||||
on = 1
|
||||
icon_state = icon_state_on
|
||||
@@ -88,7 +88,7 @@
|
||||
playsound(src, sound_activated, 50, 1)
|
||||
else if(togglable)
|
||||
if(delay_time)
|
||||
if(!do_after(user, delay_time, src, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(user, delay_time, src))
|
||||
return 0
|
||||
on = 0
|
||||
icon_state = icon_state_off
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
return
|
||||
|
||||
user.visible_message(span_infoplain(span_bold("[user]") + " starts sipping on [victim] with [src]!"), span_info("You start sipping on [victim] with [src]."))
|
||||
if(!do_after(user, 3 SECONDS, victim, exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(!do_after(user, 3 SECONDS, victim))
|
||||
return
|
||||
|
||||
user.visible_message(span_infoplain(span_bold("[user]") + " sips some of [victim] with [src]!"), span_info("You take a sip of [victim] with [src]. Yum!"))
|
||||
|
||||
@@ -310,7 +310,7 @@
|
||||
/obj/structure/theonepizza/attackby(var/obj/item/W, var/mob/living/user)
|
||||
if(istype(W,/obj/item/material/knife))
|
||||
user.visible_message(span_infoplain(span_bold("\The [user]") + " starts to slowly cut through The One Pizza."), span_notice("You start to slowly cut through The One Pizza."))
|
||||
if(do_after(user, slicetime, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(do_after(user, slicetime))
|
||||
if(!src)
|
||||
return // We got disappeared already
|
||||
user.visible_message(span_infoplain(span_bold("\The [user]") + " successfully cuts The One Pizza."), span_notice("You successfully cut The One Pizza."))
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
if(!choice||choice=="No")
|
||||
return
|
||||
user.visible_message("[user] starts dispersing the [src]...", runemessage = "disperses the [src]")
|
||||
if(do_after(user, 5 SECONDS, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(do_after(user, 5 SECONDS))
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, span_notice("There is something growing here."))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/// Adds the item to contents and to_image (if needed)
|
||||
/datum/lootpanel/proc/add_to_index(datum/search_object/index)
|
||||
RegisterSignal(index, COMSIG_PARENT_QDELETING, PROC_REF(on_searchable_deleted))
|
||||
RegisterSignal(index, COMSIG_QDELETING, PROC_REF(on_searchable_deleted))
|
||||
if(isnull(index.icon))
|
||||
to_image += index
|
||||
|
||||
@@ -50,5 +50,5 @@
|
||||
if(QDELETED(index))
|
||||
continue
|
||||
|
||||
UnregisterSignal(index, COMSIG_PARENT_QDELETING)
|
||||
UnregisterSignal(index, COMSIG_QDELETING)
|
||||
qdel(index)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
RegisterSignals(item, list(
|
||||
COMSIG_ITEM_PICKUP,
|
||||
COMSIG_MOVABLE_MOVED,
|
||||
COMSIG_PARENT_QDELETING,
|
||||
COMSIG_QDELETING,
|
||||
), PROC_REF(on_item_moved))
|
||||
|
||||
// Icon generation conditions //////////////
|
||||
|
||||
@@ -135,7 +135,11 @@
|
||||
// It is in a seperate place to avoid an infinite loop situation with dragging mobs dragging each other.
|
||||
// Also its nice to have these things seperated.
|
||||
|
||||
/mob/living/carbon/human/proc/calculate_item_encumbrance()
|
||||
//Return FALSE for no encumberance
|
||||
/mob/proc/calculate_item_encumbrance()
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/calculate_item_encumbrance()
|
||||
/// We check for all the items the wearer has that cause slowdown (positive or negative)
|
||||
/// We then multiply the postive ones by our species.item_slowdown_mod to slow us down more, while we leave negative ones untouched.
|
||||
/// Heavy things in your hands are affected by this change, UNLESS the thing in your hand speeds you up, in which case it doesn't.
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
var/score2 = (scale2 * strength2)
|
||||
|
||||
var/competition = pick(score1;player1, score2;player2)
|
||||
if(!do_after(player1, 50, player2, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(player1, 50, player2))
|
||||
player2.visible_message(span_notice("The players cancelled their competition!"))
|
||||
return 0
|
||||
if(!hand_games_check(player1,player2))
|
||||
@@ -223,7 +223,7 @@
|
||||
var/score2 = (scale2 * strength2)
|
||||
|
||||
var/competition = pick(score1;player1, score2;player2)
|
||||
if(!do_after(player1, 10, player2, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(player1, 10, player2))
|
||||
player2.visible_message(span_notice("The players cancelled their competition!"))
|
||||
return 0
|
||||
if(!hand_games_check(player1,player2))
|
||||
@@ -248,7 +248,7 @@
|
||||
if(!hand_games_check(player1,player2))
|
||||
return
|
||||
player1.visible_message(span_notice("[player1] challenges [player2] to a thumb war!"))
|
||||
if(!do_after(player1, 50, player2, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(player1, 50, player2))
|
||||
player2.visible_message(span_notice("The players cancelled their thumb war!"))
|
||||
return 0
|
||||
if(!hand_games_check(player1,player2))
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
span_warning("You gnaw on \the [SJ]. (This will take around [round(breakouttime / 600)] minutes and you need to stand still.)")
|
||||
)
|
||||
|
||||
if(do_after(src, breakouttime, incapacitation_flags = INCAPACITATION_DISABLED & INCAPACITATION_KNOCKDOWN))
|
||||
if(do_after(src, breakouttime, timed_action_flags = IGNORE_INCAPACITATED))
|
||||
if(!wear_suit)
|
||||
return
|
||||
visible_message(
|
||||
@@ -74,7 +74,7 @@
|
||||
span_warning("You attempt to rip your [wear_suit.name] apart. (This will take around 5 seconds and you need to stand still)")
|
||||
)
|
||||
|
||||
if(do_after(src, 20 SECONDS, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED)) // Same scaling as breaking cuffs, 5 seconds to 120 seconds, 20 seconds to 480 seconds.
|
||||
if(do_after(src, 20 SECONDS, timed_action_flags = IGNORE_INCAPACITATED)) // Same scaling as breaking cuffs, 5 seconds to 120 seconds, 20 seconds to 480 seconds.
|
||||
if(!wear_suit || buckled)
|
||||
return
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
return
|
||||
else
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " begins to change the form of \the [I]."))
|
||||
if(!do_after(src, 10 SECONDS, I, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(src, 10 SECONDS, I))
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " leaves \the [I] in its original form."))
|
||||
return 0
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " transmutes \the [I] into \the [transmute_product.name]."))
|
||||
@@ -185,7 +185,7 @@
|
||||
if(species.lleill_energy < energy_cost_spawn)
|
||||
to_chat(src, span_warning("You do not have enough energy to do that!"))
|
||||
return
|
||||
if(!do_after(src, 10 SECONDS, src, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(src, 10 SECONDS, src))
|
||||
src.visible_message(span_infoplain(span_bold("\The [src]") + " begins to form white rings on the ground."))
|
||||
return 0
|
||||
to_chat(src, span_warning("You place a new glamour ring at your feet."))
|
||||
@@ -315,7 +315,7 @@
|
||||
src.visible_message(span_infoplain(span_bold("\The [src]") + " boops [chosen_target] on the nose."))
|
||||
if(contact_type == "Custom")
|
||||
src.visible_message(span_infoplain("[custom_text]"))
|
||||
if(!do_after(src, 10 SECONDS, chosen_target, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(src, 10 SECONDS, chosen_target))
|
||||
src.visible_message(span_infoplain(span_bold("\The [src]") + " and \the [chosen_target] break contact before energy has been transferred."))
|
||||
return
|
||||
src.visible_message(span_infoplain(span_bold("\The [src]") + " and \the [chosen_target] complete their contact."))
|
||||
@@ -366,7 +366,7 @@
|
||||
return
|
||||
else
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " begins to change the form of \the [I]."))
|
||||
if(!do_after(src, 10 SECONDS, I, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(src, 10 SECONDS, I))
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " leaves \the [I] in its original form."))
|
||||
return 0
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " transmutes \the [I] into \the [transmute_product.name]."))
|
||||
@@ -457,7 +457,7 @@
|
||||
return
|
||||
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " begins significantly shifting their form."))
|
||||
if(!do_after(src, 10 SECONDS, src, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(src, 10 SECONDS, src))
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " ceases shifting their form."))
|
||||
return 0
|
||||
|
||||
@@ -548,7 +548,7 @@
|
||||
return
|
||||
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " begins significantly shifting their form."))
|
||||
if(!do_after(src, 10 SECONDS, src, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(src, 10 SECONDS, src))
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " ceases shifting their form."))
|
||||
return 0
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " has reverted to their original form."))
|
||||
@@ -666,7 +666,7 @@
|
||||
return
|
||||
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " begins significantly shifting their form."))
|
||||
if(!do_after(src, 10 SECONDS, src, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(src, 10 SECONDS, src))
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " ceases shifting their form."))
|
||||
return 0
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
|
||||
if(m_action == "Yes")
|
||||
to_chat(M, span_warning("You begin to break the lines of the glamour ring."))
|
||||
if(!do_after(M, 10 SECONDS, src, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(M, 10 SECONDS, src))
|
||||
to_chat(M, span_warning("You leave the glamour ring alone."))
|
||||
return
|
||||
to_chat(M, span_warning("You have destroyed \the [src]."))
|
||||
@@ -270,7 +270,7 @@
|
||||
if(LL.ring_cooldown + 10 MINUTES > world.time)
|
||||
to_chat(M, span_warning("You must wait a while before drawing energy from the glamour again."))
|
||||
return
|
||||
if(!do_after(M, 10 SECONDS, src, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(M, 10 SECONDS, src))
|
||||
to_chat(M, span_warning("You stop drawing energy."))
|
||||
return
|
||||
LL.lleill_energy = min((LL.lleill_energy + 75),LL.lleill_energy_max)
|
||||
|
||||
@@ -595,7 +595,7 @@ var/list/wrapped_species_by_ref = list()
|
||||
oocnotes = 1
|
||||
to_chat(character, span_notify("You begin to reform. You will need to remain still."))
|
||||
character.visible_message(span_notify("[character] rapidly contorts and shifts!"), span_danger("You begin to reform."))
|
||||
if(do_after(character, 40,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(do_after(character, 40))
|
||||
if(character.client.prefs) //Make sure we didn't d/c
|
||||
character.client.prefs.vanity_copy_to(src, FALSE, flavour, oocnotes, FALSE, FALSE)
|
||||
character.visible_message(span_notify("[character] adopts a new form!"), span_danger("You have reformed."))
|
||||
@@ -653,7 +653,7 @@ var/list/wrapped_species_by_ref = list()
|
||||
|
||||
to_chat(character, span_notify("You begin to reassemble into [victim]. You will need to remain still."))
|
||||
character.visible_message(span_notify("[character] rapidly contorts and shifts!"), span_danger("You begin to reassemble into [victim]."))
|
||||
if(do_after(character, 40,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(do_after(character, 40))
|
||||
checking = FALSE
|
||||
for(var/obj/item/grab/G in character)
|
||||
if(G.affecting == victim && G.state >= GRAB_AGGRESSIVE)
|
||||
|
||||
@@ -440,7 +440,7 @@
|
||||
to_chat(src,span_warning("You can't change forms while inside something."))
|
||||
return
|
||||
to_chat(src, span_notice("You rapidly disassociate your form."))
|
||||
if(force || do_after(src,20,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(force || do_after(src,20))
|
||||
handle_grasp() //It's possible to blob out before some key parts of the life loop. This results in things getting dropped at null. TODO: Fix the code so this can be done better.
|
||||
remove_micros(src, src) //Living things don't fare well in roblobs.
|
||||
if(buckled)
|
||||
@@ -554,7 +554,7 @@
|
||||
to_chat(blob,span_warning("You can't change forms while inside something."))
|
||||
return
|
||||
to_chat(src, span_notice("You rapidly reassemble your form."))
|
||||
if(force || do_after(blob,20,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(force || do_after(blob,20))
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob()
|
||||
if(LAZYLEN(buckled_mobs))
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
else
|
||||
blob = temporary_form
|
||||
active_regen = 1
|
||||
if(do_after(blob,50,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(do_after(blob,50))
|
||||
var/list/limblist = species.has_limbs[choice]
|
||||
var/limbpath = limblist["path"]
|
||||
var/obj/item/organ/external/new_eo = new limbpath(src)
|
||||
@@ -106,7 +106,7 @@
|
||||
var/obj/item/organ/internal/nano/refactory/refactory = nano_get_refactory()
|
||||
if(refactory.get_stored_material(MAT_STEEL) >= 10000)
|
||||
to_chat(protie, span_notify("You begin to rebuild. You will need to remain still."))
|
||||
if(do_after(protie, 400,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(do_after(protie, 400))
|
||||
if(species?:OurRig) //Unsafe, but we should only ever be using this with a Protean
|
||||
species?:OurRig?:make_alive(src,1) //Re-using this proc
|
||||
refactory.use_stored_material(MAT_STEEL,refactory.get_stored_material(MAT_STEEL)) //Use all of our steel
|
||||
@@ -129,7 +129,7 @@
|
||||
oocnotes = 1
|
||||
to_chat(protie, span_notify("You begin to reassemble. You will need to remain still."))
|
||||
protie.visible_message(span_notify("[protie] rapidly contorts and shifts!"), span_danger("You begin to reassemble."))
|
||||
if(do_after(protie, 40,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(do_after(protie, 40))
|
||||
if(protie.client.prefs) //Make sure we didn't d/c
|
||||
var/obj/item/rig/protean/Rig = species?:OurRig
|
||||
protie.client.prefs.vanity_copy_to(src, FALSE, flavour, oocnotes, TRUE, FALSE)
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
to_chat(protie, span_notify("You begin to reassemble into [victim]. You will need to remain still."))
|
||||
protie.visible_message(span_notify("[protie] rapidly contorts and shifts!"), span_danger("You begin to reassemble into [victim]."))
|
||||
if(do_after(protie, 40,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(do_after(protie, 40))
|
||||
checking = FALSE
|
||||
for(var/obj/item/grab/G in protie)
|
||||
if(G.affecting == victim && G.state >= GRAB_AGGRESSIVE)
|
||||
@@ -327,7 +327,7 @@
|
||||
to_chat(protie, span_warning("You need to be repaired first before you can act!"))
|
||||
return
|
||||
to_chat(protie, span_notice("You rapidly condense into your module."))
|
||||
if(forced || do_after(protie,20,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(forced || do_after(protie,20))
|
||||
if(!temporary_form) //If you're human, force you into blob form before rig'ing
|
||||
nano_blobform(forced)
|
||||
spawn(2)
|
||||
@@ -700,7 +700,7 @@
|
||||
return
|
||||
if(G.loc == protie && G.state >= GRAB_AGGRESSIVE)
|
||||
protie.visible_message(span_warning("[protie] is attempting to latch onto [target]!"), span_danger("You attempt to latch onto [target]!"))
|
||||
if(do_after(protie, 50, target,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(do_after(protie, 50, target))
|
||||
if(G.loc == protie && G.state >= GRAB_AGGRESSIVE)
|
||||
target.drop_from_inventory(target.back)
|
||||
protie.visible_message(span_danger("[protie] latched onto [target]!"), span_danger("You latch yourself onto [target]!"))
|
||||
|
||||
@@ -250,13 +250,13 @@
|
||||
if(1)
|
||||
if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
if(do_after(user,50,src,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(do_after(user,50,src))
|
||||
to_chat(user, span_notice("You unscrew the maintenace panel on the [src]."))
|
||||
dead +=1
|
||||
return
|
||||
if(2)
|
||||
if(istype(W, /obj/item/protean_reboot))//placeholder
|
||||
if(do_after(user,50,src,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(do_after(user,50,src))
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
to_chat(user, span_notice("You carefully slot [W] in the [src]."))
|
||||
dead +=1
|
||||
@@ -264,7 +264,7 @@
|
||||
return
|
||||
if(3)
|
||||
if(istype(W, /obj/item/stack/nanopaste))
|
||||
if(do_after(user,50,src,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(do_after(user,50,src))
|
||||
playsound(src, 'sound/effects/ointment.ogg', 50, 1)
|
||||
to_chat(user, span_notice("You slather the interior confines of the [src] with the [W]."))
|
||||
dead +=1
|
||||
@@ -274,7 +274,7 @@
|
||||
if(istype(W, /obj/item/shockpaddles))
|
||||
if(W?:can_use(user))
|
||||
to_chat(user, span_notice("You hook up the [W] to the contact points in the maintenance assembly"))
|
||||
if(do_after(user,50,src,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(do_after(user,50,src))
|
||||
playsound(src, 'sound/machines/defib_charge.ogg', 50, 0)
|
||||
if(do_after(user,10,src))
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
|
||||
@@ -634,7 +634,7 @@
|
||||
to_chat(src, span_warning("You can't do that in your current state."))
|
||||
return
|
||||
|
||||
if(do_after(src, 25, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(do_after(src, 25))
|
||||
var/obj/item/storage/vore_egg/bugcocoon/C = new(loc)
|
||||
forceMove(C)
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
visible_message(span_danger("[src] is trying to break [I]!"),
|
||||
span_warning("You attempt to break your [I]. (This will take around 5 seconds and you need to stand still)"))
|
||||
|
||||
if(do_after(src, 5 SECONDS, target = src, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED))
|
||||
if(do_after(src, 5 SECONDS, target = src, timed_action_flags = IGNORE_INCAPACITATED))
|
||||
if(!I || buckled)
|
||||
return
|
||||
visible_message(span_danger("[src] manages to break [I]!"),
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
visible_message(span_danger("[src] attempts to remove [I]!"),
|
||||
span_warning("You attempt to remove [I]. (This will take around [displaytime] seconds and you need to stand still)"))
|
||||
if(do_after(src, breakouttime, target = src, incapacitation_flags = INCAPACITATION_DISABLED & INCAPACITATION_KNOCKDOWN))
|
||||
if(do_after(src, breakouttime, target = src, timed_action_flags = IGNORE_INCAPACITATED))
|
||||
visible_message(span_danger("[src] manages to remove [I]!"),
|
||||
span_notice("You successfully remove [I]."))
|
||||
drop_from_inventory(I)
|
||||
@@ -87,7 +87,7 @@
|
||||
span_warning("You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)")
|
||||
)
|
||||
|
||||
if(do_after(src, 2 MINUTES, incapacitation_flags = INCAPACITATION_DEFAULT & ~(INCAPACITATION_RESTRAINED | INCAPACITATION_BUCKLED_FULLY)))
|
||||
if(do_after(src, 2 MINUTES, timed_action_flags = IGNORE_INCAPACITATED))
|
||||
if(!buckled)
|
||||
return
|
||||
visible_message(span_danger("[src] manages to unbuckle themself!"),
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
return
|
||||
|
||||
visible_message(span_warning("[src] begins chargin' their lazor!"))
|
||||
if(!do_after(src, 5 SECONDS, chosen_target, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(src, 5 SECONDS, chosen_target))
|
||||
return
|
||||
if(chosen_target.z != src.z || get_dist(src,chosen_target) > 7)
|
||||
return
|
||||
|
||||
@@ -847,7 +847,7 @@
|
||||
if(bolt)
|
||||
if(!bolt.malfunction)
|
||||
visible_message(span_danger("[src] is trying to break their [bolt]!"), span_warning("You attempt to break your [bolt]. (This will take around 90 seconds and you need to stand still)"))
|
||||
if(do_after(src, 1.5 MINUTES, src, incapacitation_flags = INCAPACITATION_DISABLED))
|
||||
if(do_after(src, 1.5 MINUTES, src, timed_action_flags = IGNORE_INCAPACITATED))
|
||||
visible_message(span_danger("[src] manages to break \the [bolt]!"), span_warning("You successfully break your [bolt]."))
|
||||
bolt.malfunction = MALFUNCTION_PERMANENT
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
|
||||
to_chat(src, span_notice("You begin to eat \the [E]..."))
|
||||
|
||||
if(!do_after(src, 20 SECONDS, E, exclusive = TRUE))
|
||||
if(!do_after(src, 20 SECONDS, E))
|
||||
return
|
||||
to_chat(src, span_notice("[msg]"))
|
||||
if(nut || aff)
|
||||
@@ -332,7 +332,7 @@
|
||||
to_chat(src, span_warning("You decide not to transition."))
|
||||
return
|
||||
to_chat(src, span_notice("You begin to transition down to \the [our_dest], stay still..."))
|
||||
if(!do_after(src, 15 SECONDS, exclusive = TRUE))
|
||||
if(!do_after(src, 15 SECONDS))
|
||||
to_chat(src, span_warning("You were interrupted."))
|
||||
return
|
||||
visible_message(span_warning("\The [src] disappears!!!"))
|
||||
@@ -343,7 +343,7 @@
|
||||
|
||||
else
|
||||
to_chat(src, span_notice("You begin to transition back to space, stay still..."))
|
||||
if(!do_after(src, 15 SECONDS, exclusive = TRUE))
|
||||
if(!do_after(src, 15 SECONDS))
|
||||
to_chat(src, span_warning("You were interrupted."))
|
||||
return
|
||||
|
||||
@@ -1060,7 +1060,7 @@
|
||||
to_chat(user, span_warning("You can see \the [controller] inside! Tendrils of nerves seem to have attached themselves to \the [controller]! There's no room for you right now!"))
|
||||
return
|
||||
user.visible_message(span_notice("\The [user] reaches out to touch \the [src]..."),span_notice("You reach out to touch \the [src]..."))
|
||||
if(!do_after(user, 10 SECONDS, src, exclusive = TRUE))
|
||||
if(!do_after(user, 10 SECONDS, src))
|
||||
user.visible_message(span_warning("\The [user] pulls back from \the [src]."),span_warning("You pull back from \the [src]."))
|
||||
return
|
||||
if(controller) //got busy while you were waiting, get rekt
|
||||
|
||||
@@ -562,7 +562,7 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have?
|
||||
return ..()
|
||||
if(resting)
|
||||
user.visible_message(span_attack("\The [user] approaches \the [src]'s neck with \the [O]."),span_attack("You approach \the [src]'s neck with \the [O]."))
|
||||
if(do_after(user, 5 SECONDS, exclusive = TASK_USER_EXCLUSIVE, target = src))
|
||||
if(do_after(user, 5 SECONDS, target = src))
|
||||
if(resting)
|
||||
death()
|
||||
return
|
||||
@@ -747,7 +747,7 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have?
|
||||
sheartime *= 2
|
||||
else
|
||||
return FALSE
|
||||
if(do_after(user, sheartime, exclusive = TASK_USER_EXCLUSIVE, target = src))
|
||||
if(do_after(user, sheartime, target = src))
|
||||
user.visible_message(span_notice("\The [user] shears \the [src] with \the [tool]."),span_notice("You shear \the [src] with \the [tool]."))
|
||||
amount_grown = rand(0,250)
|
||||
var/obj/item/stack/material/fur/F = new(get_turf(user), rand(10,15))
|
||||
|
||||
@@ -464,7 +464,7 @@
|
||||
return
|
||||
|
||||
visible_message("<b>\The [src]</b> begins significantly shifting their form.")
|
||||
if(!do_after(src, 10 SECONDS, src, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(src, 10 SECONDS, src))
|
||||
visible_message("<b>\The [src]</b> ceases shifting their form.")
|
||||
return 0
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
|
||||
/mob/living/dominated_brain/proc/lets_register_our_signals()
|
||||
if(prey_body)
|
||||
RegisterSignal(prey_body, COMSIG_PARENT_QDELETING, PROC_REF(prey_was_deleted), TRUE)
|
||||
RegisterSignal(pred_body, COMSIG_PARENT_QDELETING, PROC_REF(pred_was_deleted), TRUE)
|
||||
RegisterSignal(prey_body, COMSIG_QDELETING, PROC_REF(prey_was_deleted), TRUE)
|
||||
RegisterSignal(pred_body, COMSIG_QDELETING, PROC_REF(pred_was_deleted), TRUE)
|
||||
|
||||
/mob/living/dominated_brain/proc/lets_unregister_our_signals()
|
||||
prey_was_deleted()
|
||||
@@ -61,13 +61,13 @@
|
||||
/mob/living/dominated_brain/proc/prey_was_deleted()
|
||||
SIGNAL_HANDLER
|
||||
if(prey_body)
|
||||
UnregisterSignal(prey_body, COMSIG_PARENT_QDELETING)
|
||||
UnregisterSignal(prey_body, COMSIG_QDELETING)
|
||||
prey_body = null
|
||||
|
||||
/mob/living/dominated_brain/proc/pred_was_deleted()
|
||||
SIGNAL_HANDLER
|
||||
if(pred_body)
|
||||
UnregisterSignal(pred_body, COMSIG_PARENT_QDELETING)
|
||||
UnregisterSignal(pred_body, COMSIG_QDELETING)
|
||||
pred_body = null
|
||||
|
||||
/mob/living/dominated_brain/Destroy()
|
||||
@@ -86,7 +86,7 @@
|
||||
to_chat(src, span_danger("You begin to resist \the [prey_name]'s control!!!"))
|
||||
to_chat(pred_body, span_danger("You feel the captive mind of [src] begin to resist your control."))
|
||||
|
||||
if(do_after(src, 10 SECONDS, exclusive = TRUE))
|
||||
if(do_after(src, 10 SECONDS))
|
||||
restore_control()
|
||||
else
|
||||
to_chat(src, span_notice("Your attempt to regain control has been interrupted..."))
|
||||
@@ -243,7 +243,7 @@
|
||||
|
||||
to_chat(pred, span_warning("You can feel the will of another overwriting your own, control of your body being sapped away from you..."))
|
||||
to_chat(prey, span_warning("You can feel the will of your host diminishing as you exert your will over them!"))
|
||||
if(!do_after(prey, 10 SECONDS, exclusive = TRUE))
|
||||
if(!do_after(prey, 10 SECONDS))
|
||||
to_chat(prey, span_notice("Your attempt to regain control has been interrupted..."))
|
||||
to_chat(pred, span_notice("The dominant sensation fades away..."))
|
||||
return
|
||||
@@ -338,7 +338,7 @@
|
||||
to_chat(src, span_danger("You begin to resist \the [prey_name]'s control!!!"))
|
||||
to_chat(pred_body, span_danger("You feel the captive mind of [src] begin to resist your control."))
|
||||
|
||||
if(do_after(src, 10 SECONDS, exclusive = TRUE))
|
||||
if(do_after(src, 10 SECONDS))
|
||||
restore_control()
|
||||
else
|
||||
to_chat(src, span_notice("Your attempt to regain control has been interrupted..."))
|
||||
@@ -394,7 +394,7 @@
|
||||
|
||||
if(istype(G) && M == G.affecting)
|
||||
src.visible_message(span_danger("[src] seems to be doing something to [M], resulting in [M]'s body looking increasingly drowsy with every passing moment!"))
|
||||
if(!do_after(src, 10 SECONDS, exclusive = TRUE))
|
||||
if(!do_after(src, 10 SECONDS))
|
||||
to_chat(M, span_notice("The alien presence fades, and you are left along in your body..."))
|
||||
to_chat(src, span_notice("Your attempt to gather [M]'s mind has been interrupted."))
|
||||
return
|
||||
@@ -445,7 +445,7 @@
|
||||
if(prey_body && prey_body.loc.loc == pred_body)
|
||||
to_chat(src, span_notice("You exert your will and attempt to return to yout body!!!"))
|
||||
to_chat(pred_body, span_warning("\The [src] resists your hold and attempts to return to their body!"))
|
||||
if(do_after(src, 10 SECONDS, exclusive = TRUE))
|
||||
if(do_after(src, 10 SECONDS))
|
||||
if(prey_body && prey_body.loc.loc == pred_body)
|
||||
|
||||
prey_body.ckey = prey_ckey
|
||||
@@ -512,7 +512,7 @@
|
||||
return
|
||||
to_chat(pred, span_warning("You diminish your will, reducing it and allowing will of your prey to take over..."))
|
||||
to_chat(prey, span_warning("You can feel the will of your host diminishing as you are given control over them!"))
|
||||
if(!do_after(pred, 10 SECONDS, exclusive = TRUE))
|
||||
if(!do_after(pred, 10 SECONDS))
|
||||
to_chat(pred, span_notice("Your attempt to share control has been interrupted..."))
|
||||
to_chat(prey, span_notice("The dominant sensation fades away..."))
|
||||
return
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
return ..()
|
||||
if(M.a_intent == I_HELP)
|
||||
M.visible_message("[M] pets [src].", runemessage = "pets [src]")
|
||||
if(do_after(M, 30 SECONDS, exclusive = TASK_USER_EXCLUSIVE, target = src))
|
||||
if(do_after(M, 30 SECONDS, target = src))
|
||||
faction = M.faction
|
||||
revive()
|
||||
sight = initial(sight)
|
||||
|
||||
@@ -232,7 +232,11 @@
|
||||
|
||||
var/in_enclosed_vehicle = 0 //For mechs and fighters ambiance. Can be used in other cases.
|
||||
|
||||
var/list/progressbars = null //VOREStation Edit
|
||||
///List of progress bars this mob is currently seeing for actions
|
||||
var/list/progressbars = null //for stacking do_after bars
|
||||
|
||||
///For storing what do_after's someone has, key = string, value = amount of interactions of that type happening.
|
||||
var/list/do_afters
|
||||
|
||||
var/datum/focus //What receives our keyboard inputs. src by default
|
||||
/// dict of custom stat tabs with data
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
var/obj/belly/bellychoice = tgui_input_list(L, "Which belly?","Select A Belly", L.vore_organs)
|
||||
if(bellychoice)
|
||||
L.visible_message(span_warning("[L] is trying to stuff \the [src] into [L.gender == MALE ? "his" : L.gender == FEMALE ? "her" : "their"] [bellychoice]!"),span_notice("You begin putting \the [src] into your [bellychoice]!"))
|
||||
if(do_after(L, 5 SECONDS, src, exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(do_after(L, 5 SECONDS, src))
|
||||
forceMove(bellychoice)
|
||||
SSskybox.rebuild_skyboxes(map_z)
|
||||
L.visible_message(span_warning("[L] eats a spaceship! This is totally normal."),"You eat the the spaceship! Yum, metal.")
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
current_user = user
|
||||
user.visible_message(span_infoplain(span_bold("[user]") + " begins to draw back the string of [src]."),span_notice("You begin to draw back the string of [src]."))
|
||||
if(do_after(user, 25, src, exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(do_after(user, 25, src))
|
||||
drawn = TRUE
|
||||
user.visible_message(span_infoplain(span_bold("[user]") + "draws the string on [src] back fully!"), span_infoplain("You draw the string on [src] back fully!"))
|
||||
update_icon()
|
||||
|
||||
@@ -54,9 +54,9 @@ Notes:
|
||||
return FALSE
|
||||
|
||||
if (!isnull(last_target))
|
||||
UnregisterSignal(last_target, COMSIG_PARENT_QDELETING)
|
||||
UnregisterSignal(last_target, COMSIG_QDELETING)
|
||||
|
||||
RegisterSignal(thing, COMSIG_PARENT_QDELETING, PROC_REF(on_target_qdel))
|
||||
RegisterSignal(thing, COMSIG_QDELETING, PROC_REF(on_target_qdel))
|
||||
|
||||
last_target = thing
|
||||
|
||||
|
||||
@@ -1275,7 +1275,7 @@
|
||||
to_chat(R, escape_attempt_prey_message)
|
||||
to_chat(owner, escape_attempt_owner_message)
|
||||
|
||||
if(do_after(R, escapetime, owner, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED))
|
||||
if(do_after(R, escapetime, owner, timed_action_flags = IGNORE_INCAPACITATED))
|
||||
if((owner.stat || escapable)) //Can still escape?
|
||||
if(C)
|
||||
release_specific_contents(C)
|
||||
|
||||
@@ -928,7 +928,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, span_notice("You start crunching on [I] with your powerful jaws, attempting to tear it apart..."))
|
||||
if(do_after(feeder, T, ignore_movement = TRUE, exclusive = TASK_ALL_EXCLUSIVE)) //Eat on the move, but not multiple things at once.
|
||||
if(do_after(feeder, T, timed_action_flags = IGNORE_USER_LOC_CHANGE)) //Eat on the move, but not multiple things at once.
|
||||
if(feeder != src)
|
||||
to_chat(feeder, span_notice("You feed [I] to [src]."))
|
||||
log_admin("VORE: [feeder] fed [src] [I].")
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
hologram.visible_message("[hologram] starts engulfing [prey] in hardlight holograms!")
|
||||
to_chat(src, span_vnotice("You begin engulfing [prey] in hardlight holograms.")) //Can't be part of the above, because the above is from the hologram.
|
||||
if(do_after(user = eyeobj,delay = 50,target = prey, needhand = 0) && holo && hologram) //Didn't move and still projecting and effect exists and no other bellied people
|
||||
if(do_after(user = eyeobj,delay = 50,target = prey) && holo && hologram) //Didn't move and still projecting and effect exists and no other bellied people
|
||||
feed_grabbed_to_self(src, prey)
|
||||
|
||||
/mob/living/AIShiftClick(var/mob/user) //Shift-click as AI overridden on mobs to examine.
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
//Timer and progress bar
|
||||
if(!user.client && prey.weakened > 0) // stop crwaling instantly break swallow attempt for mobvore
|
||||
prey.Stun(min(prey.weakened, 2)) // stop crawling instantly break swallow attempt for mobvore
|
||||
if(!do_after(user, swallow_time, prey, exclusive = TASK_USER_EXCLUSIVE))
|
||||
if(!do_after(user, swallow_time, prey, hidden = TRUE))
|
||||
return FALSE // Prey escaped (or user disabled) before timer expired.
|
||||
|
||||
// If we got this far, nom successful! Announce it and move the prey!
|
||||
|
||||
Reference in New Issue
Block a user