[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:
CHOMPStation2
2024-10-04 06:00:17 -07:00
committed by GitHub
parent 43ee646816
commit ab154b48b2
1511 changed files with 12497 additions and 12357 deletions

View File

@@ -137,42 +137,42 @@
/obj/item/gun/energy/proc/load_ammo(var/obj/item/C, mob/user)
if(istype(C, /obj/item/cell))
if(self_recharge || battery_lock)
to_chat(user, "<span class='notice'>[src] does not have a battery port.</span>")
to_chat(user, span_notice("[src] does not have a battery port."))
return
if(istype(C, accept_cell_type))
var/obj/item/cell/P = C
if(power_supply)
to_chat(user, "<span class='notice'>[src] already has a power cell.</span>")
to_chat(user, span_notice("[src] already has a power cell."))
else
user.visible_message("[user] is reloading [src].", "<span class='notice'>You start to insert [P] into [src].</span>")
user.visible_message("[user] is reloading [src].", span_notice("You start to insert [P] into [src]."))
if(do_after(user, reload_time * P.w_class))
user.remove_from_mob(P)
power_supply = P
P.loc = src
user.visible_message("[user] inserts [P] into [src].", "<span class='notice'>You insert [P] into [src].</span>")
user.visible_message("[user] inserts [P] into [src].", span_notice("You insert [P] into [src]."))
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
update_icon()
update_held_icon()
user.hud_used.update_ammo_hud(user, src) // TGMC Ammo HUD
else
to_chat(user, "<span class='notice'>This cell is not fitted for [src].</span>")
to_chat(user, span_notice("This cell is not fitted for [src]."))
return
/obj/item/gun/energy/proc/unload_ammo(mob/user)
if(self_recharge || battery_lock)
to_chat(user, "<span class='notice'>[src] does not have a battery port.</span>")
to_chat(user, span_notice("[src] does not have a battery port."))
return
if(power_supply)
user.put_in_hands(power_supply)
power_supply.update_icon()
user.visible_message("[user] removes [power_supply] from [src].", "<span class='notice'>You remove [power_supply] from [src].</span>")
user.visible_message("[user] removes [power_supply] from [src].", span_notice("You remove [power_supply] from [src]."))
power_supply = null
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
update_icon()
update_held_icon()
user.hud_used.update_ammo_hud(user, src) // TGMC Ammo HUD
else
to_chat(user, "<span class='notice'>[src] does not have a power cell.</span>")
to_chat(user, span_notice("[src] does not have a power cell."))
/obj/item/gun/energy/attackby(var/obj/item/A as obj, mob/user as mob)
..()

View File

@@ -44,22 +44,22 @@
if(I.has_tool_quality(TOOL_SCREWDRIVER))
if(!scanmod)
to_chat(user, "<span class='warning'>There's no scanner module installed!</span>")
to_chat(user, span_warning("There's no scanner module installed!"))
return
var/turf/T = get_turf(src)
to_chat(user, "<span class='notice'>You remove [scanmod] from [src].</span>")
to_chat(user, span_notice("You remove [scanmod] from [src]."))
playsound(src, I.usesound, 75, 1)
scanmod.forceMove(T)
scanmod = null
update_fail_chance()
else if(istype(I, /obj/item/stock_parts/scanning_module))
if(scanmod)
to_chat(user, "<span class='warning'>There's already [scanmod] installed! Remove it first.</span>")
to_chat(user, span_warning("There's already [scanmod] installed! Remove it first."))
return
user.remove_from_mob(I)
I.forceMove(src)
scanmod = I
to_chat(user, "<span class='notice'>You install [scanmod] into [src].</span>")
to_chat(user, span_notice("You install [scanmod] into [src]."))
update_fail_chance()
else
return ..()
@@ -88,20 +88,20 @@
return
var/turf/ownturf = get_turf(src)
if(ownturf.z != T.z || get_dist(T,ownturf) > world.view)
to_chat(user, "<span class='warning'>The target is out of range!</span>")
to_chat(user, span_warning("The target is out of range!"))
return
if((get_area(A).flags & BLUE_SHIELDED) || (T.block_tele) || (ownturf.block_tele)) //CHOMPedit, consistency smh
to_chat(user, "<span class='warning'>The target area protected by bluespace shielding!</span>")
to_chat(user, span_warning("The target area protected by bluespace shielding!"))
return
if(!(A in view(user, world.view)))
to_chat(user, "<span class='warning'>Harpoon fails to lock on the obstructed target!</span>")
to_chat(user, span_warning("Harpoon fails to lock on the obstructed target!"))
return
firable = FALSE
VARSET_IN(src, firable, TRUE, 30 SECONDS)
playsound(src, 'sound/weapons/wave.ogg', 60, 1)
user.visible_message("<span class='warning'>[user] fires \the [src]!</span>","<span class='warning'>You fire \the [src]!</span>")
user.visible_message(span_warning("[user] fires \the [src]!"),span_warning("You fire \the [src]!"))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(4, 1, A)
@@ -144,8 +144,8 @@
if(prey != user && prey.can_be_drop_prey)
prey.forceMove(belly_dest)
vore_happened = TRUE
to_chat(prey, "<span class='vdanger'>[living_user] materializes around you, as you end up in their [belly_dest]!</span>")
to_chat(living_user, "<span class='vnotice'>You materialize around [prey] as they end up in your [belly_dest]!</span>")
to_chat(prey, span_vdanger("[living_user] materializes around you, as you end up in their [belly_dest]!"))
to_chat(living_user, span_vnotice("You materialize around [prey] as they end up in your [belly_dest]!"))
if(can_dropnom && !vore_happened && living_user.can_be_drop_prey)
var/mob/living/pred
for(var/mob/living/potential_pred in ToTurf)
@@ -159,8 +159,8 @@
belly_dest = pick(pred.vore_organs)
if(belly_dest)
living_user.forceMove(belly_dest)
to_chat(pred, "<span class='vnotice'>[living_user] materializes inside you as they end up in your [belly_dest]!</span>")
to_chat(living_user, "<span class='vdanger'>You materialize inside [pred] as you end up in their [belly_dest]!</span>")
to_chat(pred, span_vnotice("[living_user] materializes inside you as they end up in your [belly_dest]!"))
to_chat(living_user, span_vdanger("You materialize inside [pred] as you end up in their [belly_dest]!"))
else
for(var/obj/O in FromTurf)
@@ -185,8 +185,8 @@
belly_dest = pick(living_user.vore_organs)
if(belly_dest)
M.forceMove(belly_dest)
to_chat(living_user, "<span class='vnotice'>[M] materializes inside you as they end up in your [belly_dest]!</span>")
to_chat(M, "<span class='vdanger'>You materialize inside [living_user] as you end up in their [belly_dest]!</span>")
to_chat(living_user, span_vnotice("[M] materializes inside you as they end up in your [belly_dest]!"))
to_chat(M, span_vdanger("You materialize inside [living_user] as you end up in their [belly_dest]!"))
else if(can_dropnom && living_user.can_be_drop_prey && M.can_be_drop_pred && !user_vored)
var/obj/belly/belly_dest
if(M.vore_selected)
@@ -196,8 +196,8 @@
if(belly_dest)
living_user.forceMove(belly_dest)
user_vored = TRUE
to_chat(living_user, "<span class='vdanger'>[M] materializes around you, as you end up in their [belly_dest]!</span>")
to_chat(M, "<span class='vnotice'>You materialize around [living_user] as they end up in your [belly_dest]!</span>")
to_chat(living_user, span_vdanger("[M] materializes around you, as you end up in their [belly_dest]!"))
to_chat(M, span_vnotice("You materialize around [living_user] as they end up in your [belly_dest]!"))
/obj/item/bluespace_harpoon/attack_self(mob/living/user as mob)

View File

@@ -59,9 +59,9 @@
/obj/item/gun/projectile/cell_loaded/proc/switch_to(obj/item/ammo_casing/microbattery/new_batt)
if(ishuman(loc))
if(chambered && new_batt.type == chambered.type)
to_chat(loc,"<span class='warning'>\The [src] is now using the next [new_batt.type_name] power cell.</span>")
to_chat(loc,span_warning("\The [src] is now using the next [new_batt.type_name] power cell."))
else
to_chat(loc,"<span class='warning'>\The [src] is now firing [new_batt.type_name].</span>")
to_chat(loc,span_warning("\The [src] is now firing [new_batt.type_name]."))
chambered = new_batt
update_charge()
@@ -160,10 +160,10 @@
if(istype(W, /obj/item/ammo_casing/microbattery))
var/obj/item/ammo_casing/microbattery/B = W
if(!istype(B, ammo_type))
to_chat(user, "<span class='warning'>[B] does not fit into [src].</span>")
to_chat(user, span_warning("[B] does not fit into [src]."))
return
if(stored_ammo.len >= max_ammo)
to_chat(user, "<span class='warning'>[src] is full!</span>")
to_chat(user, span_warning("[src] is full!"))
return
user.remove_from_mob(B)
B.loc = src

View File

@@ -34,7 +34,7 @@
/obj/item/gun/projectile/automatic/fluff/crestrose/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(default_parry_check(user, attacker, damage_source) && prob(50))
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
user.visible_message(span_danger("\The [user] parries [attack_text] with \the [src]!"))
playsound(user, 'sound/weapons/punchmiss.ogg', 50, 1)
return 1
return 0
return 0

View File

@@ -27,7 +27,7 @@
/obj/item/gun/energy/gun/fluff/dominator/special_check(mob/user)
if(!emagged && mode_name == "lethal" && get_security_level() == "green")
to_chat(user,"<span class='warning'>The trigger refuses to depress while on the lethal setting under security level green!</span>")
to_chat(user,span_warning("The trigger refuses to depress while on the lethal setting under security level green!"))
return FALSE
return ..()
@@ -36,7 +36,7 @@
..()
if(!emagged)
emagged = TRUE
to_chat(user,"<span class='warning'>You disable the alert level locking mechanism on \the [src]!</span>")
to_chat(user,span_warning("You disable the alert level locking mechanism on \the [src]!"))
return TRUE
@@ -47,4 +47,4 @@
icon_state = "xray"
muzzle_type = /obj/effect/projectile/muzzle/xray
tracer_type = /obj/effect/projectile/tracer/xray
impact_type = /obj/effect/projectile/impact/xray
impact_type = /obj/effect/projectile/impact/xray

View File

@@ -99,8 +99,8 @@
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
if (active)
if ((CLUMSY in user.mutations) && prob(50))
user.visible_message("<span class='danger'>\The [user] accidentally cuts [TU.himself] with \the [src].</span>",\
"<span class='danger'>You accidentally cut yourself with \the [src].</span>")
user.visible_message(span_danger("\The [user] accidentally cuts [TU.himself] with \the [src]."),\
span_danger("You accidentally cut yourself with \the [src]."))
user.take_organ_damage(5,5)
deactivate(user)
update_icon()
@@ -119,4 +119,4 @@
return
/obj/item/cell/device/weapon/gunsword/update_icon()
cut_overlays()
cut_overlays()

View File

@@ -105,7 +105,7 @@
. += "<b>[get_remaining_mod_capacity()]%</b> mod capacity remaining."
for(var/A in get_modkits())
var/obj/item/borg/upgrade/modkit/M = A
. += "<span class='notice'>There is \a [M] installed, using <b>[M.cost]%</b> capacity.</span>"
. += span_notice("There is \a [M] installed, using <b>[M.cost]%</b> capacity.")
/obj/item/gun/energy/kinetic_accelerator/Exited(atom/movable/AM)
. = ..()
@@ -116,12 +116,12 @@
/obj/item/gun/energy/kinetic_accelerator/attackby(obj/item/I, mob/user)
if(I.has_tool_quality(TOOL_CROWBAR))
if(modkits.len)
to_chat(user, "<span class='notice'>You pry the modifications out.</span>")
to_chat(user, span_notice("You pry the modifications out."))
playsound(loc, I.usesound, 100, 1)
for(var/obj/item/borg/upgrade/modkit/M in modkits)
M.uninstall(src)
else
to_chat(user, "<span class='notice'>There are no modifications currently installed.</span>")
to_chat(user, span_notice("There are no modifications currently installed."))
if(istype(I, /obj/item/borg/upgrade/modkit))
var/obj/item/borg/upgrade/modkit/MK = I
MK.install(src, user)
@@ -221,7 +221,7 @@
// if(!suppressed)
playsound(src, 'sound/weapons/kenetic_reload.ogg', 60, 1)
// else
// to_chat(loc, "<span class='warning'>[src] silently charges up.</span>")
// to_chat(loc, span_warning("[src] silently charges up."))
overheat = FALSE
update_icon()
@@ -365,7 +365,7 @@
/obj/item/borg/upgrade/modkit/examine(mob/user)
. = ..()
. += "<span class='notice'>Occupies <b>[cost]%</b> of mod capacity.</span>"
. += span_notice("Occupies <b>[cost]%</b> of mod capacity.")
/obj/item/borg/upgrade/modkit/attackby(obj/item/A, mob/user)
if(istype(A, /obj/item/gun/energy/kinetic_accelerator))
@@ -378,7 +378,7 @@
for(var/obj/item/gun/energy/kinetic_accelerator/H in R.module.modules)
if(install(H, R)) //It worked
return
to_chat(R, "<span class='alert'>Upgrade error - Aborting Kinetic Accelerator linking.</span>") //No applicable KA found, insufficient capacity, or some other problem.
to_chat(R, span_alert("Upgrade error - Aborting Kinetic Accelerator linking.")) //No applicable KA found, insufficient capacity, or some other problem.
*/
/obj/item/borg/upgrade/modkit/proc/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user)
@@ -399,13 +399,13 @@
user.drop_from_inventory(src, KA)
// if(!user.transferItemToLoc(src, KA))
// return FALSE
to_chat(user, "<span class='notice'>You install the modkit.</span>")
to_chat(user, span_notice("You install the modkit."))
playsound(loc, 'sound/items/screwdriver.ogg', 100, 1)
KA.modkits += src
else
to_chat(user, "<span class='notice'>The modkit you're trying to install would conflict with an already installed modkit. Use a crowbar to remove existing modkits.</span>")
to_chat(user, span_notice("The modkit you're trying to install would conflict with an already installed modkit. Use a crowbar to remove existing modkits."))
else
to_chat(user, "<span class='notice'>You don't have room(<b>[KA.get_remaining_mod_capacity()]%</b> remaining, [cost]% needed) to install this modkit. Use a crowbar to remove existing modkits.</span>")
to_chat(user, span_notice("You don't have room(<b>[KA.get_remaining_mod_capacity()]%</b> remaining, [cost]% needed) to install this modkit. Use a crowbar to remove existing modkits."))
. = FALSE
/obj/item/borg/upgrade/modkit/proc/uninstall(obj/item/gun/energy/kinetic_accelerator/KA, forcemove = TRUE)
@@ -517,7 +517,7 @@
// var/armor = L.run_armor_check(K.def_zone, K.flag, null, null, K.armour_penetration)
L.apply_damage(K.damage*modifier, K.damage_type, K.def_zone, armor)
// L.apply_damage(K.damage*modifier, K.damage_type, K.def_zone, armor)
to_chat(L, "<span class='userdanger'>You're struck by a [K.name]!</span>")
to_chat(L, span_userdanger("You're struck by a [K.name]!"))
/obj/item/borg/upgrade/modkit/aoe/turfs
name = "mining explosion"

