mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 06:58:30 +01:00
refactors most spans
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
user.put_in_hands(B)
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
if(stage > 1 && !active && clown_check(user))
|
||||
to_chat(user, "<span class='warning'>You prime \the [name]!</span>")
|
||||
to_chat(user, span_warning("You prime \the [name]!"))
|
||||
|
||||
msg_admin_attack("[key_name_admin(user)] primed \a [src]")
|
||||
|
||||
@@ -58,13 +58,13 @@
|
||||
if(istype(W,/obj/item/assembly_holder) && (!stage || stage==1) && !detonator && path != 2)
|
||||
var/obj/item/assembly_holder/det = W
|
||||
if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right)))
|
||||
to_chat(user, "<span class='warning'>Assembly must contain one igniter.</span>")
|
||||
to_chat(user, span_warning("Assembly must contain one igniter."))
|
||||
return
|
||||
if(!det.secured)
|
||||
to_chat(user, "<span class='warning'>Assembly must be secured with screwdriver.</span>")
|
||||
to_chat(user, span_warning("Assembly must be secured with screwdriver."))
|
||||
return
|
||||
path = 1
|
||||
to_chat(user, "<span class='notice'>You add [W] to the metal casing.</span>")
|
||||
to_chat(user, span_notice("You add [W] to the metal casing."))
|
||||
playsound(src, 'sound/items/Screwdriver2.ogg', 25, -3)
|
||||
user.remove_from_mob(det)
|
||||
det.loc = src
|
||||
@@ -82,23 +82,23 @@
|
||||
if(stage == 1)
|
||||
path = 1
|
||||
if(beakers.len)
|
||||
to_chat(user, "<span class='notice'>You lock the assembly.</span>")
|
||||
to_chat(user, span_notice("You lock the assembly."))
|
||||
name = "grenade"
|
||||
else
|
||||
// to_chat(user, "<span class='warning'>You need to add at least one beaker before locking the assembly.</span>")
|
||||
to_chat(user, "<span class='notice'>You lock the empty assembly.</span>")
|
||||
// to_chat(user, span_warning("You need to add at least one beaker before locking the assembly."))
|
||||
to_chat(user, span_notice("You lock the empty assembly."))
|
||||
name = "fake grenade"
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
stage = 2
|
||||
else if(stage == 2)
|
||||
if(active && prob(95))
|
||||
to_chat(user, "<span class='warning'>You trigger the assembly!</span>")
|
||||
to_chat(user, span_warning("You trigger the assembly!"))
|
||||
detonate()
|
||||
else if(sealed)
|
||||
to_chat(user, "<span class='warning'>This grenade lacks a way to disassemble it.</span>")
|
||||
to_chat(user, span_warning("This grenade lacks a way to disassemble it."))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You unlock the assembly.</span>")
|
||||
to_chat(user, span_notice("You unlock the assembly."))
|
||||
playsound(src, W.usesound, 50, -3)
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
icon_state = initial(icon_state) + (detonator?"_ass":"")
|
||||
@@ -107,18 +107,18 @@
|
||||
else if(is_type_in_list(W, allowed_containers) && (!stage || stage==1) && path != 2)
|
||||
path = 1
|
||||
if(beakers.len == 2)
|
||||
to_chat(user, "<span class='warning'>The grenade can not hold more containers.</span>")
|
||||
to_chat(user, span_warning("The grenade can not hold more containers."))
|
||||
return
|
||||
else
|
||||
if(W.reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>You add \the [W] to the assembly.</span>")
|
||||
to_chat(user, span_notice("You add \the [W] to the assembly."))
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
beakers += W
|
||||
stage = 1
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [W] is empty.</span>")
|
||||
to_chat(user, span_warning("\The [W] is empty."))
|
||||
|
||||
/obj/item/grenade/chem_grenade/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
/obj/proc/concussion_blast(atom/target, var/radius = 5)
|
||||
var/turf/T = get_turf(target)
|
||||
if(is_below_sound_pressure(T))
|
||||
visible_message("<span class='notice'>Whump.</span>")
|
||||
visible_message(span_notice("Whump."))
|
||||
return
|
||||
playsound(src, 'sound/effects/bang.ogg', 75, 1, -3)
|
||||
if(istype(T))
|
||||
for(var/mob/living/L in orange(T, radius))
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
to_chat(H, "<span class='critical'>WHUMP.</span>")
|
||||
to_chat(H, span_critical("WHUMP."))
|
||||
|
||||
var/ear_safety = 0
|
||||
|
||||
@@ -67,13 +67,13 @@
|
||||
H.ear_deaf = max(H.ear_deaf,5)
|
||||
|
||||
if(H.ear_damage >= 15)
|
||||
to_chat(H, "<span class='danger'>Your ears start to ring badly!</span>")
|
||||
to_chat(H, span_danger("Your ears start to ring badly!"))
|
||||
|
||||
if(prob(H.ear_damage - 5))
|
||||
to_chat(H, "<span class='danger'>You can't hear anything!</span>")
|
||||
to_chat(H, span_danger("You can't hear anything!"))
|
||||
H.sdisabilities |= DEAF
|
||||
else if(H.ear_damage >= 5)
|
||||
to_chat(H, "<span class='danger'>Your ears start to ring!</span>")
|
||||
to_chat(H, span_danger("Your ears start to ring!"))
|
||||
if(istype(L, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = L
|
||||
if(L.client)
|
||||
@@ -81,5 +81,5 @@
|
||||
L.client.spinleft()
|
||||
else
|
||||
L.client.spinright()
|
||||
to_chat(R, "<span class='critical'>Gyroscopic failure.</span>")
|
||||
return
|
||||
to_chat(R, span_critical("Gyroscopic failure."))
|
||||
return
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/flashbang/proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
|
||||
to_chat(M, "<span class='danger'>BANG</span>") // Called during the loop that bangs people in lockers/containers and when banging
|
||||
to_chat(M, span_danger("BANG")) // Called during the loop that bangs people in lockers/containers and when banging
|
||||
playsound(src, 'sound/effects/bang.ogg', 50, 1, 30) // people in normal view. Could theroetically be called during other explosions.
|
||||
// -- Polymorph
|
||||
|
||||
@@ -80,18 +80,18 @@
|
||||
if(ishuman(M))
|
||||
var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES]
|
||||
if (E && E.damage >= E.min_bruised_damage)
|
||||
to_chat(M, "<span class='danger'>Your eyes start to burn badly!</span>")
|
||||
to_chat(M, span_danger("Your eyes start to burn badly!"))
|
||||
if(!banglet && !(istype(src , /obj/item/grenade/flashbang/clusterbang)))
|
||||
if (E.damage >= E.min_broken_damage)
|
||||
to_chat(M, "<span class='danger'>You can't see anything!</span>")
|
||||
to_chat(M, span_danger("You can't see anything!"))
|
||||
if (M.ear_damage >= 15)
|
||||
to_chat(M, "<span class='danger'>Your ears start to ring badly!</span>")
|
||||
to_chat(M, span_danger("Your ears start to ring badly!"))
|
||||
if(!banglet && !(istype(src , /obj/item/grenade/flashbang/clusterbang)))
|
||||
if (prob(M.ear_damage - 10 + 5))
|
||||
to_chat(M, "<span class='danger'>You can't hear anything!</span>")
|
||||
to_chat(M, span_danger("You can't hear anything!"))
|
||||
M.sdisabilities |= DEAF
|
||||
else if(M.ear_damage >= 5)
|
||||
to_chat(M, "<span class='danger'>Your ears start to ring!</span>")
|
||||
to_chat(M, span_danger("Your ears start to ring!"))
|
||||
|
||||
/obj/item/grenade/flashbang/Destroy()
|
||||
walk(src, 0) // Because we might have called walk_away, we must stop the walk loop or BYOND keeps an internal reference to us forever.
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/obj/item/grenade/proc/clown_check(var/mob/living/user)
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
to_chat(user, span_warning("Huh? How does this thing work?"))
|
||||
|
||||
activate(user)
|
||||
add_fingerprint(user)
|
||||
@@ -32,7 +32,7 @@
|
||||
if (istype(target, /obj/item/storage)) return ..() // Trying to put it in a full container
|
||||
if (istype(target, /obj/item/gun/grenadelauncher)) return ..()
|
||||
if((user.get_active_hand() == src) && (!active) && (clown_check(user)) && target.loc != src.loc)
|
||||
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
|
||||
to_chat(user, span_warning("You prime the [name]! [det_time/10] seconds!"))
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
playsound(src, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
@@ -58,7 +58,7 @@
|
||||
/obj/item/grenade/attack_self(mob/user as mob)
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
to_chat(user, "<span class='warning'>You prime \the [name]! [det_time/10] seconds!</span>")
|
||||
to_chat(user, span_warning("You prime \the [name]! [det_time/10] seconds!"))
|
||||
|
||||
activate(user)
|
||||
add_fingerprint(user)
|
||||
@@ -96,16 +96,16 @@
|
||||
switch(det_time)
|
||||
if (1)
|
||||
det_time = 10
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
|
||||
to_chat(user, span_notice("You set the [name] for 1 second detonation time."))
|
||||
if (10)
|
||||
det_time = 30
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
|
||||
to_chat(user, span_notice("You set the [name] for 3 second detonation time."))
|
||||
if (30)
|
||||
det_time = 50
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
|
||||
to_chat(user, span_notice("You set the [name] for 5 second detonation time."))
|
||||
if (50)
|
||||
det_time = 1
|
||||
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
|
||||
to_chat(user, span_notice("You set the [name] for instant detonation."))
|
||||
add_fingerprint(user)
|
||||
..()
|
||||
return
|
||||
@@ -116,4 +116,4 @@
|
||||
return
|
||||
|
||||
/obj/item/grenade/vendor_action(var/obj/machinery/vending/V)
|
||||
activate(V)
|
||||
activate(V)
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
if(istype(id))
|
||||
if(check_access(id))
|
||||
locked = !locked
|
||||
to_chat(user, "<span class='warning'>You [locked ? "enable" : "disable"] the safety lock on \the [src].</span>")
|
||||
to_chat(user, span_warning("You [locked ? "enable" : "disable"] the safety lock on \the [src]."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
user.visible_message("<span class='notice'>[user] swipes \the [I] against \the [src].</span>")
|
||||
to_chat(user, span_warning("Access denied."))
|
||||
user.visible_message(span_notice("[user] swipes \the [I] against \the [src]."))
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/grenade/spawnergrenade/manhacks/station/locked/emag_act(var/remaining_charges,var/mob/user)
|
||||
..()
|
||||
locked = !locked
|
||||
to_chat(user, "<span class='warning'>You [locked ? "enable" : "disable"] the safety lock on \the [src]!</span>")
|
||||
to_chat(user, span_warning("You [locked ? "enable" : "disable"] the safety lock on \the [src]!"))
|
||||
|
||||
Reference in New Issue
Block a user