mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +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:
@@ -65,7 +65,7 @@
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
if(damage >= STRUCTURE_MIN_DAMAGE_THRESHOLD)
|
||||
if(src.locked || src.welded)
|
||||
visible_message("<span class='danger'>\The [user] begins breaking into \the [src] internals!</span>")
|
||||
visible_message(span_danger("\The [user] begins breaking into \the [src] internals!"))
|
||||
user.set_AI_busy(TRUE) // If the mob doesn't have an AI attached, this won't do anything.
|
||||
if(do_after(user,10 SECONDS,src))
|
||||
src.locked = 0
|
||||
@@ -76,13 +76,13 @@
|
||||
src.shock(user, 100)
|
||||
user.set_AI_busy(FALSE)
|
||||
else if(src.density)
|
||||
visible_message("<span class='danger'>\The [user] forces \the [src] open!</span>")
|
||||
visible_message(span_danger("\The [user] forces \the [src] open!"))
|
||||
open(1)
|
||||
else
|
||||
visible_message("<span class='danger'>\The [user] forces \the [src] closed!</span>")
|
||||
visible_message(span_danger("\The [user] forces \the [src] closed!"))
|
||||
close(1)
|
||||
else
|
||||
visible_message("<span class='notice'>\The [user] strains fruitlessly to force \the [src] [density ? "open" : "closed"].</span>")
|
||||
visible_message(span_notice("\The [user] strains fruitlessly to force \the [src] [density ? "open" : "closed"]."))
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -91,10 +91,10 @@
|
||||
var/mob/living/carbon/human/X = user
|
||||
if(istype(X.species, /datum/species/xenos))
|
||||
if(src.locked || src.welded)
|
||||
visible_message("<span class='alium'>\The [user] begins tearing into \the [src] internals!</span>")
|
||||
visible_message(span_alium("\The [user] begins tearing into \the [src] internals!"))
|
||||
src.do_animate("deny")
|
||||
if(do_after(user,15 SECONDS,src))
|
||||
visible_message("<span class='danger'>\The [user] tears \the [src] open, sparks flying from its electronics!</span>")
|
||||
visible_message(span_danger("\The [user] tears \the [src] open, sparks flying from its electronics!"))
|
||||
src.do_animate("spark")
|
||||
playsound(src, 'sound/machines/door/airlock_tear_apart.ogg', 100, 1, volume_channel = VOLUME_CHANNEL_DOORS)
|
||||
src.locked = 0
|
||||
@@ -103,17 +103,17 @@
|
||||
open(1)
|
||||
src.set_broken() //These aren't emags, these be CLAWS
|
||||
else if(src.density)
|
||||
visible_message("<span class='alium'>\The [user] begins forcing \the [src] open!</span>")
|
||||
visible_message(span_alium("\The [user] begins forcing \the [src] open!"))
|
||||
if(do_after(user, 5 SECONDS,src))
|
||||
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1, volume_channel = VOLUME_CHANNEL_DOORS)
|
||||
visible_message("<span class='danger'>\The [user] forces \the [src] open!</span>")
|
||||
visible_message(span_danger("\The [user] forces \the [src] open!"))
|
||||
open(1)
|
||||
else
|
||||
visible_message("<span class='danger'>\The [user] forces \the [src] closed!</span>")
|
||||
visible_message(span_danger("\The [user] forces \the [src] closed!"))
|
||||
close(1)
|
||||
else
|
||||
src.do_animate("deny")
|
||||
visible_message("<span class='notice'>\The [user] strains fruitlessly to force \the [src] [density ? "open" : "closed"].</span>")
|
||||
visible_message(span_notice("\The [user] strains fruitlessly to force \the [src] [density ? "open" : "closed"]."))
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -672,7 +672,7 @@ About the new airlock wires panel:
|
||||
else /*if(src.justzap)*/
|
||||
return
|
||||
else if(user.hallucination > 50 && prob(10) && src.operating == 0)
|
||||
to_chat(user, "<span class='danger'>You feel a powerful shock course through your body!</span>")
|
||||
to_chat(user, span_danger("You feel a powerful shock course through your body!"))
|
||||
user.halloss += 10
|
||||
user.stunned += 10
|
||||
return
|
||||
@@ -1009,7 +1009,7 @@ About the new airlock wires panel:
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
else if(user.a_intent == I_HURT)
|
||||
src.visible_message("<span class='warning'>[user] hammers on \the [src]!</span>", "<span class='warning'>Someone hammers loudly on \the [src]!</span>")
|
||||
src.visible_message(span_warning("[user] hammers on \the [src]!"), span_warning("Someone hammers loudly on \the [src]!"))
|
||||
src.add_fingerprint(user)
|
||||
if(icon_state == "door_closed" && arePowerSystemsOn())
|
||||
flick("door_deny", src)
|
||||
@@ -1045,14 +1045,14 @@ About the new airlock wires panel:
|
||||
loseMainPower()
|
||||
update_icon()
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Main power is already offline.</span>")
|
||||
to_chat(usr, span_warning("Main power is already offline."))
|
||||
. = TRUE
|
||||
if("disrupt-backup")
|
||||
if(!backup_power_lost_until)
|
||||
loseBackupPower()
|
||||
update_icon()
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Backup power is already offline.</span>")
|
||||
to_chat(usr, span_warning("Backup power is already offline."))
|
||||
. = TRUE
|
||||
if("shock-restore")
|
||||
electrify(0, 1)
|
||||
@@ -1107,27 +1107,27 @@ About the new airlock wires panel:
|
||||
if(!user_allowed(user))
|
||||
return
|
||||
if(wires.is_cut(WIRE_DOOR_BOLTS))
|
||||
to_chat(user, "<span class='warning'>The door bolt drop wire is cut - you can't toggle the door bolts.</span>")
|
||||
to_chat(user, span_warning("The door bolt drop wire is cut - you can't toggle the door bolts."))
|
||||
return
|
||||
if(locked)
|
||||
if(!arePowerSystemsOn())
|
||||
to_chat(user, "<span class='warning'>The door has no power - you can't raise the door bolts.</span>")
|
||||
to_chat(user, span_warning("The door has no power - you can't raise the door bolts."))
|
||||
else
|
||||
unlock()
|
||||
to_chat(user, "<span class='notice'>The door bolts have been raised.</span>")
|
||||
to_chat(user, span_notice("The door bolts have been raised."))
|
||||
// log_combat(user, src, "unbolted")
|
||||
else
|
||||
lock()
|
||||
to_chat(user, "<span class='warning'>The door bolts have been dropped.</span>")
|
||||
to_chat(user, span_warning("The door bolts have been dropped."))
|
||||
// log_combat(user, src, "bolted")
|
||||
|
||||
/obj/machinery/door/airlock/proc/user_toggle_open(mob/user)
|
||||
if(!user_allowed(user))
|
||||
return
|
||||
if(welded)
|
||||
to_chat(user, text("<span class='warning'>The airlock has been welded shut!</span>"))
|
||||
to_chat(user, span_warning("The airlock has been welded shut!"))
|
||||
else if(locked)
|
||||
to_chat(user, text("<span class='warning'>The door bolts are down!</span>"))
|
||||
to_chat(user, span_warning("The door bolts are down!"))
|
||||
else if(!density)
|
||||
close()
|
||||
else
|
||||
@@ -1169,7 +1169,7 @@ About the new airlock wires panel:
|
||||
else if(C.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if (src.p_open)
|
||||
if (stat & BROKEN)
|
||||
to_chat(usr, "<span class='warning'>The panel is broken and cannot be closed.</span>")
|
||||
to_chat(usr, span_warning("The panel is broken and cannot be closed."))
|
||||
else
|
||||
src.p_open = FALSE
|
||||
playsound(src, C.usesound, 50, 1)
|
||||
@@ -1194,7 +1194,7 @@ About the new airlock wires panel:
|
||||
playsound(src, C.usesound, 75, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
|
||||
if(do_after(user,40 * C.toolspeed))
|
||||
to_chat(user, "<span class='notice'>You removed the airlock electronics!</span>")
|
||||
to_chat(user, span_notice("You removed the airlock electronics!"))
|
||||
|
||||
var/obj/structure/door_assembly/da = new assembly_type(src.loc)
|
||||
if (istype(da, /obj/structure/door_assembly/multi_tile))
|
||||
@@ -1222,9 +1222,9 @@ About the new airlock wires panel:
|
||||
qdel(src)
|
||||
return
|
||||
else if(arePowerSystemsOn())
|
||||
to_chat(user, "<span class='notice'>The airlock's motors resist your efforts to force it.</span>")
|
||||
to_chat(user, span_notice("The airlock's motors resist your efforts to force it."))
|
||||
else if(locked)
|
||||
to_chat(user, "<span class='notice'>The airlock's bolts prevent it from being forced.</span>")
|
||||
to_chat(user, span_notice("The airlock's bolts prevent it from being forced."))
|
||||
else
|
||||
if(density)
|
||||
spawn(0) open(1)
|
||||
@@ -1236,12 +1236,12 @@ About the new airlock wires panel:
|
||||
var/obj/item/W = C
|
||||
if((W.pry == 1) && !arePowerSystemsOn())
|
||||
if(locked)
|
||||
to_chat(user, "<span class='notice'>The airlock's bolts prevent it from being forced.</span>")
|
||||
to_chat(user, span_notice("The airlock's bolts prevent it from being forced."))
|
||||
else if( !welded && !operating )
|
||||
if(istype(C, /obj/item/material/twohanded/fireaxe)) // If this is a fireaxe, make sure it's held in two hands.
|
||||
var/obj/item/material/twohanded/fireaxe/F = C
|
||||
if(!F.wielded)
|
||||
to_chat(user, "<span class='warning'>You need to be wielding \the [F] to do that.</span>")
|
||||
to_chat(user, span_warning("You need to be wielding \the [F] to do that."))
|
||||
return
|
||||
// At this point, it's an armblade or a fireaxe that passed the wielded test, let's try to open it.
|
||||
if(density)
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
/obj/machinery/access_button/attack_hand(mob/user)
|
||||
add_fingerprint(usr)
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='warning'>Access Denied</span>")
|
||||
to_chat(user, span_warning("Access Denied"))
|
||||
|
||||
else if(radio_connection)
|
||||
var/datum/signal/signal = new
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/obj/item/airlock_electronics/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
to_chat(user, "<span class='notice'>You remove the access restrictions on [src]!</span>")
|
||||
to_chat(user, span_notice("You remove the access restrictions on [src]!"))
|
||||
return 1
|
||||
|
||||
/obj/item/airlock_electronics/attack_self(mob/user as mob)
|
||||
@@ -149,5 +149,5 @@
|
||||
secure = 1
|
||||
|
||||
/obj/item/airlock_electronics/secure/emag_act(var/remaining_charges, var/mob/user)
|
||||
to_chat(user, "<span class='warning'>You don't appear to be able to bypass this hardened device!</span>")
|
||||
to_chat(user, span_warning("You don't appear to be able to bypass this hardened device!"))
|
||||
return -1
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
if(istype(C,/obj/item/material/twohanded/fireaxe)) // Fireaxes need to be in both hands to pry.
|
||||
var/obj/item/material/twohanded/fireaxe/F = C
|
||||
if(!F.wielded)
|
||||
to_chat(user, "<span class='warning'>You need to be wielding \the [F] to do that.</span>")
|
||||
to_chat(user, span_warning("You need to be wielding \the [F] to do that."))
|
||||
return
|
||||
|
||||
// If we're at this point, it's a fireaxe in both hands or something else that doesn't care for twohanding.
|
||||
@@ -166,7 +166,7 @@
|
||||
force_toggle(1, user)
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src]'s motors resist your effort.</span>")
|
||||
to_chat(user, span_notice("[src]'s motors resist your effort."))
|
||||
return
|
||||
|
||||
|
||||
@@ -176,9 +176,9 @@
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
user.do_attack_animation(src)
|
||||
if(W.force < min_force)
|
||||
user.visible_message("<span class='danger'>\The [user] hits \the [src] with \the [W] with no visible effect.</span>")
|
||||
user.visible_message(span_danger("\The [user] hits \the [src] with \the [W] with no visible effect."))
|
||||
else
|
||||
user.visible_message("<span class='danger'>\The [user] forcefully strikes \the [src] with \the [W]!</span>")
|
||||
user.visible_message(span_danger("\The [user] forcefully strikes \the [src] with \the [W]!"))
|
||||
playsound(src, hitsound, 100, 1)
|
||||
take_damage(W.force*0.35) //it's a blast door, it should take a while. -Luke
|
||||
return
|
||||
@@ -186,19 +186,19 @@
|
||||
else if(istype(C, /obj/item/stack/material) && C.get_material_name() == "plasteel") // Repairing.
|
||||
var/amt = CEILING((maxhealth - health)/150, 1)
|
||||
if(!amt)
|
||||
to_chat(user, "<span class='notice'>\The [src] is already fully repaired.</span>")
|
||||
to_chat(user, span_notice("\The [src] is already fully repaired."))
|
||||
return
|
||||
var/obj/item/stack/P = C
|
||||
if(P.get_amount() < amt)
|
||||
to_chat(user, "<span class='warning'>You don't have enough sheets to repair this! You need at least [amt] sheets.</span>")
|
||||
to_chat(user, span_warning("You don't have enough sheets to repair this! You need at least [amt] sheets."))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
to_chat(user, span_notice("You begin repairing [src]..."))
|
||||
if(do_after(usr, 30))
|
||||
if(P.use(amt))
|
||||
to_chat(user, "<span class='notice'>You have repaired \The [src]</span>")
|
||||
to_chat(user, span_notice("You have repaired \The [src]"))
|
||||
src.repair()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You don't have enough sheets to repair this! You need at least [amt] sheets.</span>")
|
||||
to_chat(user, span_warning("You don't have enough sheets to repair this! You need at least [amt] sheets."))
|
||||
|
||||
else if(src.density && (user.a_intent == I_HURT)) //If we can't pry it open and it's not a weapon.... Eh, let's attack it anyway.
|
||||
var/obj/item/W = C
|
||||
@@ -206,9 +206,9 @@
|
||||
if(istype(W) && (W.damtype == BRUTE || W.damtype == BURN))
|
||||
user.do_attack_animation(src)
|
||||
if(W.force < min_force) //No actual non-weapon item shouls have a force greater than the min_force, but let's include this just in case.
|
||||
user.visible_message("<span class='danger'>\The [user] hits \the [src] with \the [W] with no visible effect.</span>")
|
||||
user.visible_message(span_danger("\The [user] hits \the [src] with \the [W] with no visible effect."))
|
||||
else
|
||||
user.visible_message("<span class='danger'>\The [user] forcefully strikes \the [src] with \the [W]!</span>")
|
||||
user.visible_message(span_danger("\The [user] forcefully strikes \the [src] with \the [W]!"))
|
||||
playsound(src, hitsound, 100, 1)
|
||||
take_damage(W.force*0.15) //If the item isn't a weapon, let's make this take longer than usual to break it down.
|
||||
return
|
||||
@@ -221,19 +221,19 @@
|
||||
var/mob/living/carbon/human/X = user
|
||||
if(istype(X.species, /datum/species/xenos))
|
||||
if(src.density)
|
||||
visible_message("<span class='alium'>\The [user] begins forcing \the [src] open!</span>")
|
||||
visible_message(span_alium("\The [user] begins forcing \the [src] open!"))
|
||||
if(do_after(user, 15 SECONDS,src))
|
||||
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
|
||||
visible_message("<span class='danger'>\The [user] forces \the [src] open!</span>")
|
||||
visible_message(span_danger("\The [user] forces \the [src] open!"))
|
||||
force_open(1)
|
||||
else
|
||||
visible_message("<span class='alium'>\The [user] begins forcing \the [src] closed!</span>")
|
||||
visible_message(span_alium("\The [user] begins forcing \the [src] closed!"))
|
||||
if(do_after(user, 5 SECONDS,src))
|
||||
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
|
||||
visible_message("<span class='danger'>\The [user] forces \the [src] closed!</span>")
|
||||
visible_message(span_danger("\The [user] forces \the [src] closed!"))
|
||||
force_close(1)
|
||||
else
|
||||
visible_message("<span class='notice'>\The [user] strains fruitlessly to force \the [src] [density ? "open" : "closed"].</span>")
|
||||
visible_message(span_notice("\The [user] strains fruitlessly to force \the [src] [density ? "open" : "closed"]."))
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -245,18 +245,18 @@
|
||||
if(damage >= STRUCTURE_MIN_DAMAGE_THRESHOLD)
|
||||
user.set_AI_busy(TRUE) // If the mob doesn't have an AI attached, this won't do anything.
|
||||
if(src.density)
|
||||
visible_message("<span class='danger'>\The [user] starts forcing \the [src] open!</span>")
|
||||
visible_message(span_danger("\The [user] starts forcing \the [src] open!"))
|
||||
if(do_after(user, 5 SECONDS, src))
|
||||
visible_message("<span class='danger'>\The [user] forces \the [src] open!</span>")
|
||||
visible_message(span_danger("\The [user] forces \the [src] open!"))
|
||||
force_open(1)
|
||||
else
|
||||
visible_message("<span class='danger'>\The [user] starts forcing \the [src] closed!</span>")
|
||||
visible_message(span_danger("\The [user] starts forcing \the [src] closed!"))
|
||||
if(do_after(user, 2 SECONDS, src))
|
||||
visible_message("<span class='danger'>\The [user] forces \the [src] closed!</span>")
|
||||
visible_message(span_danger("\The [user] forces \the [src] closed!"))
|
||||
force_close(1)
|
||||
user.set_AI_busy(FALSE)
|
||||
else
|
||||
visible_message("<span class='notice'>\The [user] strains fruitlessly to force \the [src] [density ? "open" : "closed"].</span>")
|
||||
visible_message(span_notice("\The [user] strains fruitlessly to force \the [src] [density ? "open" : "closed"]."))
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
. = TRUE
|
||||
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
to_chat(usr, span_warning("Access denied."))
|
||||
return FALSE
|
||||
|
||||
switch(action)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
if(isanimal(user))
|
||||
var/mob/living/simple_mob/S = user
|
||||
if(damage >= STRUCTURE_MIN_DAMAGE_THRESHOLD)
|
||||
visible_message("<span class='danger'>\The [user] smashes into [src]!</span>")
|
||||
visible_message(span_danger("\The [user] smashes into [src]!"))
|
||||
playsound(src, S.attack_sound, 75, 1)
|
||||
take_damage(damage)
|
||||
else
|
||||
@@ -179,7 +179,7 @@
|
||||
if (damage > 90)
|
||||
destroy_hits--
|
||||
if (destroy_hits <= 0)
|
||||
visible_message("<span class='danger'>\The [src.name] disintegrates!</span>")
|
||||
visible_message(span_danger("\The [src.name] disintegrates!"))
|
||||
switch (Proj.damage_type)
|
||||
if(BRUTE)
|
||||
new /obj/item/stack/material/steel(src.loc, 2)
|
||||
@@ -197,7 +197,7 @@
|
||||
/obj/machinery/door/hitby(AM as mob|obj, var/speed=5)
|
||||
|
||||
..()
|
||||
visible_message("<span class='danger'>[src.name] was hit by [AM].</span>")
|
||||
visible_message(span_danger("[src.name] was hit by [AM]."))
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
tforce = 15 * (speed/5)
|
||||
@@ -226,16 +226,16 @@
|
||||
return //VOREStation begin: Fireproofing
|
||||
if(health < maxhealth && I.has_tool_quality(TOOL_WELDER))
|
||||
if(!density)
|
||||
to_chat(user, "<span class='warning'>\The [src] must be closed before you can repair it.</span>")
|
||||
to_chat(user, span_warning("\The [src] must be closed before you can repair it."))
|
||||
return
|
||||
|
||||
var/obj/item/weldingtool/welder = I.get_welder()
|
||||
if(welder.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>You start to fix dents and repair \the [src].</span>")
|
||||
to_chat(user, span_notice("You start to fix dents and repair \the [src]."))
|
||||
playsound(src, welder.usesound, 50, 1)
|
||||
var/repairtime = maxhealth - health //Since we're not using materials anymore... We'll just calculate how much damage there is to repair.
|
||||
if(do_after(user, repairtime * welder.toolspeed) && welder && welder.isOn())
|
||||
to_chat(user, "<span class='notice'>You finish repairing the damage to \the [src].</span>")
|
||||
to_chat(user, span_notice("You finish repairing the damage to \the [src]."))
|
||||
health = maxhealth
|
||||
update_icon()
|
||||
return
|
||||
@@ -246,9 +246,9 @@
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
user.do_attack_animation(src)
|
||||
if(W.force < min_force)
|
||||
user.visible_message("<span class='danger'>\The [user] hits \the [src] with \the [W] with no visible effect.</span>")
|
||||
user.visible_message(span_danger("\The [user] hits \the [src] with \the [W] with no visible effect."))
|
||||
else
|
||||
user.visible_message("<span class='danger'>\The [user] forcefully strikes \the [src] with \the [W]!</span>")
|
||||
user.visible_message(span_danger("\The [user] forcefully strikes \the [src] with \the [W]!"))
|
||||
playsound(src, hitsound, 100, 1)
|
||||
take_damage(W.force)
|
||||
return
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
if (burndamage && health <= 0) //once they break, start taking damage to destroy_hits
|
||||
destroy_hits -= (burndamage / destroytime)
|
||||
if (destroy_hits <= 0)
|
||||
visible_message("<span class='danger'>\The [src.name] disintegrates!</span>")
|
||||
visible_message(span_danger("\The [src.name] disintegrates!"))
|
||||
new /obj/effect/decal/cleanable/ash(src.loc) // Turn it to ashes!
|
||||
qdel(src)
|
||||
take_damage(burndamage)
|
||||
@@ -40,13 +40,13 @@
|
||||
/obj/machinery/door/proc/attackby_vr(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/stack/material) && I.get_material_name() == "plasteel")
|
||||
if(heat_proof)
|
||||
to_chat(user, "<span class='warning'>\The [src] is already reinforced.</span>")
|
||||
to_chat(user, span_warning("\The [src] is already reinforced."))
|
||||
return TRUE
|
||||
if((stat & BROKEN) || (health < maxhealth))
|
||||
to_chat(user, "<span class='notice'>It looks like \the [src] broken. Repair it before reinforcing it.</span>")
|
||||
to_chat(user, span_notice("It looks like \the [src] broken. Repair it before reinforcing it."))
|
||||
return TRUE
|
||||
if(!density)
|
||||
to_chat(user, "<span class='warning'>\The [src] must be closed before you can reinforce it.</span>")
|
||||
to_chat(user, span_warning("\The [src] must be closed before you can reinforce it."))
|
||||
return TRUE
|
||||
|
||||
var/amount_needed = 2
|
||||
@@ -56,7 +56,7 @@
|
||||
var/mats_given = stack.get_amount()
|
||||
var/singular_name = stack.singular_name
|
||||
if(reinforcing && amount_given <= 0)
|
||||
to_chat(user, "<span class='warning'>You must weld or remove \the plasteel from \the [src] before you can add anything else.</span>")
|
||||
to_chat(user, span_warning("You must weld or remove \the plasteel from \the [src] before you can add anything else."))
|
||||
else
|
||||
if(mats_given >= amount_given)
|
||||
if(stack.use(amount_given))
|
||||
@@ -66,25 +66,25 @@
|
||||
reinforcing += mats_given
|
||||
amount_given = mats_given
|
||||
if(amount_given)
|
||||
to_chat(user, "<span class='notice'>You fit [amount_given] [singular_name]\s on \the [src].</span>")
|
||||
to_chat(user, span_notice("You fit [amount_given] [singular_name]\s on \the [src]."))
|
||||
|
||||
return TRUE
|
||||
|
||||
if(reinforcing && I.has_tool_quality(TOOL_WELDER))
|
||||
if(!density)
|
||||
to_chat(user, "<span class='warning'>\The [src] must be closed before you can reinforce it.</span>")
|
||||
to_chat(user, span_warning("\The [src] must be closed before you can reinforce it."))
|
||||
return TRUE
|
||||
|
||||
if(reinforcing < 2)
|
||||
to_chat(user, "<span class='warning'>You will need more plasteel to reinforce \the [src].</span>")
|
||||
to_chat(user, span_warning("You will need more plasteel to reinforce \the [src]."))
|
||||
return TRUE
|
||||
|
||||
var/obj/item/weldingtool/welder = I.get_welder()
|
||||
if(welder.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>You start weld \the plasteel into place.</span>")
|
||||
to_chat(user, span_notice("You start weld \the plasteel into place."))
|
||||
playsound(src, welder.usesound, 50, 1)
|
||||
if(do_after(user, 10 * welder.toolspeed) && welder && welder.isOn())
|
||||
to_chat(user, "<span class='notice'>You finish reinforcing \the [src].</span>")
|
||||
to_chat(user, span_notice("You finish reinforcing \the [src]."))
|
||||
heat_proof = 1
|
||||
update_icon()
|
||||
reinforcing = 0
|
||||
@@ -93,7 +93,7 @@
|
||||
if(reinforcing && I.has_tool_quality(TOOL_CROWBAR))
|
||||
var/obj/item/stack/material/plasteel/reinforcing_sheet = new /obj/item/stack/material/plasteel(src.loc, reinforcing)
|
||||
reinforcing = 0
|
||||
to_chat(user, "<span class='notice'>You remove \the [reinforcing_sheet].</span>")
|
||||
to_chat(user, span_notice("You remove \the [reinforcing_sheet]."))
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
return .
|
||||
|
||||
if(pdiff >= FIREDOOR_MAX_PRESSURE_DIFF)
|
||||
. += "<span class='warning'>WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!</span>"
|
||||
. += span_warning("WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!")
|
||||
|
||||
. += "<b>Sensor readings:</b>"
|
||||
for(var/index = 1; index <= tile_info.len; index++)
|
||||
@@ -101,7 +101,7 @@
|
||||
if(4)
|
||||
o += "WEST: "
|
||||
if(tile_info[index] == null)
|
||||
o += "<span class='warning'>DATA UNAVAILABLE</span>"
|
||||
o += span_warning("DATA UNAVAILABLE")
|
||||
. += o
|
||||
continue
|
||||
var/celsius = convert_k2c(tile_info[index][1])
|
||||
@@ -145,7 +145,7 @@
|
||||
return
|
||||
|
||||
if(blocked)
|
||||
to_chat(user, "<span class='warning'>\The [src] is welded solid!</span>")
|
||||
to_chat(user, span_warning("\The [src] is welded solid!"))
|
||||
return
|
||||
|
||||
var/alarmed = lockdown
|
||||
@@ -165,10 +165,10 @@
|
||||
return
|
||||
|
||||
if(alarmed && density && lockdown && !allowed(user))
|
||||
to_chat(user, "<span class='warning'>Access denied. Please wait for authorities to arrive, or for the alert to clear.</span>")
|
||||
to_chat(user, span_warning("Access denied. Please wait for authorities to arrive, or for the alert to clear."))
|
||||
return
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [src] [density ? "open" : "close"]s for \the [user].</span>",\
|
||||
user.visible_message(span_notice("\The [src] [density ? "open" : "close"]s for \the [user]."),\
|
||||
"\The [src] [density ? "open" : "close"]s.",\
|
||||
"You hear a beep, and a door opening.")
|
||||
|
||||
@@ -199,23 +199,23 @@
|
||||
var/mob/living/carbon/human/X = user
|
||||
if(istype(X.species, /datum/species/xenos))
|
||||
if(src.blocked)
|
||||
visible_message("<span class='alium'>\The [user] begins digging into \the [src] internals!</span>")
|
||||
visible_message(span_alium("\The [user] begins digging into \the [src] internals!"))
|
||||
if(do_after(user,5 SECONDS,src))
|
||||
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
|
||||
src.blocked = 0
|
||||
update_icon()
|
||||
open(1)
|
||||
else if(src.density)
|
||||
visible_message("<span class='alium'>\The [user] begins forcing \the [src] open!</span>")
|
||||
visible_message(span_alium("\The [user] begins forcing \the [src] open!"))
|
||||
if(do_after(user, 2 SECONDS,src))
|
||||
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
|
||||
visible_message("<span class='danger'>\The [user] forces \the [src] open!</span>")
|
||||
visible_message(span_danger("\The [user] forces \the [src] open!"))
|
||||
open(1)
|
||||
else
|
||||
visible_message("<span class='danger'>\The [user] forces \the [src] closed!</span>")
|
||||
visible_message(span_danger("\The [user] forces \the [src] closed!"))
|
||||
close(1)
|
||||
else
|
||||
visible_message("<span class='notice'>\The [user] strains fruitlessly to force \the [src] [density ? "open" : "closed"].</span>")
|
||||
visible_message(span_notice("\The [user] strains fruitlessly to force \the [src] [density ? "open" : "closed"]."))
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -224,23 +224,23 @@
|
||||
if(damage >= STRUCTURE_MIN_DAMAGE_THRESHOLD)
|
||||
var/time_to_force = (2 + (2 * blocked)) * 5
|
||||
if(src.density)
|
||||
visible_message("<span class='danger'>\The [user] starts forcing \the [src] open!</span>")
|
||||
visible_message(span_danger("\The [user] starts forcing \the [src] open!"))
|
||||
user.set_AI_busy(TRUE) // If the mob doesn't have an AI attached, this won't do anything.
|
||||
if(do_after(user, time_to_force, src))
|
||||
visible_message("<span class='danger'>\The [user] forces \the [src] open!</span>")
|
||||
visible_message(span_danger("\The [user] forces \the [src] open!"))
|
||||
src.blocked = 0
|
||||
open(1)
|
||||
user.set_AI_busy(FALSE)
|
||||
else
|
||||
time_to_force = (time_to_force / 2)
|
||||
visible_message("<span class='danger'>\The [user] starts forcing \the [src] closed!</span>")
|
||||
visible_message(span_danger("\The [user] starts forcing \the [src] closed!"))
|
||||
user.set_AI_busy(TRUE) // If the mob doesn't have an AI attached, this won't do anything.
|
||||
if(do_after(user, time_to_force, src))
|
||||
visible_message("<span class='danger'>\The [user] forces \the [src] closed!</span>")
|
||||
visible_message(span_danger("\The [user] forces \the [src] closed!"))
|
||||
close(1)
|
||||
user.set_AI_busy(FALSE)
|
||||
else
|
||||
visible_message("<span class='notice'>\The [user] strains fruitlessly to force \the [src] [density ? "open" : "closed"].</span>")
|
||||
visible_message(span_notice("\The [user] strains fruitlessly to force \the [src] [density ? "open" : "closed"]."))
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -257,11 +257,11 @@
|
||||
return
|
||||
//VOREstation Edit End
|
||||
if(prying)
|
||||
to_chat(user, "<span class='notice'>Someone's busy prying that [density ? "open" : "closed"]!</span>")
|
||||
to_chat(user, span_notice("Someone's busy prying that [density ? "open" : "closed"]!"))
|
||||
var/obj/item/weldingtool/W = C.get_welder()
|
||||
if(W.remove_fuel(0, user))
|
||||
blocked = !blocked
|
||||
user.visible_message("<span class='danger'>\The [user] [blocked ? "welds" : "unwelds"] \the [src] with \a [W].</span>",\
|
||||
user.visible_message(span_danger("\The [user] [blocked ? "welds" : "unwelds"] \the [src] with \a [W]."),\
|
||||
"You [blocked ? "weld" : "unweld"] \the [src] with \the [W].",\
|
||||
"You hear something being welded.")
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
@@ -271,21 +271,21 @@
|
||||
if(density && C.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
hatch_open = !hatch_open
|
||||
playsound(src, C.usesound, 50, 1)
|
||||
user.visible_message("<span class='danger'>[user] has [hatch_open ? "opened" : "closed"] \the [src] maintenance hatch.</span>",
|
||||
user.visible_message(span_danger("[user] has [hatch_open ? "opened" : "closed"] \the [src] maintenance hatch."),
|
||||
"You have [hatch_open ? "opened" : "closed"] the [src] maintenance hatch.")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(blocked && C.has_tool_quality(TOOL_CROWBAR))
|
||||
if(!hatch_open)
|
||||
to_chat(user, "<span class='danger'>You must open the maintenance hatch first!</span>")
|
||||
to_chat(user, span_danger("You must open the maintenance hatch first!"))
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] is removing the electronics from \the [src].</span>",
|
||||
user.visible_message(span_danger("[user] is removing the electronics from \the [src]."),
|
||||
"You start to remove the electronics from [src].")
|
||||
if(do_after(user,30))
|
||||
if(blocked && density && hatch_open)
|
||||
playsound(src, C.usesound, 50, 1)
|
||||
user.visible_message("<span class='danger'>[user] has removed the electronics from \the [src].</span>",
|
||||
user.visible_message(span_danger("[user] has removed the electronics from \the [src]."),
|
||||
"You have removed the electronics from [src].")
|
||||
|
||||
if (stat & BROKEN)
|
||||
@@ -303,7 +303,7 @@
|
||||
return
|
||||
|
||||
if(blocked)
|
||||
to_chat(user, "<span class='danger'>\The [src] is welded shut!</span>")
|
||||
to_chat(user, span_danger("\The [src] is welded shut!"))
|
||||
return
|
||||
|
||||
if(C.pry == 1)
|
||||
@@ -311,7 +311,7 @@
|
||||
return
|
||||
|
||||
if(blocked && C.has_tool_quality(TOOL_CROWBAR))
|
||||
user.visible_message("<span class='danger'>\The [user] pries at \the [src] with \a [C], but \the [src] is welded in place!</span>",\
|
||||
user.visible_message(span_danger("\The [user] pries at \the [src] with \a [C], but \the [src] is welded in place!"),\
|
||||
"You try to pry \the [src] [density ? "open" : "closed"], but it is welded in place!",\
|
||||
"You hear someone struggle and metal straining.")
|
||||
return
|
||||
@@ -322,10 +322,10 @@
|
||||
return
|
||||
|
||||
if(prying)
|
||||
to_chat(user, "<span class='notice'>Someone's already prying that [density ? "open" : "closed"].</span>")
|
||||
to_chat(user, span_notice("Someone's already prying that [density ? "open" : "closed"]."))
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>\The [user] starts to force \the [src] [density ? "open" : "closed"] with \a [C]!</span>",\
|
||||
user.visible_message(span_danger("\The [user] starts to force \the [src] [density ? "open" : "closed"] with \a [C]!"),\
|
||||
"You start forcing \the [src] [density ? "open" : "closed"] with \the [C]!",\
|
||||
"You hear metal strain.")
|
||||
prying = 1
|
||||
@@ -334,11 +334,11 @@
|
||||
if(do_after(user,30 * C.toolspeed))
|
||||
if(C.has_tool_quality(TOOL_CROWBAR))
|
||||
if(stat & (BROKEN|NOPOWER) || !density)
|
||||
user.visible_message("<span class='danger'>\The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!</span>",\
|
||||
user.visible_message(span_danger("\The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!"),\
|
||||
"You force \the [src] [density ? "open" : "closed"] with \the [C]!",\
|
||||
"You hear metal strain, and a door [density ? "open" : "close"].")
|
||||
else
|
||||
user.visible_message("<span class='danger'>\The [user] forces \the [ blocked ? "welded" : "" ] [src] [density ? "open" : "closed"] with \a [C]!</span>",\
|
||||
user.visible_message(span_danger("\The [user] forces \the [ blocked ? "welded" : "" ] [src] [density ? "open" : "closed"] with \a [C]!"),\
|
||||
"You force \the [ blocked ? "welded" : "" ] [src] [density ? "open" : "closed"] with \the [C]!",\
|
||||
"You hear metal strain and groan, and a door [density ? "opening" : "closing"].")
|
||||
if(density)
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
if(istype(C, /obj/item/stack/cable_coil) && !wired && anchored)
|
||||
var/obj/item/stack/cable_coil/cable = C
|
||||
if (cable.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one length of coil to wire \the [src].</span>")
|
||||
to_chat(user, span_warning("You need one length of coil to wire \the [src]."))
|
||||
return
|
||||
user.visible_message("[user] wires \the [src].", "You start to wire \the [src].")
|
||||
if(do_after(user, 40) && !wired && anchored)
|
||||
if (cable.use(1))
|
||||
wired = 1
|
||||
to_chat(user, "<span class='notice'>You wire \the [src].</span>")
|
||||
to_chat(user, span_notice("You wire \the [src]."))
|
||||
|
||||
else if(C.has_tool_quality(TOOL_WIRECUTTER) && wired )
|
||||
playsound(src, C.usesound, 100, 1)
|
||||
@@ -37,14 +37,14 @@
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You cut the wires!</span>")
|
||||
to_chat(user, span_notice("You cut the wires!"))
|
||||
new/obj/item/stack/cable_coil(src.loc, 1)
|
||||
wired = 0
|
||||
|
||||
else if(istype(C, /obj/item/circuitboard/airalarm) && wired)
|
||||
if(anchored)
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] has inserted a circuit into \the [src]!</span>",
|
||||
user.visible_message(span_warning("[user] has inserted a circuit into \the [src]!"),
|
||||
"You have inserted the circuit into \the [src]!")
|
||||
if(glass)
|
||||
new /obj/machinery/door/firedoor/glass(loc)
|
||||
@@ -53,11 +53,11 @@
|
||||
qdel(C)
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You must secure \the [src] first!</span>")
|
||||
to_chat(user, span_warning("You must secure \the [src] first!"))
|
||||
else if(C.has_tool_quality(TOOL_WRENCH))
|
||||
anchored = !anchored
|
||||
playsound(src, C.usesound, 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] has [anchored ? "" : "un" ]secured \the [src]!</span>",
|
||||
user.visible_message(span_warning("[user] has [anchored ? "" : "un" ]secured \the [src]!"),
|
||||
"You have [anchored ? "" : "un" ]secured \the [src]!")
|
||||
update_icon()
|
||||
else if((glass || !anchored) && C.has_tool_quality(TOOL_WELDER))
|
||||
@@ -65,32 +65,32 @@
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
if(glass)
|
||||
user.visible_message("<span class='warning'>[user] welds the glass panel out of \the [src].</span>",
|
||||
"<span class='notice'>You start to weld the glass panel out of \the [src].</span>")
|
||||
user.visible_message(span_warning("[user] welds the glass panel out of \the [src]."),
|
||||
span_notice("You start to weld the glass panel out of \the [src]."))
|
||||
if(do_after(user, 40 * WT.toolspeed, src) && WT.isOn())
|
||||
to_chat(user, "<span class='notice'>You welded the glass panel out!</span>")
|
||||
to_chat(user, span_notice("You welded the glass panel out!"))
|
||||
new /obj/item/stack/material/glass/reinforced(drop_location())
|
||||
glass = FALSE
|
||||
update_icon()
|
||||
return
|
||||
if(!anchored)
|
||||
user.visible_message("<span class='warning'>[user] dissassembles \the [src].</span>", "You start to dissassemble \the [src].")
|
||||
user.visible_message(span_warning("[user] dissassembles \the [src]."), "You start to dissassemble \the [src].")
|
||||
if(do_after(user, 40 * WT.toolspeed, src) && WT.isOn())
|
||||
user.visible_message("<span class='warning'>[user] has dissassembled \the [src].</span>",
|
||||
user.visible_message(span_warning("[user] has dissassembled \the [src]."),
|
||||
"You have dissassembled \the [src].")
|
||||
new /obj/item/stack/material/steel(drop_location(), 2)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need more welding fuel.</span>")
|
||||
to_chat(user, span_notice("You need more welding fuel."))
|
||||
else if(istype(C, /obj/item/stack/material) && C.get_material_name() == "rglass" && !glass)
|
||||
var/obj/item/stack/S = C
|
||||
if (S.get_amount() >= 1)
|
||||
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("<span class='info'>[user] adds [S.name] to \the [src].</span>",
|
||||
"<span class='notice'>You start to install [S.name] into \the [src].</span>")
|
||||
user.visible_message(span_info("[user] adds [S.name] to \the [src]."),
|
||||
span_notice("You start to install [S.name] into \the [src]."))
|
||||
if(do_after(user, 40, src) && !glass && S.use(1))
|
||||
to_chat(user, "<span class='notice'>You installed reinforced glass windows into \the [src].</span>")
|
||||
to_chat(user, span_notice("You installed reinforced glass windows into \the [src]."))
|
||||
glass = TRUE
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.can_shred(H))
|
||||
playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
visible_message("<span class='danger'>[user] smashes against the [src.name].</span>", 1)
|
||||
visible_message(span_danger("[user] smashes against the [src.name]."), 1)
|
||||
user.do_attack_animation(src)
|
||||
user.setClickCooldown(user.get_attack_speed())
|
||||
take_damage(25)
|
||||
@@ -200,14 +200,14 @@
|
||||
var/obj/item/weldingtool/WT = I.get_welder()
|
||||
if(health < maxhealth)
|
||||
if(WT.remove_fuel(1 ,user))
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
to_chat(user, span_notice("You begin repairing [src]..."))
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
health = maxhealth
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
to_chat(user, span_notice("You repair [src]."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
to_chat(user, span_warning("[src] is already in good condition!"))
|
||||
return
|
||||
|
||||
//Emags and ninja swords? You may pass.
|
||||
@@ -218,7 +218,7 @@
|
||||
spark_system.start()
|
||||
playsound(src, "sparks", 50, 1)
|
||||
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
visible_message("<span class='warning'>The glass door was sliced open by [user]!</span>")
|
||||
visible_message(span_warning("The glass door was sliced open by [user]!"))
|
||||
return 1
|
||||
|
||||
//If it's opened/emagged, crowbar can pry it out of its frame.
|
||||
@@ -226,7 +226,7 @@
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
user.visible_message("[user] begins prying the windoor out of the frame.", "You start to pry the windoor out of the frame.")
|
||||
if (do_after(user,40 * I.toolspeed))
|
||||
to_chat(user,"<span class='notice'>You pried the windoor out of the frame!</span>")
|
||||
to_chat(user,span_notice("You pried the windoor out of the frame!"))
|
||||
|
||||
var/obj/structure/windoor_assembly/wa = new/obj/structure/windoor_assembly(src.loc)
|
||||
if (istype(src, /obj/machinery/door/window/brigdoor))
|
||||
@@ -262,7 +262,7 @@
|
||||
user.setClickCooldown(user.get_attack_speed(I))
|
||||
var/aforce = I.force
|
||||
playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
visible_message("<span class='danger'>[src] was hit by [I].</span>")
|
||||
visible_message(span_danger("[src] was hit by [I]."))
|
||||
if(I.damtype == BRUTE || I.damtype == BURN)
|
||||
take_damage(aforce)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user