View File

@@ -206,7 +206,7 @@
power_supply.charge = 0
power_supply.maxcharge = 1 //just to avoid div/0 runtimes
desc = "A rare weapon, produced by the Lunar Arms Company around 2105 - one of humanity's first wholly extra-terrestrial weapon designs. It looks to have completely burned out."
user.visible_message("<span class='warning'>\The [src] erupts in a shower of sparks!</span>", "<span class='danger'>\the [src] bursts into a shower of sparks!</span>")
user.visible_message(span_warning("\The [src] erupts in a shower of sparks!"), span_danger("\the [src] bursts into a shower of sparks!"))
var/turf/T = get_turf(src)
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(2, 1, T)
@@ -223,7 +223,7 @@
sparks.set_up(2, 1, T)
sparks.start()
update_icon()
user.visible_message("<span class='warning'>\The [src] shorts out!</span>", "<span class='danger'>\the [src] shorts out!</span>")
user.visible_message(span_warning("\The [src] shorts out!"), span_danger("\the [src] shorts out!"))
failurechance += rand(1,5)
return
if(6 to 7) //20% chance of weakening the beam type, possibly to uselessness
@@ -243,18 +243,18 @@
projectile_type = /obj/item/projectile/beam/heavylaser
if(81 to 100) //pulse becomes cannon
projectile_type = /obj/item/projectile/beam/heavylaser/cannon
user.visible_message("<span class='warning'>\The [src] dims slightly!</span>", "<span class='danger'>\the [src] dims slightly!</span>")
user.visible_message(span_warning("\The [src] dims slightly!"), span_danger("\the [src] dims slightly!"))
return
if(8) //10% chance of reducing the number of shots you have left, or giving you a limit if there isn't one
if(!remainingshots)
remainingshots = rand(1,40)
else
remainingshots = min(1, round(remainingshots/2))
user.visible_message("<span class='warning'>\The [src] lets out a faint pop.</span>", "<span class='danger'>\the [src] lets out a faint pop.</span>")
user.visible_message(span_warning("\The [src] lets out a faint pop."), span_danger("\the [src] lets out a faint pop."))
if(9) //10% chance of permanently reducing the cell's max charge
power_supply.maxcharge = power_supply.maxcharge/2
power_supply.charge = min(power_supply.charge, power_supply.maxcharge)
user.visible_message("<span class='warning'>\The [src] sparks,letting off a puff of smoke!</span>", "<span class='danger'>\the [src] sparks,letting off a puff of smoke!</span>")
user.visible_message(span_warning("\The [src] sparks,letting off a puff of smoke!"), span_danger("\the [src] sparks,letting off a puff of smoke!"))
var/turf/T = get_turf(src)
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(2, 1, T)

View File

@@ -69,12 +69,12 @@
var/pressure = environment ? environment.return_pressure() : 0
if (!power_supply || power_supply.charge < charge_cost)
user.visible_message("<span class='warning'>*click*</span>", "<span class='danger'>*click*</span>")
user.visible_message(span_warning("*click*"), span_danger("*click*"))
playsound(src, 'sound/weapons/empty.ogg', 100, 1)
return 0
if(pressure >= 10)
if (safetycatch) //weapons with a pressure regulator simply won't fire
user.visible_message("<span class='warning'>*click*</span>", "<span class='danger'>The pressure-interlock prevents you from firing \the [src].</span>")
user.visible_message(span_warning("*click*"), span_danger("The pressure-interlock prevents you from firing \the [src]."))
playsound(src, 'sound/weapons/empty.ogg', 100, 1)
return 0
else if (prob(min(pressure, 100))) //pressure% chance of failing
@@ -86,10 +86,10 @@
/obj/item/gun/energy/particle/proc/pressuremalfunction(severity, var/mob/user, var/turf/T)
if (severity <= 10) // just doesn't fire. 10% chance in 100 atmo.
user.visible_message("<span class='warning'>*click*</span>", "<span class='danger'>\The [src] jams.</span>")
user.visible_message(span_warning("*click*"), span_danger("\The [src] jams."))
playsound(src, 'sound/weapons/empty.ogg', 100, 1)
else if (severity <= 60) //50% chance of fizzling and wasting a shot
user.visible_message("<span class='warning'>\The [user] fires \the [src], but the shot fizzles in the air!</span>", "<span class='danger'>You fire \the [src], but the shot fizzles in the air!</span>")
user.visible_message(span_warning("\The [user] fires \the [src], but the shot fizzles in the air!"), span_danger("You fire \the [src], but the shot fizzles in the air!"))
power_supply.charge -= charge_cost
playsound(src, fire_sound, 100, 1)
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
@@ -97,14 +97,14 @@
sparks.start()
update_icon()
else if (severity <= 80) //20% chance of shorting out and emptying the cell
user.visible_message("<span class='warning'>\The [user] pulls the trigger, but \the [src] shorts out!</span>", "<span class='danger'>You pull the trigger, but \the [src] shorts out!</span>")
user.visible_message(span_warning("\The [user] pulls the trigger, but \the [src] shorts out!"), span_danger("You pull the trigger, but \the [src] shorts out!"))
power_supply.charge = 0
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(2, 1, T)
sparks.start()
update_icon()
else if (severity <= 90) //10% chance of breaking the gun
user.visible_message("<span class='warning'>\The [user] pulls the trigger, but \the [src] erupts in a shower of sparks!</span>", "<span class='danger'>You pull the trigger, but \the [src] bursts into a shower of sparks!</span>")
user.visible_message(span_warning("\The [user] pulls the trigger, but \the [src] erupts in a shower of sparks!"), span_danger("You pull the trigger, but \the [src] bursts into a shower of sparks!"))
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(2, 1, T)
sparks.start()
@@ -116,12 +116,12 @@
charge_cost += charge_cost
update_icon()
else if (severity <= 150) // 10% chance of exploding
user.visible_message("<span class='danger'>\The [user] pulls the trigger, but \the [src] explodes!</span>", "<span class='danger'>The [src] explodes!</span>")
user.visible_message(span_danger("\The [user] pulls the trigger, but \the [src] explodes!"), span_danger("The [src] explodes!"))
log_and_message_admins("blew themself up with a particle gun.", user)
explosion(T, -1, -1, 1, 1)
qdel(src)
else //can only possibly happen if you're dumb enough to fire it in an OVER pressure environment, over 150kPa
user.visible_message("<span class='danger'>\The [user] pulls the trigger, but \the [src] explodes!</span>", "<span class='danger'>The [src] explodes catastrophically!</span>")
user.visible_message(span_danger("\The [user] pulls the trigger, but \the [src] explodes!"), span_danger("The [src] explodes catastrophically!"))
log_and_message_admins("blew their dumb ass up with a particle gun.", user)
explosion(T, -1, 1, 2, 2)
qdel(src)
@@ -133,9 +133,9 @@
/obj/item/gun/energy/particle/attackby(var/obj/item/A as obj, mob/user as mob)
if(istype(A, /obj/item/pressurelock))
if(safetycatch)
to_chat(user, "<span class='notice'>\The [src] already has a [attached_safety].</span>")
to_chat(user, span_notice("\The [src] already has a [attached_safety]."))
return
to_chat(user, "<span class='notice'>You insert \the [A] into \the [src].</span>")
to_chat(user, span_notice("You insert \the [A] into \the [src]."))
user.drop_item()
A.loc = src
attached_safety = A
@@ -144,9 +144,9 @@
if(istype(A, /obj/item/tool/screwdriver))
if(safetycatch && attached_safety)
to_chat(user, "<span class='notice'>You begin removing \the [attached_safety] from \the [src].</span>")
to_chat(user, span_notice("You begin removing \the [attached_safety] from \the [src]."))
if(do_after(user, 25))
to_chat(user, "<span class='notice'>You remove \the [attached_safety] from \the [src].</span>")
to_chat(user, span_notice("You remove \the [attached_safety] from \the [src]."))
user.put_in_hands(attached_safety)
safetycatch = 0
attached_safety = null
@@ -189,4 +189,3 @@
if(prob(Proj.damage))
GetDrilled()
..()

