mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] refactors most spans (#9139)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
@@ -149,7 +149,7 @@
|
||||
if(shield_health <= 0)
|
||||
destroy_shields()
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='danger'>\The [src] overloads and the shield vanishes!</span>")
|
||||
T.visible_message(span_danger("\The [src] overloads and the shield vanishes!"))
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 75, 0)
|
||||
else
|
||||
if(shield_health < max_shield_health / 4) // Play a more urgent sounding beep if it's at 25% health.
|
||||
@@ -189,13 +189,13 @@
|
||||
/obj/item/shield_projector/attack_self(var/mob/living/user)
|
||||
if(active)
|
||||
if(always_on)
|
||||
to_chat(user, "<span class='warning'>You can't seem to deactivate \the [src].</span>")
|
||||
to_chat(user, span_warning("You can't seem to deactivate \the [src]."))
|
||||
return
|
||||
set_on(FALSE)
|
||||
else
|
||||
set_dir(user.dir) // Needed for linear shields.
|
||||
set_on(TRUE)
|
||||
visible_message("<span class='notice'>\The [user] [!active ? "de":""]activates \the [src].</span>")
|
||||
visible_message(span_notice("\The [user] [!active ? "de":""]activates \the [src]."))
|
||||
|
||||
/obj/item/shield_projector/proc/set_on(var/on)
|
||||
if(isnull(on))
|
||||
@@ -381,7 +381,7 @@
|
||||
/obj/item/shield_projector/line/exosuit/attack_self(var/mob/living/user)
|
||||
if(active)
|
||||
if(always_on)
|
||||
to_chat(user, "<span class='warning'>You can't seem to deactivate \the [src].</span>")
|
||||
to_chat(user, span_warning("You can't seem to deactivate \the [src]."))
|
||||
return
|
||||
|
||||
destroy_shields()
|
||||
@@ -391,7 +391,7 @@
|
||||
else
|
||||
set_dir(user.dir)
|
||||
create_shields()
|
||||
visible_message("<span class='notice'>\The [user] [!active ? "de":""]activates \the [src].</span>")
|
||||
visible_message(span_notice("\The [user] [!active ? "de":""]activates \the [src]."))
|
||||
|
||||
/obj/item/shield_projector/line/exosuit/adjust_health(amount)
|
||||
..()
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
/obj/machinery/shield/hitby(AM as mob|obj)
|
||||
//Let everyone know we've been hit!
|
||||
visible_message("<span class='danger'>\The [src] was hit by [AM].</span>")
|
||||
visible_message(span_danger("\The [src] was hit by [AM]."))
|
||||
|
||||
//Super realistic, resource-intensive, real-time damage calculations.
|
||||
var/tforce = 0
|
||||
@@ -291,13 +291,13 @@
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && malfunction && is_open)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
to_chat(user, "<span class='notice'>You begin to replace the wires.</span>")
|
||||
to_chat(user, span_notice("You begin to replace the wires."))
|
||||
//if(do_after(user, min(60, round( ((getMaxHealth()/health)*10)+(malfunction*10) ))) //Take longer to repair heavier damage
|
||||
if(do_after(user, 30))
|
||||
if (coil.use(1))
|
||||
health = max_health
|
||||
malfunction = 0
|
||||
to_chat(user, "<span class='notice'>You repair the [src]!</span>")
|
||||
to_chat(user, span_notice("You repair the [src]!"))
|
||||
update_icon()
|
||||
|
||||
else if(W.has_tool_quality(TOOL_WRENCH))
|
||||
|
||||
@@ -126,9 +126,9 @@
|
||||
// Fails shield segments in specific range. Range of 1 affects the shielded turf only.
|
||||
/obj/effect/shield/proc/fail_adjacent_segments(var/range, var/hitby = null)
|
||||
if(hitby)
|
||||
visible_message("<span class='danger'>\The [src] flashes a bit as \the [hitby] collides with it, eventually fading out in a rain of sparks!</span>")
|
||||
visible_message(span_danger("\The [src] flashes a bit as \the [hitby] collides with it, eventually fading out in a rain of sparks!"))
|
||||
else
|
||||
visible_message("<span class='danger'>\The [src] flashes a bit as it eventually fades out in a rain of sparks!</span>")
|
||||
visible_message(span_danger("\The [src] flashes a bit as it eventually fades out in a rain of sparks!"))
|
||||
fail(range * 2)
|
||||
|
||||
for(var/obj/effect/shield/S in range(range, src))
|
||||
@@ -247,7 +247,7 @@
|
||||
user.do_attack_animation(src)
|
||||
|
||||
if(gen.check_flag(MODEFLAG_HYPERKINETIC))
|
||||
user.visible_message("<span class='danger'>\The [user] hits \the [src] with \the [I]!</span>")
|
||||
user.visible_message(span_danger("\The [user] hits \the [src] with \the [I]!"))
|
||||
if(I.damtype == BURN)
|
||||
take_damage(I.force, SHIELD_DAMTYPE_HEAT)
|
||||
else if (I.damtype == BRUTE)
|
||||
@@ -255,7 +255,7 @@
|
||||
else
|
||||
take_damage(I.force, SHIELD_DAMTYPE_EM)
|
||||
else
|
||||
user.visible_message("<span class='danger'>\The [user] tries to attack \the [src] with \the [I], but it passes through!</span>")
|
||||
user.visible_message(span_danger("\The [user] tries to attack \the [src] with \the [I], but it passes through!"))
|
||||
|
||||
|
||||
// Special treatment for meteors because they would otherwise penetrate right through the shield.
|
||||
@@ -274,7 +274,7 @@
|
||||
/obj/effect/shield/proc/overcharge_shock(var/mob/living/M)
|
||||
M.adjustFireLoss(rand(20, 40))
|
||||
M.Weaken(5)
|
||||
to_chat(M, "<span class='danger'>As you come into contact with \the [src] a surge of energy paralyses you!</span>")
|
||||
to_chat(M, span_danger("As you come into contact with \the [src] a surge of energy paralyses you!"))
|
||||
take_damage(10, SHIELD_DAMTYPE_EM)
|
||||
|
||||
// Called when a flag is toggled. Can be used to add on-toggle behavior, such as visual changes.
|
||||
@@ -352,6 +352,6 @@
|
||||
if(!S.gen.check_flag(MODEFLAG_HYPERKINETIC))
|
||||
return
|
||||
S.take_damage(get_shield_damage(), SHIELD_DAMTYPE_PHYSICAL, src)
|
||||
visible_message("<span class='danger'>\The [src] breaks into dust!</span>")
|
||||
visible_message(span_danger("\The [src] breaks into dust!"))
|
||||
make_debris()
|
||||
qdel(src)
|
||||
|
||||
@@ -364,10 +364,10 @@
|
||||
return
|
||||
if(O?.has_tool_quality(TOOL_CROWBAR) || O?.has_tool_quality(TOOL_WRENCH) || istype(O, /obj/item/storage/part_replacer))
|
||||
if(offline_for)
|
||||
to_chat(user, "<span class='warning'>Wait until \the [src] cools down from emergency shutdown first!</span>")
|
||||
to_chat(user, span_warning("Wait until \the [src] cools down from emergency shutdown first!"))
|
||||
return
|
||||
if(running)
|
||||
to_chat(user, "<span class='notice'>Turn off \the [src] first!</span>")
|
||||
to_chat(user, span_notice("Turn off \the [src] first!"))
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, O))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user