[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

@@ -63,7 +63,7 @@
break
if(box.caliber == bullet.caliber && bullet.BB)
if (boolets < 1)
to_chat(user, "<span class='notice'>You start collecting shells.</span>") // Say it here so it doesn't get said if we don't find anything useful.
to_chat(user, span_notice("You start collecting shells.")) // Say it here so it doesn't get said if we don't find anything useful.
if(do_after(user,5,box))
if(box.stored_ammo.len >= box.max_ammo) // Double check because these can change during the wait.
break
@@ -77,9 +77,9 @@
break
if(boolets > 0)
to_chat(user, "<span class='notice'>You collect [boolets] shell\s. [box] now contains [box.stored_ammo.len] shell\s.</span>")
to_chat(user, span_notice("You collect [boolets] shell\s. [box] now contains [box.stored_ammo.len] shell\s."))
else
to_chat(user, "<span class='warning'>You fail to collect anything!</span>")
to_chat(user, span_warning("You fail to collect anything!"))
box.reloading = FALSE
else
return ..()
@@ -143,10 +143,10 @@
if(istype(W, /obj/item/ammo_casing))
var/obj/item/ammo_casing/C = W
if(C.caliber != caliber)
to_chat(user, "<span class='warning'>[C] does not fit into [src].</span>")
to_chat(user, span_warning("[C] 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(C)
C.forceMove(src)
@@ -155,13 +155,13 @@
if(istype(W, /obj/item/ammo_magazine/clip))
var/obj/item/ammo_magazine/clip/L = W
if(L.caliber != caliber)
to_chat(user, "<span class='warning'>The ammo in [L] does not fit into [src].</span>")
to_chat(user, span_warning("The ammo in [L] does not fit into [src]."))
return
if(!L.stored_ammo.len)
to_chat(user, "<span class='warning'>There's no more ammo [L]!</span>")
to_chat(user, span_warning("There's no more ammo [L]!"))
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
var/obj/item/ammo_casing/AC = L.stored_ammo[1] //select the next casing.
L.stored_ammo -= AC //Remove this casing from loaded list of the clip.
@@ -175,9 +175,9 @@
/obj/item/ammo_magazine/attack_self(mob/user)
if(can_remove_ammo)
if(!stored_ammo.len)
to_chat(user, "<span class='notice'>[src] is already empty!</span>")
to_chat(user, span_notice("[src] is already empty!"))
return
to_chat(user, "<span class='notice'>You empty [src].</span>")
to_chat(user, span_notice("You empty [src]."))
playsound(src, "casing_sound", 50, 1)
spawn(7)
playsound(src, "casing_sound", 50, 1)
@@ -189,7 +189,7 @@
stored_ammo.Cut()
update_icon()
else
to_chat(user, "<span class='notice'>\The [src] is not designed to be unloaded.</span>")
to_chat(user, span_notice("\The [src] is not designed to be unloaded."))
return
// This puts one bullet from the magazine into your hand
@@ -200,7 +200,7 @@
var/obj/item/ammo_casing/C = stored_ammo[stored_ammo.len]
stored_ammo-=C
user.put_in_hands(C)
user.visible_message("\The [user] removes \a [C] from [src].", "<span class='notice'>You remove \a [C] from [src].</span>")
user.visible_message("\The [user] removes \a [C] from [src].", span_notice("You remove \a [C] from [src]."))
update_icon()
return
..()
@@ -272,7 +272,7 @@
var/obj/item/ammo_casing/C = stored_ammo[stored_ammo.len]
stored_ammo-=C
user.put_in_hands(C)
user.visible_message("\The [user] removes \a [C] from [src].", "<span class='notice'>You remove \a [C] from [src].</span>")
user.visible_message("\The [user] removes \a [C] from [src].", span_notice("You remove \a [C] from [src]."))
update_icon()
return
..()
@@ -280,4 +280,4 @@
/obj/item/ammo_magazine/ammo_box/examine(mob/user)
. = ..()
. += to_chat(usr, "<span class='notice'>Alt-click to extract contents.</span>")
. += to_chat(usr, span_notice("Alt-click to extract contents."))

View File

@@ -53,9 +53,9 @@
. = ..()
if(attached_cell)
. += "<span class='notice'>\The [src] is loaded with a [attached_cell.name]. It is [round(attached_cell.percent())]% charged.</span>"
. += span_notice("\The [src] is loaded with a [attached_cell.name]. It is [round(attached_cell.percent())]% charged.")
else
. += "<span class='warning'>\The [src] does not appear to have a power source installed.</span>"
. += span_warning("\The [src] does not appear to have a power source installed.")
/obj/item/ammo_magazine/smart/update_icon()
if(attached_cell)
@@ -66,7 +66,7 @@
// Emagging lets you remove bullets from your bullet-making magazine
/obj/item/ammo_magazine/smart/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
to_chat(user, "<span class='notice'>You overload \the [src]'s security measures causing widespread destabilisation. It is likely you could empty \the [src] now.</span>")
to_chat(user, span_notice("You overload \the [src]'s security measures causing widespread destabilisation. It is likely you could empty \the [src] now."))
emagged = TRUE
can_remove_ammo = TRUE
return TRUE
@@ -75,7 +75,7 @@
/obj/item/ammo_magazine/smart/attackby(var/obj/item/I as obj, mob/user)
if(istype(I, /obj/item/cell/device))
if(attached_cell)
to_chat(user, "<span class='notice'>\The [src] already has a [attached_cell.name] attached.</span>")
to_chat(user, span_notice("\The [src] already has a [attached_cell.name] attached."))
return
else
to_chat(user, "You begin inserting \the [I] into \the [src].")
@@ -182,7 +182,7 @@
msg += "ammunition type."
if(change)
to_chat(user, "<span class='notice'>[msg]</span>")
to_chat(user, span_notice("[msg]"))
caliber = new_caliber
ammo_type = new_ammo_type
set_production_cost(ammo_type) // Update our cost
@@ -214,13 +214,13 @@
return
if(LAZYLEN(stored_ammo))
to_chat(usr, "<span class='warning'>You can't reset \the [src] unless it's empty!</span>")
to_chat(usr, span_warning("You can't reset \the [src] unless it's empty!"))
return
to_chat(usr, "<span class='notice'>You clear \the [src]'s data buffers.</span>")
to_chat(usr, span_notice("You clear \the [src]'s data buffers."))
caliber = null
ammo_type = null
production_cost = null
return
return

View File

@@ -27,10 +27,10 @@
. = ..()
spawn()
if(get_dist(get_turf(user),get_turf(src)) <= 1)
to_chat(user, "<span class='notice'>You begin inspecting \the [src].</span>")
to_chat(user, span_notice("You begin inspecting \the [src]."))
if(do_after(user, 5 SECONDS))
to_chat(user, "<span class='notice'>\The [src] can possibly be restored with:</span>")
to_chat(user, span_notice("\The [src] can possibly be restored with:"))
for(var/obj/item/res as anything in material_needs)
if(material_needs[res] > 0)
var/res_name = ""
@@ -43,7 +43,7 @@
res_name = "[mat.use_name] [mat.sheet_singular_name]"
else
res_name = initial(res.name)
to_chat(user, "<span class='notice'>- x [material_needs[res]] [res_name]</span>")
to_chat(user, span_notice("- x [material_needs[res]] [res_name]"))
/obj/item/broken_gun/proc/setup_gun(var/obj/item/gun/path)
if(ispath(path))
@@ -105,7 +105,7 @@
if(S.can_use(material_needs[path]))
return TRUE
else
to_chat(user, "<span class='notice'>You do not have enough [path] to continue repairs.</span>")
to_chat(user, span_notice("You do not have enough [path] to continue repairs."))
else
return TRUE
@@ -120,11 +120,11 @@
if(S.can_use(material_needs[path]))
S.use(material_needs[path])
material_needs[path] = 0
to_chat(user, "<span class='notice'>You repair some damage on \the [src] with \the [S].</span>")
to_chat(user, span_notice("You repair some damage on \the [src] with \the [S]."))
else
material_needs[path] = max(0, material_needs[path] - 1)
user.drop_from_inventory(I)
to_chat(user, "<span class='notice'>You repair some damage on \the [src] with \the [I].</span>")
to_chat(user, span_notice("You repair some damage on \the [src] with \the [I]."))
qdel(I)
check_complete_repair(user)
@@ -141,5 +141,5 @@
if(fully_repaired)
my_guntype = new my_guntype(get_turf(src))
my_guntype.name = "[pick("salvaged", "repaired", "old")] [initial(my_guntype.name)]"
to_chat(user, "<span class='notice'>You finish your repairs on \the [my_guntype].</span>")
to_chat(user, span_notice("You finish your repairs on \the [my_guntype]."))
qdel(src)

View File

@@ -18,17 +18,17 @@
if(!attached_lock.controller_lock)
if(!attached_lock.stored_dna && !(M.dna in attached_lock.stored_dna))
to_chat(M, "<span class='warning'>\The [src] buzzes and displays a symbol showing the gun already contains your DNA.</span>")
to_chat(M, span_warning("\The [src] buzzes and displays a symbol showing the gun already contains your DNA."))
return 0
else
attached_lock.stored_dna += M.dna
to_chat(M, "<span class='notice'>\The [src] pings and a needle flicks out from the grip, taking a DNA sample from you.</span>")
to_chat(M, span_notice("\The [src] pings and a needle flicks out from the grip, taking a DNA sample from you."))
if(!attached_lock.controller_dna)
attached_lock.controller_dna = M.dna
to_chat(M, "<span class='notice'>\The [src] processes the dna sample and pings, acknowledging you as the primary controller.</span>")
to_chat(M, span_notice("\The [src] processes the dna sample and pings, acknowledging you as the primary controller."))
return 1
else
to_chat(M, "<span class='warning'>\The [src] buzzes and displays a locked symbol. It is not allowing DNA samples at this time.</span>")
to_chat(M, span_warning("\The [src] buzzes and displays a locked symbol. It is not allowing DNA samples at this time."))
return 0
/obj/item/gun/verb/give_dna()
@@ -41,19 +41,19 @@
var/mob/living/M = user
if(!attached_lock.controller_lock)
if(!authorized_user(M))
to_chat(M, "<span class='warning'>\The [src] buzzes and displays an invalid user symbol.</span>")
to_chat(M, span_warning("\The [src] buzzes and displays an invalid user symbol."))
return 0
else
attached_lock.stored_dna -= user.dna
to_chat(M, "<span class='notice'>\The [src] beeps and clears the DNA it has stored.</span>")
to_chat(M, span_notice("\The [src] beeps and clears the DNA it has stored."))
if(M.dna == attached_lock.controller_dna)
attached_lock.controller_dna = null
to_chat(M, "<span class='notice'>\The [src] beeps and removes you as the primary controller.</span>")
to_chat(M, span_notice("\The [src] beeps and removes you as the primary controller."))
if(attached_lock.controller_lock)
attached_lock.controller_lock = 0
return 1
else
to_chat(M, "<span class='warning'>\The [src] buzzes and displays a locked symbol. It is not allowing DNA modifcation at this time.</span>")
to_chat(M, span_warning("\The [src] buzzes and displays a locked symbol. It is not allowing DNA modifcation at this time."))
return 0
/obj/item/gun/verb/remove_dna()
@@ -67,12 +67,12 @@
if(authorized_user(M) && user.dna == attached_lock.controller_dna)
if(!attached_lock.controller_lock)
attached_lock.controller_lock = 1
to_chat(M, "<span class='notice'>\The [src] beeps and displays a locked symbol, informing you it will no longer allow DNA samples.</span>")
to_chat(M, span_notice("\The [src] beeps and displays a locked symbol, informing you it will no longer allow DNA samples."))
else
attached_lock.controller_lock = 0
to_chat(M, "<span class='notice'>\The [src] beeps and displays an unlocked symbol, informing you it will now allow DNA samples.</span>")
to_chat(M, span_notice("\The [src] beeps and displays an unlocked symbol, informing you it will now allow DNA samples."))
else
to_chat(M, "<span class='warning'>\The [src] buzzes and displays an invalid user symbol.</span>")
to_chat(M, span_warning("\The [src] buzzes and displays an invalid user symbol."))
/obj/item/gun/verb/allow_dna()
set name = "Toggle DNA Samples Allowance"
@@ -85,4 +85,4 @@
return 1
if(!(user.dna in attached_lock.stored_dna))
return 0
return 1
return 1

View File

@@ -185,12 +185,12 @@
if(dna_lock && attached_lock.stored_dna)
if(!authorized_user(user))
if(attached_lock.safety_level == 0)
to_chat(M, "<span class='danger'>\The [src] buzzes in dissapointment and displays an invalid DNA symbol.</span>")
to_chat(M, span_danger("\The [src] buzzes in dissapointment and displays an invalid DNA symbol."))
return 0
if(!attached_lock.exploding)
if(attached_lock.safety_level == 1)
to_chat(M, "<span class='danger'>\The [src] hisses in dissapointment.</span>")
visible_message("<span class='game say'><span class='name'>\The [src]</span> announces, \"Self-destruct occurring in ten seconds.\"</span>", "<span class='game say'><span class='name'>\The [src]</span> announces, \"Self-destruct occurring in ten seconds.\"</span>")
to_chat(M, span_danger("\The [src] hisses in dissapointment."))
visible_message(span_game(span_say("<span class='name'>\The [src]</span> announces, \"Self-destruct occurring in ten seconds.\"")), span_game(span_say("<span class='name'>\The [src]</span> announces, \"Self-destruct occurring in ten seconds.\"")))
attached_lock.exploding = 1
spawn(100)
explosion(src, 0, 0, 3, 4)
@@ -198,7 +198,7 @@
qdel(src)
return 0
if(HULK in M.mutations)
to_chat(M, "<span class='danger'>Your fingers are much too large for the trigger guard!</span>")
to_chat(M, span_danger("Your fingers are much too large for the trigger guard!"))
return 0
if((CLUMSY in M.mutations) && prob(40)) //Clumsy handling
var/obj/P = consume_next_projectile()
@@ -207,8 +207,8 @@
handle_post_fire(user, user)
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
user.visible_message(
"<span class='danger'>\The [user] shoots [TU.himself] in the foot with \the [src]!</span>",
"<span class='danger'>You shoot yourself in the foot with \the [src]!</span>"
span_danger("\The [user] shoots [TU.himself] in the foot with \the [src]!"),
span_danger("You shoot yourself in the foot with \the [src]!")
)
M.drop_item()
else
@@ -231,7 +231,7 @@
return
if(user && user.a_intent == I_HELP && user.client?.prefs?.read_preference(/datum/preference/toggle/safefiring)) //regardless of what happens, refuse to shoot if help intent is on
to_chat(user, "<span class='warning'>You refrain from firing your [src] as your intent is set to help.</span>")
to_chat(user, span_warning("You refrain from firing your [src] as your intent is set to help."))
return
else
@@ -246,12 +246,12 @@
if(auto_target)//If they already have one then update it
auto_target.loc = get_turf(A)
auto_target.delay_del = 1//And reset the del so its like they got a new one and doesnt instantly vanish
to_chat(user, "<span class='notice'>You ready \the [src]! Click and drag the target around to shoot.</span>")
to_chat(user, span_notice("You ready \the [src]! Click and drag the target around to shoot."))
else//Otherwise just make a new one
auto_target = new/obj/screen/auto_target(get_turf(A), src)
visible_message("<span class='danger'>\The [user] readies the [src]!</span>")
visible_message(span_danger("\The [user] readies the [src]!"))
playsound(src, 'sound/weapons/TargetOn.ogg', 50, 1)
to_chat(user, "<span class='notice'>You ready \the [src]! Click and drag the target around to shoot.</span>")
to_chat(user, span_notice("You ready \the [src]! Click and drag the target around to shoot."))
return
Fire(A,user,params) //Otherwise, fire normally.
*/
@@ -271,9 +271,9 @@
/obj/item/gun/attackby(var/obj/item/A as obj, mob/user as mob)
if(istype(A, /obj/item/dnalockingchip))
if(dna_lock)
to_chat(user, "<span class='notice'>\The [src] already has a [attached_lock].</span>")
to_chat(user, span_notice("\The [src] already has a [attached_lock]."))
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_lock = A
@@ -285,10 +285,10 @@
if(A.has_tool_quality(TOOL_SCREWDRIVER))
if(dna_lock && attached_lock && !attached_lock.controller_lock)
to_chat(user, "<span class='notice'>You begin removing \the [attached_lock] from \the [src].</span>")
to_chat(user, span_notice("You begin removing \the [attached_lock] from \the [src]."))
playsound(src, A.usesound, 50, 1)
if(do_after(user, 25 * A.toolspeed))
to_chat(user, "<span class='notice'>You remove \the [attached_lock] from \the [src].</span>")
to_chat(user, span_notice("You remove \the [attached_lock] from \the [src]."))
user.put_in_hands(attached_lock)
dna_lock = 0
attached_lock = null
@@ -296,12 +296,12 @@
verbs -= /obj/item/gun/verb/give_dna
verbs -= /obj/item/gun/verb/allow_dna
else
to_chat(user, "<span class='warning'>\The [src] is not accepting modifications at this time.</span>")
to_chat(user, span_warning("\The [src] is not accepting modifications at this time."))
..()
/obj/item/gun/emag_act(var/remaining_charges, var/mob/user)
if(dna_lock && attached_lock.controller_lock)
to_chat(user, "<span class='notice'>You short circuit the internal locking mechanisms of \the [src]!</span>")
to_chat(user, span_notice("You short circuit the internal locking mechanisms of \the [src]!"))
attached_lock.controller_dna = null
attached_lock.controller_lock = 0
attached_lock.stored_dna = list()
@@ -354,7 +354,7 @@
if(world.time < next_fire_time)
if (world.time % 3) //to prevent spam
to_chat(user, "<span class='warning'>[src] is not ready to fire again!</span>")
to_chat(user, span_warning("[src] is not ready to fire again!"))
return
var/shoot_time = (burst - 1)* burst_delay
@@ -424,7 +424,7 @@
// We do this down here, so we don't get the message if we fire an empty gun.
if(user.item_is_in_hands(src) && user.hands_are_full())
if(one_handed_penalty >= 20)
to_chat(user, "<span class='warning'>You struggle to keep \the [src] pointed at the correct position with just one hand!</span>")
to_chat(user, span_warning("You struggle to keep \the [src] pointed at the correct position with just one hand!"))
//update timing
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
@@ -450,9 +450,9 @@
nerd.Weaken(1*recoil_mode)
if(!istype(src,/obj/item/gun/energy))
nerd.adjustBruteLoss((5-mysize*4)*recoil_mode)
to_chat(nerd, "<span class='danger'>You're so tiny that you drop the gun and hurt yourself from the recoil!</span>")
to_chat(nerd, span_danger("You're so tiny that you drop the gun and hurt yourself from the recoil!"))
else
to_chat(nerd, "<span class='danger'>You're so tiny that the pull of the trigger causes you to drop the gun!</span>")
to_chat(nerd, span_danger("You're so tiny that the pull of the trigger causes you to drop the gun!"))
//YAWNEDIT: Knockdown code end
@@ -548,7 +548,7 @@
//called if there was no projectile to shoot
/obj/item/gun/proc/handle_click_empty(mob/user)
if (user)
user.visible_message("*click click*", "<span class='danger'>*click*</span>")
user.visible_message("*click click*", span_danger("*click*"))
user.hud_used.update_ammo_hud(user, src)
else
src.visible_message("*click click*")
@@ -558,18 +558,18 @@
// Moved from handle_post_fire() because if using a laser, the message for when someone got shot would show up before the firing message.
/obj/item/gun/proc/handle_firing_text(mob/user, atom/target, pointblank = FALSE, reflex = FALSE)
if(silenced)
to_chat(user, "<span class='warning'>You fire \the [src][pointblank ? " point blank at \the [target]":""][reflex ? " by reflex":""]</span>")
to_chat(user, span_warning("You fire \the [src][pointblank ? " point blank at \the [target]":""][reflex ? " by reflex":""]"))
for(var/mob/living/L in oview(2,user))
if(L.stat)
continue
if(L.blinded)
to_chat(L, "You hear a [fire_sound_text]!")
continue
to_chat(L, "<span class='danger'>\The [user] fires \the [src][pointblank ? " point blank at \the [target]":""][reflex ? " by reflex":""]!</span>")
to_chat(L, span_danger("\The [user] fires \the [src][pointblank ? " point blank at \the [target]":""][reflex ? " by reflex":""]!"))
else
user.visible_message(
"<span class='danger'>\The [user] fires \the [src][pointblank ? " point blank at \the [target]":""][reflex ? " by reflex":""]!</span>",
"<span class='warning'>You fire \the [src][pointblank ? " point blank at \the [target]":""][reflex ? " by reflex":""]!</span>",
span_danger("\The [user] fires \the [src][pointblank ? " point blank at \the [target]":""][reflex ? " by reflex":""]!"),
span_warning("You fire \the [src][pointblank ? " point blank at \the [target]":""][reflex ? " by reflex":""]!"),
"You hear a [fire_sound_text]!"
)
@@ -594,24 +594,24 @@
switch(one_handed_penalty)
if(1 to 15)
if(prob(50)) //don't need to tell them every single time
to_chat(user, "<span class='warning'>Your aim wavers slightly.</span>")
to_chat(user, span_warning("Your aim wavers slightly."))
if(16 to 30)
to_chat(user, "<span class='warning'>Your aim wavers as you fire \the [src] with just one hand.</span>")
to_chat(user, span_warning("Your aim wavers as you fire \the [src] with just one hand."))
if(31 to 45)
to_chat(user, "<span class='warning'>You have trouble keeping \the [src] on target with just one hand.</span>")
to_chat(user, span_warning("You have trouble keeping \the [src] on target with just one hand."))
if(46 to INFINITY)
to_chat(user, "<span class='warning'>You struggle to keep \the [src] on target with just one hand!</span>")
to_chat(user, span_warning("You struggle to keep \the [src] on target with just one hand!"))
else if(!user.can_wield_item(src))
switch(one_handed_penalty)
if(1 to 15)
if(prob(50)) //don't need to tell them every single time
to_chat(user, "<span class='warning'>Your aim wavers slightly.</span>")
to_chat(user, span_warning("Your aim wavers slightly."))
if(16 to 30)
to_chat(user, "<span class='warning'>Your aim wavers as you try to hold \the [src] steady.</span>")
to_chat(user, span_warning("Your aim wavers as you try to hold \the [src] steady."))
if(31 to 45)
to_chat(user, "<span class='warning'>You have trouble holding \the [src] steady.</span>")
to_chat(user, span_warning("You have trouble holding \the [src] steady."))
if(46 to INFINITY)
to_chat(user, "<span class='warning'>You struggle to hold \the [src] steady!</span>")
to_chat(user, span_warning("You struggle to hold \the [src] steady!"))
if(recoil)
spawn()
@@ -788,7 +788,7 @@
sel_mode = 1
var/datum/firemode/new_mode = firemodes[sel_mode]
new_mode.apply_to(src)
to_chat(user, "<span class='notice'>\The [src] is now set to [new_mode.name].</span>")
to_chat(user, span_notice("\The [src] is now set to [new_mode.name]."))
user.hud_used.update_ammo_hud(user, src)
return new_mode

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 ..()

View File

@@ -581,14 +581,14 @@
if(G.affecting.stat == DEAD)
var/shield_chance = min(80, (30 * (M.mob_size / 10))) //Small mobs have a harder time keeping a dead body as a shield than a human-sized one. Unathi would have an easier job, if they are made to be SIZE_LARGE in the future. -Mech
if(prob(shield_chance))
visible_message("<span class='danger'>\The [M] uses [G.affecting] as a shield!</span>")
visible_message(span_danger("\The [M] uses [G.affecting] as a shield!"))
if(bump_targets)
if(Bump(G.affecting))
return
else
visible_message("<span class='danger'>\The [M] tries to use [G.affecting] as a shield, but fails!</span>")
visible_message(span_danger("\The [M] tries to use [G.affecting] as a shield, but fails!"))
else
visible_message("<span class='danger'>\The [M] uses [G.affecting] as a shield!</span>")
visible_message(span_danger("\The [M] uses [G.affecting] as a shield!"))
if(bump_targets)
if(Bump(G.affecting))
return //If Bump() returns 0 (keep going) then we continue on to attack M.

View File

@@ -184,7 +184,7 @@
attack_mob(L)
spawn()
T.visible_message("<span class='warning'>\The [src] covers \the [T] in a corrosive paste!</span>")
T.visible_message(span_warning("\The [src] covers \the [T] in a corrosive paste!"))
for(var/turf/simulated/floor/F in view(2, T))
spawn()
var/obj/effect/effect/water/splash = new(T)

View File

@@ -256,11 +256,11 @@
var/obj/item/clothing/suit/redtag/S = M.wear_suit
if (S.lasertag_health <= 1)
M.Weaken(5)
to_chat(M,"<span class='warning'>You have been defeated!</span>")
to_chat(M,span_warning("You have been defeated!"))
S.lasertag_health = initial(S.lasertag_health)
else
S.lasertag_health--
to_chat(M,"<span class='warning'>Danger! You have [num2text(S.lasertag_health)] hits remaining!</span>")
to_chat(M,span_warning("Danger! You have [num2text(S.lasertag_health)] hits remaining!"))
return 1
/obj/item/projectile/beam/lasertag/red
@@ -291,11 +291,11 @@
var/obj/item/clothing/suit/bluetag/S = M.wear_suit
if(S.lasertag_health <= 1)
M.Weaken(5)
to_chat(M,"<span class='warning'>You have been defeated!</span>")
to_chat(M,span_warning("You have been defeated!"))
S.lasertag_health = initial(S.lasertag_health)
else
S.lasertag_health--
to_chat(M,"<span class='warning'>Danger! You have [num2text(S.lasertag_health)] hits remaining!</span>")
to_chat(M,span_warning("Danger! You have [num2text(S.lasertag_health)] hits remaining!"))
return 1
/obj/item/projectile/beam/lasertag/omni//A laser tag bolt that stuns EVERYONE
@@ -561,7 +561,7 @@
pulse.anchored = TRUE
spawn(20)
qdel(pulse)
to_chat(target, "<span class='notice'>As the beam strikes you, your injuries close up!</span>")
to_chat(target, span_notice("As the beam strikes you, your injuries close up!"))
M.adjustBruteLoss(-15)
M.adjustFireLoss(-15)
M.adjustToxLoss(-5)

View File

@@ -66,7 +66,7 @@
if(prob(chance))
if(A.opacity)
//display a message so that people on the other side aren't so confused
A.visible_message("<span class='warning'>\The [src] pierces through \the [A]!</span>")
A.visible_message(span_warning("\The [src] pierces through \the [A]!"))
return 1
return 0

View File

@@ -92,10 +92,10 @@
else
new_mob.key = M.key
to_chat(new_mob, "<span class='warning'>Your form morphs into that of \a [lowertext(randomize)].</span>")
to_chat(new_mob, span_warning("Your form morphs into that of \a [lowertext(randomize)]."))
qdel(M)
return
else
to_chat(M, "<span class='warning'>Your form morphs into that of \a [lowertext(randomize)].</span>")
to_chat(M, span_warning("Your form morphs into that of \a [lowertext(randomize)]."))
return

View File

@@ -46,7 +46,7 @@
//snap pop
playsound(src, 'sound/effects/snap.ogg', 50, 1)
src.visible_message("<span class='warning'>\The [src] explodes in a bright flash!</span>")
src.visible_message(span_warning("\The [src] explodes in a bright flash!"))
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(2, 1, T)
@@ -243,7 +243,7 @@
/obj/item/projectile/energy/plasmastun/proc/bang(var/mob/living/carbon/M)
to_chat(M, "<span class='danger'>You hear a loud roar.</span>")
to_chat(M, span_danger("You hear a loud roar."))
playsound(src, 'sound/effects/bang.ogg', 50, 1)
var/ear_safety = 0
ear_safety = M.get_ear_protection()
@@ -258,14 +258,14 @@
M.ear_deaf = max(M.ear_deaf,15)
M.deaf_loop.start() // CHOMPStation Add: Ear Ringing/Deafness
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 (prob(M.ear_damage - 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
M.deaf_loop.start() // CHOMPStation Add: Ear Ringing/Deafness
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!"))
M.update_icons() //Just to apply matrix transform for laying asap
/obj/item/projectile/energy/plasmastun/on_hit(var/atom/target)

View File

@@ -90,7 +90,7 @@
turfs += T
if(turfs.len)
var/turf/target = pick(turfs)
visible_message("<span class='danger'>[H]'s [W] goes off due to \the [src]!</span>")
visible_message(span_danger("[H]'s [W] goes off due to \the [src]!"))
return W.afterattack(target,H)
if(!(H.species.flags & NO_SLIP) && prob(50))
@@ -98,9 +98,9 @@
H.apply_effect(3, WEAKEN, armor_check)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(armor_check < 60)
visible_message("<span class='danger'>\The [src] has pushed [H]!</span>")
visible_message(span_danger("\The [src] has pushed [H]!"))
else
visible_message("<span class='warning'>\The [src] attempted to push [H]!</span>")
visible_message(span_warning("\The [src] attempted to push [H]!"))
return
else
@@ -111,7 +111,7 @@
for(var/obj/item/I in holding)
if(I)
H.drop_from_inventory(I)
visible_message("<span class='danger'>\The [src] has disarmed [H]!</span>")
visible_message(span_danger("\The [src] has disarmed [H]!"))
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
@@ -151,7 +151,7 @@
spawn(2)
playsound(target, crack_sound, 40, 1)
visible_message("<span class='notice'>\The [T] is snatched by \the [src]!</span>")
visible_message(span_notice("\The [T] is snatched by \the [src]!"))
T.throw_at(get_turf(firer), 7, 1, src)
success = TRUE
else if(isliving(target) && !done_mob_unique)
@@ -163,12 +163,12 @@
if(message == "slaps")
spawn(1)
playsound(src, 'sound/effects/snap.ogg', 50, 1)
visible_message("<span class='notice'>\The [src] [message] [target].</span>")
visible_message(span_notice("\The [src] [message] [target]."))
done_mob_unique = TRUE
success = TRUE
if(I_HURT)
if(prob(10) && istype(L, /mob/living/carbon/human))
to_chat(L, "<span class='warning'>\The [src] rips at your hands!</span>")
to_chat(L, span_warning("\The [src] rips at your hands!"))
ranged_disarm(L)
success = TRUE
done_mob_unique = TRUE
@@ -176,7 +176,7 @@
if(prob(disarm_chance) && istype(L, /mob/living/carbon/human))
ranged_disarm(L)
else
L.visible_message("<span class='danger'>\The [src] sends \the [L] stumbling backwards.</span>")
L.visible_message(span_danger("\The [src] sends \the [L] stumbling backwards."))
L.throw_at(get_turf(get_step(L,get_dir(firer,L))), 1, 1, src)
done_mob_unique = TRUE
success = TRUE
@@ -184,7 +184,7 @@
var/turf/STurf = get_turf(L)
spawn(2)
playsound(STurf, crack_sound, 60, 1)
L.visible_message("<span class='critical'>\The [src] rips [L] towards \the [firer]!</span>")
L.visible_message(span_critical("\The [src] rips [L] towards \the [firer]!"))
L.throw_at(get_turf(get_step(firer,get_dir(firer,L))), 6, 1, src)
done_mob_unique = TRUE
success = TRUE

View File

@@ -118,10 +118,10 @@
/obj/item/projectile/bullet/magnetic/fuelrod/on_impact(var/atom/A) //Future-proofing, again. In the event new fuel rods are introduced, and have special effects for when they stop flying.
if(src.loc)
if(detonate_travel && detonate_mob)
visible_message("<span class='warning'>\The [src] shatters in a violent explosion!</span>")
visible_message(span_warning("\The [src] shatters in a violent explosion!"))
explosion(src.loc, 1, 1, 3, 4)
else if(detonate_travel)
visible_message("<span class='warning'>\The [src] explodes in a shower of embers!</span>")
visible_message(span_warning("\The [src] explodes in a shower of embers!"))
explosion(src.loc, -1, 1, 2, 3)
..(A)
@@ -164,7 +164,7 @@
/obj/item/projectile/bullet/magnetic/fuelrod/supermatter/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null) //You cannot touch the supermatter without disentigrating. Assumedly, this is true for condensed rods of it flying at relativistic speeds.
if(istype(target,/turf/simulated/wall) || istype(target,/mob/living))
target.visible_message("<span class='danger'>The [src] burns a perfect hole through \the [target] with a blinding flash!</span>")
target.visible_message(span_danger("The [src] burns a perfect hole through \the [target] with a blinding flash!"))
playsound(target, 'sound/effects/teleport.ogg', 40, 0)
return ..(target, blocked, def_zone)
@@ -201,4 +201,4 @@
explosion(A, -1, -1, 1, 3)
return ..()
else
..()
..()

View File

@@ -279,7 +279,7 @@
if(isturf(target.loc))
var/obj/effect/spider/stickyweb/W = locate() in get_turf(target)
if(!W && prob(75))
visible_message("<span class='danger'>\The [src] splatters a layer of web on \the [target]!</span>")
visible_message(span_danger("\The [src] splatters a layer of web on \the [target]!"))
new /obj/effect/spider/stickyweb(target.loc)
..()
@@ -339,17 +339,17 @@
target_limb.dislocate()
if(armor_special > 1)
target.visible_message("<span class='cult'>\The [src] slams into \the [target]'s [target_limb], reverberating loudly!</span>")
target.visible_message(span_cult("\The [src] slams into \the [target]'s [target_limb], reverberating loudly!"))
else if(armor_special)
target.visible_message("<span class='cult'>\The [src] slams into \the [target]'s [target_limb] with a low rumble!</span>")
target.visible_message(span_cult("\The [src] slams into \the [target]'s [target_limb] with a low rumble!"))
..()
/obj/item/projectile/beam/tungsten/on_impact(var/atom/A)
if(istype(A,/turf/simulated/shuttle/wall) || istype(A,/turf/simulated/wall) || (istype(A,/turf/simulated/mineral) && A.density) || istype(A,/obj/mecha) || istype(A,/obj/machinery/door))
var/blast_dir = src.dir
A.visible_message("<span class='danger'>\The [A] begins to glow!</span>")
A.visible_message(span_danger("\The [A] begins to glow!"))
spawn(2 SECONDS)
var/blastloc = get_step(A, blast_dir)
if(blastloc)

View File

@@ -12,7 +12,7 @@
M.aiming = new(src)
M.aiming.toggle_active()
else
to_chat(src, "<span class='warning'>This verb may only be used by living mobs, sorry.</span>")
to_chat(src, span_warning("This verb may only be used by living mobs, sorry."))
return
/mob/living/proc/stop_aiming(var/obj/item/thing, var/no_message = 0)

View File

@@ -110,24 +110,24 @@
if(!locked && lock_time <= world.time)
locked = 1
to_chat(owner, "<span class ='notice'>You are locked onto your target.</span>")
to_chat(aiming_at, "<span class='danger'>The gun is trained on you!</span>")
to_chat(aiming_at, span_danger("The gun is trained on you!"))
update_icon()
var/cancel_aim = 1
var/mob/living/carbon/human/H = owner
if(!(aiming_with in owner) || (istype(H) && !H.item_is_in_hands(aiming_with)))
to_chat(owner, "<span class='warning'>You must keep hold of your weapon!</span>")
to_chat(owner, span_warning("You must keep hold of your weapon!"))
else if(owner.eye_blind)
to_chat(owner, "<span class='warning'>You are blind and cannot see your target!</span>")
to_chat(owner, span_warning("You are blind and cannot see your target!"))
else if(!aiming_at || !istype(aiming_at.loc, /turf))
to_chat(owner, "<span class='warning'>You have lost sight of your target!</span>")
to_chat(owner, span_warning("You have lost sight of your target!"))
else if(owner.incapacitated() || owner.lying || owner.restrained())
to_chat(owner, "<span class='warning'>You must be conscious and standing to keep track of your target!</span>")
to_chat(owner, span_warning("You must be conscious and standing to keep track of your target!"))
else if(aiming_at.alpha <= 50 || (aiming_at.invisibility > owner.see_invisible))
to_chat(owner, "<span class='warning'>Your target has become invisible!</span>")
to_chat(owner, span_warning("Your target has become invisible!"))
else if(get_dist(get_turf(owner), get_turf(aiming_at)) > 7) // !(owner in viewers(aiming_at, 7))
to_chat(owner, "<span class='warning'>Your target is too far away to track!</span>")
to_chat(owner, span_warning("Your target is too far away to track!"))
else
cancel_aim = 0
@@ -147,31 +147,31 @@
return
if(owner.incapacitated())
to_chat(owner, "<span class='warning'>You cannot aim a gun in your current state.</span>")
to_chat(owner, span_warning("You cannot aim a gun in your current state."))
return
if(owner.lying)
to_chat(owner, "<span class='warning'>You cannot aim a gun while prone.</span>")
to_chat(owner, span_warning("You cannot aim a gun while prone."))
return
if(owner.restrained())
to_chat(owner, "<span class='warning'>You cannot aim a gun while handcuffed.</span>")
to_chat(owner, span_warning("You cannot aim a gun while handcuffed."))
return
if(target.alpha <= 50)
to_chat(owner, "<span class='warning'>You cannot aim at something you cannot see.</span>")
to_chat(owner, span_warning("You cannot aim at something you cannot see."))
return
if(aiming_at)
if(aiming_at == target)
return
aiming_at.aimed -= src
owner.visible_message("<span class='danger'>\The [owner] turns \the [thing] on \the [target]!</span>")
owner.visible_message(span_danger("\The [owner] turns \the [thing] on \the [target]!"))
else
owner.visible_message("<span class='danger'>\The [owner] aims \the [thing] at \the [target]!</span>")
owner.visible_message(span_danger("\The [owner] aims \the [thing] at \the [target]!"))
log_and_message_admins("aimed \a [thing] at [key_name(target)].")
if(owner.client)
owner.client.add_gun_icons()
to_chat(target, "<span class='danger'>You now have a gun pointed at you. No sudden moves!</span>")
to_chat(target, "<span class='critical'>If you fail to comply with your assailant, you accept the consequences of your actions.</span>")
to_chat(target, span_danger("You now have a gun pointed at you. No sudden moves!"))
to_chat(target, span_critical("If you fail to comply with your assailant, you accept the consequences of your actions."))
aiming_with = thing
aiming_at = target
if(istype(aiming_with, /obj/item/gun))
@@ -204,10 +204,10 @@
if(owner.client)
if(active)
to_chat(owner, "<span class='notice'>You will now aim rather than fire.</span>")
to_chat(owner, span_notice("You will now aim rather than fire."))
owner.client.add_gun_icons()
else
to_chat(owner, "<span class='notice'>You will no longer aim rather than fire.</span>")
to_chat(owner, span_notice("You will no longer aim rather than fire."))
owner.client.remove_gun_icons()
owner.gun_setting_icon?.icon_state = "gun[active]"

View File

@@ -21,9 +21,9 @@
return
owner.setClickCooldown(5) // Spam prevention, essentially.
if(owner.a_intent == I_HELP && owner.client?.prefs?.read_preference(/datum/preference/toggle/safefiring))
to_chat(owner, "<span class='warning'>You refrain from firing \the [aiming_with] as your intent is set to help.</span>")
to_chat(owner, span_warning("You refrain from firing \the [aiming_with] as your intent is set to help."))
return
owner.visible_message("<span class='danger'>\The [owner] pulls the trigger reflexively!</span>")
owner.visible_message(span_danger("\The [owner] pulls the trigger reflexively!"))
var/obj/item/gun/G = aiming_with
if(istype(G))
G.Fire(aiming_at, owner, reflex = 1)