View File

@@ -45,7 +45,7 @@
/obj/item/gun/energy/gun/protector/special_check(mob/user)
if(!emagged && mode_name == "lethal" && get_security_level() == "green")
to_chat(user,"<span class='warning'>The trigger refuses to depress while on the lethal setting under security level green!</span>")
to_chat(user,span_warning("The trigger refuses to depress while on the lethal setting under security level green!"))
return FALSE
return ..()
@@ -66,7 +66,7 @@
..()
if(!emagged)
emagged = TRUE
to_chat(user,"<span class='warning'>You disable the alert level locking mechanism on \the [src]!</span>")
to_chat(user,span_warning("You disable the alert level locking mechanism on \the [src]!"))
return TRUE
@@ -143,10 +143,10 @@
if(istype(id) && lockable)
if(check_access(id))
locked = !locked
to_chat(user, "<span class='warning'>You [locked ? "enable" : "disable"] the safety interlock on \the [src].</span>")
to_chat(user, span_warning("You [locked ? "enable" : "disable"] the safety interlock 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 ..()
@@ -157,6 +157,6 @@
if(locked)
var/turf/T = get_turf(src)
if(T.z in using_map.station_levels)
to_chat(user, "<span class='warning'>The safety device prevents the gun from firing this close to the facility.</span>")
to_chat(user, span_warning("The safety device prevents the gun from firing this close to the facility."))
return 0
return ..()

View File

@@ -38,7 +38,7 @@
fire_delay = 12
/obj/item/gun/energy/pulse_rifle/destroyer/attack_self(mob/living/user as mob)
to_chat(user, "<span class='warning'>[src.name] has three settings, and they are all DESTROY.</span>")
to_chat(user, span_warning("[src.name] has three settings, and they are all DESTROY."))
/*
* Pulse Carbine
@@ -82,4 +82,4 @@
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_delay=null, charge_cost = 240),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_delay=null, charge_cost = 240),
list(mode_name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_delay=null, charge_cost = 480),
)
)

View File

@@ -50,7 +50,7 @@
var/mob/living/simple_mob/vore/alienanimals/startreader/S = L
if(!S.flipped)
S.adjustBruteLoss(100)
S.visible_message("<span class='notice'>\The [S] is flipped over!!!</span>")
S.visible_message(span_notice("\The [S] is flipped over!!!"))
S.flipped = TRUE
S.flip_cooldown = 10
S.handle_flip()

View File

@@ -24,10 +24,10 @@
if(istype(id) && lockable)
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 ..()
@@ -35,14 +35,14 @@
..()
if(lockable)
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]!"))
return 1
/obj/item/gun/energy/locked/special_check(mob/user)
if(locked)
var/turf/T = get_turf(src)
if(T.z in using_map.station_levels)
to_chat(user, "<span class='warning'>The safety device prevents the gun from firing this close to the facility.</span>")
to_chat(user, span_warning("The safety device prevents the gun from firing this close to the facility."))
return 0
return ..()
@@ -85,8 +85,8 @@
return
recharging = 1
update_icon()
user.visible_message("<span class='notice'>[user] opens \the [src] and starts pumping the handle.</span>", \
"<span class='notice'>You open \the [src] and start pumping the handle.</span>")
user.visible_message(span_notice("[user] opens \the [src] and starts pumping the handle."), \
span_notice("You open \the [src] and start pumping the handle."))
while(recharging)
if(!do_after(user, 10, src))
break
@@ -267,4 +267,4 @@
desc = "An minaturized weapon that fires a bolt of energy. Includes a built-in crank charger for recharging away from civilization."
req_access = newlist() //for toggling safety
locked = 0
lockable = 0
lockable = 0

View File

@@ -78,29 +78,29 @@
user.drop_item()
W.loc = src
emitter = W
to_chat(user, "<span class='notice'>You install a [emitter.name] in [src].</span>")
to_chat(user, span_notice("You install a [emitter.name] in [src]."))
else
to_chat(user, "<span class='notice'>[src] already has a laser.</span>")
to_chat(user, span_notice("[src] already has a laser."))
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(emitter)
to_chat(user, "<span class='notice'>You remove the [emitter.name] from the [src].</span>")
to_chat(user, span_notice("You remove the [emitter.name] from the [src]."))
emitter.loc = get_turf(src.loc)
playsound(src, W.usesound, 50, 1)
emitter = null
return
else
to_chat(user, "<span class='notice'>There is no micro laser in this [src].</span>")
to_chat(user, span_notice("There is no micro laser in this [src]."))
return
/obj/item/gun/energy/floragun/afterattack(obj/target, mob/user, adjacent_flag)
//allow shooting into adjacent hydrotrays regardless of intent
if(!emitter)
to_chat(user, "<span class='notice'>The [src] has no laser! </span>")
to_chat(user, span_notice("The [src] has no laser! "))
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
return
if(adjacent_flag && istype(target,/obj/machinery/portable_atmospherics/hydroponics))
user.visible_message("<span class='danger'>\The [user] fires \the [src] into \the [target]!</span>")
user.visible_message(span_danger("\The [user] fires \the [src] into \the [target]!"))
Fire(target,user)
return
..()
@@ -117,7 +117,7 @@
gene = SSplants.plant_gene_datums[genemask]
to_chat(usr, "<span class='info'>You set the [src]'s targeted genetic area to [genemask].</span>")
to_chat(usr, span_info("You set the [src]'s targeted genetic area to [genemask]."))
return
@@ -193,14 +193,14 @@
/obj/item/gun/energy/staff/special_check(var/mob/user)
if((user.mind && !wizards.is_antagonist(user.mind)))
to_chat(usr, "<span class='warning'>You focus your mind on \the [src], but nothing happens!</span>")
to_chat(usr, span_warning("You focus your mind on \the [src], but nothing happens!"))
return 0
return ..()
/obj/item/gun/energy/staff/handle_click_empty(mob/user = null)
if (user)
user.visible_message("*fizzle*", "<span class='danger'>*fizzle*</span>")
user.visible_message("*fizzle*", span_danger("*fizzle*"))
else
src.visible_message("*fizzle*")
playsound(src, 'sound/effects/sparks1.ogg', 100, 1)
@@ -222,11 +222,11 @@
attack_self(mob/living/user as mob)
if(projectile_type == "/obj/item/projectile/forcebolt")
charge_cost = 400
to_chat(user, "<span class='warning'>The [src.name] will now strike a small area.</span>")
to_chat(user, span_warning("The [src.name] will now strike a small area."))
projectile_type = "/obj/item/projectile/forcebolt/strong"
else
charge_cost = 200
to_chat(user, "<span class='warning'>The [src.name] will now strike only a single person.</span>")
to_chat(user, span_warning("The [src.name] will now strike only a single person."))
projectile_type = "/obj/item/projectile/forcebolt"
*/
@@ -285,12 +285,12 @@
/obj/item/gun/energy/maghowitzer/attack(atom/A, mob/living/user, def_zone)
if(power_cycle)
to_chat(user, "<span class='notice'>\The [src] is already powering up!</span>")
to_chat(user, span_notice("\The [src] is already powering up!"))
return 0
var/turf/target_turf = get_turf(A)
var/beameffect = user.Beam(target_turf,icon_state="sat_beam",icon='icons/effects/beam.dmi',time=31, maxdistance=10,beam_type=/obj/effect/ebeam,beam_sleep_time=3)
if(beameffect)
user.visible_message("<span class='cult'>[user] aims \the [src] at \the [A].</span>")
user.visible_message(span_cult("[user] aims \the [src] at \the [A]."))
if(power_supply && power_supply.charge >= charge_cost) //Do a delay for pointblanking too.
power_cycle = TRUE
if(do_after(user, 30))
@@ -311,7 +311,7 @@
/obj/item/gun/energy/maghowitzer/afterattack(atom/A, mob/living/user, adjacent, params)
if(power_cycle)
to_chat(user, "<span class='notice'>\The [src] is already powering up!</span>")
to_chat(user, span_notice("\The [src] is already powering up!"))
return 0
var/turf/target_turf = get_turf(A)
@@ -319,7 +319,7 @@
var/beameffect = user.Beam(target_turf,icon_state="sat_beam",icon='icons/effects/beam.dmi',time=31, maxdistance=10,beam_type=/obj/effect/ebeam,beam_sleep_time=3)
if(beameffect)
user.visible_message("<span class='cult'>[user] aims \the [src] at \the [A].</span>")
user.visible_message(span_cult("[user] aims \the [src] at \the [A]."))
if(!power_cycle)
power_cycle = TRUE
@@ -338,4 +338,4 @@
handle_click_empty(user)
power_cycle = FALSE
else
to_chat(user, "<span class='notice'>\The [src] is already powering up!</span>")
to_chat(user, span_notice("\The [src] is already powering up!"))

View File

@@ -55,8 +55,8 @@
playsound(src, 'sound/weapons/chargeup.ogg', 100, 1)
spinning_up = TRUE
update_icon()
user.visible_message("<span class='notice'>[user] starts charging the [src]!</span>", \
"<span class='notice'>You start charging the [src]!</span>")
user.visible_message(span_notice("[user] starts charging the [src]!"), \
span_notice("You start charging the [src]!"))
if(do_after(user, 8, src))
spinning_up = FALSE
..()

View File

@@ -153,7 +153,7 @@
if(!M.mind) return 0
var/job = M.mind.assigned_role
if(job != JOB_DETECTIVE && job != JOB_SECURITY_OFFICER && job != JOB_WARDEN && job != JOB_HEAD_OF_SECURITY )
to_chat(M, "<span class='notice'>You don't feel cool enough to name this gun, chump.</span>")
to_chat(M, span_notice("You don't feel cool enough to name this gun, chump."))
return 0
var/input = sanitizeSafe(input("What do you want to name the gun?", ,""), MAX_NAME_LEN)

View File

@@ -60,7 +60,7 @@
/obj/item/gun/launcher/crossbow/bow/consume_next_projectile(mob/user)
if(!drawn)
to_chat(user, "<span class='warning'>\The [src] is not drawn back!</span>")
to_chat(user, span_warning("\The [src] is not drawn back!"))
return null
return bolt
@@ -94,7 +94,7 @@
return
current_user = user
user.visible_message("<b>[user]</b> begins to draw back the string of [src].","<span class='notice'>You begin to draw back the string of [src].</span>")
user.visible_message("<b>[user]</b> begins to draw back the string of [src].",span_notice("You begin to draw back the string of [src]."))
if(do_after(user, 25, src, exclusive = TASK_ALL_EXCLUSIVE))
drawn = TRUE
user.visible_message("<b>[user]</b> draws the string on [src] back fully!", "You draw the string on [src] back fully!")

View File

@@ -73,7 +73,7 @@
/obj/item/gun/launcher/crossbow/consume_next_projectile(mob/user=null)
if(tension <= 0)
to_chat(user, "<span class='warning'>\The [src] is not drawn back!</span>")
to_chat(user, span_warning("\The [src] is not drawn back!"))
return null
return bolt
@@ -108,12 +108,12 @@
return
current_user = user
user.visible_message("[user] begins to draw back the string of [src].","<span class='notice'>You begin to draw back the string of [src].</span>")
user.visible_message("[user] begins to draw back the string of [src].",span_notice("You begin to draw back the string of [src]."))
tension = 1
while(bolt && tension && loc == current_user)
if(!do_after(user, 25)) //crossbow strings don't just magically pull back on their own.
user.visible_message("[usr] stops drawing and relaxes the string of [src].","<span class='warning'>You stop drawing back and relax the string of [src].</span>")
user.visible_message("[usr] stops drawing and relaxes the string of [src].",span_warning("You stop drawing back and relax the string of [src]."))
tension = 0
update_icon()
return
@@ -130,7 +130,7 @@
to_chat(usr, "[src] clunks as you draw the string to its maximum tension!")
return
user.visible_message("[usr] draws back the string of [src]!","<span class='notice'>You continue drawing back the string of [src]!</span>")
user.visible_message("[usr] draws back the string of [src]!",span_notice("You continue drawing back the string of [src]!"))
/obj/item/gun/launcher/crossbow/proc/increase_tension(var/mob/user as mob)
@@ -162,20 +162,20 @@
user.drop_item()
cell = W
cell.loc = src
to_chat(user, "<span class='notice'>You jam [cell] into [src] and wire it to the firing coil.</span>")
to_chat(user, span_notice("You jam [cell] into [src] and wire it to the firing coil."))
superheat_rod(user)
else
to_chat(user, "<span class='notice'>[src] already has a cell installed.</span>")
to_chat(user, span_notice("[src] already has a cell installed."))
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(cell)
var/obj/item/C = cell
C.loc = get_turf(user)
to_chat(user, "<span class='notice'>You jimmy [cell] out of [src] with [W].</span>")
to_chat(user, span_notice("You jimmy [cell] out of [src] with [W]."))
playsound(src, W.usesound, 50, 1)
cell = null
else
to_chat(user, "<span class='notice'>[src] doesn't have a cell installed.</span>")
to_chat(user, span_notice("[src] doesn't have a cell installed."))
else
..()
@@ -186,7 +186,7 @@
if(bolt.throwforce >= 15) return
if(!istype(bolt,/obj/item/arrow/rod)) return
to_chat(user, "<span class='notice'>[bolt] plinks and crackles as it begins to glow red-hot.</span>")
to_chat(user, span_notice("[bolt] plinks and crackles as it begins to glow red-hot."))
bolt.throwforce = 15
bolt.icon_state = "metal-rod-superheated"
cell.use(500)
@@ -231,11 +231,11 @@
if(buildstate == 0)
var/obj/item/stack/rods/R = W
if(R.use(3))
to_chat(user, "<span class='notice'>You assemble a backbone of rods around the wooden stock.</span>")
to_chat(user, span_notice("You assemble a backbone of rods around the wooden stock."))
buildstate++
update_icon()
else
to_chat(user, "<span class='notice'>You need at least three rods to complete this task.</span>")
to_chat(user, span_notice("You need at least three rods to complete this task."))
return
else if(W.has_tool_quality(TOOL_WELDER))
if(buildstate == 1)
@@ -243,7 +243,7 @@
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You weld the rods into place.</span>")
to_chat(user, span_notice("You weld the rods into place."))
buildstate++
update_icon()
return
@@ -251,33 +251,33 @@
var/obj/item/stack/cable_coil/C = W
if(buildstate == 2)
if(C.use(5))
to_chat(user, "<span class='notice'>You wire a crude cell mount into the top of the crossbow.</span>")
to_chat(user, span_notice("You wire a crude cell mount into the top of the crossbow."))
buildstate++
update_icon()
else
to_chat(user, "<span class='notice'>You need at least five segments of cable coil to complete this task.</span>")
to_chat(user, span_notice("You need at least five segments of cable coil to complete this task."))
return
else if(buildstate == 4)
if(C.use(5))
to_chat(user, "<span class='notice'>You string a steel cable across the crossbow's lath.</span>")
to_chat(user, span_notice("You string a steel cable across the crossbow's lath."))
buildstate++
update_icon()
else
to_chat(user, "<span class='notice'>You need at least five segments of cable coil to complete this task.</span>")
to_chat(user, span_notice("You need at least five segments of cable coil to complete this task."))
return
else if(istype(W,/obj/item/stack/material) && W.get_material_name() == "plastic")
if(buildstate == 3)
var/obj/item/stack/material/P = W
if(P.use(3))
to_chat(user, "<span class='notice'>You assemble and install a heavy plastic lath onto the crossbow.</span>")
to_chat(user, span_notice("You assemble and install a heavy plastic lath onto the crossbow."))
buildstate++
update_icon()
else
to_chat(user, "<span class='notice'>You need at least three plastic sheets to complete this task.</span>")
to_chat(user, span_notice("You need at least three plastic sheets to complete this task."))
return
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(buildstate == 5)
to_chat(user, "<span class='notice'>You secure the crossbow's various parts.</span>")
to_chat(user, span_notice("You secure the crossbow's various parts."))
playsound(src, W.usesound, 50, 1)
new /obj/item/gun/launcher/crossbow(get_turf(src))
qdel(src)

View File

@@ -30,9 +30,9 @@
if(next)
grenades -= next //Remove grenade from loaded list.
chambered = next
to_chat(M, "<span class='warning'>You pump [src], loading \a [next] into the chamber.</span>")
to_chat(M, span_warning("You pump [src], loading \a [next] into the chamber."))
else
to_chat(M, "<span class='warning'>You pump [src], but the magazine is empty.</span>")
to_chat(M, span_warning("You pump [src], but the magazine is empty."))
update_icon()
/obj/item/gun/launcher/grenade/examine(mob/user)
@@ -46,24 +46,24 @@
/obj/item/gun/launcher/grenade/proc/load(obj/item/grenade/G, mob/user)
if(G.loadable)
if(grenades.len >= max_grenades)
to_chat(user, "<span class='warning'>[src] is full.</span>")
to_chat(user, span_warning("[src] is full."))
return
user.remove_from_mob(G)
G.loc = src
grenades.Insert(1, G) //add to the head of the list, so that it is loaded on the next pump
user.visible_message("[user] inserts \a [G] into [src].", "<span class='notice'>You insert \a [G] into [src].</span>")
user.visible_message("[user] inserts \a [G] into [src].", span_notice("You insert \a [G] into [src]."))
return
to_chat(user, "<span class='warning'>[G] doesn't seem to fit in the [src]!</span>")
to_chat(user, span_warning("[G] doesn't seem to fit in the [src]!"))
/obj/item/gun/launcher/grenade/proc/unload(mob/user)
if(grenades.len)
var/obj/item/grenade/G = grenades[grenades.len]
grenades.len--
user.put_in_hands(G)
user.visible_message("[user] removes \a [G] from [src].", "<span class='notice'>You remove \a [G] from [src].</span>")
user.visible_message("[user] removes \a [G] from [src].", span_notice("You remove \a [G] from [src]."))
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
else
to_chat(user, "<span class='warning'>[src] is empty.</span>")
to_chat(user, span_warning("[src] is empty."))
/obj/item/gun/launcher/grenade/attack_self(mob/user)
pump(user)
@@ -106,20 +106,20 @@
/obj/item/gun/launcher/grenade/underslung/load(obj/item/grenade/G, mob/user)
if(G.loadable)
if(chambered)
to_chat(user, "<span class='warning'>[src] is already loaded.</span>")
to_chat(user, span_warning("[src] is already loaded."))
return
user.remove_from_mob(G)
G.loc = src
chambered = G
user.visible_message("[user] load \a [G] into [src].", "<span class='notice'>You load \a [G] into [src].</span>")
user.visible_message("[user] load \a [G] into [src].", span_notice("You load \a [G] into [src]."))
return
to_chat(user, "<span class='warning'>[G] doesn't seem to fit in the [src]!</span>")
to_chat(user, span_warning("[G] doesn't seem to fit in the [src]!"))
/obj/item/gun/launcher/grenade/underslung/unload(mob/user)
if(chambered)
user.put_in_hands(chambered)
user.visible_message("[user] removes \a [chambered] from [src].", "<span class='notice'>You remove \a [chambered] from [src].</span>")
user.visible_message("[user] removes \a [chambered] from [src].", span_notice("You remove \a [chambered] from [src]."))
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
chambered = null
else
to_chat(user, "<span class='warning'>[src] is empty.</span>")
to_chat(user, span_warning("[src] is empty."))

View File

@@ -168,7 +168,7 @@
if(buildstate == 0)
user.drop_from_inventory(W)
qdel(W)
to_chat(user, "<span class='notice'>You secure the piping inside the frame.</span>")
to_chat(user, span_notice("You secure the piping inside the frame."))
buildstate++
update_icon()
return
@@ -176,17 +176,17 @@
if(buildstate == 2)
var/obj/item/stack/material/M = W
if(M.use(5))
to_chat(user, "<span class='notice'>You assemble a chassis around the cannon frame.</span>")
to_chat(user, span_notice("You assemble a chassis around the cannon frame."))
buildstate++
update_icon()
else
to_chat(user, "<span class='notice'>You need at least five metal sheets to complete this task.</span>")
to_chat(user, span_notice("You need at least five metal sheets to complete this task."))
return
else if(istype(W,/obj/item/transfer_valve))
if(buildstate == 4)
user.drop_from_inventory(W)
qdel(W)
to_chat(user, "<span class='notice'>You install the transfer valve and connect it to the piping.</span>")
to_chat(user, span_notice("You install the transfer valve and connect it to the piping."))
buildstate++
update_icon()
return
@@ -196,21 +196,21 @@
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>You weld the pipe into place.</span>")
to_chat(user, span_notice("You weld the pipe into place."))
buildstate++
update_icon()
if(buildstate == 3)
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>You weld the metal chassis together.</span>")
to_chat(user, span_notice("You weld the metal chassis together."))
buildstate++
update_icon()
if(buildstate == 5)
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>You weld the valve into place.</span>")
to_chat(user, span_notice("You weld the valve into place."))
new /obj/item/gun/launcher/pneumatic(get_turf(src))
qdel(src)
return

View File

@@ -20,7 +20,7 @@
/obj/item/syringe_cartridge/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/reagent_containers/syringe))
syringe = I
to_chat(user, "<span class='notice'>You carefully insert [syringe] into [src].</span>")
to_chat(user, span_notice("You carefully insert [syringe] into [src]."))
user.remove_from_mob(syringe)
syringe.loc = src
sharp = TRUE
@@ -29,7 +29,7 @@
/obj/item/syringe_cartridge/attack_self(mob/user)
if(syringe)
to_chat(user, "<span class='notice'>You remove [syringe] from [src].</span>")
to_chat(user, span_notice("You remove [syringe] from [src]."))
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
user.put_in_hands(syringe)
syringe = null
@@ -94,26 +94,26 @@
/obj/item/gun/launcher/syringe/attack_self(mob/living/user as mob)
if(next)
user.visible_message("[user] unlatches and carefully relaxes the bolt on [src].", "<span class='warning'>You unlatch and carefully relax the bolt on [src], unloading the spring.</span>")
user.visible_message("[user] unlatches and carefully relaxes the bolt on [src].", span_warning("You unlatch and carefully relax the bolt on [src], unloading the spring."))
next = null
else if(darts.len)
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
user.visible_message("[user] draws back the bolt on [src], clicking it into place.", "<span class='warning'>You draw back the bolt on the [src], loading the spring!</span>")
user.visible_message("[user] draws back the bolt on [src], clicking it into place.", span_warning("You draw back the bolt on the [src], loading the spring!"))
next = darts[1]
add_fingerprint(user)
/obj/item/gun/launcher/syringe/attack_hand(mob/living/user as mob)
if(user.get_inactive_hand() == src)
if(!darts.len)
to_chat(user, "<span class='warning'>[src] is empty.</span>")
to_chat(user, span_warning("[src] is empty."))
return
if(next)
to_chat(user, "<span class='warning'>[src]'s cover is locked shut.</span>")
to_chat(user, span_warning("[src]'s cover is locked shut."))
return
var/obj/item/syringe_cartridge/C = darts[1]
darts -= C
user.put_in_hands(C)
user.visible_message("[user] removes \a [C] from [src].", "<span class='notice'>You remove \a [C] from [src].</span>")
user.visible_message("[user] removes \a [C] from [src].", span_notice("You remove \a [C] from [src]."))
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
else
..()
@@ -122,12 +122,12 @@
if(istype(A, /obj/item/syringe_cartridge))
var/obj/item/syringe_cartridge/C = A
if(darts.len >= max_darts)
to_chat(user, "<span class='warning'>[src] is full!</span>")
to_chat(user, span_warning("[src] is full!"))
return
user.remove_from_mob(C)
C.loc = src
darts += C //add to the end
user.visible_message("[user] inserts \a [C] into [src].", "<span class='notice'>You insert \a [C] into [src].</span>")
user.visible_message("[user] inserts \a [C] into [src].", span_notice("You insert \a [C] into [src]."))
else
..()

