[PORT] Adds TG "busy" cogbar animation for players (#27932)

* looks like it works

* move to PREFTOGGLE_3 and add sneaky do_after

* linter

* param doc and some cleanup

* autodoc and comment signal

* fix wrong type in link_processing

* fix wrong var in preferences

* cover do_mob and do_after_once

* fix toggles total

* replace indent with space

* offset and helpers procs

* fix conditional statement

* Apply suggestions from code review

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Mira <42539014+MiraHell@users.noreply.github.com>

* Update code/__HELPERS/mob_helpers.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Mira <42539014+MiraHell@users.noreply.github.com>

* use SECONDS

* Update code/game/objects/items/weapons/weaponry.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Mira <42539014+MiraHell@users.noreply.github.com>

---------

Signed-off-by: Mira <42539014+MiraHell@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
Mira
2025-03-06 16:04:51 +00:00
committed by GitHub
co-authored by Luc Burzah
parent c550db4e65
commit a6e8f69c55
40 changed files with 357 additions and 41 deletions
@@ -865,7 +865,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
visible_message("<span class='warning'>[src] attempts to unbuckle [p_themselves()]!</span>",
"<span class='notice'>You attempt to unbuckle yourself... (This will take around [breakout_time / 10] seconds and you need to stay still.)</span>")
if(!do_after(src, breakout_time, FALSE, src, allow_moving = TRUE, extra_checks = list(CALLBACK(src, PROC_REF(buckle_check))), allow_moving_target = TRUE))
if(!do_after(src, breakout_time, FALSE, src, allow_moving = TRUE, extra_checks = list(CALLBACK(src, PROC_REF(buckle_check))), allow_moving_target = TRUE, hidden = TRUE))
if(src && buckled)
to_chat(src, "<span class='warning'>You fail to unbuckle yourself!</span>")
else
@@ -931,7 +931,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
apply_status_effect(STATUS_EFFECT_REMOVE_MUZZLE)
visible_message("<span class='warning'>[src] gnaws on [I], trying to remove it!</span>")
to_chat(src, "<span class='notice'>You attempt to remove [I]... (This will take around [time/10] seconds and you need to stand still.)</span>")
if(do_after(src, time, FALSE, src, extra_checks = list(CALLBACK(src, PROC_REF(muzzle_check)))))
if(do_after(src, time, FALSE, src, extra_checks = list(CALLBACK(src, PROC_REF(muzzle_check))), hidden = TRUE))
visible_message("<span class='warning'>[src] removes [I]!</span>")
to_chat(src, "<span class='notice'>You get rid of [I]!</span>")
if(I.security_lock)
@@ -91,7 +91,7 @@ STATUS EFFECTS
if(stat == DEAD && !work_when_dead)
return
if(!instant && !do_mob(src, src, 1 SECONDS, extra_checks = list(CALLBACK(src, TYPE_PROC_REF(/mob/living, cannot_stand))), only_use_extra_checks = TRUE))
if(!instant && !do_mob(src, src, 1 SECONDS, extra_checks = list(CALLBACK(src, TYPE_PROC_REF(/mob/living, cannot_stand))), only_use_extra_checks = TRUE, hidden = TRUE))
return
if(resting || body_position == STANDING_UP || HAS_TRAIT(src, TRAIT_FLOORED))
return
@@ -48,7 +48,7 @@
/mob/living/simple_animal/hostile/headslug/AltClickOn(mob/living/carbon/carbon_target)
if(egg_layed || !istype(carbon_target) || !Adjacent(carbon_target) || ismachineperson(carbon_target))
return ..()
if(carbon_target.stat != DEAD && !do_mob(src, carbon_target, 5 SECONDS))
if(carbon_target.stat != DEAD && !do_mob(src, carbon_target, 5 SECONDS, hidden = TRUE))
return
if(HAS_TRAIT(carbon_target, TRAIT_XENO_HOST))
to_chat(src, "<span class='userdanger'>A foreign presence repels us from this body. Perhaps we should try to infest another?</span>")
+1 -1
View File
@@ -524,7 +524,7 @@
else
to_chat(src, "<span class='notice'>You are now trying to get up.</span>")
if(!do_mob(src, src, 1 SECONDS, extra_checks = list(CALLBACK(src, TYPE_PROC_REF(/mob/living, cannot_stand))), only_use_extra_checks = TRUE))
if(!do_mob(src, src, 1 SECONDS, extra_checks = list(CALLBACK(src, TYPE_PROC_REF(/mob/living, cannot_stand))), only_use_extra_checks = TRUE, hidden = TRUE))
return
if(resting)