mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 13:30:42 +01:00
Refactored do_after to use a flag-based system for options (#17127)
* Refactored do_after to use a flag-based system for options * More flags * Ditto * Use the HAS_FLAG macro * do_after pass * Fix burning paper code * Resolve issues from Fluffy's code reviews * .
This commit is contained in:
@@ -152,7 +152,7 @@
|
||||
SPAN_NOTICE("\The [usr] begins searching through \the [src]..."),\
|
||||
SPAN_NOTICE("You begin searching through your deck...")\
|
||||
)
|
||||
if(!do_after(user, 5 + stored_card_names.len, act_target = src))
|
||||
if(!do_after(user, 5 + stored_card_names.len, src))
|
||||
user.visible_message(\
|
||||
SPAN_NOTICE("\The [usr] stops and thinks better of it."),\
|
||||
SPAN_NOTICE("You stop and think better of it.")\
|
||||
|
||||
@@ -725,7 +725,7 @@
|
||||
// a ledge. Regular actuators make you have to climb the rest of the way.
|
||||
if (!combatType)
|
||||
H.visible_message(SPAN_NOTICE("\The [H] starts pulling [H.get_pronoun("himself")] up onto the [valid_climbable]."), SPAN_NOTICE("You start pulling yourself up onto \the [valid_climbable]."))
|
||||
if (!do_after(H, 4 SECONDS, use_user_turf = TRUE))
|
||||
if (!do_after(H, 4 SECONDS))
|
||||
H.visible_message(SPAN_WARNING("\The [H] is interrupted and falls!"), SPAN_DANGER("You are interrupted and fall back down!"))
|
||||
|
||||
// Climbers will auto-fall if they exit the turf. This is for in case
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
if(!failed_to_seal)
|
||||
if(!instant)
|
||||
wearer.visible_message("<span class='notice'>[wearer]'s suit emits a quiet hum as it begins to adjust its seals.</span>","<span class='notice'>With a quiet hum, the suit begins running checks and adjusting components.</span>")
|
||||
if(seal_delay && !do_after(wearer, seal_delay, act_target = src))
|
||||
if(seal_delay && !do_after(wearer, seal_delay, src, do_flags = DO_DEFAULT & ~DO_USER_SAME_HAND))
|
||||
if(wearer) to_chat(wearer, "<span class='warning'>You must remain still while the suit is adjusting the components.</span>")
|
||||
playsound(src, 'sound/items/rfd_empty.ogg', 20, FALSE)
|
||||
failed_to_seal = 1
|
||||
@@ -294,7 +294,7 @@
|
||||
|
||||
if(!failed_to_seal && wearer.back == src && piece == compare_piece)
|
||||
|
||||
if(seal_delay && !instant && !do_after(wearer,seal_delay,needhand=0, act_target = src))
|
||||
if(seal_delay && !instant && !do_after(wearer, seal_delay, src, do_flags = DO_DEFAULT & ~DO_USER_SAME_HAND))
|
||||
failed_to_seal = 1
|
||||
|
||||
piece.icon_state = "[initial(icon_state)][!seal_target ? "_sealed" : ""]_[piece.clothing_class()]"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
if(stored_charge >= cell_increase)
|
||||
to_chat(user, SPAN_WARNING("The pump on \the [src] refuses to move."))
|
||||
else
|
||||
if(!pump_delay || do_after(user, pump_delay, use_user_turf = -1))
|
||||
if(!pump_delay || do_after(user, pump_delay))
|
||||
if(last_pump < world.time)
|
||||
if(isturf(src.loc))
|
||||
to_chat(user, SPAN_NOTICE("You pump \the [src]."))
|
||||
@@ -258,4 +258,4 @@
|
||||
origin_tech = list(TECH_MATERIAL = 4,TECH_ENGINEERING = 5,TECH_MAGNET = 4,TECH_POWER = 4)
|
||||
|
||||
type_to_take = "mhydrogen"
|
||||
charge_per_sheet = 90
|
||||
charge_per_sheet = 90
|
||||
|
||||
@@ -308,7 +308,7 @@
|
||||
health_scan_mob(M, pilot, TRUE, TRUE, sound_scan = sound_scan)
|
||||
else
|
||||
user.visible_message("<b>[user]</b> starts scanning \the [M] with \the [src].", SPAN_NOTICE("You start scanning \the [M] with \the [src]."))
|
||||
if(do_after(user, 7 SECONDS, TRUE))
|
||||
if(do_after(user, 7 SECONDS))
|
||||
print_scan(M, user)
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
B.disconnect()
|
||||
if(length(held_braces) < 2)
|
||||
owner.visible_message(SPAN_NOTICE("\The [owner] starts loading \the [B] into \the [src]."))
|
||||
if(do_after(user, 5 SECONDS, act_target = owner, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), B, B.loc)))
|
||||
if(do_after(user, 5 SECONDS, owner, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), B, B.loc)))
|
||||
owner.visible_message(SPAN_NOTICE("\The [owner] loads \the [B] into \the [src]."))
|
||||
B.forceMove(src)
|
||||
LAZYADD(held_braces, B)
|
||||
if(!held_drill && istype(M, /obj/machinery/mining/drill))
|
||||
var/obj/machinery/mining/drill/D = M
|
||||
owner.visible_message(SPAN_NOTICE("\The [owner] starts loading \the [D] into \the [src]."))
|
||||
if(do_after(user, 5 SECONDS, act_target = owner, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), D, D.loc)))
|
||||
if(do_after(user, 5 SECONDS, owner, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), D, D.loc)))
|
||||
owner.visible_message(SPAN_NOTICE("\The [owner] loads \the [D] into \the [src]."))
|
||||
D.anchored = FALSE
|
||||
D.active = FALSE
|
||||
@@ -83,4 +83,4 @@
|
||||
for(var/obj/brace in held_braces)
|
||||
brace.dropInto(get_turf(src))
|
||||
held_braces -= brace
|
||||
. = ..()
|
||||
. = ..()
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
var/obj/machinery/door/firedoor/FD = target
|
||||
if(FD.blocked)
|
||||
FD.visible_message(SPAN_WARNING("\The [owner] begins prying on \the [FD]!"))
|
||||
if(do_after(user, 10 SECONDS, act_target = owner, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), FD, FD.loc)) && FD.blocked)
|
||||
if(do_after(user, 10 SECONDS, owner, (DO_DEFAULT & ~DO_USER_CAN_TURN) | DO_USER_UNIQUE_ACT, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), FD, FD.loc)) && FD.blocked)
|
||||
playsound(FD, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
playsound(FD, 'sound/machines/airlock_open_force.ogg', 100, 1)
|
||||
FD.blocked = FALSE
|
||||
@@ -41,7 +41,7 @@
|
||||
FD.visible_message(SPAN_WARNING("\The [owner] tears \the [FD] open!"))
|
||||
else
|
||||
FD.visible_message(SPAN_WARNING("\The [owner] begins forcing \the [FD]!"))
|
||||
if(do_after(user, 4 SECONDS, act_target = owner, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), FD, FD.loc)) && !FD.blocked)
|
||||
if(do_after(user, 4 SECONDS, owner, (DO_DEFAULT & ~DO_USER_CAN_TURN) | DO_USER_UNIQUE_ACT, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), FD, FD.loc)) && !FD.blocked)
|
||||
if(FD.density)
|
||||
FD.visible_message(SPAN_WARNING("\The [owner] forces \the [FD] open!"))
|
||||
playsound(FD, 'sound/machines/airlock_open_force.ogg', 100, 1)
|
||||
@@ -62,7 +62,7 @@
|
||||
var/time_to_open = 15 SECONDS
|
||||
if(AD.welded && AD.locked)
|
||||
time_to_open = 30 SECONDS
|
||||
if(do_after(user, time_to_open, act_target = owner, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), AD, AD.loc)))
|
||||
if(do_after(user, time_to_open, owner, (DO_DEFAULT & ~DO_USER_CAN_TURN) | DO_USER_UNIQUE_ACT, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), AD, AD.loc)))
|
||||
AD.welded = FALSE
|
||||
AD.locked = FALSE
|
||||
AD.update_icon()
|
||||
@@ -72,7 +72,7 @@
|
||||
INVOKE_ASYNC(AD, TYPE_PROC_REF(/obj/machinery/door/airlock, open))
|
||||
else
|
||||
AD.visible_message(SPAN_WARNING("\The [owner] begins forcing \the [AD]!"))
|
||||
if(do_after(user, 5 SECONDS, act_target = owner, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), AD, AD.loc)) && !(AD.operating || AD.welded || AD.locked))
|
||||
if(do_after(user, 5 SECONDS, owner, (DO_DEFAULT & ~DO_USER_CAN_TURN) | DO_USER_UNIQUE_ACT, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), AD, AD.loc)) && !(AD.operating || AD.welded || AD.locked))
|
||||
if(AD.density)
|
||||
INVOKE_ASYNC(AD, TYPE_PROC_REF(/obj/machinery/door/airlock, open))
|
||||
playsound(AD, 'sound/machines/airlock_open_force.ogg', 100, 1)
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
|
||||
owner.visible_message(SPAN_NOTICE("\The [owner] begins loading \the [O]."), intent_message = MACHINE_SOUND)
|
||||
if(do_after(user, 2 SECONDS, act_target = owner, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), O, O.loc)))
|
||||
if(do_after(user, 2 SECONDS, owner, (DO_DEFAULT & ~DO_USER_CAN_TURN) | DO_USER_UNIQUE_ACT, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), O, O.loc)))
|
||||
O.forceMove(src)
|
||||
carrying += O
|
||||
owner.visible_message(SPAN_NOTICE("\The [owner] loads \the [O] into its cargo compartment."))
|
||||
@@ -376,7 +376,7 @@
|
||||
//Better materials = faster drill!
|
||||
var/delay = max(5, 20 - drill_head.material.protectiveness)
|
||||
owner.setClickCooldown(delay) //Don't spamclick!
|
||||
if(do_after(user, delay, act_target = owner, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), target, target.loc)) && drill_head)
|
||||
if(do_after(user, delay, owner, (DO_DEFAULT & ~DO_USER_CAN_TURN) | DO_USER_UNIQUE_ACT, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), target, target.loc)) && drill_head)
|
||||
if(src == owner.selected_system)
|
||||
if(drill_head.durability <= 0)
|
||||
drill_head.shatter()
|
||||
|
||||
@@ -364,7 +364,7 @@
|
||||
to_chat(user, SPAN_WARNING("You are unable to apply this upgrade while \the [src]'s maintenance protocols are not active."))
|
||||
return
|
||||
user.visible_message(SPAN_NOTICE("\The [user] begins installing \the [thing] into \the [src]..."), SPAN_NOTICE("You begin installing the [thing] into \the [src]..."))
|
||||
if(do_after(user, 30, TRUE, src))
|
||||
if(do_after(user, 30, src))
|
||||
if(length(pilots))
|
||||
to_chat(user, SPAN_WARNING("You can't apply this upgrade while \the [src] has occupants!"))
|
||||
return
|
||||
@@ -404,7 +404,7 @@
|
||||
to_chat(user, SPAN_WARNING("The securing bolts are not visible while maintenance protocols are disabled."))
|
||||
return
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts dismantling \the [src]..."), SPAN_NOTICE("You start disassembling \the [src]..."))
|
||||
if(do_after(user, 30, TRUE, src))
|
||||
if(do_after(user, 30, src))
|
||||
if(!remote && length(pilots))
|
||||
to_chat(user, SPAN_WARNING("You can't disassemble \the [src] while it has a pilot!"))
|
||||
return
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
if(!unlock_power)
|
||||
return 0
|
||||
user.visible_message("\The [user] takes out \the [I], picking \the [holder]'s lock.")
|
||||
if(!do_after(user, 20, holder))
|
||||
if(!do_after(user, 2 SECONDS, holder))
|
||||
return 0
|
||||
if(prob(20*(unlock_power/getComplexity())))
|
||||
to_chat(user, "<span class='notice'>You pick open \the [holder]'s lock!</span>")
|
||||
|
||||
@@ -41,13 +41,13 @@ Exercise Verbs
|
||||
stop_pushups()
|
||||
return
|
||||
animate(src, pixel_y = target_y, time = 0.8 SECONDS, easing = QUAD_EASING) //down to the floor
|
||||
if(!lying || !do_after(src, 0.6 SECONDS, needhand = TRUE, display_progress = FALSE))
|
||||
if(!lying || !do_after(src, 0.6 SECONDS, do_flags = DO_EXERCISE))
|
||||
visible_message(SPAN_NOTICE("[src] stops doing pushups."), SPAN_NOTICE("You stop doing pushups."), SPAN_NOTICE("You hear movements."))
|
||||
animate(src, pixel_y = 0, time = 0.2 SECONDS, easing = QUAD_EASING)
|
||||
stop_pushups()
|
||||
return
|
||||
animate(src, pixel_y = 0, time = 0.8 SECONDS, easing = QUAD_EASING) //back up
|
||||
if(!lying || !do_after(src, 0.6 SECONDS, needhand = TRUE, display_progress = FALSE))
|
||||
if(!lying || !do_after(src, 0.6 SECONDS, do_flags = DO_EXERCISE))
|
||||
visible_message(SPAN_NOTICE("[src] stops doing pushups."), SPAN_NOTICE("You stop doing pushups."), SPAN_NOTICE("You hear movements."))
|
||||
animate(src, pixel_y = 0, time = 0.2 SECONDS, easing = QUAD_EASING)
|
||||
stop_pushups()
|
||||
|
||||
@@ -479,7 +479,7 @@
|
||||
animate(src, pixel_y = starting_pixel_y + 4, time = 2)
|
||||
animate(src, pixel_y = starting_pixel_y, time = 2)
|
||||
|
||||
if(!do_after(H, 8, FALSE)) //Chest compressions are fast, need to wait for the loading bar to do mouth to mouth
|
||||
if(!do_after(H, 8, do_flags = DO_DEFAULT | DO_USER_UNIQUE_ACT)) //Chest compressions are fast, need to wait for the loading bar to do mouth to mouth
|
||||
to_chat(H, SPAN_NOTICE("You stop performing [cpr_mode] on \the [src]."))
|
||||
cpr = FALSE //If it cancelled, cancel it. Simple.
|
||||
|
||||
@@ -635,7 +635,7 @@
|
||||
organ.applied_pressure = user
|
||||
|
||||
//apply pressure as long as they stay still and keep grabbing
|
||||
do_after(user, INFINITY, TRUE, display_progress = FALSE)
|
||||
do_after(user, INFINITY, do_flags = (DO_DEFAULT & ~DO_SHOW_PROGRESS) | DO_USER_UNIQUE_ACT)
|
||||
|
||||
organ.applied_pressure = null
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
to_chat(user, SPAN_WARNING("\The [H] doesn't have a head!"))
|
||||
return
|
||||
user.visible_message(SPAN_WARNING("\The [user] is trying to remove something from \the [H]'s headtails!"))
|
||||
if(do_after(user, HUMAN_STRIP_DELAY, act_target = H))
|
||||
if(do_after(user, HUMAN_STRIP_DELAY, do_flags = DO_EQUIP))
|
||||
var/obj/item/storage/internal/skrell/S = locate() in H.organs_by_name[BP_HEAD]
|
||||
var/obj/item/I = locate() in S
|
||||
if(!I)
|
||||
|
||||
@@ -23,35 +23,35 @@
|
||||
// Handle things that are part of this interface but not removing/replacing a given item.
|
||||
if("mask")
|
||||
visible_message(SPAN_WARNING("\The [user] is trying to adjust \the [src]'s mask!"))
|
||||
if(do_after(user,HUMAN_STRIP_DELAY, act_target = src))
|
||||
if(do_after(user, HUMAN_STRIP_DELAY, src, do_flags = DO_EQUIP))
|
||||
var/obj/item/clothing/mask/M = wear_mask
|
||||
M.adjust_mask(user, FALSE)
|
||||
return TRUE
|
||||
if("tank")
|
||||
visible_message(SPAN_WARNING("\The [user] is taking a look at \the [src]'s air tank."))
|
||||
if(do_after(user,HUMAN_STRIP_DELAY, act_target = src))
|
||||
if(do_after(user, HUMAN_STRIP_DELAY, src, do_flags = DO_EQUIP))
|
||||
var/obj/item/tank/T = internal
|
||||
to_chat(user, SPAN_NOTICE("\The [T] has [T.air_contents.return_pressure()] kPA left."))
|
||||
to_chat(user, SPAN_NOTICE("The [T] is set to release [T.distribute_pressure] kPA."))
|
||||
return TRUE
|
||||
if("pockets")
|
||||
visible_message("<span class='danger'>\The [user] is trying to empty \the [src]'s pockets!</span>")
|
||||
if(do_after(user,HUMAN_STRIP_DELAY, act_target = src))
|
||||
if(do_after(user, HUMAN_STRIP_DELAY, src, do_flags = DO_EQUIP))
|
||||
empty_pockets(user)
|
||||
return 1
|
||||
if("splints")
|
||||
visible_message("<span class='danger'>\The [user] is trying to remove \the [src]'s splints!</span>")
|
||||
if(do_after(user,HUMAN_STRIP_DELAY, act_target = src))
|
||||
if(do_after(user, HUMAN_STRIP_DELAY, src, do_flags = DO_EQUIP))
|
||||
remove_splints(user)
|
||||
return 1
|
||||
if("sensors")
|
||||
visible_message("<span class='danger'>\The [user] is trying to set \the [src]'s sensors!</span>")
|
||||
if(do_after(user,HUMAN_STRIP_DELAY, act_target = src))
|
||||
if(do_after(user, HUMAN_STRIP_DELAY, src, do_flags = DO_EQUIP))
|
||||
toggle_sensors(user)
|
||||
return 1
|
||||
if("internals")
|
||||
visible_message("<span class='danger'>\The [usr] is trying to set \the [src]'s internals!</span>")
|
||||
if(do_after(user,HUMAN_STRIP_DELAY, act_target = src))
|
||||
if(do_after(user, HUMAN_STRIP_DELAY, src, do_flags = DO_EQUIP))
|
||||
toggle_internals(user)
|
||||
return 1
|
||||
if("tie")
|
||||
@@ -72,7 +72,7 @@
|
||||
return 0
|
||||
visible_message("<span class='danger'>\The [usr] is trying to remove \the [src]'s [A.name]!</span>")
|
||||
|
||||
if(!do_after(user,HUMAN_STRIP_DELAY, act_target = src))
|
||||
if(!do_after(user, HUMAN_STRIP_DELAY, src, do_flags = DO_EQUIP))
|
||||
return 0
|
||||
|
||||
if(!A || suit.loc != src || !(A in suit.accessories))
|
||||
|
||||
@@ -39,25 +39,25 @@
|
||||
SPAN_DANGER("\The [src] attempts to escape [wear_suit]!"),
|
||||
SPAN_WARNING("You attempt to escape [wear_suit]. (This will take around 6 minutes and you need to stand still)")
|
||||
)
|
||||
if (!do_after(src, 1.5 MINUTES, act_target = src))
|
||||
if (!do_after(src, 1.5 MINUTES, do_flags = DO_DEFAULT | DO_USER_UNIQUE_ACT, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED))
|
||||
return
|
||||
visible_message(
|
||||
SPAN_WARNING("\The [src] is shifting in their [wear_suit]!"),
|
||||
SPAN_WARNING("You start to loosen the [wear_suit].")
|
||||
)
|
||||
if (!do_after(src, 1.5 MINUTES, act_target = src))
|
||||
if (!do_after(src, 1.5 MINUTES, do_flags = DO_DEFAULT | DO_USER_UNIQUE_ACT, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED))
|
||||
return
|
||||
visible_message(
|
||||
SPAN_DANGER("\The [src] is moving in their [wear_suit]!"),
|
||||
SPAN_WARNING("You slip one of your arms out of the [wear_suit].")
|
||||
)
|
||||
if (!do_after(src, 1.5 MINUTES, act_target = src))
|
||||
if (!do_after(src, 1.5 MINUTES, do_flags = DO_DEFAULT | DO_USER_UNIQUE_ACT, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED))
|
||||
return
|
||||
visible_message(
|
||||
SPAN_DANGER("\The [src] is moving around in their [wear_suit] - it looks like they are about to break out!"),
|
||||
SPAN_WARNING("You start to pull loose the straps on the straightjacket[wear_suit].")
|
||||
)
|
||||
if (do_after(src, 1.5 MINUTES, act_target = src))
|
||||
if (do_after(src, 1.5 MINUTES, do_flags = DO_DEFAULT | DO_USER_UNIQUE_ACT, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED))
|
||||
var/obj/ex_suit = wear_suit
|
||||
remove_from_mob(wear_suit)
|
||||
ex_suit.forceMove(get_turf(src))
|
||||
@@ -107,7 +107,7 @@
|
||||
SPAN_WARNING("You attempt to slip out of \the [HC]. (This will take around [displaytime] minutes and you need to stand still)")
|
||||
)
|
||||
|
||||
if(do_after(src, breakouttime))
|
||||
if(do_after(src, breakouttime, do_flags = DO_DEFAULT | DO_USER_UNIQUE_ACT, incapacitation_flags = INCAPACITATION_DISABLED))
|
||||
if(!handcuffed)
|
||||
return
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
SPAN_WARNING("You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)")
|
||||
)
|
||||
|
||||
if(do_after(src, breakouttime))
|
||||
if(do_after(src, breakouttime, do_flags = DO_DEFAULT | DO_USER_UNIQUE_ACT, incapacitation_flags = INCAPACITATION_DISABLED))
|
||||
if(!legcuffed || buckled_to)
|
||||
return
|
||||
visible_message(
|
||||
@@ -191,7 +191,7 @@
|
||||
SPAN_WARNING("You attempt to break your [handcuffed.name]. (This will take around 10 seconds and you need to stand still)")
|
||||
)
|
||||
|
||||
if(do_after(src, 10 SECONDS))
|
||||
if(do_after(src, 10 SECONDS, do_flags = DO_DEFAULT | DO_USER_UNIQUE_ACT, incapacitation_flags = INCAPACITATION_DISABLED))
|
||||
if(!handcuffed)
|
||||
return
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
to_chat(src, SPAN_WARNING("You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)"))
|
||||
visible_message(SPAN_DANGER("[src] is trying to break the legcuffs!"))
|
||||
|
||||
if(do_after(src, 50))
|
||||
if(do_after(src, 50, do_flags = DO_DEFAULT | DO_USER_UNIQUE_ACT, incapacitation_flags = INCAPACITATION_DISABLED))
|
||||
if(!legcuffed || buckled_to)
|
||||
return
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/mob/living/Logout()
|
||||
if (stamina_bar)
|
||||
QDEL_NULL(stamina_bar)
|
||||
..()
|
||||
if (mind)
|
||||
//Per BYOND docs key remains set if the player DCs, becomes null if switching bodies.
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
is_in_use = TRUE
|
||||
user.visible_message("<b>[user]</b> begins waving \the [src] around \the [target]...", SPAN_NOTICE("You prepare to wirelessly charge \the [target]..."), range = 3)
|
||||
if(!do_after(user, 50, TRUE, target))
|
||||
if(!do_after(user, 50, target))
|
||||
is_in_use = FALSE
|
||||
return
|
||||
is_in_use = FALSE
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
deploying = 1
|
||||
user.visible_message("<b>[user]</b> starts deploying an inflatable [mode ? "door" : "wall"].", SPAN_NOTICE("You start deploying an inflatable [mode ? "door" : "wall"]!"))
|
||||
playsound(T, 'sound/items/zip.ogg', 75, TRUE)
|
||||
if(do_after(user, 30, needhand = FALSE))
|
||||
if(do_after(user, 30, do_flags = DO_DEFAULT & ~DO_USER_SAME_HAND))
|
||||
new newtype(T)
|
||||
if(mode)
|
||||
stored_doors--
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
if(A?.loc == src)
|
||||
return FALSE
|
||||
visible_message(SPAN_WARNING("\The [src] begins swallowing \the [A] whole!"), SPAN_NOTICE("You begin swallowing \the [A] whole."))
|
||||
if(do_after(src, delay, act_target = A))
|
||||
if(do_after(src, delay, A))
|
||||
visible_message(SPAN_WARNING("\The [src] swallows \the [A] whole!"), SPAN_NOTICE("You swallow \the [A] whole."))
|
||||
A.forceMove(src)
|
||||
return TRUE
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
var/obj/item/stack/material/P = A
|
||||
if(P.material.name == MATERIAL_PHORON)
|
||||
visible_message(SPAN_WARNING("\The [src] starts consuming \the [P]..."), SPAN_NOTICE("You start consuming \the [P]."))
|
||||
if(!do_after(src, 1 SECOND, act_target = P))
|
||||
if(!do_after(src, 1 SECOND, P))
|
||||
return
|
||||
var/self_msg = "You consume \the [P][health < maxHealth ? ", healing yourself" : ""]."
|
||||
adjustBruteLoss(-5 * P.amount)
|
||||
@@ -151,4 +151,4 @@
|
||||
melee_damage_upper = 15
|
||||
resist_mod = 1
|
||||
mob_size = 15
|
||||
environment_smash = 1
|
||||
environment_smash = 1
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
|
||||
to_chat(user, SPAN_NOTICE("You begin repairing the damage to \the [src]..."))
|
||||
playsound(get_turf(src), 'sound/items/Welder.ogg', 100, 1)
|
||||
if(WT.use(round(damage / 75)) && do_after(user, damage / 10))
|
||||
if(WT.use(round(damage / 75)) && do_after(user, damage / 10, src, DO_REPAIR_CONSTRUCT))
|
||||
damage = 0
|
||||
to_chat(user, SPAN_NOTICE("You fully repair \the [src]."))
|
||||
update_icon()
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
return
|
||||
|
||||
user.visible_message("<b>[user]</b> starts making a scan of \the [target]...", SPAN_NOTICE("You start making a scan of \the [target]..."), range = 3)
|
||||
if(do_after(user, 30 * length(pages_to_scan), TRUE, target))
|
||||
if(do_after(user, 30 * length(pages_to_scan), target))
|
||||
if(!drive)
|
||||
to_chat(user, SPAN_WARNING("\The [src] doesn't have a drive installed."))
|
||||
return
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
if(size) // defined size means we're hoisting and it'll take time
|
||||
user.visible_message(SPAN_NOTICE("[user] begins to [movtext] \the [hoistee]!"), SPAN_NOTICE("You begin to [movtext] \the [hoistee]!"), SPAN_NOTICE("You hear the sound of a crank."))
|
||||
|
||||
if (do_after(user, (1 SECONDS) * size / 4, act_target = src))
|
||||
if (do_after(user, (1 SECONDS) * size / 4, src))
|
||||
. = move_dir(movedir)
|
||||
|
||||
if(.)
|
||||
|
||||
@@ -56,8 +56,7 @@
|
||||
place_ladder(A,user)
|
||||
|
||||
/obj/item/ladder_mobile/proc/handle_action(atom/A, mob/user)
|
||||
if(!do_after(user, 30, act_target = user))
|
||||
to_chat(user, SPAN_WARNING("You were interrupted while placing the ladder!"))
|
||||
if(!do_after(user, 30, user))
|
||||
return FALSE
|
||||
if(!A || QDELETED(src) || QDELETED(user))
|
||||
// Shit was deleted during delay, call is no longer valid.
|
||||
@@ -86,8 +85,7 @@
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts folding up \the [src]."),
|
||||
SPAN_NOTICE("You start folding up \the [src]."))
|
||||
|
||||
if(!do_after(user, 30, act_target = src))
|
||||
to_chat(user, SPAN_WARNING("You are interrupted!"))
|
||||
if(!do_after(user, 30, src))
|
||||
return
|
||||
|
||||
if(QDELETED(src))
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
if(prob(climb_chance))
|
||||
will_succeed = TRUE
|
||||
|
||||
if(do_after(src, climb_speed, extra_checks = CALLBACK(src, PROC_REF(climb_check), will_succeed, climb_chance, climb_speed, direction, destination)))
|
||||
if(do_after(src, climb_speed))
|
||||
if(will_succeed)
|
||||
visible_message(SPAN_NOTICE("\The [src] climbs [(direction == UP) ? "upwards" : "downwards"]."),
|
||||
SPAN_NOTICE("You climb [(direction == UP) ? "upwards" : "downwards"]."))
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
if(LAZYLEN(destroy_tools))
|
||||
if(is_type_in_list(C, destroy_tools))
|
||||
user.visible_message("<b>[user]</b> starts breaking down \the [src] with \the [C]!", SPAN_NOTICE("You start breaking down \the [src] with \the [C]."))
|
||||
if(do_after(user, 10 SECONDS, TRUE))
|
||||
if(do_after(user, 10 SECONDS, src, DO_REPAIR_CONSTRUCT))
|
||||
user.visible_message("<b>[user]</b> breaks down \the [src] with \the [C]!", SPAN_NOTICE("You break down \the [src] with \the [C]."))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
var/r_eyes = hex2num(copytext(new_eyes, 2, 4))
|
||||
var/g_eyes = hex2num(copytext(new_eyes, 4, 6))
|
||||
var/b_eyes = hex2num(copytext(new_eyes, 6, 8))
|
||||
if(do_after(owner, 5) && owner.change_eye_color(r_eyes, g_eyes, b_eyes))
|
||||
if(do_after(owner, 0.5 SECONDS, do_flags = DO_USER_CAN_MOVE | DO_USER_CAN_TURN) && owner.change_eye_color(r_eyes, g_eyes, b_eyes))
|
||||
owner.update_eyes()
|
||||
owner.visible_message("<span class='notice'>[owner] shifts, their eye color changing.</span>", "<span class='notice'>You shift, your eye color changing.</span>")
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
examinate(user, src)
|
||||
else
|
||||
user.visible_message(SPAN_WARNING("\The [user] starts fiddling with \the [src]..."), SPAN_NOTICE("You start fiddling with \the [src]..."))
|
||||
if(do_after(user, 30, TRUE, src))
|
||||
if(do_after(user, 30, src))
|
||||
if(src.loc != user)
|
||||
to_chat(user, SPAN_WARNING("You can only modify \the [src] if it's on your person!"))
|
||||
return
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
var/obj/item/organ/external/E = input(src, "Select a limb to detach:", "Nymph Limb Detach") as null|anything in my_nymph_limbs
|
||||
if(!istype(E))
|
||||
return
|
||||
if(!do_after(src, delay = 3 SECONDS, needhand = FALSE))
|
||||
if(!do_after(src, delay = 3 SECONDS, do_flags = DO_DEFAULT & ~DO_USER_SAME_HAND))
|
||||
return
|
||||
if(E.detach_nymph_limb() && my_nymph_limbs.len == 1)
|
||||
remove_verb(src, /mob/living/carbon/human/proc/detach_nymph_limb)
|
||||
@@ -199,7 +199,7 @@
|
||||
if(istype(E))
|
||||
to_chat(src, "You start to detach from your host.")
|
||||
to_chat(E.owner, "The nymph acting as your [E.name] starts to unattach itself.")
|
||||
if(do_after(src, delay = 3 SECONDS, needhand = FALSE))
|
||||
if(do_after(src, delay = 3 SECONDS, do_flags = DO_DEFAULT & ~DO_USER_SAME_HAND))
|
||||
E.detach_nymph_limb()
|
||||
|
||||
// Organ detach
|
||||
@@ -261,7 +261,7 @@
|
||||
if(!limb_choice)
|
||||
return
|
||||
|
||||
if(!do_after(src, delay = 3 SECONDS, needhand = FALSE))
|
||||
if(!do_after(src, delay = 3 SECONDS, do_flags = DO_DEFAULT & ~DO_USER_SAME_HAND))
|
||||
return
|
||||
|
||||
// Make new limb and put it on the host
|
||||
@@ -321,7 +321,7 @@
|
||||
if(!limb_choice)
|
||||
return
|
||||
|
||||
if(!do_after(target, delay = 3 SECONDS, needhand = TRUE))
|
||||
if(!do_after(target, delay = 3 SECONDS, do_flags = DO_DEFAULT & ~DO_USER_SAME_HAND))
|
||||
return
|
||||
|
||||
// Make new limb and put it on the host
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
return //no hiding mobs in there
|
||||
user.visible_message("[user] begins digging around inside of \the [src].", "You begin digging around in \the [src], trying to hide \the [W].")
|
||||
playsound(loc, 'sound/effects/plantshake.ogg', 50, 1)
|
||||
if(do_after(user, 20, act_target = src))
|
||||
if(do_after(user, 20, src))
|
||||
if(!stored_item)
|
||||
if(W.w_class <= ITEMSIZE_NORMAL)
|
||||
user.drop_from_inventory(W,src)
|
||||
@@ -53,7 +53,7 @@
|
||||
/obj/structure/flora/pottedplant/attack_hand(mob/user)
|
||||
user.visible_message("[user] begins digging around inside of \the [src].", "You begin digging around in \the [src], searching it.")
|
||||
playsound(loc, 'sound/effects/plantshake.ogg', 50, 1)
|
||||
if(do_after(user, 40, act_target = src))
|
||||
if(do_after(user, 40, src))
|
||||
if(!stored_item)
|
||||
to_chat(user,"<span class='notice'>There is nothing hidden in [src].</span>")
|
||||
else
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
if(SA.caliber == weapon.get_caliber())
|
||||
if(SA.can_be_loaded())
|
||||
visible_message(SPAN_NOTICE("[H] begins loading \the [SA] into \the [src]..."))
|
||||
if(do_after(H, weapon.load_time))
|
||||
if(do_after(H, weapon.load_time, src, DO_UNIQUE))
|
||||
if(weapon.load_ammunition(SA, H))
|
||||
visible_message(SPAN_NOTICE("[H] loads \the [SA] into \the [src]!"))
|
||||
playsound(src, 'sound/weapons/ammo_load.ogg')
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
var/datum/species/S = H.species
|
||||
if(S.mob_size >= mob_carry_size || S.resist_mod >= 10 || user.status_flags & GODMODE)
|
||||
visible_message(SPAN_NOTICE("[user] tightens their grip on [src] and starts heaving..."))
|
||||
if(do_after(user, 1 SECONDS))
|
||||
if(do_after(user, 1 SECONDS, src, DO_UNIQUE))
|
||||
visible_message(SPAN_NOTICE("[user] heaves \the [src] up!"))
|
||||
wield(user)
|
||||
return TRUE
|
||||
@@ -77,7 +77,7 @@
|
||||
var/obj/item/rig/R = H.back
|
||||
if(R.suit_is_deployed())
|
||||
visible_message(SPAN_NOTICE("[user] tightens their grip on [src] and starts heaving with some difficulty..."))
|
||||
if(do_after(user, 5 SECONDS))
|
||||
if(do_after(user, 5 SECONDS, src, DO_UNIQUE))
|
||||
visible_message(SPAN_NOTICE("[user] heaves \the [src] up!"))
|
||||
wield(user)
|
||||
return TRUE
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
else
|
||||
user.visible_message(SPAN_WARNING("[user] begins to wipe [H]'s lipstick off with \the [src]."), \
|
||||
SPAN_NOTICE("You begin to wipe off [H]'s lipstick."))
|
||||
if(do_after(user, 10) && do_after(H, 10, 0)) //user needs to keep their active hand, H does not.
|
||||
if(do_after(user, 1 SECOND, H, do_flags = (DO_DEFAULT | DO_USER_UNIQUE_ACT) & ~DO_BOTH_CAN_TURN))
|
||||
user.visible_message(SPAN_NOTICE("[user] wipes [H]'s lipstick off with \the [src]."), \
|
||||
SPAN_NOTICE("You wipe off [H]'s lipstick."))
|
||||
H.lipstick_color = null
|
||||
|
||||
@@ -159,17 +159,13 @@
|
||||
user.visible_message(span("[class]", "[user] holds \the [P] up to \the [src], trying to burn it!"), \
|
||||
span("[class]", "You hold \the [P] up to \the [src], burning it slowly."))
|
||||
playsound(src.loc, 'sound/bureaucracy/paperburn.ogg', 50, 1)
|
||||
flick("shredp_onfire", src) //no do_after here, so people can walk n' burn at the same time. -wezzy
|
||||
flick("shredp_onfire", src)
|
||||
|
||||
spawn(20)
|
||||
if(get_dist(src, user) < 2 && user.get_active_hand() == P)
|
||||
user.visible_message(span("[class]", "[user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap."), \
|
||||
span("[class]", "You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap."))
|
||||
new /obj/effect/decal/cleanable/ash(src.loc)
|
||||
qdel(src)
|
||||
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("You must hold \the [P] steady to burn \the [src]."))
|
||||
if (do_after(user, 2 SECONDS, src, DO_UNIQUE | DO_USER_CAN_MOVE))
|
||||
user.visible_message(span("[class]", "[user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap."), \
|
||||
span("[class]", "You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap."))
|
||||
new /obj/effect/decal/cleanable/ash(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/shreddedp
|
||||
name = "shredded paper"
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
to_chat(user, "<span class='warning'>You must remove the floor plating first.</span>")
|
||||
return 1
|
||||
to_chat(user, "<span class='notice'>You start adding cable to the [src].</span>")
|
||||
if(do_after(user, 50))
|
||||
if(do_after(user, 5 SECONDS, src, DO_REPAIR_CONSTRUCT))
|
||||
terminal = new /obj/machinery/power/terminal(tempLoc)
|
||||
terminal.set_dir(tempDir)
|
||||
terminal.master = src
|
||||
|
||||
@@ -432,7 +432,7 @@
|
||||
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='warning'>You begin to disassemble the [src]!</span>")
|
||||
if (do_after(usr, 100 * cur_coils)) // More coils = takes longer to disassemble. It's complex so largest one with 5 coils will take 50s
|
||||
if (do_after(usr, 100 * cur_coils, src, DO_REPAIR_CONSTRUCT)) // More coils = takes longer to disassemble. It's complex so largest one with 5 coils will take 50s
|
||||
|
||||
if (failure_probability && prob(failure_probability))
|
||||
total_system_failure(failure_probability, user)
|
||||
|
||||
@@ -382,7 +382,7 @@
|
||||
/obj/machinery/power/solar_control/attackby(var/obj/I, user as mob)
|
||||
if(I.isscrewdriver())
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if(do_after(user, 2 SECONDS, src, DO_REPAIR_CONSTRUCT))
|
||||
if (src.stat & BROKEN)
|
||||
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
|
||||
@@ -584,7 +584,7 @@
|
||||
|
||||
mouthshoot = TRUE
|
||||
M.visible_message(SPAN_DANGER("\The [user] sticks \the [src] in their mouth, their finger ready to pull the trigger..."))
|
||||
if(!do_after(user, 40))
|
||||
if(!do_after(user, 4 SECONDS))
|
||||
M.visible_message(SPAN_GOOD("\The [user] takes \the [src] out of their mouth."))
|
||||
mouthshoot = FALSE
|
||||
return
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
playsound(user.loc, 'sound/items/crank.ogg', 60, 1)
|
||||
is_charging = TRUE
|
||||
flick("crank", src)
|
||||
if(do_after(user,20))
|
||||
if(do_after(user,2 SECONDS))
|
||||
to_chat(user, "<span class='notice'>You finish charging \the [src].</span>")
|
||||
power_supply.give(charge_cost)
|
||||
update_maptext()
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
/obj/item/gun/projectile/shotgun/pump/proc/pump(mob/M)
|
||||
if(!wielded)
|
||||
if(!do_after(M, 20, TRUE)) // have to stand still for 2 seconds instead of doing it instantly. bad idea during a shootout
|
||||
if(!do_after(M, 2 SECONDS)) // have to stand still for 2 seconds instead of doing it instantly. bad idea during a shootout
|
||||
return
|
||||
|
||||
playsound(M, rack_sound, 60, FALSE)
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
dipped.attempt_apply_coating(src, user)
|
||||
return
|
||||
if(!(W.flags & NOBLUDGEON) && (user.a_intent == I_HURT) && fragile && (W.force > fragile))
|
||||
if(do_after(user, 10))
|
||||
if(do_after(user, 1 SECOND, src))
|
||||
if(!QDELETED(src))
|
||||
visible_message(SPAN_WARNING("[user] smashes [src] with \a [W]!"))
|
||||
user.do_attack_animation(src)
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
LAZYADD(src.other_DNA, M.dna.unique_enzymes)
|
||||
src.other_DNA_type = "saliva"
|
||||
|
||||
while (do_after(user, 25, 5, 1))
|
||||
while (do_after(user, 25, 5))
|
||||
var/blood_taken = 0
|
||||
blood_taken = min(5, REAGENT_VOLUME(reagents, /singleton/reagent/blood)/4)
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
user.visible_message("<span class='notice'>\The [user] injects themselves with \the [src]</span>","<span class='notice'>You stick the \the [src] in your mouth and press the injection button.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>\The [user] attempts to administer \the [src] to \the [H]...</span>","<span class='notice'>You attempt to administer \the [src] to \the [H]...</span>")
|
||||
if (!do_after(user, 1 SECONDS, act_target = H))
|
||||
if (!do_after(user, 1 SECONDS, H))
|
||||
to_chat(user,"<span class='notice'>You and the target need to be standing still in order to inject \the [src].</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
user.visible_message("<span class='notice'>[user] sticks \the [src] in their mouth and presses the injection button.</span>","<span class='notice'>You stick \the [src] in your mouth and press the injection button.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] attempts to administer \the [src] to [M]...</span>","<span class='notice'>You attempt to administer \the [src] to [M]...</span>")
|
||||
if (!do_after(user, 1 SECONDS, act_target = M))
|
||||
if (!do_after(user, 1 SECONDS, M))
|
||||
to_chat(user,"<span class='notice'>You and \the [M] need to be standing still in order to inject \the [src].</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
if (!anchored && !isinspace())
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
to_chat(usr, SPAN_NOTICE(" You begin to tighten \the [src] to the floor..."))
|
||||
if (do_after(user, 2 SECONDS, src))
|
||||
if (do_after(user, 2 SECONDS, src, DO_REPAIR_CONSTRUCT))
|
||||
if(!anchored && !isinspace())
|
||||
user.visible_message( \
|
||||
"[user] tightens \the [src]'s casters.", \
|
||||
@@ -27,7 +27,7 @@
|
||||
else if(anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
to_chat(usr, SPAN_NOTICE(" You begin to loosen \the [src]'s casters..."))
|
||||
if (do_after(user, 4 SECONDS, src))
|
||||
if (do_after(user, 4 SECONDS, src, DO_REPAIR_CONSTRUCT))
|
||||
if(anchored)
|
||||
user.visible_message( \
|
||||
"[user] loosens \the [src]'s casters.", \
|
||||
@@ -55,4 +55,4 @@
|
||||
name = "space minimoog"
|
||||
desc = "This is a minimoog, like a space piano, but more spacey!"
|
||||
icon_state = "minimoog"
|
||||
obj_flags = OBJ_FLAG_ROTATABLE
|
||||
obj_flags = OBJ_FLAG_ROTATABLE
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
)
|
||||
LAZYADD(climbers, user)
|
||||
|
||||
if(!do_after(user,25))
|
||||
if(!do_after(user, 2.5 SECONDS))
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
if(manipulating) return M
|
||||
manipulating = 1
|
||||
to_chat(user, "<span class='notice'>You begin [verb]ing \the [src] with [M.display_name].</span>")
|
||||
if(!do_after(user, 20) || !S.use(1))
|
||||
if(!do_after(user, 2 SECONDS, src, DO_REPAIR_CONSTRUCT) || !S.use(1))
|
||||
manipulating = 0
|
||||
return null
|
||||
user.visible_message("<span class='notice'>\The [user] [verb]es \the [src] with [M.display_name].</span>", "<span class='notice'>You finish [verb]ing \the [src].</span>")
|
||||
@@ -252,7 +252,7 @@
|
||||
"<span class='notice'>You begin removing the [type_holding] holding \the [src]'s [M.display_name] [what] in place.</span>")
|
||||
if(sound)
|
||||
playsound(src.loc, sound, 50, 1)
|
||||
if(!do_after(user, 40))
|
||||
if(!do_after(user, 4 SECONDS, src, DO_REPAIR_CONSTRUCT))
|
||||
manipulating = 0
|
||||
return M
|
||||
user.visible_message("<span class='notice'>\The [user] removes the [M.display_name] [what] from \the [src].</span>",
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
to_chat(user, "You unbuckle yourself from \the [src]")
|
||||
else if(user != load && load)
|
||||
user.visible_message ("[user] starts to unbuckle [load] from \the [src]!")
|
||||
if(do_after(user, 8 SECONDS, act_target = src))
|
||||
if(do_after(user, 8 SECONDS, src))
|
||||
unload(load)
|
||||
to_chat(user, "You unbuckle [load] from \the [src]")
|
||||
to_chat(load, "You were unbuckled from \the [src] by [user]")
|
||||
@@ -362,4 +362,4 @@
|
||||
land_speed = 2
|
||||
space_speed = 0
|
||||
protection_percent = 10
|
||||
can_hover = FALSE
|
||||
can_hover = FALSE
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
to_chat(user, "You climb on \the [src]")
|
||||
else if(user != load && load)
|
||||
user.visible_message ("[user] starts to remove [load] from \the [src]!")
|
||||
if(do_after(user, 8 SECONDS, act_target = src))
|
||||
if(do_after(user, 8 SECONDS, src))
|
||||
unload(load)
|
||||
to_chat(user, "You remove [load] from \the [src]")
|
||||
to_chat(load, "You were removed from \the [src] by [user]")
|
||||
@@ -82,4 +82,4 @@
|
||||
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
/obj/machinery/atmospherics/pipe/zpipe/handle_z_crawl(var/mob/living/L, var/direction)
|
||||
to_chat(L, SPAN_NOTICE("You start climbing [travel_direction_name] the pipe. This will take a while..."))
|
||||
playsound(loc, 'sound/machines/ventcrawl.ogg', 100, 1, 3)
|
||||
if(!do_after(L, 100, needhand = 0, act_target = get_turf(src)) || !can_z_crawl(L, direction))
|
||||
if(!do_after(L, 10 SECONDS, get_turf(src), do_flags = DO_DEFAULT & ~DO_USER_SAME_HAND) || !can_z_crawl(L, direction))
|
||||
to_chat(L, SPAN_DANGER("You gave up on climbing [travel_direction_name] the pipe."))
|
||||
return FALSE
|
||||
return ventcrawl_to(L, node2, null)
|
||||
|
||||
Reference in New Issue
Block a user