View File

@@ -54,7 +54,7 @@
/obj/item/gun/magic/handle_click_empty(mob/user)
if (user)
user.visible_message("*wzhzhzh*", "<span class='danger'>The [name] whizzles quietly.</span>")
user.visible_message("*wzhzhzh*", span_danger("The [name] whizzles quietly."))
else
src.visible_message("*wzhzh*")
playsound(src, 'sound/weapons/empty.ogg', 100, 1)

View File

@@ -30,9 +30,9 @@
/obj/item/gun/magnetic/matfed/examine(mob/user)
. = ..()
if(manipulator)
. += "<span class='notice'>The installed [manipulator.name] consumes [mat_cost] units of [ammo_material] per shot.</span>"
. += span_notice("The installed [manipulator.name] consumes [mat_cost] units of [ammo_material] per shot.")
else
. += "<span class='notice'>The \"manipulator missing\" indicator is lit. [src] consumes [mat_cost] units of [ammo_material] per shot.</span>"
. += span_notice("The \"manipulator missing\" indicator is lit. [src] consumes [mat_cost] units of [ammo_material] per shot.")
/obj/item/gun/magnetic/matfed/update_icon()
var/list/overlays_to_add = list()
@@ -79,9 +79,9 @@
/obj/item/gun/magnetic/matfed/show_ammo()
if(mat_storage)
return "<span class='notice'>It has [mat_storage] out of [max_mat_storage] units of [ammo_material] loaded.</span>"
return span_notice("It has [mat_storage] out of [max_mat_storage] units of [ammo_material] loaded.")
else
return "<span class='warning'>It\'s out of [ammo_material]!</span>"
return span_warning("It\'s out of [ammo_material]!")
/obj/item/gun/magnetic/matfed/attackby(var/obj/item/thing, var/mob/user)
@@ -90,7 +90,7 @@
if(removable_components)
if(thing.has_tool_quality(TOOL_CROWBAR))
if(!manipulator)
to_chat(user, "<span class='warning'>\The [src] has no manipulator installed.</span>")
to_chat(user, span_warning("\The [src] has no manipulator installed."))
return
user.put_in_hands(manipulator)
user.visible_message("<b>\The [user]</b> levers \the [manipulator] from \the [src].")
@@ -103,7 +103,7 @@
if(istype(thing, /obj/item/stock_parts/manipulator))
if(manipulator)
to_chat(user, "<span class='warning'>\The [src] already has \a [manipulator] installed.</span>")
to_chat(user, span_warning("\The [src] already has \a [manipulator] installed."))
return
manipulator = thing
user.drop_from_inventory(manipulator, src)
@@ -122,7 +122,7 @@
return
if(mat_storage + SHEET_MATERIAL_AMOUNT > max_mat_storage)
to_chat(user, "<span class='warning'>\The [src] cannot hold more [ammo_material].</span>")
to_chat(user, span_warning("\The [src] cannot hold more [ammo_material]."))
return
loading = TRUE
while(mat_storage + SHEET_MATERIAL_AMOUNT <= max_mat_storage && do_after(user,1.5 SECONDS))
@@ -137,7 +137,7 @@
return
if(mat_storage + (SHEET_MATERIAL_AMOUNT/2*0.8) > max_mat_storage)
to_chat(user, "<span class='warning'>\The [src] cannot hold more [ammo_material].</span>")
to_chat(user, span_warning("\The [src] cannot hold more [ammo_material]."))
return
qdel(M)
@@ -192,9 +192,9 @@
/obj/item/gun/magnetic/matfed/phoronbore/examine(mob/user)
. = ..()
if(rating_modifier)
. += "<span class='notice'>A display on the side slowly scrolls the text \"BLAST EFFICIENCY [rating_modifier]\".</span>"
. += span_notice("A display on the side slowly scrolls the text \"BLAST EFFICIENCY [rating_modifier]\".")
else // rating_mod 0 = something's not right
. += "<span class='warning'>A display on the side slowly scrolls the text \"ERR: MISSING COMPONENT - EFFICIENCY MODIFICATION INCOMPLETE\".</span>"
. += span_warning("A display on the side slowly scrolls the text \"ERR: MISSING COMPONENT - EFFICIENCY MODIFICATION INCOMPLETE\".")
/obj/item/gun/magnetic/matfed/phoronbore/Initialize()
. = ..()

