mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
[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:
@@ -42,6 +42,9 @@
|
||||
/// Value used to increment ex_act() if reactionary_explosions is on
|
||||
var/explosion_block = 0
|
||||
|
||||
///vis overlays managed by SSvis_overlays to automaticaly turn them like other overlays.
|
||||
var/list/managed_vis_overlays
|
||||
|
||||
// Detective Work, used for the duplicate data points kept in the scanners
|
||||
var/list/original_atom
|
||||
/// List of fibers that this atom has
|
||||
|
||||
@@ -865,7 +865,7 @@
|
||||
user.playsound_local(user, "sparks", 50, FALSE, use_reverb = FALSE)
|
||||
adjust_uses(-1, user)
|
||||
robot_target.audible_message("<span class='italics'>You hear a loud electrical buzzing sound coming from [robot_target]!</span>")
|
||||
if(!do_mob(user, robot_target, 10 SECONDS))
|
||||
if(!do_mob(user, robot_target, 10 SECONDS, hidden = TRUE))
|
||||
is_active = FALSE
|
||||
return
|
||||
is_active = FALSE
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
if(!occupant)
|
||||
return
|
||||
to_chat(occupant, "<span class='warning'>You start trying to break free!</span>")
|
||||
if(!do_after_once(occupant, 20 SECONDS, FALSE, src))
|
||||
if(!do_after_once(occupant, 20 SECONDS, FALSE, src, hidden = TRUE))
|
||||
return
|
||||
var/list/possible_results = list(
|
||||
CALLBACK(src, PROC_REF(electrocute_abductee)) = 1,
|
||||
|
||||
@@ -68,3 +68,12 @@
|
||||
layer = FLOAT_LAYER
|
||||
vis_flags = VIS_INHERIT_ID
|
||||
appearance_flags = KEEP_TOGETHER | LONG_GLIDE | PIXEL_SCALE
|
||||
|
||||
/obj/effect/overlay/vis
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
anchored = TRUE
|
||||
vis_flags = VIS_INHERIT_DIR
|
||||
///When detected to be unused it gets set to world.time, after a while it gets removed
|
||||
var/unused = 0
|
||||
///overlays which go unused for this amount of time get cleaned up
|
||||
var/cache_expiration = 2 MINUTES
|
||||
|
||||
@@ -392,7 +392,7 @@
|
||||
to_chat(user, "<span class='danger'>The mind batterer has been burnt out!</span>")
|
||||
times_used--
|
||||
return
|
||||
if(!do_after_once(user, 2 SECONDS, target = src, allow_moving = TRUE, attempt_cancel_message = "You think it's best to save this for later."))
|
||||
if(!do_after_once(user, 2 SECONDS, target = src, allow_moving = TRUE, attempt_cancel_message = "You think it's best to save this for later.", hidden = TRUE))
|
||||
times_used--
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You trigger [src]. It has [max_uses-times_used] charges left.</span>")
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
user.visible_message("<span class='warning'>[user] attempts to [break_cuffs ? "break" : "remove"] [src]!</span>", "<span class='notice'>You attempt to [break_cuffs ? "break" : "remove"] [src]...</span>")
|
||||
to_chat(user, "<span class='notice'>(This will take around [DisplayTimeText(effective_breakout_time)] and you need to stand still.)</span>")
|
||||
|
||||
if(!do_after(user, effective_breakout_time, FALSE, user))
|
||||
if(!do_after(user, effective_breakout_time, FALSE, user, hidden = TRUE))
|
||||
user.remove_status_effect(STATUS_EFFECT_REMOVE_CUFFS)
|
||||
to_chat(user, "<span class='warning'>You fail to [break_cuffs ? "break" : "remove"] [src]!</span>")
|
||||
return
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
L.update_inv_l_hand()
|
||||
spinning = TRUE
|
||||
for(var/i in 1 to max_spins)
|
||||
if(!do_mob(L, L, 1 SECONDS, only_use_extra_checks = TRUE, extra_checks = list(CALLBACK(src, PROC_REF(can_spin_check), L))))
|
||||
if(!do_mob(L, L, 1 SECONDS, only_use_extra_checks = TRUE, extra_checks = list(CALLBACK(src, PROC_REF(can_spin_check), L)), hidden = TRUE))
|
||||
reset_values(L)
|
||||
break
|
||||
throw_range += range_increment
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
return ..()
|
||||
to_chat(user, "<span class='warning'>You begin gathering strength...</span>")
|
||||
playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, 1)
|
||||
if(do_after(user, 90, target = user))
|
||||
if(do_after(user, 9 SECONDS, target = user, hidden = TRUE))
|
||||
to_chat(user, "<span class='userdanger'>You gather power! Time for a home run!</span>")
|
||||
homerun_ready = 1
|
||||
..()
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
"<span class='notice'>You struggle to break free from [src], exacerbating your wounds! (Stay still for two minutes.)</span>",\
|
||||
"<span class='italics'>You hear a wet squishing noise..</span>")
|
||||
M.adjustBruteLoss(30)
|
||||
if(!do_after(M, 2 MINUTES, target = src))
|
||||
if(!do_after(M, 2 MINUTES, target = src, hidden = TRUE))
|
||||
if(M && M.buckled)
|
||||
to_chat(M, "<span class='warning'>You fail to free yourself!</span>")
|
||||
return
|
||||
|
||||
@@ -101,7 +101,7 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
if(!drill_timer)
|
||||
return
|
||||
cut_overlay(progress_bar)
|
||||
progress_bar = image('icons/effects/progessbar.dmi', src, "prog_bar_[round((((world.time - drill_start_time) / time_to_drill) * 100), 5)]", HUD_LAYER)
|
||||
progress_bar = image('icons/effects/progressbar.dmi', src, "prog_bar_[round((((world.time - drill_start_time) / time_to_drill) * 100), 5)]", HUD_LAYER)
|
||||
add_overlay(progress_bar)
|
||||
if(prob(DRILL_SPARK_CHANCE))
|
||||
drill.spark_system.start()
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
M.visible_message("<span class='warning'>[M.name] struggles to break free from the gelatinous resin!</span>",\
|
||||
"<span class='notice'>You struggle to break free from the gelatinous resin... (Stay still for two minutes.)</span>",\
|
||||
"<span class='italics'>You hear squelching...</span>")
|
||||
if(!do_after(M, 120 SECONDS, target = src))
|
||||
if(!do_after(M, 120 SECONDS, target = src, hidden = TRUE))
|
||||
if(M && M.buckled)
|
||||
to_chat(M, "<span class='warning'>You fail to escape \the [src]!</span>")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user