View File

@@ -69,10 +69,10 @@
if(loaded)
var/obj/item/tank/T = loaded
. += "<span class='notice'>\The [T]'s pressure meter shows: [T.air_contents.return_pressure()] kpa.</span>"
. += span_notice("\The [T]'s pressure meter shows: [T.air_contents.return_pressure()] kpa.")
switch(check_ammo())
if(TRUE)
. += "<span class='notice'>\The [src]'s display registers a proper fuel mixture.</span>"
. += span_notice("\The [src]'s display registers a proper fuel mixture.")
if(FALSE)
. += "<span class='warning'>\The [src]'s display registers an improper fuel mixture.</span>"
. += span_warning("\The [src]'s display registers an improper fuel mixture.")

View File

@@ -119,7 +119,7 @@
/obj/item/gun/magnetic/proc/show_ammo()
var/list/ammotext = list()
if(loaded)
ammotext += "<span class='notice'>It has \a [loaded] loaded.</span>"
ammotext += span_notice("It has \a [loaded] loaded.")
return ammotext
@@ -129,24 +129,24 @@
. += show_ammo()
if(cell)
. += "<span class='notice'>The installed [cell.name] has a charge level of [round((cell.charge/cell.maxcharge)*100)]%.</span>"
. += span_notice("The installed [cell.name] has a charge level of [round((cell.charge/cell.maxcharge)*100)]%.")
if(capacitor)
. += "<span class='notice'>The installed [capacitor.name] has a charge level of [round((capacitor.charge/capacitor.max_charge)*100)]%.</span>"
. += span_notice("The installed [capacitor.name] has a charge level of [round((capacitor.charge/capacitor.max_charge)*100)]%.")
if(state & ICON_BAD)
. += "<span class='notice'>The capacitor charge indicator is blinking [span_red("red")]. Maybe you should check the cell or capacitor.</span>"
. += span_notice("The capacitor charge indicator is blinking [span_red("red")]. Maybe you should check the cell or capacitor.")
else
if(state & ICON_CHARGE)
. += "<span class='notice'>The capacitor charge indicator is [span_orange("amber")].</span>"
. += span_notice("The capacitor charge indicator is [span_orange("amber")].")
else
. += "<span class='notice'>The capacitor charge indicator is [span_green("green")].</span>"
. += span_notice("The capacitor charge indicator is [span_green("green")].")
/obj/item/gun/magnetic/attackby(var/obj/item/thing, var/mob/user)
if(removable_components)
if(istype(thing, /obj/item/cell))
if(cell)
to_chat(user, "<span class='warning'>\The [src] already has \a [cell] installed.</span>")
to_chat(user, span_warning("\The [src] already has \a [cell] installed."))
return
cell = thing
user.drop_from_inventory(cell, src)
@@ -157,7 +157,7 @@
if(thing.has_tool_quality(TOOL_SCREWDRIVER))
if(!capacitor)
to_chat(user, "<span class='warning'>\The [src] has no capacitor installed.</span>")
to_chat(user, span_warning("\The [src] has no capacitor installed."))
return
user.put_in_hands(capacitor)
user.visible_message("<b>\The [user]</b> unscrews \the [capacitor] from \the [src].")
@@ -168,7 +168,7 @@
if(istype(thing, /obj/item/stock_parts/capacitor))
if(capacitor)
to_chat(user, "<span class='warning'>\The [src] already has \a [capacitor] installed.</span>")
to_chat(user, span_warning("\The [src] already has \a [capacitor] installed."))
return
capacitor = thing
user.drop_from_inventory(capacitor, src)
@@ -181,7 +181,7 @@
if(istype(thing, load_type))
if(loaded)
to_chat(user, "<span class='warning'>\The [src] already has \a [loaded] loaded.</span>")
to_chat(user, span_warning("\The [src] already has \a [loaded] loaded."))
return
// This is not strictly necessary for the magnetic gun but something using
@@ -239,7 +239,7 @@
if(gun_unreliable && prob(gun_unreliable))
spawn(3) // So that it will still fire - considered modifying Fire() to return a value but burst fire makes that annoying.
visible_message("<span class='danger'>\The [src] explodes with the force of the shot!</span>")
visible_message(span_danger("\The [src] explodes with the force of the shot!"))
explosion(get_turf(src), -1, 0, 2)
qdel(src)
@@ -283,26 +283,26 @@
projectile_type = /obj/item/projectile/bullet/magnetic/fuelrod/phoron
if("supermatter")
projectile_type = /obj/item/projectile/bullet/magnetic/fuelrod/supermatter
visible_message("<span class='danger'>The barrel of \the [src] glows a blinding white!</span>")
visible_message(span_danger("The barrel of \the [src] glows a blinding white!"))
spawn(5)
visible_message("<span class='danger'>\The [src] begins to rattle, its acceleration chamber collapsing in on itself!</span>")
visible_message(span_danger("\The [src] begins to rattle, its acceleration chamber collapsing in on itself!"))
removable_components = FALSE
spawn(15)
audible_message("<span class='critical'>\The [src]'s power supply begins to overload as the device crumples!</span>", runemessage = "VWRRRRRRRR") //Why are you still holding this?
audible_message(span_critical("\The [src]'s power supply begins to overload as the device crumples!"), runemessage = "VWRRRRRRRR") //Why are you still holding this?
playsound(src, 'sound/effects/grillehit.ogg', 10, 1)
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
var/turf/T = get_turf(src)
sparks.set_up(2, 1, T)
sparks.start()
spawn(15)
visible_message("<span class='critical'>\The [src] explodes in a blinding white light!</span>")
visible_message(span_critical("\The [src] explodes in a blinding white light!"))
explosion(src.loc, -1, 1, 2, 3)
qdel(src)
if("blitz")
var/max_range = 6 // -- Polymorph
var/banglet = 0
projectile_type = /obj/item/projectile/bullet/magnetic/fuelrod/blitz
visible_message("<span class='critical'>\The [src] explodes in a blinding white light with a deafening bang!</span>")
visible_message(span_critical("\The [src] explodes in a blinding white light with a deafening bang!"))
for(var/obj/structure/closet/L in hear(max_range, get_turf(src)))
if(locate(/mob/living/carbon/, L))
for(var/mob/living/carbon/M in L)
@@ -314,7 +314,7 @@
spawn(2)
qdel(src)
if("blitzu")
visible_message("<span class='critical'>\The [src] explodes in a blinding white light with a deafening bang!</span>")
visible_message(span_critical("\The [src] explodes in a blinding white light with a deafening bang!"))
explosion(get_turf(src),1,2,4,6)
qdel(src)
return
@@ -329,7 +329,7 @@
return
/obj/item/gun/magnetic/fuelrod/proc/blitzed(var/turf/T, var/mob/living/carbon/M, var/max_range, var/banglet) // 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.
@@ -384,18 +384,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!"))
//CHOMPEdit End
/obj/item/gun/magnetic/fuelrod/New()
cell = new /obj/item/cell/high

View File

@@ -14,7 +14,7 @@
var/datum/material/reinforcing_with = reinforcing.get_material()
if(reinforcing_with.name == MAT_STEEL) // Steel
if(reinforcing.get_amount() < 5)
to_chat(user, "<span class='warning'>You need at least 5 [reinforcing.singular_name]\s for this task.</span>")
to_chat(user, span_warning("You need at least 5 [reinforcing.singular_name]\s for this task."))
return
reinforcing.use(5)
user.visible_message("<b>\The [user]</b> shapes some steel sheets around \the [src] to form a body.")
@@ -37,11 +37,11 @@
var/obj/item/weldingtool/welder = thing.get_welder()
if(!welder.isOn())
to_chat(user, "<span class='warning'>Turn it on first!</span>")
to_chat(user, span_warning("Turn it on first!"))
return
if(!welder.remove_fuel(0,user))
to_chat(user, "<span class='warning'>You need more fuel!</span>")
to_chat(user, span_warning("You need more fuel!"))
return
user.visible_message("<b>\The [user]</b> welds the barrel of \the [src] into place.")
@@ -52,7 +52,7 @@
if(istype(thing, /obj/item/stack/cable_coil) && construction_stage == 5)
var/obj/item/stack/cable_coil/cable = thing
if(cable.get_amount() < 5)
to_chat(user, "<span class='warning'>You need at least 5 lengths of cable for this task.</span>")
to_chat(user, span_warning("You need at least 5 lengths of cable for this task."))
return
cable.use(5)
user.visible_message("<b>\The [user]</b> wires \the [src].")
@@ -92,18 +92,18 @@
if(get_dist(user, src) <= 2)
switch(construction_stage)
if(2)
. += "<span class='notice'>It has a metal frame loosely shaped around the stock.</span>"
. += span_notice("It has a metal frame loosely shaped around the stock.")
if(3)
. += "<span class='notice'>It has a metal frame duct-taped to the stock.</span>"
. += span_notice("It has a metal frame duct-taped to the stock.")
if(4)
. += "<span class='notice'>It has a length of pipe attached to the body.</span>"
. += span_notice("It has a length of pipe attached to the body.")
if(4)
. += "<span class='notice'>It has a length of pipe welded to the body.</span>"
. += span_notice("It has a length of pipe welded to the body.")
if(6)
. += "<span class='notice'>It has a cable mount and capacitor jack wired to the frame.</span>"
. += span_notice("It has a cable mount and capacitor jack wired to the frame.")
if(7)
. += "<span class='notice'>It has a single superconducting coil threaded onto the barrel.</span>"
. += span_notice("It has a single superconducting coil threaded onto the barrel.")
if(8)
. += "<span class='notice'>It has a pair of superconducting coils threaded onto the barrel.</span>"
. += span_notice("It has a pair of superconducting coils threaded onto the barrel.")
if(9)
. += "<span class='notice'>It has three superconducting coils attached to the body, waiting to be secured.</span>"
. += span_notice("It has three superconducting coils attached to the body, waiting to be secured.")

View File

@@ -29,9 +29,9 @@
/obj/item/gun/magnetic/railgun/show_ammo()
var/obj/item/rcd_ammo/ammo = loaded
if (ammo)
return list("<span class='notice'>There are [ammo.remaining] shot\s remaining in \the [loaded].</span>")
return list(span_notice("There are [ammo.remaining] shot\s remaining in \the [loaded]."))
else
return list("<span class='notice'>There is nothing loaded.</span>")
return list(span_notice("There is nothing loaded."))
/obj/item/gun/magnetic/railgun/check_ammo()
var/obj/item/rcd_ammo/ammo = loaded
@@ -46,7 +46,7 @@
/obj/item/gun/magnetic/railgun/proc/out_of_ammo()
loaded.forceMove(get_turf(src))
loaded = null
visible_message("<span class='warning'>\The [src] beeps and ejects its empty cartridge.</span>","<span class='warning'>There's a beeping sound!</span>")
visible_message(span_warning("\The [src] beeps and ejects its empty cartridge."),span_warning("There's a beeping sound!"))
playsound(src, empty_sound, 40, 1)
update_state()
@@ -75,7 +75,7 @@
/obj/item/gun/magnetic/railgun/automatic/examine(var/mob/user)
. = ..()
if(Adjacent(user))
. += "<span class='notice'>Someone has scratched <i>Ultima Ratio Regum</i> onto the side of the barrel.</span>"
. += span_notice("Someone has scratched <i>Ultima Ratio Regum</i> onto the side of the barrel.")
/obj/item/gun/magnetic/railgun/flechette
name = "flechette gun"

View File

@@ -52,16 +52,16 @@
/obj/item/gun/energy/modular/attackby(obj/item/O, mob/user)
if(O.has_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, "<span class='notice'>You [assembled ? "disassemble" : "assemble"] the gun.</span>")
to_chat(user, span_notice("You [assembled ? "disassemble" : "assemble"] the gun."))
assembled = !assembled
playsound(src, O.usesound, 50, 1)
return
if(O.has_tool_quality(TOOL_CROWBAR))
if(assembled == 1)
to_chat(user, "<span class='warning'>Disassemble the [src] first!</span>")
to_chat(user, span_warning("Disassemble the [src] first!"))
return
for(var/obj/item/I in guncomponents)
to_chat(user, "<span class='notice'>You remove the gun's components.</span>")
to_chat(user, span_notice("You remove the gun's components."))
playsound(src, O.usesound, 50, 1)
I.forceMove(get_turf(src))
guncomponents.Remove(I)
@@ -72,18 +72,18 @@
if(assembled) // can't put anything in
return
if(!(O.type in accepted_components))//check if we can accept it
to_chat(user, "<span class='warning'>You can't add this to [src]!</span>")
to_chat(user, span_warning("You can't add this to [src]!"))
return
if(guncomponents.len >= max_components) //We have too many componenets and can't fit more.
to_chat(user, "<span class='warning'>You can't add any more components!</span>")
to_chat(user, span_warning("You can't add any more components!"))
return
if(istype(O, /obj/item/stock_parts/capacitor) && capacitor_rating == 5)
to_chat(user, "<span class='warning'>You can't add any more capacitors!</span>")
to_chat(user, span_warning("You can't add any more capacitors!"))
return
user.drop_item()
guncomponents += O
O.forceMove(src)
to_chat(user, "<span class='notice'>You add a component to the [src]</span>")
to_chat(user, span_notice("You add a component to the [src]"))
CheckParts()
@@ -131,18 +131,18 @@
/obj/item/gun/energy/modular/load_ammo(var/obj/item/C, mob/user)
if(istype(C, cell_type))
if(self_recharge || battery_lock)
to_chat(user, "<span class='notice'>[src] does not have a battery port.</span>")
to_chat(user, span_notice("[src] does not have a battery port."))
return
var/obj/item/cell/P = C
if(power_supply)
to_chat(user, "<span class='notice'>[src] already has a power cell.</span>")
to_chat(user, span_notice("[src] already has a power cell."))
else
user.visible_message("[user] is reloading [src].", "<span class='notice'>You start to insert [P] into [src].</span>")
user.visible_message("[user] is reloading [src].", span_notice("You start to insert [P] into [src]."))
if(do_after(user, 10))
user.remove_from_mob(P)
power_supply = P
P.loc = src
user.visible_message("[user] inserts [P] into [src].", "<span class='notice'>You insert [P] into [src].</span>")
user.visible_message("[user] inserts [P] into [src].", span_notice("You insert [P] into [src]."))
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
update_icon()
update_held_icon()
@@ -173,4 +173,4 @@
one_handed_penalty = 4 //dual wielding = no.
cell_type = /obj/item/cell //We're bigger. We can use much larger power cells.
origin_tech = list(TECH_COMBAT = 6, TECH_MAGNET = 6, TECH_MATERIAL = 5, TECH_BLUESPACE = 4) //its a damn cannon capable of holding a huge amount of parts.
burst_delay = 4 //preventing extreme silliness.
burst_delay = 4 //preventing extreme silliness.

View File

@@ -120,23 +120,23 @@
if(istype(A, /obj/item/ammo_magazine))
var/obj/item/ammo_magazine/AM = A
if(!(load_method & AM.mag_type) || caliber != AM.caliber || allowed_magazines && !is_type_in_list(A, allowed_magazines))
to_chat(user, "<span class='warning'>[AM] won't load into [src]!</span>")
to_chat(user, span_warning("[AM] won't load into [src]!"))
return
switch(AM.mag_type)
if(MAGAZINE)
if(ammo_magazine)
to_chat(user, "<span class='warning'>[src] already has a magazine loaded.</span>") //already a magazine here
to_chat(user, span_warning("[src] already has a magazine loaded.")) //already a magazine here
return
if(do_after(user, reload_time * AM.w_class))
user.remove_from_mob(AM)
AM.loc = src
ammo_magazine = AM
user.visible_message("[user] inserts [AM] into [src].", "<span class='notice'>You insert [AM] into [src].</span>")
user.visible_message("[user] inserts [AM] into [src].", span_notice("You insert [AM] into [src]."))
user.hud_used.update_ammo_hud(user, src)
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
if(SPEEDLOADER)
if(loaded.len >= max_shells)
to_chat(user, "<span class='warning'>[src] is full!</span>")
to_chat(user, span_warning("[src] is full!"))
return
var/count = 0
for(var/obj/item/ammo_casing/C in AM.stored_ammo)
@@ -150,7 +150,7 @@
user.hud_used.update_ammo_hud(user, src)
if(do_after(user, reload_time * AM.w_class))
if(count)
user.visible_message("[user] reloads [src].", "<span class='notice'>You load [count] round\s into [src].</span>")
user.visible_message("[user] reloads [src].", span_notice("You load [count] round\s into [src]."))
user.hud_used.update_ammo_hud(user, src)
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
AM.update_icon()
@@ -159,14 +159,14 @@
if(!(load_method & SINGLE_CASING) || caliber != C.caliber)
return //incompatible
if(loaded.len >= max_shells)
to_chat(user, "<span class='warning'>[src] is full.</span>")
to_chat(user, span_warning("[src] is full."))
return
if(do_after(user, reload_time * C.w_class))
user.remove_from_mob(C)
C.loc = src
loaded.Insert(1, C) //add to the head of the list
user.visible_message("[user] inserts \a [C] into [src].", "<span class='notice'>You insert \a [C] into [src].</span>")
user.visible_message("[user] inserts \a [C] into [src].", span_notice("You insert \a [C] into [src]."))
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
else if(istype(A, /obj/item/storage))
@@ -174,7 +174,7 @@
if(!(load_method & SINGLE_CASING))
return //incompatible
to_chat(user, "<span class='notice'>You start loading \the [src].</span>")
to_chat(user, span_notice("You start loading \the [src]."))
sleep(1 SECOND)
for(var/obj/item/ammo_casing/ammo in storage.contents)
if(caliber != ammo.caliber)
@@ -183,7 +183,7 @@
load_ammo(ammo, user)
if(loaded.len >= max_shells)
to_chat(user, "<span class='warning'>[src] is full.</span>")
to_chat(user, span_warning("[src] is full."))
break
sleep(1 SECOND)
@@ -194,7 +194,7 @@
/obj/item/gun/projectile/proc/unload_ammo(mob/user, var/allow_dump=1)
if(ammo_magazine)
user.put_in_hands(ammo_magazine)
user.visible_message("[user] removes [ammo_magazine] from [src].", "<span class='notice'>You remove [ammo_magazine] from [src].</span>")
user.visible_message("[user] removes [ammo_magazine] from [src].", span_notice("You remove [ammo_magazine] from [src]."))
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
ammo_magazine.update_icon()
ammo_magazine = null
@@ -210,16 +210,16 @@
count++
loaded.Cut()
if(count)
user.visible_message("[user] unloads [src].", "<span class='notice'>You unload [count] round\s from [src].</span>")
user.visible_message("[user] unloads [src].", span_notice("You unload [count] round\s from [src]."))
else if(load_method & SINGLE_CASING)
var/obj/item/ammo_casing/C = loaded[loaded.len]
loaded.len--
user.put_in_hands(C)
user.visible_message("[user] removes \a [C] from [src].", "<span class='notice'>You remove \a [C] from [src].</span>")
user.visible_message("[user] removes \a [C] from [src].", span_notice("You remove \a [C] from [src]."))
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
user.hud_used.update_ammo_hud(user, src)
else
to_chat(user, "<span class='warning'>[src] is empty.</span>")
to_chat(user, span_warning("[src] is empty."))
update_icon()
user.hud_used.update_ammo_hud(user, src)
@@ -245,7 +245,7 @@
ammo_magazine.loc = get_turf(src.loc)
user.visible_message(
"[ammo_magazine] falls out and clatters on the floor!",
"<span class='notice'>[ammo_magazine] falls out and clatters on the floor!</span>"
span_notice("[ammo_magazine] falls out and clatters on the floor!")
)
if(auto_eject_sound)
playsound(src, auto_eject_sound, 40, 1)

View File

@@ -312,13 +312,13 @@
/obj/item/gun/projectile/automatic/l6_saw/special_check(mob/user)
if(cover_open)
to_chat(user, "<span class='warning'>[src]'s cover is open! Close it before firing!</span>")
to_chat(user, span_warning("[src]'s cover is open! Close it before firing!"))
return 0
return ..()
/obj/item/gun/projectile/automatic/l6_saw/proc/toggle_cover(mob/user)
cover_open = !cover_open
to_chat(user, "<span class='notice'>You [cover_open ? "open" : "close"] [src]'s cover.</span>")
to_chat(user, span_notice("You [cover_open ? "open" : "close"] [src]'s cover."))
update_icon()
update_held_icon()
@@ -345,13 +345,13 @@
/obj/item/gun/projectile/automatic/l6_saw/load_ammo(var/obj/item/A, mob/user)
if(!cover_open)
to_chat(user, "<span class='warning'>You need to open the cover to load [src].</span>")
to_chat(user, span_warning("You need to open the cover to load [src]."))
return
..()
/obj/item/gun/projectile/automatic/l6_saw/unload_ammo(mob/user, var/allow_dump=1)
if(!cover_open)
to_chat(user, "<span class='warning'>You need to open the cover to unload [src].</span>")
to_chat(user, span_warning("You need to open the cover to unload [src]."))
return
..()

View File

@@ -69,14 +69,14 @@
/obj/item/gun/projectile/shotgun/pump/rifle/ceremonial/attackby(var/obj/item/A as obj, mob/user as mob)
if(sawn_off)
to_chat(user, "<span class='warning'>The [src] is already shortened!</span>")
to_chat(user, span_warning("The [src] is already shortened!"))
return
if(istype(A, /obj/item/surgical/circular_saw) || istype(A, /obj/item/melee/energy) || istype(A, /obj/item/pickaxe/plasmacutter) && w_class != ITEMSIZE_NORMAL)
to_chat(user, "<span class='notice'>You begin to shorten the barrel and stock of \the [src].</span>")
to_chat(user, span_notice("You begin to shorten the barrel and stock of \the [src]."))
if(loaded.len)
afterattack(user, user)
playsound(src, fire_sound, 50, 1)
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='danger'>The rifle goes off in your face!</span>")
user.visible_message(span_danger("[src] goes off!"), span_danger("The rifle goes off in your face!"))
return
if(do_after(user, 30))
if(sawn_off)
@@ -91,7 +91,7 @@
name = "sawn-off rifle"
desc = "The firepower of a rifle, now the size of a pistol, with an effective combat range of about three feet. Uses 7.62mm rounds."
pump_animation = "sawn_rifle-cycling"
to_chat(user, "<span class='warning'>You shorten the barrel and stock of \the [src]!</span>")
to_chat(user, span_warning("You shorten the barrel and stock of \the [src]!"))
sawn_off = TRUE
else
..()
@@ -147,4 +147,4 @@
/obj/item/gun/projectile/shotgun/pump/rifle/verb/scope()
set category = "Object"
set name = "Use Scope"
set popup_menu = 1
set popup_menu = 1

View File

@@ -30,20 +30,20 @@
loaded -= C
if(!retracted_bolt)
to_chat(user, "<span class='notice'>You cycle back the bolt on [src], ejecting the casing and allowing you to reload.</span>")
to_chat(user, span_notice("You cycle back the bolt on [src], ejecting the casing and allowing you to reload."))
icon_state = icon_retracted
retracted_bolt = 1
return 1
else if(retracted_bolt && loaded.len)
to_chat(user, "<span class='notice'>You cycle the loaded round into the chamber, allowing you to fire.</span>")
to_chat(user, span_notice("You cycle the loaded round into the chamber, allowing you to fire."))
else
to_chat(user, "<span class='notice'>You cycle the boly back into position, leaving the gun empty.</span>")
to_chat(user, span_notice("You cycle the boly back into position, leaving the gun empty."))
icon_state = initial(icon_state)
retracted_bolt = 0
/obj/item/gun/projectile/contender/load_ammo(var/obj/item/A, mob/user)
if(!retracted_bolt)
to_chat(user, "<span class='notice'>You can't load [src] without cycling the bolt.</span>")
to_chat(user, span_notice("You can't load [src] without cycling the bolt."))
return
..()
@@ -56,4 +56,4 @@
tactical look. For when you really want to make a hole. This one has been \
modified to work almost like a bolt-action. Uses .357 rounds."
icon_state = "pockrifle_b"
icon_retracted = "pockrifle_b-e"
icon_retracted = "pockrifle_b-e"

View File

@@ -102,11 +102,11 @@
/obj/item/gun/projectile/dartgun/examine(mob/user)
. = ..()
if(beakers.len)
. += "<span class='notice'>[src] contains:</span>"
. += span_notice("[src] contains:")
for(var/obj/item/reagent_containers/glass/beaker/B in beakers)
if(B.reagents && B.reagents.reagent_list.len)
for(var/datum/reagent/R in B.reagents.reagent_list)
. += "<span class='notice'>[R.volume] units of [R.name]</span>"
. += span_notice("[R.volume] units of [R.name]")
/obj/item/gun/projectile/dartgun/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/reagent_containers/glass))

View File

@@ -42,7 +42,7 @@
if(!M.mind) return 0
var/job = M.mind.assigned_role
if(job != JOB_DETECTIVE && job != JOB_SECURITY_OFFICER && job != JOB_WARDEN && job != JOB_HEAD_OF_SECURITY )
to_chat(M, "<span class='notice'>You don't feel cool enough to name this gun, chump.</span>")
to_chat(M, span_notice("You don't feel cool enough to name this gun, chump."))
return 0
var/input = sanitizeSafe(input(usr, "What do you want to name the gun?", ,""), MAX_NAME_LEN)
@@ -241,7 +241,7 @@
if(!user.item_is_in_hands(src))
..()
return
to_chat(user, "<span class='notice'>You unscrew [silenced] from [src].</span>")
to_chat(user, span_notice("You unscrew [silenced] from [src]."))
user.put_in_hands(silenced)
silenced = 0
w_class = ITEMSIZE_SMALL
@@ -252,10 +252,10 @@
/obj/item/gun/projectile/pistol/attackby(obj/item/I as obj, mob/living/user as mob)
if(istype(I, /obj/item/silencer))
if(!user.item_is_in_hands(src)) //if we're not in his hands
to_chat(user, "<span class='notice'>You'll need [src] in your hands to do that.</span>")
to_chat(user, span_notice("You'll need [src] in your hands to do that."))
return
user.drop_item()
to_chat(user, "<span class='notice'>You screw [I] onto [src].</span>")
to_chat(user, span_notice("You screw [I] onto [src]."))
silenced = I //dodgy?
w_class = ITEMSIZE_NORMAL
I.loc = src //put the silencer into the gun
@@ -297,7 +297,7 @@
if(!user.item_is_in_hands(src))
..()
return
to_chat(user, "<span class='notice'>You unscrew [silenced] from [src].</span>")
to_chat(user, span_notice("You unscrew [silenced] from [src]."))
user.put_in_hands(silenced)
silenced = 0
update_icon()
@@ -307,10 +307,10 @@
/obj/item/gun/projectile/aps/attackby(obj/item/I as obj, mob/living/user as mob)
if(istype(I, /obj/item/silencer))
if(!user.item_is_in_hands(src)) //if we're not in his hands
to_chat(user, "<span class='notice'>You'll need [src] in your hands to do that.</span>")
to_chat(user, span_notice("You'll need [src] in your hands to do that."))
return
user.drop_item()
to_chat(user, "<span class='notice'>You screw [I] onto [src].</span>")
to_chat(user, span_notice("You screw [I] onto [src]."))
silenced = I //dodgy?
I.loc = src //put the silencer into the gun
update_icon()

View File

@@ -25,8 +25,8 @@
set category = "Object"
chamber_offset = 0
visible_message("<span class='warning'>\The [usr] spins the cylinder of \the [src]!</span>", \
"<span class='notice'>You hear something metallic spin and click.</span>")
visible_message(span_warning("\The [usr] spins the cylinder of \the [src]!"), \
span_notice("You hear something metallic spin and click."))
playsound(src, 'sound/weapons/revolver_spin.ogg', 100, 1)
loaded = shuffle(loaded)
if(rand(1,max_shells) > loaded.len)
@@ -65,7 +65,7 @@
var/mob/M = usr
if(!M.mind) return 0
if(!M.mind.assigned_role == JOB_DETECTIVE)
to_chat(M, "<span class='notice'>You don't feel cool enough to name this gun, chump.</span>")
to_chat(M, span_notice("You don't feel cool enough to name this gun, chump."))
return 0
var/input = sanitizeSafe(input(usr, "What do you want to name the gun?", ,""), MAX_NAME_LEN)
@@ -93,7 +93,7 @@
if(!M.mind) return 0
var/job = M.mind.assigned_role
if(job != JOB_DETECTIVE)
to_chat(M, "<span class='notice'>You don't feel cool enough to name this gun, chump.</span>")
to_chat(M, span_notice("You don't feel cool enough to name this gun, chump."))
return 0
var/input = sanitizeSafe(input(usr, "What do you want to name the gun?", ,""), MAX_NAME_LEN)
@@ -255,7 +255,7 @@
if(!M.mind)
return 0
to_chat(M, "<span class='notice'>You change the firing mode on \the [src].</span>")
to_chat(M, span_notice("You change the firing mode on \the [src]."))
if(!flipped_firing)
if(max_shells && secondary_max_shells)
max_shells = secondary_max_shells
@@ -294,8 +294,8 @@
set category = "Object"
chamber_offset = 0
visible_message("<span class='warning'>\The [usr] spins the cylinder of \the [src]!</span>", \
"<span class='notice'>You hear something metallic spin and click.</span>")
visible_message(span_warning("\The [usr] spins the cylinder of \the [src]!"), \
span_notice("You hear something metallic spin and click."))
playsound(src, 'sound/weapons/revolver_spin.ogg', 100, 1)
if(!flipped_firing)
loaded = shuffle(loaded)

View File

@@ -171,7 +171,7 @@
options["Blued"] = "dshotgun_b"
var/choice = tgui_input_list(M,"Choose your sprite!","Resprite Gun", options)
if(sawn_off)
to_chat(M, "<span class='warning'>The [src] is already shortened and cannot be resprited!</span>")
to_chat(M, span_warning("The [src] is already shortened and cannot be resprited!"))
return
if(src && choice && !M.stat && in_range(M,src))
icon_state = options[choice]
@@ -184,14 +184,14 @@
if(istype(A, /obj/item/ammo_casing/a12g) || istype(A, /obj/item/ammo_magazine)) //CHOMPEdit: Trying to make sawn offs reload able
..()
if(sawn_off)
to_chat(user, "<span class='warning'>The [src] is already shortened!</span>")
to_chat(user, span_warning("The [src] is already shortened!"))
return
if(istype(A, /obj/item/surgical/circular_saw) || istype(A, /obj/item/melee/energy) || istype(A, /obj/item/pickaxe/plasmacutter))
to_chat(user, "<span class='notice'>You begin to shorten the barrel of \the [src].</span>")
to_chat(user, span_notice("You begin to shorten the barrel of \the [src]."))
if(loaded.len)
var/burstsetting = burst
burst = 2
user.visible_message("<span class='danger'>The shotgun goes off!</span>", "<span class='danger'>The shotgun goes off in your face!</span>")
user.visible_message(span_danger("The shotgun goes off!"), span_danger("The shotgun goes off in your face!"))
Fire_userless(user)
user.hud_used.update_ammo_hud(user, src) // TGMC Ammo HUD Port
burst = burstsetting
@@ -210,7 +210,7 @@
slot_flags |= (SLOT_BELT|SLOT_HOLSTER) // but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) - or in a holster, why not.
name = "sawn-off shotgun"
desc = "Omar's coming!"
to_chat(user, "<span class='warning'>You shorten the barrel of \the [src]!</span>")
to_chat(user, span_warning("You shorten the barrel of \the [src]!"))
sawn_off = TRUE
else
..()

View File

@@ -45,8 +45,8 @@
var/mob/living/user = loc
stock = !stock
if(stock)
user.visible_message("<span class='warning'>With a fluid movement, [user] unfolds their shotgun's stock and foregrip.</span>",\
"<span class='warning'>You unfold the shotgun's stock and foregrip.</span>",\
user.visible_message(span_warning("With a fluid movement, [user] unfolds their shotgun's stock and foregrip."),\
span_warning("You unfold the shotgun's stock and foregrip."),\
"You hear an ominous click.")
icon_state = "compshot"
item_state = icon_state
@@ -55,7 +55,7 @@
recoil = 1 //As above, stock and foregrip would help with the kick
else
user.visible_message("<b>\The [user]</b> collapses their shotgun's stock and fold it's foregrip.",\
"<span class='notice'>You fold the shotgun's stock and foregrip.</span>",\
span_notice("You fold the shotgun's stock and foregrip."),\
"You hear a click.")
icon_state = "compshotc"
item_state = icon_state
@@ -82,7 +82,7 @@
if (isliving(usr))
toggle_stock()
else
to_chat(usr, "<span class='notice'>You cannot do this in your current state.</span>")
to_chat(usr, span_notice("You cannot do this in your current state."))
/obj/item/gun/projectile/shotgun/compact/attack_self(mob/user as mob)
@@ -92,7 +92,7 @@
if (isliving(usr))
toggle_stock()
else
to_chat(usr, "<span class='notice'>You cannot do this in your current state.</span>")
to_chat(usr, span_notice("You cannot do this in your current state."))
/obj/item/gun/projectile/shotgun/compact/ui_action_click()
var/mob/living/user = loc

View File

@@ -51,20 +51,20 @@
/obj/item/gun/projectile/smartgun/load_ammo(var/obj/item/A, mob/user)
if(closed)
to_chat(user, "<span class='warning'>[src] can't be loaded until you un-ready it. (Alt-click)</span>")
to_chat(user, span_warning("[src] can't be loaded until you un-ready it. (Alt-click)"))
return
return ..()
/obj/item/gun/projectile/smartgun/unload_ammo(mob/user, var/allow_dump=0)
if(closed)
to_chat(user, "<span class='warning'>[src] can't be unloaded until you un-ready it. (Alt-click)</span>")
to_chat(user, span_warning("[src] can't be unloaded until you un-ready it. (Alt-click)"))
return
return ..()
/obj/item/gun/projectile/smartgun/AltClick(mob/user)
if(ishuman(user) && !user.incapacitated() && Adjacent(user))
if(cycling)
to_chat(user, "<span class='warning'>[src] is still cycling!</span>")
to_chat(user, span_warning("[src] is still cycling!"))
return
cycling = TRUE
@@ -72,11 +72,11 @@
if(closed)
icon_state = "[initial(icon_state)]_open"
playsound(src, 'sound/weapons/smartgunopen.ogg', 75, 0)
to_chat(user, "<span class='notice'>You unready [src] so that it can be reloaded.</span>")
to_chat(user, span_notice("You unready [src] so that it can be reloaded."))
else
icon_state = "[initial(icon_state)]_closed"
playsound(src, 'sound/weapons/smartgunclose.ogg', 75, 0)
to_chat(user, "<span class='notice'>You ready [src] so that it can be fired.</span>")
to_chat(user, span_notice("You ready [src] so that it can be fired."))
addtimer(CALLBACK(src, PROC_REF(toggle_real_state)), 2 SECONDS, TIMER_UNIQUE)
/obj/item/gun/projectile/smartgun/proc/toggle_real_state()

View File

@@ -35,21 +35,21 @@
bolt_open = !bolt_open
if(bolt_open)
if(chambered)
to_chat(user, "<span class='notice'>You work the bolt open, ejecting [chambered]!</span>")
to_chat(user, span_notice("You work the bolt open, ejecting [chambered]!"))
chambered.loc = get_turf(src)
loaded -= chambered
chambered = null
else
to_chat(user, "<span class='notice'>You work the bolt open.</span>")
to_chat(user, span_notice("You work the bolt open."))
else
to_chat(user, "<span class='notice'>You work the bolt closed.</span>")
to_chat(user, span_notice("You work the bolt closed."))
bolt_open = 0
add_fingerprint(user)
update_icon()
/obj/item/gun/projectile/heavysniper/special_check(mob/user)
if(bolt_open)
to_chat(user, "<span class='warning'>You can't fire [src] while the bolt is open!</span>")
to_chat(user, span_warning("You can't fire [src] while the bolt is open!"))
return 0
return ..()
@@ -110,4 +110,4 @@
set name = "Use Scope"
set popup_menu = 1
toggle_scope(2.0)
toggle_scope(2.0)

View File

@@ -11,15 +11,15 @@
return
if(chambered)
to_chat(user, "<span class='warning'>You need to empty the rifle to break it down.</span>")
to_chat(user, span_warning("You need to empty the rifle to break it down."))
else
collapse_rifle(user)
/obj/item/gun/projectile/heavysniper/proc/collapse_rifle(mob/user)
to_chat(user, "<span class='warning'>You begin removing \the [src]'s barrel.</span>")
to_chat(user, span_warning("You begin removing \the [src]'s barrel."))
if(do_after(user, 40))
if(user.unEquip(src, force=1))
to_chat(user, "<span class='warning'>You remove \the [src]'s barrel.</span>")
to_chat(user, span_warning("You remove \the [src]'s barrel."))
qdel(src)
var/obj/item/barrel = new /obj/item/sniper_rifle_part/barrel(user)
var/obj/item/sniper_rifle_part/assembly = new /obj/item/sniper_rifle_part/trigger_group(user)
@@ -71,14 +71,14 @@
/obj/item/sniper_rifle_part/attack_self(mob/user as mob)
if(part_count == 1)
to_chat(user, "<span class='warning'>You can't disassemble this further!</span>")
to_chat(user, span_warning("You can't disassemble this further!"))
return
to_chat(user, "<span class='notice'>You start disassembling \the [src].</span>")
to_chat(user, span_notice("You start disassembling \the [src]."))
if(!do_after(user, 40))
return
to_chat(user, "<span class='notice'>You disassemble \the [src].</span>")
to_chat(user, span_notice("You disassemble \the [src]."))
for(var/obj/item/sniper_rifle_part/P in list(barrel, stock, trigger_group))
if(P.barrel != P)
P.barrel = null
@@ -94,7 +94,7 @@
/obj/item/sniper_rifle_part/attackby(var/obj/item/sniper_rifle_part/A as obj, mob/user as mob)
to_chat(user, "<span class='notice'>You begin adding \the [A] to \the [src].</span>")
to_chat(user, span_notice("You begin adding \the [A] to \the [src]."))
if(!do_after(user, 30))
return
@@ -102,14 +102,14 @@
if(istype(A, /obj/item/sniper_rifle_part/trigger_group))
if(A.part_count > 1 && src.part_count > 1)
to_chat(user, "<span class='warning'>Disassemble one of these parts first!</span>")
to_chat(user, span_warning("Disassemble one of these parts first!"))
return
if(!trigger_group)
if(user.unEquip(A, force=1))
trigger_group = A
else
to_chat(user, "<span class='warning'>There's already a trigger group!</span>")
to_chat(user, span_warning("There's already a trigger group!"))
return
else if(istype(A, /obj/item/sniper_rifle_part/barrel))
@@ -117,7 +117,7 @@
if(user.unEquip(A, force=1))
barrel = A
else
to_chat(user, "<span class='warning'>There's already a barrel!</span>")
to_chat(user, span_warning("There's already a barrel!"))
return
else if(istype(A, /obj/item/sniper_rifle_part/stock))
@@ -125,11 +125,11 @@
if(user.unEquip(A, force=1))
stock = A
else
to_chat(user, "<span class='warning'>There's already a stock!</span>")
to_chat(user, span_warning("There's already a stock!"))
return
A.forceMove(src)
to_chat(user, "<span class='notice'>You install \the [A].</span>")
to_chat(user, span_notice("You install \the [A]."))
if(A.barrel && !src.barrel)
src.barrel = A.barrel

View File

@@ -286,7 +286,7 @@
/obj/item/gun/energy/lasertag/special_check(var/mob/living/carbon/human/M)
if(ishuman(M))
if(!istype(M.wear_suit, required_vest))
to_chat(M, "<span class='warning'>You need to be wearing your laser tag vest!</span>")
to_chat(M, span_warning("You need to be wearing your laser tag vest!"))
return 0
return ..()