mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs. Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines. Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing. Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc. (Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
This commit is contained in:
@@ -70,9 +70,9 @@
|
||||
var/list/readout = list("")
|
||||
// No dividing by 0
|
||||
if(loaded_projectile.damage > 0)
|
||||
readout += "Most monkeys our legal team subjected to these rounds succumbed to their wounds after <span class='warning'>[round(100 / (loaded_projectile.damage * pellets), 0.1)]</span> discharge\s at point-blank, taking <span class='warning'>[pellets]</span> shot\s per round"
|
||||
readout += "Most monkeys our legal team subjected to these rounds succumbed to their wounds after [span_warning("[round(100 / (loaded_projectile.damage * pellets), 0.1)]")] discharge\s at point-blank, taking [span_warning("[pellets]")] shot\s per round"
|
||||
if(loaded_projectile.stamina > 0)
|
||||
readout += "[loaded_projectile.damage == 0 ? "Most Monkeys" : "More Fortunate Monkeys" ] collapsed from exhaustion after <span class='warning'>[round(100 / ((loaded_projectile.damage + loaded_projectile.stamina) * pellets), 0.1)]</span> of these rounds"
|
||||
readout += "[loaded_projectile.damage == 0 ? "Most Monkeys" : "More Fortunate Monkeys" ] collapsed from exhaustion after [span_warning("[round(100 / ((loaded_projectile.damage + loaded_projectile.stamina) * pellets), 0.1)]")] of these rounds"
|
||||
if(loaded_projectile.damage == 0 && loaded_projectile.stamina == 0)
|
||||
return "Our legal team has determined the offensive nature of these rounds to be esoteric"
|
||||
return readout.Join("\n") // Sending over a single string, rather than the whole list
|
||||
@@ -120,9 +120,9 @@
|
||||
continue
|
||||
if (boolets > 0)
|
||||
box.update_appearance()
|
||||
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!"))
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
modified = TRUE
|
||||
FD.modified = TRUE
|
||||
FD.damage_type = BRUTE
|
||||
to_chat(user, "<span class='notice'>You pop the safety cap off [src].</span>")
|
||||
to_chat(user, span_notice("You pop the safety cap off [src]."))
|
||||
update_appearance()
|
||||
else if (istype(A, /obj/item/pen))
|
||||
if(modified)
|
||||
@@ -40,11 +40,11 @@
|
||||
FD.pen = A
|
||||
FD.damage = 5
|
||||
FD.nodamage = FALSE
|
||||
to_chat(user, "<span class='notice'>You insert [A] into [src].</span>")
|
||||
to_chat(user, span_notice("You insert [A] into [src]."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There's already something in [src].</span>")
|
||||
to_chat(user, span_warning("There's already something in [src]."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The safety cap prevents you from inserting [A] into [src].</span>")
|
||||
to_chat(user, span_warning("The safety cap prevents you from inserting [A] into [src]."))
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
FD.damage = initial(FD.damage)
|
||||
FD.nodamage = initial(FD.nodamage)
|
||||
user.put_in_hands(FD.pen)
|
||||
to_chat(user, "<span class='notice'>You remove [FD.pen] from [src].</span>")
|
||||
to_chat(user, span_notice("You remove [FD.pen] from [src]."))
|
||||
FD.pen = null
|
||||
|
||||
/obj/item/ammo_casing/caseless/foam_dart/riot
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
if(num_loaded)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>")
|
||||
to_chat(user, span_notice("You load [num_loaded] shell\s into \the [src]!"))
|
||||
playsound(src, 'sound/weapons/gun/general/mag_bullet_insert.ogg', 60, TRUE)
|
||||
update_ammo_count()
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
if(!user.is_holding(src) || !user.put_in_hands(A)) //incase they're using TK
|
||||
A.bounce_away(FALSE, NONE)
|
||||
playsound(src, 'sound/weapons/gun/general/mag_bullet_insert.ogg', 60, TRUE)
|
||||
to_chat(user, "<span class='notice'>You remove a round from [src]!</span>")
|
||||
to_chat(user, span_notice("You remove a round from [src]!"))
|
||||
update_ammo_count()
|
||||
|
||||
/// Updates the materials and appearance of this ammo box
|
||||
|
||||
@@ -126,21 +126,21 @@
|
||||
. = ..()
|
||||
if(pin)
|
||||
. += "It has \a [pin] installed."
|
||||
. += "<span class='info'>[pin] looks like it could be removed with some <b>tools</b>.</span>"
|
||||
. += span_info("[pin] looks like it could be removed with some <b>tools</b>.")
|
||||
else
|
||||
. += "It doesn't have a <b>firing pin</b> installed, and won't fire."
|
||||
|
||||
if(gun_light)
|
||||
. += "It has \a [gun_light] [can_flashlight ? "" : "permanently "]mounted on it."
|
||||
if(can_flashlight) //if it has a light and this is false, the light is permanent.
|
||||
. += "<span class='info'>[gun_light] looks like it can be <b>unscrewed</b> from [src].</span>"
|
||||
. += span_info("[gun_light] looks like it can be <b>unscrewed</b> from [src].")
|
||||
else if(can_flashlight)
|
||||
. += "It has a mounting point for a <b>seclite</b>."
|
||||
|
||||
if(bayonet)
|
||||
. += "It has \a [bayonet] [can_bayonet ? "" : "permanently "]affixed to it."
|
||||
if(can_bayonet) //if it has a bayonet and this is false, the bayonet is permanent.
|
||||
. += "<span class='info'>[bayonet] looks like it can be <b>unscrewed</b> from [src].</span>"
|
||||
. += span_info("[bayonet] looks like it can be <b>unscrewed</b> from [src].")
|
||||
if(can_bayonet)
|
||||
. += "It has a <b>bayonet</b> lug on it."
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/proc/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
to_chat(user, "<span class='danger'>*click*</span>")
|
||||
to_chat(user, span_danger("*click*"))
|
||||
playsound(src, dry_fire_sound, 30, TRUE)
|
||||
|
||||
|
||||
@@ -173,18 +173,18 @@
|
||||
playsound(user, fire_sound, fire_sound_volume, vary_fire_sound)
|
||||
if(message)
|
||||
if(pointblank)
|
||||
user.visible_message("<span class='danger'>[user] fires [src] point blank at [pbtarget]!</span>", \
|
||||
"<span class='danger'>You fire [src] point blank at [pbtarget]!</span>", \
|
||||
"<span class='hear'>You hear a gunshot!</span>", COMBAT_MESSAGE_RANGE, pbtarget)
|
||||
to_chat(pbtarget, "<span class='userdanger'>[user] fires [src] point blank at you!</span>")
|
||||
user.visible_message(span_danger("[user] fires [src] point blank at [pbtarget]!"), \
|
||||
span_danger("You fire [src] point blank at [pbtarget]!"), \
|
||||
span_hear("You hear a gunshot!"), COMBAT_MESSAGE_RANGE, pbtarget)
|
||||
to_chat(pbtarget, span_userdanger("[user] fires [src] point blank at you!"))
|
||||
if(pb_knockback > 0 && ismob(pbtarget))
|
||||
var/mob/PBT = pbtarget
|
||||
var/atom/throw_target = get_edge_target_turf(PBT, user.dir)
|
||||
PBT.throw_at(throw_target, pb_knockback, 2)
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] fires [src]!</span>", \
|
||||
"<span class='danger'>You fire [src]!</span>", \
|
||||
"<span class='hear'>You hear a gunshot!</span>", COMBAT_MESSAGE_RANGE)
|
||||
user.visible_message(span_danger("[user] fires [src]!"), \
|
||||
span_danger("You fire [src]!"), \
|
||||
span_hear("You hear a gunshot!"), COMBAT_MESSAGE_RANGE)
|
||||
|
||||
/obj/item/gun/emp_act(severity)
|
||||
. = ..()
|
||||
@@ -194,10 +194,10 @@
|
||||
|
||||
/obj/item/gun/attack_secondary(mob/living/victim, mob/living/user, params)
|
||||
if (user.GetComponent(/datum/component/gunpoint))
|
||||
to_chat(user, "<span class='warning'>You are already holding someone up!</span>")
|
||||
to_chat(user, span_warning("You are already holding someone up!"))
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
if (user == victim)
|
||||
to_chat(user,"<span class='warning'>You can't hold yourself up!</span>")
|
||||
to_chat(user,span_warning("You can't hold yourself up!"))
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
|
||||
user.AddComponent(/datum/component/gunpoint, victim, src)
|
||||
@@ -242,7 +242,7 @@
|
||||
|
||||
var/obj/item/bodypart/other_hand = user.has_hand_for_held_index(user.get_inactive_hand_index()) //returns non-disabled inactive hands
|
||||
if(weapon_weight == WEAPON_HEAVY && (user.get_inactive_held_item() || !other_hand))
|
||||
to_chat(user, "<span class='warning'>You need two hands to fire [src]!</span>")
|
||||
to_chat(user, span_warning("You need two hands to fire [src]!"))
|
||||
return
|
||||
//DUAL (or more!) WIELDING
|
||||
var/bonus_spread = 0
|
||||
@@ -263,7 +263,7 @@
|
||||
if(clumsy_check)
|
||||
if(istype(user))
|
||||
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(40))
|
||||
to_chat(user, "<span class='userdanger'>You shoot yourself in the foot with [src]!</span>")
|
||||
to_chat(user, span_userdanger("You shoot yourself in the foot with [src]!"))
|
||||
var/shot_leg = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
process_fire(user, user, FALSE, params, shot_leg)
|
||||
SEND_SIGNAL(user, COMSIG_MOB_CLUMSY_SHOOT_FOOT)
|
||||
@@ -283,7 +283,7 @@
|
||||
pin.auth_fail(user)
|
||||
return FALSE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src]'s trigger is locked. This weapon doesn't have a firing pin installed!</span>")
|
||||
to_chat(user, span_warning("[src]'s trigger is locked. This weapon doesn't have a firing pin installed!"))
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/proc/recharge_newshot()
|
||||
@@ -300,7 +300,7 @@
|
||||
if(chambered?.loaded_projectile)
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM)) // If the user has the pacifist trait, then they won't be able to fire [src] if the round chambered inside of [src] is lethal.
|
||||
if(chambered.harmful) // Is the bullet chambered harmful?
|
||||
to_chat(user, "<span class='warning'>[src] is lethally chambered! You don't want to risk harming anyone...</span>")
|
||||
to_chat(user, span_warning("[src] is lethally chambered! You don't want to risk harming anyone..."))
|
||||
return
|
||||
if(randomspread)
|
||||
sprd = round((rand(0, 1) - 0.5) * DUALWIELD_PENALTY_EXTRA_MULTIPLIER * (randomized_gun_spread + randomized_bonus_spread))
|
||||
@@ -358,7 +358,7 @@
|
||||
if(chambered)
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM)) // If the user has the pacifist trait, then they won't be able to fire [src] if the round chambered inside of [src] is lethal.
|
||||
if(chambered.harmful) // Is the bullet chambered harmful?
|
||||
to_chat(user, "<span class='warning'>[src] is lethally chambered! You don't want to risk harming anyone...</span>")
|
||||
to_chat(user, span_warning("[src] is lethally chambered! You don't want to risk harming anyone..."))
|
||||
return
|
||||
sprd = round((rand(0, 1) - 0.5) * DUALWIELD_PENALTY_EXTRA_MULTIPLIER * (randomized_gun_spread + randomized_bonus_spread))
|
||||
before_firing(target,user)
|
||||
@@ -413,7 +413,7 @@
|
||||
if(!gun_light)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You click [S] into place on [src].</span>")
|
||||
to_chat(user, span_notice("You click [S] into place on [src]."))
|
||||
set_gun_light(S)
|
||||
update_gunlight()
|
||||
alight = new(src)
|
||||
@@ -425,7 +425,7 @@
|
||||
return ..()
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You attach [K] to [src]'s bayonet lug.</span>")
|
||||
to_chat(user, span_notice("You attach [K] to [src]'s bayonet lug."))
|
||||
bayonet = K
|
||||
update_appearance()
|
||||
|
||||
@@ -452,13 +452,13 @@
|
||||
return remove_gun_attachment(user, I, bayonet, "unfix")
|
||||
|
||||
else if(pin && user.is_holding(src))
|
||||
user.visible_message("<span class='warning'>[user] attempts to remove [pin] from [src] with [I].</span>",
|
||||
"<span class='notice'>You attempt to remove [pin] from [src]. (It will take [DisplayTimeText(FIRING_PIN_REMOVAL_DELAY)].)</span>", null, 3)
|
||||
user.visible_message(span_warning("[user] attempts to remove [pin] from [src] with [I]."),
|
||||
span_notice("You attempt to remove [pin] from [src]. (It will take [DisplayTimeText(FIRING_PIN_REMOVAL_DELAY)].)"), null, 3)
|
||||
if(I.use_tool(src, user, FIRING_PIN_REMOVAL_DELAY, volume = 50))
|
||||
if(!pin) //check to see if the pin is still there, or we can spam messages by clicking multiple times during the tool delay
|
||||
return
|
||||
user.visible_message("<span class='notice'>[pin] is pried out of [src] by [user], destroying the pin in the process.</span>",
|
||||
"<span class='warning'>You pry [pin] out with [I], destroying the pin in the process.</span>", null, 3)
|
||||
user.visible_message(span_notice("[pin] is pried out of [src] by [user], destroying the pin in the process."),
|
||||
span_warning("You pry [pin] out with [I], destroying the pin in the process."), null, 3)
|
||||
QDEL_NULL(pin)
|
||||
return TRUE
|
||||
|
||||
@@ -469,13 +469,13 @@
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
if(pin && user.is_holding(src))
|
||||
user.visible_message("<span class='warning'>[user] attempts to remove [pin] from [src] with [I].</span>",
|
||||
"<span class='notice'>You attempt to remove [pin] from [src]. (It will take [DisplayTimeText(FIRING_PIN_REMOVAL_DELAY)].)</span>", null, 3)
|
||||
user.visible_message(span_warning("[user] attempts to remove [pin] from [src] with [I]."),
|
||||
span_notice("You attempt to remove [pin] from [src]. (It will take [DisplayTimeText(FIRING_PIN_REMOVAL_DELAY)].)"), null, 3)
|
||||
if(I.use_tool(src, user, FIRING_PIN_REMOVAL_DELAY, 5, volume = 50))
|
||||
if(!pin) //check to see if the pin is still there, or we can spam messages by clicking multiple times during the tool delay
|
||||
return
|
||||
user.visible_message("<span class='notice'>[pin] is spliced out of [src] by [user], melting part of the pin in the process.</span>",
|
||||
"<span class='warning'>You splice [pin] out of [src] with [I], melting part of the pin in the process.</span>", null, 3)
|
||||
user.visible_message(span_notice("[pin] is spliced out of [src] by [user], melting part of the pin in the process."),
|
||||
span_warning("You splice [pin] out of [src] with [I], melting part of the pin in the process."), null, 3)
|
||||
QDEL_NULL(pin)
|
||||
return TRUE
|
||||
|
||||
@@ -486,20 +486,20 @@
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
if(pin && user.is_holding(src))
|
||||
user.visible_message("<span class='warning'>[user] attempts to remove [pin] from [src] with [I].</span>",
|
||||
"<span class='notice'>You attempt to remove [pin] from [src]. (It will take [DisplayTimeText(FIRING_PIN_REMOVAL_DELAY)].)</span>", null, 3)
|
||||
user.visible_message(span_warning("[user] attempts to remove [pin] from [src] with [I]."),
|
||||
span_notice("You attempt to remove [pin] from [src]. (It will take [DisplayTimeText(FIRING_PIN_REMOVAL_DELAY)].)"), null, 3)
|
||||
if(I.use_tool(src, user, FIRING_PIN_REMOVAL_DELAY, volume = 50))
|
||||
if(!pin) //check to see if the pin is still there, or we can spam messages by clicking multiple times during the tool delay
|
||||
return
|
||||
user.visible_message("<span class='notice'>[pin] is ripped out of [src] by [user], mangling the pin in the process.</span>",
|
||||
"<span class='warning'>You rip [pin] out of [src] with [I], mangling the pin in the process.</span>", null, 3)
|
||||
user.visible_message(span_notice("[pin] is ripped out of [src] by [user], mangling the pin in the process."),
|
||||
span_warning("You rip [pin] out of [src] with [I], mangling the pin in the process."), null, 3)
|
||||
QDEL_NULL(pin)
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/proc/remove_gun_attachment(mob/living/user, obj/item/tool_item, obj/item/item_to_remove, removal_verb)
|
||||
if(tool_item)
|
||||
tool_item.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You [removal_verb ? removal_verb : "remove"] [item_to_remove] from [src].</span>")
|
||||
to_chat(user, span_notice("You [removal_verb ? removal_verb : "remove"] [item_to_remove] from [src]."))
|
||||
item_to_remove.forceMove(drop_location())
|
||||
|
||||
if(Adjacent(user) && !issilicon(user))
|
||||
@@ -569,7 +569,7 @@
|
||||
var/mob/living/carbon/human/user = usr
|
||||
gun_light.on = !gun_light.on
|
||||
gun_light.update_brightness()
|
||||
to_chat(user, "<span class='notice'>You toggle the gunlight [gun_light.on ? "on":"off"].</span>")
|
||||
to_chat(user, span_notice("You toggle the gunlight [gun_light.on ? "on":"off"]."))
|
||||
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, TRUE)
|
||||
update_gunlight()
|
||||
@@ -623,26 +623,26 @@
|
||||
return
|
||||
|
||||
if(user == target)
|
||||
target.visible_message("<span class='warning'>[user] sticks [src] in [user.p_their()] mouth, ready to pull the trigger...</span>", \
|
||||
"<span class='userdanger'>You stick [src] in your mouth, ready to pull the trigger...</span>")
|
||||
target.visible_message(span_warning("[user] sticks [src] in [user.p_their()] mouth, ready to pull the trigger..."), \
|
||||
span_userdanger("You stick [src] in your mouth, ready to pull the trigger..."))
|
||||
else
|
||||
target.visible_message("<span class='warning'>[user] points [src] at [target]'s head, ready to pull the trigger...</span>", \
|
||||
"<span class='userdanger'>[user] points [src] at your head, ready to pull the trigger...</span>")
|
||||
target.visible_message(span_warning("[user] points [src] at [target]'s head, ready to pull the trigger..."), \
|
||||
span_userdanger("[user] points [src] at your head, ready to pull the trigger..."))
|
||||
|
||||
semicd = TRUE
|
||||
|
||||
if(!bypass_timer && (!do_mob(user, target, 120) || user.zone_selected != BODY_ZONE_PRECISE_MOUTH))
|
||||
if(user)
|
||||
if(user == target)
|
||||
user.visible_message("<span class='notice'>[user] decided not to shoot.</span>")
|
||||
user.visible_message(span_notice("[user] decided not to shoot."))
|
||||
else if(target?.Adjacent(user))
|
||||
target.visible_message("<span class='notice'>[user] has decided to spare [target]</span>", "<span class='notice'>[user] has decided to spare your life!</span>")
|
||||
target.visible_message(span_notice("[user] has decided to spare [target]"), span_notice("[user] has decided to spare your life!"))
|
||||
semicd = FALSE
|
||||
return
|
||||
|
||||
semicd = FALSE
|
||||
|
||||
target.visible_message("<span class='warning'>[user] pulls the trigger!</span>", "<span class='userdanger'>[(user == target) ? "You pull" : "[user] pulls"] the trigger!</span>")
|
||||
target.visible_message(span_warning("[user] pulls the trigger!"), span_userdanger("[(user == target) ? "You pull" : "[user] pulls"] the trigger!"))
|
||||
|
||||
if(chambered?.loaded_projectile)
|
||||
chambered.loaded_projectile.damage *= 5
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
*/
|
||||
/obj/item/gun/ballistic/proc/add_notes_ballistic()
|
||||
if(magazine) // Make sure you have a magazine, thats where the warning is!
|
||||
return "\nBe especially careful around this device, as it can be loaded with <span class='warning'>[magazine.caliber]</span> rounds, which you can inspect for more information."
|
||||
return "\nBe especially careful around this device, as it can be loaded with [span_warning("[magazine.caliber]")] rounds, which you can inspect for more information."
|
||||
else
|
||||
return "\nThe warning attached to the magazine is missing..."
|
||||
|
||||
@@ -242,11 +242,11 @@
|
||||
if (bolt_type == BOLT_TYPE_OPEN)
|
||||
if(!bolt_locked) //If it's an open bolt, racking again would do nothing
|
||||
if (user)
|
||||
to_chat(user, "<span class='notice'>\The [src]'s [bolt_wording] is already cocked!</span>")
|
||||
to_chat(user, span_notice("\The [src]'s [bolt_wording] is already cocked!"))
|
||||
return
|
||||
bolt_locked = FALSE
|
||||
if (user)
|
||||
to_chat(user, "<span class='notice'>You rack the [bolt_wording] of \the [src].</span>")
|
||||
to_chat(user, span_notice("You rack the [bolt_wording] of \the [src]."))
|
||||
process_chamber(!chambered, FALSE)
|
||||
if (bolt_type == BOLT_TYPE_LOCKING && !chambered)
|
||||
bolt_locked = TRUE
|
||||
@@ -259,7 +259,7 @@
|
||||
/obj/item/gun/ballistic/proc/drop_bolt(mob/user = null)
|
||||
playsound(src, bolt_drop_sound, bolt_drop_sound_volume, FALSE)
|
||||
if (user)
|
||||
to_chat(user, "<span class='notice'>You drop the [bolt_wording] of \the [src].</span>")
|
||||
to_chat(user, span_notice("You drop the [bolt_wording] of \the [src]."))
|
||||
chamber_round()
|
||||
bolt_locked = FALSE
|
||||
update_appearance()
|
||||
@@ -267,19 +267,19 @@
|
||||
///Handles all the logic needed for magazine insertion
|
||||
/obj/item/gun/ballistic/proc/insert_magazine(mob/user, obj/item/ammo_box/magazine/AM, display_message = TRUE)
|
||||
if(!istype(AM, mag_type))
|
||||
to_chat(user, "<span class='warning'>\The [AM] doesn't seem to fit into \the [src]...</span>")
|
||||
to_chat(user, span_warning("\The [AM] doesn't seem to fit into \the [src]..."))
|
||||
return FALSE
|
||||
if(user.transferItemToLoc(AM, src))
|
||||
magazine = AM
|
||||
if (display_message)
|
||||
to_chat(user, "<span class='notice'>You load a new [magazine_wording] into \the [src].</span>")
|
||||
to_chat(user, span_notice("You load a new [magazine_wording] into \the [src]."))
|
||||
playsound(src, load_empty_sound, load_sound_volume, load_sound_vary)
|
||||
if (bolt_type == BOLT_TYPE_OPEN && !bolt_locked)
|
||||
chamber_round(TRUE)
|
||||
update_appearance()
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot seem to get \the [src] out of your hands!</span>")
|
||||
to_chat(user, span_warning("You cannot seem to get \the [src] out of your hands!"))
|
||||
return FALSE
|
||||
|
||||
///Handles all the logic of magazine ejection, if tac_load is set that magazine will be tacloaded in the place of the old eject
|
||||
@@ -294,16 +294,16 @@
|
||||
var/obj/item/ammo_box/magazine/old_mag = magazine
|
||||
if (tac_load)
|
||||
if (insert_magazine(user, tac_load, FALSE))
|
||||
to_chat(user, "<span class='notice'>You perform a tactical reload on \the [src].</span>")
|
||||
to_chat(user, span_notice("You perform a tactical reload on \the [src]."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You dropped the old [magazine_wording], but the new one doesn't fit. How embarassing.</span>")
|
||||
to_chat(user, span_warning("You dropped the old [magazine_wording], but the new one doesn't fit. How embarassing."))
|
||||
magazine = null
|
||||
else
|
||||
magazine = null
|
||||
user.put_in_hands(old_mag)
|
||||
old_mag.update_appearance()
|
||||
if (display_message)
|
||||
to_chat(user, "<span class='notice'>You pull the [magazine_wording] out of \the [src].</span>")
|
||||
to_chat(user, span_notice("You pull the [magazine_wording] out of \the [src]."))
|
||||
update_appearance()
|
||||
|
||||
/obj/item/gun/ballistic/can_shoot()
|
||||
@@ -321,7 +321,7 @@
|
||||
if (tac_reloads)
|
||||
eject_magazine(user, FALSE, AM)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There's already a [magazine_wording] in \the [src].</span>")
|
||||
to_chat(user, span_notice("There's already a [magazine_wording] in \the [src]."))
|
||||
return
|
||||
if (istype(A, /obj/item/ammo_casing) || istype(A, /obj/item/ammo_box))
|
||||
if (bolt_type == BOLT_TYPE_NO_BOLT || internal_magazine)
|
||||
@@ -330,7 +330,7 @@
|
||||
chambered = null
|
||||
var/num_loaded = magazine?.attackby(A, user, params, TRUE)
|
||||
if (num_loaded)
|
||||
to_chat(user, "<span class='notice'>You load [num_loaded] [cartridge_wording]\s into \the [src].</span>")
|
||||
to_chat(user, span_notice("You load [num_loaded] [cartridge_wording]\s into \the [src]."))
|
||||
playsound(src, load_sound, load_sound_volume, load_sound_vary)
|
||||
if (chambered == null && bolt_type == BOLT_TYPE_NO_BOLT)
|
||||
chamber_round()
|
||||
@@ -340,16 +340,16 @@
|
||||
if(istype(A, /obj/item/suppressor))
|
||||
var/obj/item/suppressor/S = A
|
||||
if(!can_suppress)
|
||||
to_chat(user, "<span class='warning'>You can't seem to figure out how to fit [S] on [src]!</span>")
|
||||
to_chat(user, span_warning("You can't seem to figure out how to fit [S] on [src]!"))
|
||||
return
|
||||
if(!user.is_holding(src))
|
||||
to_chat(user, "<span class='warning'>You need be holding [src] to fit [S] to it!</span>")
|
||||
to_chat(user, span_warning("You need be holding [src] to fit [S] to it!"))
|
||||
return
|
||||
if(suppressed)
|
||||
to_chat(user, "<span class='warning'>[src] already has a suppressor!</span>")
|
||||
to_chat(user, span_warning("[src] already has a suppressor!"))
|
||||
return
|
||||
if(user.transferItemToLoc(A, src))
|
||||
to_chat(user, "<span class='notice'>You screw \the [S] onto \the [src].</span>")
|
||||
to_chat(user, span_notice("You screw \the [S] onto \the [src]."))
|
||||
install_suppressor(A)
|
||||
return
|
||||
if (can_be_sawn_off)
|
||||
@@ -367,7 +367,7 @@
|
||||
if(magazine && chambered.loaded_projectile && can_misfire && misfire_probability > 0)
|
||||
if(prob(misfire_probability))
|
||||
if(blow_up(user))
|
||||
to_chat(user, "<span class='userdanger'>[src] misfires!</span>")
|
||||
to_chat(user, span_userdanger("[src] misfires!"))
|
||||
|
||||
if (sawn_off)
|
||||
bonus_spread += SAWN_OFF_ACC_PENALTY
|
||||
@@ -403,7 +403,7 @@
|
||||
var/obj/item/suppressor/S = suppressed
|
||||
if(!user.is_holding(src))
|
||||
return ..()
|
||||
to_chat(user, "<span class='notice'>You unscrew \the [S] from \the [src].</span>")
|
||||
to_chat(user, span_notice("You unscrew \the [S] from \the [src]."))
|
||||
user.put_in_hands(S)
|
||||
clear_suppressor()
|
||||
|
||||
@@ -441,13 +441,13 @@
|
||||
if(HAS_TRAIT(user, TRAIT_GUNFLIP))
|
||||
if(flip_cooldown <= world.time)
|
||||
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(40))
|
||||
to_chat(user, "<span class='userdanger'>While trying to flip the [src] you pull the trigger and accidently shoot yourself!</span>")
|
||||
to_chat(user, span_userdanger("While trying to flip the [src] you pull the trigger and accidently shoot yourself!"))
|
||||
var/flip_mistake = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_HEAD, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_CHEST)
|
||||
process_fire(user, user, FALSE, flip_mistake)
|
||||
user.dropItemToGround(src, TRUE)
|
||||
return
|
||||
flip_cooldown = (world.time + 30)
|
||||
user.visible_message("<span class='notice'>[user] spins the [src] around their finger by the trigger. That’s pretty badass.</span>")
|
||||
user.visible_message(span_notice("[user] spins the [src] around their finger by the trigger. That’s pretty badass."))
|
||||
playsound(src, 'sound/items/handling/ammobox_pickup.ogg', 20, FALSE)
|
||||
if(!internal_magazine && magazine)
|
||||
if(!magazine.ammo_count())
|
||||
@@ -464,11 +464,11 @@
|
||||
if(T && is_station_level(T.z))
|
||||
SSblackbox.record_feedback("tally", "station_mess_created", 1, CB.name)
|
||||
if (num_unloaded)
|
||||
to_chat(user, "<span class='notice'>You unload [num_unloaded] [cartridge_wording]\s from [src].</span>")
|
||||
to_chat(user, span_notice("You unload [num_unloaded] [cartridge_wording]\s from [src]."))
|
||||
playsound(user, eject_sound, eject_sound_volume, eject_sound_vary)
|
||||
update_appearance()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
to_chat(user, span_warning("[src] is empty!"))
|
||||
return
|
||||
if(bolt_type == BOLT_TYPE_LOCKING && bolt_locked)
|
||||
drop_bolt(user)
|
||||
@@ -492,9 +492,9 @@
|
||||
if (suppressed)
|
||||
. += "It has a suppressor attached that can be removed with <b>alt+click</b>."
|
||||
if(can_misfire)
|
||||
. += "<span class='danger'>You get the feeling this might explode if you fire it....</span>"
|
||||
. += span_danger("You get the feeling this might explode if you fire it....")
|
||||
if(misfire_probability > 0)
|
||||
. += "<span class='danger'>Given the state of the gun, there is a [misfire_probability]% chance it'll misfire.</span>"
|
||||
. += span_danger("Given the state of the gun, there is a [misfire_probability]% chance it'll misfire.")
|
||||
|
||||
///Gets the number of bullets in the gun
|
||||
/obj/item/gun/ballistic/proc/get_ammo(countchambered = TRUE)
|
||||
@@ -521,12 +521,12 @@
|
||||
/obj/item/gun/ballistic/suicide_act(mob/user)
|
||||
var/obj/item/organ/brain/B = user.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if (B && chambered && chambered.loaded_projectile && can_trigger_gun(user) && !chambered.loaded_projectile.nodamage)
|
||||
user.visible_message("<span class='suicide'>[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
user.visible_message(span_suicide("[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!"))
|
||||
sleep(25)
|
||||
if(user.is_holding(src))
|
||||
var/turf/T = get_turf(user)
|
||||
process_fire(user, user, FALSE, null, BODY_ZONE_HEAD)
|
||||
user.visible_message("<span class='suicide'>[user] blows [user.p_their()] brain[user.p_s()] out with [src]!</span>")
|
||||
user.visible_message(span_suicide("[user] blows [user.p_their()] brain[user.p_s()] out with [src]!"))
|
||||
var/turf/target = get_ranged_target_turf(user, turn(user.dir, 180), BRAINS_BLOWN_THROW_RANGE)
|
||||
B.Remove(user)
|
||||
B.forceMove(T)
|
||||
@@ -534,10 +534,10 @@
|
||||
B.throw_at(target, BRAINS_BLOWN_THROW_RANGE, BRAINS_BLOWN_THROW_SPEED, callback=gibspawner)
|
||||
return(BRUTELOSS)
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] panics and starts choking to death!</span>")
|
||||
user.visible_message(span_suicide("[user] panics and starts choking to death!"))
|
||||
return(OXYLOSS)
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] is pretending to blow [user.p_their()] brain[user.p_s()] out with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
|
||||
user.visible_message(span_suicide("[user] is pretending to blow [user.p_their()] brain[user.p_s()] out with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b>"))
|
||||
playsound(src, dry_fire_sound, 30, TRUE)
|
||||
return (OXYLOSS)
|
||||
#undef BRAINS_BLOWN_THROW_SPEED
|
||||
@@ -554,23 +554,23 @@ GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list(
|
||||
if(!saw.get_sharpness() || (!is_type_in_typecache(saw, GLOB.gun_saw_types) && saw.tool_behaviour != TOOL_SAW)) //needs to be sharp. Otherwise turned off eswords can cut this.
|
||||
return
|
||||
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(bayonet)
|
||||
to_chat(user, "<span class='warning'>You cannot saw-off \the [src] with \the [bayonet] attached!</span>")
|
||||
to_chat(user, span_warning("You cannot saw-off \the [src] with \the [bayonet] attached!"))
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='notice'>[user] begins to shorten \the [src].</span>", "<span class='notice'>You begin to shorten \the [src]...</span>")
|
||||
user.visible_message(span_notice("[user] begins to shorten \the [src]."), span_notice("You begin to shorten \the [src]..."))
|
||||
|
||||
//if there's any live ammo inside the gun, makes it go off
|
||||
if(blow_up(user))
|
||||
user.visible_message("<span class='danger'>\The [src] goes off!</span>", "<span class='danger'>\The [src] goes off in your face!</span>")
|
||||
user.visible_message(span_danger("\The [src] goes off!"), span_danger("\The [src] goes off in your face!"))
|
||||
return
|
||||
|
||||
if(do_after(user, 30, target = src))
|
||||
if(sawn_off)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] shortens \the [src]!</span>", "<span class='notice'>You shorten \the [src].</span>")
|
||||
user.visible_message(span_notice("[user] shortens \the [src]!"), span_notice("You shorten \the [src]."))
|
||||
name = "sawn-off [src.name]"
|
||||
desc = sawn_desc
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
@@ -590,22 +590,22 @@ GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list(
|
||||
|
||||
/obj/item/gun/ballistic/proc/guncleaning(mob/user, /obj/item/A)
|
||||
if(misfire_probability == 0)
|
||||
to_chat(user, "<span class='notice'>\The [src] seems to be already clean of fouling.</span>")
|
||||
to_chat(user, span_notice("\The [src] seems to be already clean of fouling."))
|
||||
return
|
||||
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='notice'>[user] begins to cleaning \the [src].</span>", "<span class='notice'>You begin to clean the internals of \the [src].</span>")
|
||||
user.visible_message(span_notice("[user] begins to cleaning \the [src]."), span_notice("You begin to clean the internals of \the [src]."))
|
||||
|
||||
if(do_after(user, 100, target = src))
|
||||
var/original_misfire_value = initial(misfire_probability)
|
||||
if(misfire_probability > original_misfire_value)
|
||||
misfire_probability = original_misfire_value
|
||||
user.visible_message("<span class='notice'>[user] cleans \the [src] of any fouling.</span>", "<span class='notice'>You clean \the [src], removing any fouling, preventing misfire.</span>")
|
||||
user.visible_message(span_notice("[user] cleans \the [src] of any fouling."), span_notice("You clean \the [src], removing any fouling, preventing misfire."))
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/ballistic/wrench_act(mob/living/user, obj/item/I)
|
||||
if(!user.is_holding(src))
|
||||
to_chat(user, "<span class='notice'>You need to hold [src] to modify it.</span>")
|
||||
to_chat(user, span_notice("You need to hold [src] to modify it."))
|
||||
return TRUE
|
||||
|
||||
if(!can_modify_ammo)
|
||||
@@ -613,20 +613,20 @@ GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list(
|
||||
|
||||
if(bolt_type == BOLT_TYPE_STANDARD)
|
||||
if(get_ammo())
|
||||
to_chat(user, "<span class='notice'>You can't get at the internals while the gun has a bullet in it!</span>")
|
||||
to_chat(user, span_notice("You can't get at the internals while the gun has a bullet in it!"))
|
||||
return
|
||||
|
||||
else if(!bolt_locked)
|
||||
to_chat(user, "<span class='notice'>You can't get at the internals while the bolt is down!</span>")
|
||||
to_chat(user, span_notice("You can't get at the internals while the bolt is down!"))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin to tinker with [src]...</span>")
|
||||
to_chat(user, span_notice("You begin to tinker with [src]..."))
|
||||
I.play_tool_sound(src)
|
||||
if(!I.use_tool(src, user, 3 SECONDS))
|
||||
return TRUE
|
||||
|
||||
if(blow_up(user))
|
||||
user.visible_message("<span class='danger'>\The [src] goes off!</span>", "<span class='danger'>\The [src] goes off in your face!</span>")
|
||||
user.visible_message(span_danger("\The [src] goes off!"), span_danger("\The [src] goes off in your face!"))
|
||||
return
|
||||
|
||||
if(magazine.caliber == initial_caliber)
|
||||
@@ -634,13 +634,13 @@ GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list(
|
||||
if(alternative_ammo_misfires)
|
||||
can_misfire = TRUE
|
||||
fire_sound = alternative_fire_sound
|
||||
to_chat(user, "<span class='notice'>You modify [src]. Now it will fire [alternative_caliber] rounds.</span>")
|
||||
to_chat(user, span_notice("You modify [src]. Now it will fire [alternative_caliber] rounds."))
|
||||
else
|
||||
magazine.caliber = initial_caliber
|
||||
if(alternative_ammo_misfires)
|
||||
can_misfire = FALSE
|
||||
fire_sound = initial_fire_sound
|
||||
to_chat(user, "<span class='notice'>You reset [src]. Now it will fire [initial_caliber] rounds.</span>")
|
||||
to_chat(user, span_notice("You reset [src]. Now it will fire [initial_caliber] rounds."))
|
||||
|
||||
|
||||
///used for sawing guns, causes the gun to fire without the input of the user
|
||||
|
||||
@@ -36,11 +36,11 @@
|
||||
if(!select)
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
to_chat(user, "<span class='notice'>You switch to semi-automatic.</span>")
|
||||
to_chat(user, span_notice("You switch to semi-automatic."))
|
||||
else
|
||||
burst_size = initial(burst_size)
|
||||
fire_delay = initial(fire_delay)
|
||||
to_chat(user, "<span class='notice'>You switch to [burst_size]-round burst.</span>")
|
||||
to_chat(user, span_notice("You switch to [burst_size]-round burst."))
|
||||
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, TRUE)
|
||||
update_appearance()
|
||||
@@ -203,12 +203,12 @@
|
||||
select = 1
|
||||
burst_size = initial(burst_size)
|
||||
fire_delay = initial(fire_delay)
|
||||
to_chat(user, "<span class='notice'>You switch to [burst_size]-rnd burst.</span>")
|
||||
to_chat(user, span_notice("You switch to [burst_size]-rnd burst."))
|
||||
if(1)
|
||||
select = 0
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
to_chat(user, "<span class='notice'>You switch to semi-auto.</span>")
|
||||
to_chat(user, span_notice("You switch to semi-auto."))
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, TRUE)
|
||||
update_appearance()
|
||||
return
|
||||
@@ -285,14 +285,14 @@
|
||||
. = ..()
|
||||
. += "<b>alt + click</b> to [cover_open ? "close" : "open"] the dust cover."
|
||||
if(cover_open && magazine)
|
||||
. += "<span class='notice'>It seems like you could use an <b>empty hand</b> to remove the magazine.</span>"
|
||||
. += span_notice("It seems like you could use an <b>empty hand</b> to remove the magazine.")
|
||||
|
||||
|
||||
/obj/item/gun/ballistic/automatic/l6_saw/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src))
|
||||
return
|
||||
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."))
|
||||
playsound(src, 'sound/weapons/gun/l6/l6_door.ogg', 60, TRUE)
|
||||
update_appearance()
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
|
||||
/obj/item/gun/ballistic/automatic/l6_saw/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params)
|
||||
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
|
||||
else
|
||||
. = ..()
|
||||
@@ -319,13 +319,13 @@
|
||||
..()
|
||||
return
|
||||
if (!cover_open)
|
||||
to_chat(user, "<span class='warning'>[src]'s cover is closed! Open it before trying to remove the magazine!</span>")
|
||||
to_chat(user, span_warning("[src]'s cover is closed! Open it before trying to remove the magazine!"))
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/l6_saw/attackby(obj/item/A, mob/user, params)
|
||||
if(!cover_open && istype(A, mag_type))
|
||||
to_chat(user, "<span class='warning'>[src]'s dust cover prevents a magazine from being fit.</span>")
|
||||
to_chat(user, span_warning("[src]'s dust cover prevents a magazine from being fit."))
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
return //too difficult to remove the rocket with TK
|
||||
|
||||
/obj/item/gun/ballistic/rocketlauncher/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='warning'>[user] aims [src] at the ground! It looks like [user.p_theyre()] performing a sick rocket jump!</span>", \
|
||||
"<span class='userdanger'>You aim [src] at the ground to perform a bisnasty rocket jump...</span>")
|
||||
user.visible_message(span_warning("[user] aims [src] at the ground! It looks like [user.p_theyre()] performing a sick rocket jump!"), \
|
||||
span_userdanger("You aim [src] at the ground to perform a bisnasty rocket jump..."))
|
||||
if(can_shoot())
|
||||
user.notransform = TRUE
|
||||
playsound(src, 'sound/vehicles/rocketlaunch.ogg', 80, TRUE, 5)
|
||||
@@ -104,7 +104,7 @@
|
||||
sleep(5)
|
||||
shoot_with_empty_chamber(user)
|
||||
sleep(20)
|
||||
user.visible_message("<span class='warning'>[user] looks about the room realizing [user.p_theyre()] still there. [user.p_they(TRUE)] proceed to shove [src] down their throat and choke [user.p_them()]self with it!</span>", \
|
||||
"<span class='userdanger'>You look around after realizing you're still here, then proceed to choke yourself to death with [src]!</span>")
|
||||
user.visible_message(span_warning("[user] looks about the room realizing [user.p_theyre()] still there. [user.p_they(TRUE)] proceed to shove [src] down their throat and choke [user.p_them()]self with it!"), \
|
||||
span_userdanger("You look around after realizing you're still here, then proceed to choke yourself to death with [src]!"))
|
||||
sleep(20)
|
||||
return OXYLOSS
|
||||
|
||||
@@ -90,12 +90,12 @@
|
||||
|
||||
/obj/item/gun/ballistic/automatic/pistol/stickman/pickup(mob/living/user)
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
to_chat(user, "<span class='notice'>As you try to pick up [src], it slips out of your grip..</span>")
|
||||
to_chat(user, span_notice("As you try to pick up [src], it slips out of your grip.."))
|
||||
if(prob(50))
|
||||
to_chat(user, "<span class='notice'>..and vanishes from your vision! Where the hell did it go?</span>")
|
||||
to_chat(user, span_notice("..and vanishes from your vision! Where the hell did it go?"))
|
||||
qdel(src)
|
||||
user.update_icons()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>..and falls into view. Whew, that was a close one.</span>")
|
||||
to_chat(user, span_notice("..and falls into view. Whew, that was a close one."))
|
||||
user.dropItemToGround(src)
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
if(do_spin())
|
||||
playsound(usr, "revolver_spin", 30, FALSE)
|
||||
usr.visible_message("<span class='notice'>[usr] spins [src]'s chamber.</span>", "<span class='notice'>You spin [src]'s chamber.</span>")
|
||||
usr.visible_message(span_notice("[usr] spins [src]'s chamber."), span_notice("You spin [src]'s chamber."))
|
||||
else
|
||||
verbs -= /obj/item/gun/ballistic/revolver/verb/spin
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
/obj/item/gun/ballistic/revolver/ignition_effect(atom/A, mob/user)
|
||||
if(last_fire && last_fire + 15 SECONDS > world.time)
|
||||
. = "<span class='notice'>[user] touches the end of [src] to \the [A], using the residual heat to ignite it in a puff of smoke. What a badass.</span>"
|
||||
. = span_notice("[user] touches the end of [src] to \the [A], using the residual heat to ignite it in a puff of smoke. What a badass.")
|
||||
|
||||
/obj/item/gun/ballistic/revolver/detective
|
||||
name = "\improper Colt Detective Special"
|
||||
@@ -176,13 +176,13 @@
|
||||
return
|
||||
if(target != user)
|
||||
if(ismob(target))
|
||||
to_chat(user, "<span class='warning'>A mechanism prevents you from shooting anyone but yourself!</span>")
|
||||
to_chat(user, span_warning("A mechanism prevents you from shooting anyone but yourself!"))
|
||||
return
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!spun)
|
||||
to_chat(user, "<span class='warning'>You need to spin \the [src]'s chamber first!</span>")
|
||||
to_chat(user, span_warning("You need to spin \the [src]'s chamber first!"))
|
||||
return
|
||||
|
||||
spun = FALSE
|
||||
@@ -196,21 +196,21 @@
|
||||
if(zone == BODY_ZONE_HEAD || zone == BODY_ZONE_PRECISE_EYES || zone == BODY_ZONE_PRECISE_MOUTH)
|
||||
shoot_self(user, affecting)
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user.name] cowardly fires [src] at [user.p_their()] [affecting.name]!</span>", "<span class='userdanger'>You cowardly fire [src] at your [affecting.name]!</span>", "<span class='hear'>You hear a gunshot!</span>")
|
||||
user.visible_message(span_danger("[user.name] cowardly fires [src] at [user.p_their()] [affecting.name]!"), span_userdanger("You cowardly fire [src] at your [affecting.name]!"), span_hear("You hear a gunshot!"))
|
||||
chambered = null
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>*click*</span>")
|
||||
user.visible_message(span_danger("*click*"))
|
||||
playsound(src, dry_fire_sound, 30, TRUE)
|
||||
|
||||
/obj/item/gun/ballistic/revolver/russian/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
add_fingerprint(user)
|
||||
playsound(src, dry_fire_sound, 30, TRUE)
|
||||
user.visible_message("<span class='danger'>[user.name] tries to fire \the [src] at the same time, but only succeeds at looking like an idiot.</span>", "<span class='danger'>\The [src]'s anti-combat mechanism prevents you from firing it at the same time!</span>")
|
||||
user.visible_message(span_danger("[user.name] tries to fire \the [src] at the same time, but only succeeds at looking like an idiot."), span_danger("\The [src]'s anti-combat mechanism prevents you from firing it at the same time!"))
|
||||
|
||||
/obj/item/gun/ballistic/revolver/russian/proc/shoot_self(mob/living/carbon/human/user, affecting = BODY_ZONE_HEAD)
|
||||
user.apply_damage(300, BRUTE, affecting)
|
||||
user.visible_message("<span class='danger'>[user.name] fires [src] at [user.p_their()] head!</span>", "<span class='userdanger'>You fire [src] at your head!</span>", "<span class='hear'>You hear a gunshot!</span>")
|
||||
user.visible_message(span_danger("[user.name] fires [src] at [user.p_their()] head!"), span_userdanger("You fire [src] at your head!"), span_hear("You hear a gunshot!"))
|
||||
|
||||
/obj/item/gun/ballistic/revolver/russian/soul
|
||||
name = "cursed Russian revolver"
|
||||
@@ -222,7 +222,7 @@
|
||||
if(!SS.transfer_soul("FORCE", user)) //Something went wrong
|
||||
qdel(SS)
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user.name]'s soul is captured by \the [src]!</span>", "<span class='userdanger'>You've lost the gamble! Your soul is forfeit!</span>")
|
||||
user.visible_message(span_danger("[user.name]'s soul is captured by \the [src]!"), span_userdanger("You've lost the gamble! Your soul is forfeit!"))
|
||||
|
||||
/obj/item/gun/ballistic/revolver/reverse //Fires directly at its user... unless the user is a clown, of course.
|
||||
clumsy_check = FALSE
|
||||
@@ -231,7 +231,7 @@
|
||||
if((HAS_TRAIT(user, TRAIT_CLUMSY)) || (user.mind && user.mind.assigned_role == "Clown"))
|
||||
return ..()
|
||||
if(process_fire(user, user, FALSE, null, BODY_ZONE_HEAD))
|
||||
user.visible_message("<span class='warning'>[user] somehow manages to shoot [user.p_them()]self in the face!</span>", "<span class='userdanger'>You somehow shoot yourself in the face! How the hell?!</span>")
|
||||
user.visible_message(span_warning("[user] somehow manages to shoot [user.p_them()]self in the face!"), span_userdanger("You somehow shoot yourself in the face! How the hell?!"))
|
||||
user.emote("scream")
|
||||
user.drop_all_held_items()
|
||||
user.Paralyze(80)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/obj/item/gun/ballistic/rifle/rack(mob/user = null)
|
||||
if (bolt_locked == FALSE)
|
||||
to_chat(user, "<span class='notice'>You open the bolt of \the [src].</span>")
|
||||
to_chat(user, span_notice("You open the bolt of \the [src]."))
|
||||
playsound(src, rack_sound, rack_sound_volume, rack_sound_vary)
|
||||
process_chamber(FALSE, FALSE, FALSE)
|
||||
bolt_locked = TRUE
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
/obj/item/gun/ballistic/rifle/attackby(obj/item/A, mob/user, params)
|
||||
if (!bolt_locked && !istype(A, /obj/item/stack/sheet/cloth))
|
||||
to_chat(user, "<span class='notice'>The bolt is closed!</span>")
|
||||
to_chat(user, span_notice("The bolt is closed!"))
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
unjam_chance = 10
|
||||
else
|
||||
unjam_chance += 10
|
||||
to_chat(user, "<span class='warning'>[src] is jammed!</span>")
|
||||
to_chat(user, span_warning("[src] is jammed!"))
|
||||
playsound(user,'sound/weapons/jammed.ogg', 75, TRUE)
|
||||
return FALSE
|
||||
..()
|
||||
@@ -104,7 +104,7 @@
|
||||
if(bolt_locked)
|
||||
if(istype(item, /obj/item/gun_maintenance_supplies))
|
||||
if(do_after(user, 10 SECONDS, target = src))
|
||||
user.visible_message("<span class='notice'>[user] finishes maintenance of [src].</span>")
|
||||
user.visible_message(span_notice("[user] finishes maintenance of [src]."))
|
||||
jamming_chance = 10
|
||||
qdel(item)
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/automatic/dual_tube/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click to pump it.</span>"
|
||||
. += span_notice("Alt-click to pump it.")
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/automatic/dual_tube/Initialize()
|
||||
. = ..()
|
||||
@@ -100,9 +100,9 @@
|
||||
alternate_magazine = current_mag
|
||||
toggled = !toggled
|
||||
if(toggled)
|
||||
to_chat(user, "<span class='notice'>You switch to tube B.</span>")
|
||||
to_chat(user, span_notice("You switch to tube B."))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You switch to tube A.</span>")
|
||||
to_chat(user, span_notice("You switch to tube A."))
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/automatic/dual_tube/AltClick(mob/living/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/hook/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Right-click to shoot the hook.</span>"
|
||||
. += span_notice("Right-click to shoot the hook.")
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/hook/afterattack_secondary(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
hook.afterattack(target, user, proximity_flag, click_parameters)
|
||||
|
||||
@@ -62,14 +62,14 @@
|
||||
if(!ammo_type)
|
||||
return
|
||||
var/obj/projectile/exam_proj
|
||||
readout += "Standard models of this projectile weapon have <span class='warning'>[ammo_type.len]</span> mode\s"
|
||||
readout += "Standard models of this projectile weapon have [span_warning("[ammo_type.len]")] mode\s"
|
||||
readout += "Our heroic interns have shown that one can theoretically stay standing after..."
|
||||
for(var/obj/item/ammo_casing/energy/for_ammo in ammo_type)
|
||||
exam_proj = for_ammo.loaded_projectile
|
||||
if(exam_proj.damage > 0) // Don't divide by 0!!!!!
|
||||
readout += "<span class='warning'>[round(100 / exam_proj.damage, 0.1)]</span> shot\s on <span class='warning'>[for_ammo.select_name]</span> mode before collapsing from [exam_proj.damage_type == STAMINA ? "immense pain" : "their wounds"]."
|
||||
readout += "[span_warning("[round(100 / exam_proj.damage, 0.1)]")] shot\s on [span_warning("[for_ammo.select_name]")] mode before collapsing from [exam_proj.damage_type == STAMINA ? "immense pain" : "their wounds"]."
|
||||
else
|
||||
readout += "an infinite number of shots on <span class='warning'>[for_ammo.select_name] mode</span>."
|
||||
readout += "an infinite number of shots on [span_warning("[for_ammo.select_name] mode")]."
|
||||
return readout.Join("\n") // Sending over the singular string, rather than the whole list
|
||||
|
||||
/obj/item/gun/energy/ComponentInitialize()
|
||||
@@ -160,7 +160,7 @@
|
||||
fire_sound = shot.fire_sound
|
||||
fire_delay = shot.delay
|
||||
if (shot.select_name)
|
||||
to_chat(user, "<span class='notice'>[src] is now set to [shot.select_name].</span>")
|
||||
to_chat(user, span_notice("[src] is now set to [shot.select_name]."))
|
||||
chambered = null
|
||||
recharge_newshot(TRUE)
|
||||
update_appearance()
|
||||
@@ -219,20 +219,20 @@
|
||||
|
||||
/obj/item/gun/energy/suicide_act(mob/living/user)
|
||||
if (istype(user) && can_shoot() && can_trigger_gun(user) && user.get_bodypart(BODY_ZONE_HEAD))
|
||||
user.visible_message("<span class='suicide'>[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
user.visible_message(span_suicide("[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!"))
|
||||
sleep(25)
|
||||
if(user.is_holding(src))
|
||||
user.visible_message("<span class='suicide'>[user] melts [user.p_their()] face off with [src]!</span>")
|
||||
user.visible_message(span_suicide("[user] melts [user.p_their()] face off with [src]!"))
|
||||
playsound(loc, fire_sound, 50, TRUE, -1)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
cell.use(shot.e_cost)
|
||||
update_appearance()
|
||||
return(FIRELOSS)
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] panics and starts choking to death!</span>")
|
||||
user.visible_message(span_suicide("[user] panics and starts choking to death!"))
|
||||
return(OXYLOSS)
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] is pretending to melt [user.p_their()] face off with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
|
||||
user.visible_message(span_suicide("[user] is pretending to melt [user.p_their()] face off with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b>"))
|
||||
playsound(src, dry_fire_sound, 30, TRUE)
|
||||
return (OXYLOSS)
|
||||
|
||||
@@ -257,13 +257,13 @@
|
||||
if(!loaded_projectile)
|
||||
. = ""
|
||||
else if(loaded_projectile.nodamage || !loaded_projectile.damage || loaded_projectile.damage_type == STAMINA)
|
||||
user.visible_message("<span class='danger'>[user] tries to light [A.loc == user ? "[user.p_their()] [A.name]" : A] with [src], but it doesn't do anything. Dumbass.</span>")
|
||||
user.visible_message(span_danger("[user] tries to light [A.loc == user ? "[user.p_their()] [A.name]" : A] with [src], but it doesn't do anything. Dumbass."))
|
||||
playsound(user, E.fire_sound, 50, TRUE)
|
||||
playsound(user, loaded_projectile.hitsound, 50, TRUE)
|
||||
cell.use(E.e_cost)
|
||||
. = ""
|
||||
else if(loaded_projectile.damage_type != BURN)
|
||||
user.visible_message("<span class='danger'>[user] tries to light [A.loc == user ? "[user.p_their()] [A.name]" : A] with [src], but only succeeds in utterly destroying it. Dumbass.</span>")
|
||||
user.visible_message(span_danger("[user] tries to light [A.loc == user ? "[user.p_their()] [A.name]" : A] with [src], but only succeeds in utterly destroying it. Dumbass."))
|
||||
playsound(user, E.fire_sound, 50, TRUE)
|
||||
playsound(user, loaded_projectile.hitsound, 50, TRUE)
|
||||
cell.use(E.e_cost)
|
||||
@@ -273,7 +273,7 @@
|
||||
playsound(user, E.fire_sound, 50, TRUE)
|
||||
playsound(user, loaded_projectile.hitsound, 50, TRUE)
|
||||
cell.use(E.e_cost)
|
||||
. = "<span class='danger'>[user] casually lights [A.loc == user ? "[user.p_their()] [A.name]" : A] with [src]. Damn.</span>"
|
||||
. = span_danger("[user] casually lights [A.loc == user ? "[user.p_their()] [A.name]" : A] with [src]. Damn.")
|
||||
|
||||
/obj/item/gun/energy/proc/instant_recharge()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
var/mob/living/A = get_duelist(gun_A)
|
||||
var/mob/living/B = get_duelist(gun_B)
|
||||
if(!A || !B)
|
||||
message_duelists("<span class='warning'>To begin the duel, both participants need to be holding paired dueling pistols.</span>")
|
||||
message_duelists(span_warning("To begin the duel, both participants need to be holding paired dueling pistols."))
|
||||
return
|
||||
begin()
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
fired.Cut()
|
||||
countdown_step = countdown_length
|
||||
|
||||
message_duelists("<span class='notice'>Set your gun setting and move [required_distance] steps away from your opponent.</span>")
|
||||
message_duelists(span_notice("Set your gun setting and move [required_distance] steps away from your opponent."))
|
||||
|
||||
START_PROCESSING(SSobj,src)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
return G == gun_A ? gun_B : gun_A
|
||||
|
||||
/datum/duel/proc/end()
|
||||
message_duelists("<span class='notice'>Duel finished. Re-engaging safety.</span>")
|
||||
message_duelists(span_notice("Duel finished. Re-engaging safety."))
|
||||
STOP_PROCESSING(SSobj,src)
|
||||
state = DUEL_IDLE
|
||||
|
||||
@@ -83,26 +83,26 @@
|
||||
|
||||
|
||||
/datum/duel/proc/back_to_prep()
|
||||
message_duelists("<span class='notice'>Positions invalid. Please move to valid positions [required_distance] steps away from each other to continue.</span>")
|
||||
message_duelists(span_notice("Positions invalid. Please move to valid positions [required_distance] steps away from each other to continue."))
|
||||
state = DUEL_PREPARATION
|
||||
confirmations.Cut()
|
||||
countdown_step = countdown_length
|
||||
|
||||
/datum/duel/proc/confirm_positioning()
|
||||
message_duelists("<span class='notice'>Position confirmed. Confirm readiness by pulling the trigger once.</span>")
|
||||
message_duelists(span_notice("Position confirmed. Confirm readiness by pulling the trigger once."))
|
||||
state = DUEL_READY
|
||||
|
||||
/datum/duel/proc/confirm_ready()
|
||||
message_duelists("<span class='notice'>Readiness confirmed. Starting countdown. Commence firing at zero mark.</span>")
|
||||
message_duelists(span_notice("Readiness confirmed. Starting countdown. Commence firing at zero mark."))
|
||||
state = DUEL_COUNTDOWN
|
||||
|
||||
/datum/duel/proc/countdown_step()
|
||||
countdown_step--
|
||||
if(countdown_step == 0)
|
||||
state = DUEL_FIRING
|
||||
message_duelists("<span class='userdanger'>Fire!</span>")
|
||||
message_duelists(span_userdanger("Fire!"))
|
||||
else
|
||||
message_duelists("<span class='userdanger'>[countdown_step]!</span>")
|
||||
message_duelists(span_userdanger("[countdown_step]!"))
|
||||
|
||||
/datum/duel/proc/check_fired()
|
||||
if(fired.len == 2)
|
||||
@@ -172,7 +172,7 @@
|
||||
setting = DUEL_SETTING_C
|
||||
if(DUEL_SETTING_C)
|
||||
setting = DUEL_SETTING_A
|
||||
to_chat(user,"<span class='notice'>You switch [src] setting to [setting] mode.</span>")
|
||||
to_chat(user,span_notice("You switch [src] setting to [setting] mode."))
|
||||
update_appearance()
|
||||
|
||||
/obj/item/gun/energy/dueling/update_overlays()
|
||||
@@ -197,7 +197,7 @@
|
||||
if(DUEL_READY)
|
||||
return .
|
||||
else
|
||||
to_chat(user,"<span class='warning'>[src] is locked. Wait for FIRE signal before shooting.</span>")
|
||||
to_chat(user,span_warning("[src] is locked. Wait for FIRE signal before shooting."))
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/energy/dueling/proc/is_duelist(mob/living/L)
|
||||
@@ -210,10 +210,10 @@
|
||||
/obj/item/gun/energy/dueling/process_fire(atom/target, mob/living/user, message, params, zone_override, bonus_spread)
|
||||
if(duel.state == DUEL_READY)
|
||||
duel.confirmations[src] = TRUE
|
||||
to_chat(user,"<span class='notice'>You confirm your readiness.</span>")
|
||||
to_chat(user,span_notice("You confirm your readiness."))
|
||||
return
|
||||
else if(!is_duelist(target)) //I kinda want to leave this out just to see someone shoot a bystander or missing.
|
||||
to_chat(user,"<span class='warning'>[src] safety system prevents shooting anyone but your designated opponent.</span>")
|
||||
to_chat(user,span_warning("[src] safety system prevents shooting anyone but your designated opponent."))
|
||||
return
|
||||
else
|
||||
duel.fired[src] = TRUE
|
||||
|
||||
@@ -122,12 +122,12 @@
|
||||
if(0 to 200)
|
||||
fail_tick += (2*(fail_chance))
|
||||
M.rad_act(40)
|
||||
to_chat(M, "<span class='userdanger'>Your [name] feels warmer.</span>")
|
||||
to_chat(M, span_userdanger("Your [name] feels warmer."))
|
||||
if(201 to INFINITY)
|
||||
SSobj.processing.Remove(src)
|
||||
M.rad_act(80)
|
||||
reactor_overloaded = TRUE
|
||||
to_chat(M, "<span class='userdanger'>Your [name]'s reactor overloads!</span>")
|
||||
to_chat(M, span_userdanger("Your [name]'s reactor overloads!"))
|
||||
|
||||
/obj/item/gun/energy/e_gun/nuclear/emp_act(severity)
|
||||
. = ..()
|
||||
|
||||
@@ -31,21 +31,21 @@
|
||||
. = ..()
|
||||
if(max_mod_capacity)
|
||||
. += "<b>[get_remaining_mod_capacity()]%</b> mod capacity remaining."
|
||||
. += "<span class='info'>You can use a <b>crowbar</b> to remove modules.</span>"
|
||||
. += span_info("You can use a <b>crowbar</b> to remove modules.")
|
||||
for(var/A in 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/crowbar_act(mob/living/user, obj/item/I)
|
||||
. = TRUE
|
||||
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."))
|
||||
I.play_tool_sound(src, 100)
|
||||
for(var/a in modkits)
|
||||
var/obj/item/borg/upgrade/modkit/M = a
|
||||
M.forceMove(drop_location()) //uninstallation handled in Exited(), or /mob/living/silicon/robot/remove_from_upgrades() for borgs
|
||||
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."))
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/Exited(atom/A)
|
||||
if(modkits.len && (A in modkits))
|
||||
@@ -146,7 +146,7 @@
|
||||
if(!suppressed)
|
||||
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, TRUE)
|
||||
else
|
||||
to_chat(loc, "<span class='warning'>[src] silently charges up.</span>")
|
||||
to_chat(loc, span_warning("[src] silently charges up."))
|
||||
update_appearance()
|
||||
overheat = FALSE
|
||||
|
||||
@@ -250,7 +250,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) && !issilicon(user))
|
||||
@@ -268,10 +268,10 @@
|
||||
. = TRUE
|
||||
if(minebot_upgrade)
|
||||
if(minebot_exclusive && !istype(KA.loc, /mob/living/simple_animal/hostile/mining_drone))
|
||||
to_chat(user, "<span class='notice'>The modkit you're trying to install is only rated for minebot use.</span>")
|
||||
to_chat(user, span_notice("The modkit you're trying to install is only rated for minebot use."))
|
||||
return FALSE
|
||||
else if(istype(KA.loc, /mob/living/simple_animal/hostile/mining_drone))
|
||||
to_chat(user, "<span class='notice'>The modkit you're trying to install is not rated for minebot use.</span>")
|
||||
to_chat(user, span_notice("The modkit you're trying to install is not rated for minebot use."))
|
||||
return FALSE
|
||||
if(denied_type)
|
||||
var/number_of_denied = 0
|
||||
@@ -286,13 +286,13 @@
|
||||
if(.)
|
||||
if(transfer_to_loc && !user.transferItemToLoc(src, KA))
|
||||
return
|
||||
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, TRUE)
|
||||
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/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
@@ -402,7 +402,7 @@
|
||||
for(var/mob/living/L in range(1, target_turf) - K.firer - target)
|
||||
var/armor = L.run_armor_check(K.def_zone, K.flag, "", "", K.armour_penetration)
|
||||
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"
|
||||
|
||||
@@ -43,12 +43,12 @@
|
||||
armed = TRUE
|
||||
if(!user.put_in_hands(gun))
|
||||
armed = FALSE
|
||||
to_chat(user, "<span class='warning'>You need a free hand to hold the gun!</span>")
|
||||
to_chat(user, span_warning("You need a free hand to hold the gun!"))
|
||||
return
|
||||
update_appearance()
|
||||
user.update_inv_back()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are already holding the gun!</span>")
|
||||
to_chat(user, span_warning("You are already holding the gun!"))
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -90,9 +90,9 @@
|
||||
gun.forceMove(src)
|
||||
armed = FALSE
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You attach the [gun.name] to the [name].</span>")
|
||||
to_chat(user, span_notice("You attach the [gun.name] to the [name]."))
|
||||
else
|
||||
src.visible_message("<span class='warning'>The [gun.name] snaps back onto the [name]!</span>")
|
||||
src.visible_message(span_warning("The [gun.name] snaps back onto the [name]!"))
|
||||
update_appearance()
|
||||
user.update_inv_back()
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
/obj/item/gun/energy/minigun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
if(ammo_pack && ammo_pack.overheat >= ammo_pack.overheat_max)
|
||||
to_chat(user, "<span class='warning'>The gun's heat sensor locked the trigger to prevent lens damage!</span>")
|
||||
to_chat(user, span_warning("The gun's heat sensor locked the trigger to prevent lens damage!"))
|
||||
return
|
||||
..()
|
||||
ammo_pack.overheat += burst_size
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
/obj/item/gun/energy/minigun/afterattack(atom/target, mob/living/user, flag, params)
|
||||
if(!ammo_pack || ammo_pack.loc != user)
|
||||
to_chat(user, "<span class='warning'>You need the backpack power source to fire the gun!</span>")
|
||||
to_chat(user, span_warning("You need the backpack power source to fire the gun!"))
|
||||
. = ..()
|
||||
|
||||
/obj/item/stock_parts/cell/minigun
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse)
|
||||
|
||||
/obj/item/gun/energy/pulse/destroyer/attack_self(mob/living/user)
|
||||
to_chat(user, "<span class='danger'>[src.name] has three settings, and they are all DESTROY.</span>")
|
||||
to_chat(user, span_danger("[src.name] has three settings, and they are all DESTROY."))
|
||||
|
||||
/obj/item/gun/energy/pulse/pistol
|
||||
name = "pulse pistol"
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
/obj/item/gun/energy/plasmacutter/examine(mob/user)
|
||||
. = ..()
|
||||
if(cell)
|
||||
. += "<span class='notice'>[src] is [round(cell.percent())]% charged.</span>"
|
||||
. += span_notice("[src] is [round(cell.percent())]% charged.")
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/attackby(obj/item/I, mob/user)
|
||||
var/charge_multiplier = 0 //2 = Refined stack, 1 = Ore
|
||||
@@ -155,11 +155,11 @@
|
||||
charge_multiplier = 1
|
||||
if(charge_multiplier)
|
||||
if(cell.charge == cell.maxcharge)
|
||||
to_chat(user, "<span class='notice'>You try to insert [I] into [src], but it's fully charged.</span>") //my cell is round and full
|
||||
to_chat(user, span_notice("You try to insert [I] into [src], but it's fully charged.")) //my cell is round and full
|
||||
return
|
||||
I.use(1)
|
||||
cell.give(500*charge_multiplier)
|
||||
to_chat(user, "<span class='notice'>You insert [I] in [src], recharging it.</span>")
|
||||
to_chat(user, span_notice("You insert [I] in [src], recharging it."))
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -167,13 +167,13 @@
|
||||
// Amount cannot be defaulted to 1: most of the code specifies 0 in the call.
|
||||
/obj/item/gun/energy/plasmacutter/tool_use_check(mob/living/user, amount)
|
||||
if(QDELETED(cell))
|
||||
to_chat(user, "<span class='warning'>[src] does not have a cell, and cannot be used!</span>")
|
||||
to_chat(user, span_warning("[src] does not have a cell, and cannot be used!"))
|
||||
return FALSE
|
||||
// Amount cannot be used if drain is made continuous, e.g. amount = 5, charge_weld = 25
|
||||
// Then it'll drain 125 at first and 25 periodically, but fail if charge dips below 125 even though it still can finish action
|
||||
// Alternately it'll need to drain amount*charge_weld every period, which is either obscene or makes it free for other uses
|
||||
if(amount ? cell.charge < charge_weld * amount : cell.charge < charge_weld)
|
||||
to_chat(user, "<span class='warning'>You need more charge to complete this task!</span>")
|
||||
to_chat(user, span_warning("You need more charge to complete this task!"))
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
@@ -209,7 +209,7 @@
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/attackby(obj/item/C, mob/user)
|
||||
if(istype(C, /obj/item/assembly/signaler/anomaly/bluespace))
|
||||
to_chat(user, "<span class='notice'>You insert [C] into the wormhole projector and the weapon gently hums to life.</span>")
|
||||
to_chat(user, span_notice("You insert [C] into the wormhole projector and the weapon gently hums to life."))
|
||||
firing_core = TRUE
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
|
||||
qdel(C)
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/shoot_with_empty_chamber(mob/living/user)
|
||||
. = ..()
|
||||
to_chat(user, "<span class='danger'>The display says, 'NO CORE INSTALLED'.</span>")
|
||||
to_chat(user, span_danger("The display says, 'NO CORE INSTALLED'."))
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/update_icon_state()
|
||||
. = ..()
|
||||
@@ -371,7 +371,7 @@
|
||||
|
||||
/obj/item/gun/energy/gravity_gun/attackby(obj/item/C, mob/user)
|
||||
if(istype(C, /obj/item/assembly/signaler/anomaly/grav))
|
||||
to_chat(user, "<span class='notice'>You insert [C] into the gravitational manipulator and the weapon gently hums to life.</span>")
|
||||
to_chat(user, span_notice("You insert [C] into the gravitational manipulator and the weapon gently hums to life."))
|
||||
firing_core = TRUE
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
|
||||
qdel(C)
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
var/area/A = get_area(user)
|
||||
if(istype(A, /area/wizard_station))
|
||||
add_fingerprint(user)
|
||||
to_chat(user, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].</span>")
|
||||
to_chat(user, span_warning("You know better than to violate the security of The Den, best wait until you leave to use [src]."))
|
||||
return
|
||||
else
|
||||
no_den_usage = 0
|
||||
if(checks_antimagic && user.anti_magic_check(TRUE, FALSE, FALSE, 0, TRUE))
|
||||
add_fingerprint(user)
|
||||
to_chat(user, "<span class='warning'>Something is interfering with [src].</span>")
|
||||
to_chat(user, span_warning("Something is interfering with [src]."))
|
||||
return
|
||||
. = ..()
|
||||
|
||||
@@ -80,10 +80,10 @@
|
||||
|
||||
|
||||
/obj/item/gun/magic/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
to_chat(user, "<span class='warning'>The [name] whizzles quietly.</span>")
|
||||
to_chat(user, span_warning("The [name] whizzles quietly."))
|
||||
|
||||
/obj/item/gun/magic/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is twisting [src] above [user.p_their()] head, releasing a magical blast! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
user.visible_message(span_suicide("[user] is twisting [src] above [user.p_their()] head, releasing a magical blast! It looks like [user.p_theyre()] trying to commit suicide!"))
|
||||
playsound(loc, fire_sound, 50, TRUE, -1)
|
||||
return (FIRELOSS)
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
if(no_den_usage)
|
||||
var/area/A = get_area(user)
|
||||
if(istype(A, /area/wizard_station))
|
||||
to_chat(user, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].</span>")
|
||||
to_chat(user, span_warning("You know better than to violate the security of The Den, best wait until you leave to use [src]."))
|
||||
return
|
||||
else
|
||||
no_den_usage = 0
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
|
||||
/obj/item/gun/magic/wand/proc/zap_self(mob/living/user)
|
||||
user.visible_message("<span class='danger'>[user] zaps [user.p_them()]self with [src].</span>")
|
||||
user.visible_message(span_danger("[user] zaps [user.p_them()]self with [src]."))
|
||||
playsound(user, fire_sound, 50, TRUE)
|
||||
user.log_message("zapped [user.p_them()]self with a <b>[src]</b>", LOG_ATTACK)
|
||||
|
||||
@@ -73,13 +73,13 @@
|
||||
..()
|
||||
charges--
|
||||
if(user.anti_magic_check())
|
||||
user.visible_message("<span class='warning'>[src] has no effect on [user]!</span>")
|
||||
user.visible_message(span_warning("[src] has no effect on [user]!"))
|
||||
return
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
if(L.mob_biotypes & MOB_UNDEAD) //negative energy heals the undead
|
||||
user.revive(full_heal = TRUE, admin_revive = TRUE)
|
||||
to_chat(user, "<span class='notice'>You feel great!</span>")
|
||||
to_chat(user, span_notice("You feel great!"))
|
||||
return
|
||||
to_chat(user, "<span class='warning'>You irradiate yourself with pure negative energy! \
|
||||
[pick("Do not pass go. Do not collect 200 zorkmids.","You feel more confident in your spell casting skills.","You Die...","Do you want your possessions identified?")]\
|
||||
@@ -112,7 +112,7 @@
|
||||
..()
|
||||
charges--
|
||||
if(user.anti_magic_check())
|
||||
user.visible_message("<span class='warning'>[src] has no effect on [user]!</span>")
|
||||
user.visible_message(span_warning("[src] has no effect on [user]!"))
|
||||
return
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
@@ -123,7 +123,7 @@
|
||||
user.death(0)
|
||||
return
|
||||
user.revive(full_heal = TRUE, admin_revive = TRUE)
|
||||
to_chat(user, "<span class='notice'>You feel great!</span>")
|
||||
to_chat(user, span_notice("You feel great!"))
|
||||
|
||||
/obj/item/gun/magic/wand/resurrection/debug //for testing
|
||||
desc = "Is it possible for something to be even more powerful than regular magic? This wand is."
|
||||
@@ -221,7 +221,7 @@
|
||||
no_den_usage = 1
|
||||
|
||||
/obj/item/gun/magic/wand/door/zap_self(mob/living/user)
|
||||
to_chat(user, "<span class='notice'>You feel vaguely more open with your feelings.</span>")
|
||||
to_chat(user, span_notice("You feel vaguely more open with your feelings."))
|
||||
charges--
|
||||
..()
|
||||
|
||||
|
||||
@@ -101,13 +101,13 @@
|
||||
zoom_lock = 0
|
||||
switch(zoom_lock)
|
||||
if(ZOOM_LOCK_AUTOZOOM_FREEMOVE)
|
||||
to_chat(user, "<span class='boldnotice'>You switch [src]'s zooming processor to free directional.</span>")
|
||||
to_chat(user, span_boldnotice("You switch [src]'s zooming processor to free directional."))
|
||||
if(ZOOM_LOCK_AUTOZOOM_ANGLELOCK)
|
||||
to_chat(user, "<span class='boldnotice'>You switch [src]'s zooming processor to locked directional.</span>")
|
||||
to_chat(user, span_boldnotice("You switch [src]'s zooming processor to locked directional."))
|
||||
if(ZOOM_LOCK_CENTER_VIEW)
|
||||
to_chat(user, "<span class='boldnotice'>You switch [src]'s zooming processor to center mode.</span>")
|
||||
to_chat(user, span_boldnotice("You switch [src]'s zooming processor to center mode."))
|
||||
if(ZOOM_LOCK_OFF)
|
||||
to_chat(user, "<span class='boldnotice'>You disable [src]'s zooming system.</span>")
|
||||
to_chat(user, span_boldnotice("You disable [src]'s zooming system."))
|
||||
reset_zooming()
|
||||
else
|
||||
..()
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/attack_self(mob/user)
|
||||
projectile_setting_pierce = !projectile_setting_pierce
|
||||
to_chat(user, "<span class='boldnotice'>You set \the [src] to [projectile_setting_pierce? "pierce":"impact"] mode.</span>")
|
||||
to_chat(user, span_boldnotice("You set \the [src] to [projectile_setting_pierce? "pierce":"impact"] mode."))
|
||||
aiming_beam()
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/proc/update_slowdown()
|
||||
@@ -441,7 +441,7 @@
|
||||
new /obj/effect/temp_visual/explosion/fast(epicenter)
|
||||
for(var/mob/living/L in range(aoe_mob_range, epicenter)) //handle aoe mob damage
|
||||
L.adjustFireLoss(aoe_mob_damage)
|
||||
to_chat(L, "<span class='userdanger'>\The [src] sears you!</span>")
|
||||
to_chat(L, span_userdanger("\The [src] sears you!"))
|
||||
for(var/turf/T in RANGE_TURFS(aoe_fire_range, epicenter)) //handle aoe fire
|
||||
if(prob(aoe_fire_chance))
|
||||
new /obj/effect/hotspot(T)
|
||||
|
||||
@@ -62,13 +62,13 @@
|
||||
/obj/item/gun/blastcannon/examine(mob/user)
|
||||
. = ..()
|
||||
if(bomb)
|
||||
. += "<span class='notice'>A bomb is loaded inside.</span>"
|
||||
. += span_notice("A bomb is loaded inside.")
|
||||
|
||||
/obj/item/gun/blastcannon/attack_self(mob/user)
|
||||
if(bomb)
|
||||
bomb.forceMove(user.loc)
|
||||
user.put_in_hands(bomb)
|
||||
user.visible_message("<span class='warning'>[user] detaches [bomb] from [src].</span>")
|
||||
user.visible_message(span_warning("[user] detaches [bomb] from [src]."))
|
||||
bomb = null
|
||||
update_appearance()
|
||||
return ..()
|
||||
@@ -82,16 +82,16 @@
|
||||
return ..()
|
||||
|
||||
if(bomb)
|
||||
to_chat(user, "<span class='warning'>[bomb] is already attached to [src]!</span>")
|
||||
to_chat(user, span_warning("[bomb] is already attached to [src]!"))
|
||||
return
|
||||
if(!bomb_to_attach.ready())
|
||||
to_chat(user, "<span class='warning'>What good would an incomplete bomb do?</span>")
|
||||
to_chat(user, span_warning("What good would an incomplete bomb do?"))
|
||||
return FALSE
|
||||
if(!user.transferItemToLoc(bomb_to_attach, src))
|
||||
to_chat(user, "<span class='warning'>[bomb_to_attach] seems to be stuck to your hand!</span>")
|
||||
to_chat(user, span_warning("[bomb_to_attach] seems to be stuck to your hand!"))
|
||||
return FALSE
|
||||
|
||||
user.visible_message("<span class='warning'>[user] attaches [bomb_to_attach] to [src]!</span>")
|
||||
user.visible_message(span_warning("[user] attaches [bomb_to_attach] to [src]!"))
|
||||
bomb = bomb_to_attach
|
||||
update_appearance()
|
||||
return TRUE
|
||||
@@ -104,8 +104,8 @@
|
||||
cached_modifiers = params
|
||||
if(bomb?.valve_open)
|
||||
user.visible_message(
|
||||
"<span class='danger'>[user] points [src] at [target]!</span>",
|
||||
"<span class='danger'>You point [src] at [target]!</span>"
|
||||
span_danger("[user] points [src] at [target]!"),
|
||||
span_danger("You point [src] at [target]!")
|
||||
)
|
||||
return
|
||||
|
||||
@@ -116,8 +116,8 @@
|
||||
|
||||
playsound(src, dry_fire_sound, 30, TRUE) // *click
|
||||
user.visible_message(
|
||||
"<span class='danger'>[user] opens [bomb] on [user.p_their()] [src] and points [p_them()] at [target]!</span>",
|
||||
"<span class='danger'>You open [bomb] on your [src] and point [p_them()] at [target]!</span>"
|
||||
span_danger("[user] opens [bomb] on [user.p_their()] [src] and points [p_them()] at [target]!"),
|
||||
span_danger("You open [bomb] on your [src] and point [p_them()] at [target]!")
|
||||
)
|
||||
var/turf/current_turf = get_turf(src)
|
||||
var/turf/target_turf = get_turf(target)
|
||||
@@ -142,7 +142,7 @@
|
||||
var/light = arguments[EXARG_KEY_LIGHT_RANGE]
|
||||
var/range = max(heavy, medium, light, 0)
|
||||
if(!range)
|
||||
visible_message("<span class='warning'>[src] lets out a little \"phut\".</span>")
|
||||
visible_message(span_warning("[src] lets out a little \"phut\"."))
|
||||
return
|
||||
|
||||
if(!ismob(loc))
|
||||
@@ -200,8 +200,8 @@
|
||||
*/
|
||||
/obj/item/gun/blastcannon/proc/fire_intentionally(atom/target, mob/firer, heavy, medium, light, modifiers)
|
||||
firer.visible_message(
|
||||
"<span class='danger'>[firer] fires a blast wave at [target]!</span>",
|
||||
"<span class='danger'>You fire a blast wave at [target]!</span>"
|
||||
span_danger("[firer] fires a blast wave at [target]!"),
|
||||
span_danger("You fire a blast wave at [target]!")
|
||||
)
|
||||
var/turf/start_turf = get_turf(src)
|
||||
var/turf/target_turf = get_turf(target)
|
||||
@@ -232,8 +232,8 @@
|
||||
var/mob/firer = cached_firer?.resolve()
|
||||
var/turf/start_turf = get_turf(src)
|
||||
holder.visible_message(
|
||||
"<span class='danger'>[src] suddenly goes off[holding ? " in [holder]'s hands" : null]!</span>",
|
||||
"<span class='danger'>[src] suddenly goes off[holding ? " in your hands" : null]!</span>"
|
||||
span_danger("[src] suddenly goes off[holding ? " in [holder]'s hands" : null]!"),
|
||||
span_danger("[src] suddenly goes off[holding ? " in your hands" : null]!")
|
||||
)
|
||||
message_admins("Blast wave primed by [ADMIN_LOOKUPFLW(firer)] fired from [ADMIN_VERBOSEJMP(start_turf)] roughly towards [ADMIN_VERBOSEJMP(target)] while being held by [ADMIN_LOOKUPFLW(holder)] with power [heavy]/[medium]/[light].")
|
||||
log_game("Blast wave primed by [key_name(firer)] fired from [AREACOORD(start_turf)] roughly towards [AREACOORD(target)] while being held by [key_name(holder)] with power [heavy]/[medium]/[light].")
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
/obj/item/gun/ballistic/bow/attack_self(mob/user)
|
||||
if(chambered)
|
||||
to_chat(user, "<span class='notice'>You [drawn ? "release the tension on" : "draw the string on"] [src].</span>")
|
||||
to_chat(user, span_notice("You [drawn ? "release the tension on" : "draw the string on"] [src]."))
|
||||
drawn = !drawn
|
||||
update_appearance()
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
return
|
||||
if(world.time < last_synth+time_per_syringe)
|
||||
return
|
||||
to_chat(loc, "<span class='warning'>You hear a click as [src] synthesizes a new dart.</span>")
|
||||
to_chat(loc, span_warning("You hear a click as [src] synthesizes a new dart."))
|
||||
syringes_left++
|
||||
if(chambered && !chambered.loaded_projectile)
|
||||
chambered.newshot()
|
||||
|
||||
@@ -23,17 +23,17 @@
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
grenades += I
|
||||
to_chat(user, "<span class='notice'>You put the grenade in the grenade launcher.</span>")
|
||||
to_chat(user, "<span class='notice'>[grenades.len] / [max_grenades] Grenades.</span>")
|
||||
to_chat(user, span_notice("You put the grenade in the grenade launcher."))
|
||||
to_chat(user, span_notice("[grenades.len] / [max_grenades] Grenades."))
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>The grenade launcher cannot hold more grenades!</span>")
|
||||
to_chat(usr, span_warning("The grenade launcher cannot hold more grenades!"))
|
||||
|
||||
/obj/item/gun/grenadelauncher/can_shoot()
|
||||
return grenades.len
|
||||
|
||||
/obj/item/gun/grenadelauncher/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
user.visible_message("<span class='danger'>[user] fired a grenade!</span>", \
|
||||
"<span class='danger'>You fire the grenade launcher!</span>")
|
||||
user.visible_message(span_danger("[user] fired a grenade!"), \
|
||||
span_danger("You fire the grenade launcher!"))
|
||||
var/obj/item/grenade/F = grenades[1] //Now with less copypasta!
|
||||
grenades -= F
|
||||
F.forceMove(user.loc)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
SIGNAL_HANDLER
|
||||
active = FALSE //skip qdelling the beam again if we're doing this proc, because
|
||||
if(isliving(loc))
|
||||
to_chat(loc, "<span class='warning'>You lose control of the beam!</span>")
|
||||
to_chat(loc, span_warning("You lose control of the beam!"))
|
||||
LoseTarget()
|
||||
|
||||
/obj/item/gun/medbeam/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
/obj/item/gun/syringe/attack_self(mob/living/user)
|
||||
if(!syringes.len)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
to_chat(user, span_warning("[src] is empty!"))
|
||||
return FALSE
|
||||
|
||||
var/obj/item/reagent_containers/syringe/S = syringes[syringes.len]
|
||||
@@ -54,27 +54,27 @@
|
||||
user.put_in_hands(S)
|
||||
|
||||
syringes.Remove(S)
|
||||
to_chat(user, "<span class='notice'>You unload [S] from \the [src].</span>")
|
||||
to_chat(user, span_notice("You unload [S] from \the [src]."))
|
||||
update_appearance()
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
|
||||
if(istype(A, /obj/item/reagent_containers/syringe/bluespace))
|
||||
to_chat(user, "<span class='notice'>[A] is too big to load into [src].</span>")
|
||||
to_chat(user, span_notice("[A] is too big to load into [src]."))
|
||||
return TRUE
|
||||
if(istype(A, /obj/item/reagent_containers/syringe))
|
||||
if(syringes.len < max_syringes)
|
||||
if(!user.transferItemToLoc(A, src))
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You load [A] into \the [src].</span>")
|
||||
to_chat(user, span_notice("You load [A] into \the [src]."))
|
||||
syringes += A
|
||||
recharge_newshot()
|
||||
update_appearance()
|
||||
playsound(loc, load_sound, 40)
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
|
||||
to_chat(user, span_warning("[src] cannot hold more syringes!"))
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/syringe/update_overlays()
|
||||
@@ -113,17 +113,17 @@
|
||||
if(istype(A, /obj/item/dnainjector))
|
||||
var/obj/item/dnainjector/D = A
|
||||
if(D.used)
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
to_chat(user, span_warning("This injector is used up!"))
|
||||
return
|
||||
if(syringes.len < max_syringes)
|
||||
if(!user.transferItemToLoc(D, src))
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You load \the [D] into \the [src].</span>")
|
||||
to_chat(user, span_notice("You load \the [D] into \the [src]."))
|
||||
syringes += D
|
||||
recharge_newshot()
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
|
||||
to_chat(user, span_warning("[src] cannot hold more syringes!"))
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/syringe/blowgun
|
||||
@@ -135,7 +135,7 @@
|
||||
fire_sound = 'sound/items/syringeproj.ogg'
|
||||
|
||||
/obj/item/gun/syringe/blowgun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
visible_message("<span class='danger'>[user] starts aiming with a blowgun!</span>")
|
||||
visible_message(span_danger("[user] starts aiming with a blowgun!"))
|
||||
if(do_after(user, 25, target = src))
|
||||
user.adjustStaminaLoss(20)
|
||||
user.adjustOxyLoss(20)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
var/obj/item/gun/G = target
|
||||
var/obj/item/firing_pin/old_pin = G.pin
|
||||
if(old_pin && (force_replace || old_pin.pin_removeable))
|
||||
to_chat(user, "<span class='notice'>You remove [old_pin] from [G].</span>")
|
||||
to_chat(user, span_notice("You remove [old_pin] from [G]."))
|
||||
if(Adjacent(user))
|
||||
user.put_in_hands(old_pin)
|
||||
else
|
||||
@@ -38,15 +38,15 @@
|
||||
if(!user.temporarilyRemoveItemFromInventory(src))
|
||||
return
|
||||
gun_insert(user, G)
|
||||
to_chat(user, "<span class='notice'>You insert [src] into [G].</span>")
|
||||
to_chat(user, span_notice("You insert [src] into [G]."))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>This firearm already has a firing pin installed.</span>")
|
||||
to_chat(user, span_notice("This firearm already has a firing pin installed."))
|
||||
|
||||
/obj/item/firing_pin/emag_act(mob/user)
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
obj_flags |= EMAGGED
|
||||
to_chat(user, "<span class='notice'>You override the authentication mechanism.</span>")
|
||||
to_chat(user, span_notice("You override the authentication mechanism."))
|
||||
|
||||
/obj/item/firing_pin/proc/gun_insert(mob/living/user, obj/item/gun/G)
|
||||
gun = G
|
||||
@@ -67,8 +67,8 @@
|
||||
user.show_message(fail_message, MSG_VISUAL)
|
||||
if(selfdestruct)
|
||||
if(user)
|
||||
user.show_message("<span class='danger'>SELF-DESTRUCTING...</span><br>", MSG_VISUAL)
|
||||
to_chat(user, "<span class='userdanger'>[gun] explodes!</span>")
|
||||
user.show_message("[span_danger("SELF-DESTRUCTING...")]<br>", MSG_VISUAL)
|
||||
to_chat(user, span_userdanger("[gun] explodes!"))
|
||||
explosion(src, devastation_range = -1, light_impact_range = 2, flash_range = 3)
|
||||
if(gun)
|
||||
qdel(gun)
|
||||
@@ -185,7 +185,7 @@
|
||||
var/mob/living/carbon/M = target
|
||||
if(M.dna && M.dna.unique_enzymes)
|
||||
unique_enzymes = M.dna.unique_enzymes
|
||||
to_chat(user, "<span class='notice'>DNA-LOCK SET.</span>")
|
||||
to_chat(user, span_notice("DNA-LOCK SET."))
|
||||
|
||||
/obj/item/firing_pin/dna/pin_auth(mob/living/carbon/user)
|
||||
if(user && user.dna && user.dna.unique_enzymes)
|
||||
@@ -197,7 +197,7 @@
|
||||
if(!unique_enzymes)
|
||||
if(user && user.dna && user.dna.unique_enzymes)
|
||||
unique_enzymes = user.dna.unique_enzymes
|
||||
to_chat(user, "<span class='notice'>DNA-LOCK SET.</span>")
|
||||
to_chat(user, span_notice("DNA-LOCK SET."))
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -221,24 +221,24 @@
|
||||
|
||||
/obj/item/firing_pin/paywall/attack_self(mob/user)
|
||||
multi_payment = !multi_payment
|
||||
to_chat(user, "<span class='notice'>You set the pin to [( multi_payment ) ? "process payment for every shot" : "one-time license payment"].</span>")
|
||||
to_chat(user, span_notice("You set the pin to [( multi_payment ) ? "process payment for every shot" : "one-time license payment"]."))
|
||||
|
||||
/obj/item/firing_pin/paywall/examine(mob/user)
|
||||
. = ..()
|
||||
if(pin_owner)
|
||||
. += "<span class='notice'>This firing pin is currently authorized to pay into the account of [pin_owner.registered_name].</span>"
|
||||
. += span_notice("This firing pin is currently authorized to pay into the account of [pin_owner.registered_name].")
|
||||
|
||||
/obj/item/firing_pin/paywall/gun_insert(mob/living/user, obj/item/gun/G)
|
||||
if(!pin_owner)
|
||||
to_chat(user, "<span class='warning'>ERROR: Please swipe valid identification card before installing firing pin!</span>")
|
||||
to_chat(user, span_warning("ERROR: Please swipe valid identification card before installing firing pin!"))
|
||||
return
|
||||
gun = G
|
||||
forceMove(gun)
|
||||
gun.pin = src
|
||||
if(multi_payment)
|
||||
gun.desc += "<span class='notice'> This [gun.name] has a per-shot cost of [payment_amount] credit[( payment_amount > 1 ) ? "s" : ""].</span>"
|
||||
gun.desc += span_notice(" This [gun.name] has a per-shot cost of [payment_amount] credit[( payment_amount > 1 ) ? "s" : ""].")
|
||||
return
|
||||
gun.desc += "<span class='notice'> This [gun.name] has a license permit cost of [payment_amount] credit[( payment_amount > 1 ) ? "s" : ""].</span>"
|
||||
gun.desc += span_notice(" This [gun.name] has a license permit cost of [payment_amount] credit[( payment_amount > 1 ) ? "s" : ""].")
|
||||
return
|
||||
|
||||
|
||||
@@ -250,20 +250,20 @@
|
||||
if(istype(M, /obj/item/card/id))
|
||||
var/obj/item/card/id/id = M
|
||||
if(!id.registered_account)
|
||||
to_chat(user, "<span class='warning'>ERROR: Identification card lacks registered bank account!</span>")
|
||||
to_chat(user, span_warning("ERROR: Identification card lacks registered bank account!"))
|
||||
return
|
||||
if(id != pin_owner && owned)
|
||||
to_chat(user, "<span class='warning'>ERROR: This firing pin has already been authorized!</span>")
|
||||
to_chat(user, span_warning("ERROR: This firing pin has already been authorized!"))
|
||||
return
|
||||
if(id == pin_owner)
|
||||
to_chat(user, "<span class='notice'>You unlink the card from the firing pin.</span>")
|
||||
to_chat(user, span_notice("You unlink the card from the firing pin."))
|
||||
gun_owners -= user
|
||||
pin_owner = null
|
||||
owned = FALSE
|
||||
return
|
||||
var/transaction_amount = input(user, "Insert valid deposit amount for gun purchase", "Money Deposit") as null|num
|
||||
if(transaction_amount < 1)
|
||||
to_chat(user, "<span class='warning'>ERROR: Invalid amount designated.</span>")
|
||||
to_chat(user, span_warning("ERROR: Invalid amount designated."))
|
||||
return
|
||||
if(!transaction_amount)
|
||||
return
|
||||
@@ -271,7 +271,7 @@
|
||||
owned = TRUE
|
||||
payment_amount = transaction_amount
|
||||
gun_owners += user
|
||||
to_chat(user, "<span class='notice'>You link the card to the firing pin.</span>")
|
||||
to_chat(user, span_notice("You link the card to the firing pin."))
|
||||
|
||||
/obj/item/firing_pin/paywall/pin_auth(mob/living/user)
|
||||
if(!istype(user))//nice try commie
|
||||
@@ -282,7 +282,7 @@
|
||||
if(credit_card_details.adjust_money(-payment_amount))
|
||||
pin_owner.registered_account.adjust_money(payment_amount)
|
||||
return TRUE
|
||||
to_chat(user, "<span class='warning'>ERROR: User balance insufficent for successful transaction!</span>")
|
||||
to_chat(user, span_warning("ERROR: User balance insufficent for successful transaction!"))
|
||||
return FALSE
|
||||
return TRUE
|
||||
if(credit_card_details && !active_prompt)
|
||||
@@ -296,15 +296,15 @@
|
||||
if(credit_card_details.adjust_money(-payment_amount))
|
||||
pin_owner.registered_account.adjust_money(payment_amount)
|
||||
gun_owners += user
|
||||
to_chat(user, "<span class='notice'>Gun license purchased, have a secure day!</span>")
|
||||
to_chat(user, span_notice("Gun license purchased, have a secure day!"))
|
||||
active_prompt = FALSE
|
||||
return FALSE //we return false here so you don't click initially to fire, get the prompt, accept the prompt, and THEN the gun
|
||||
to_chat(user, "<span class='warning'>ERROR: User balance insufficent for successful transaction!</span>")
|
||||
to_chat(user, span_warning("ERROR: User balance insufficent for successful transaction!"))
|
||||
return FALSE
|
||||
if("No")
|
||||
to_chat(user, "<span class='warning'>ERROR: User has declined to purchase gun license!</span>")
|
||||
to_chat(user, span_warning("ERROR: User has declined to purchase gun license!"))
|
||||
return FALSE
|
||||
to_chat(user, "<span class='warning'>ERROR: User has no valid bank account to substract neccesary funds from!</span>")
|
||||
to_chat(user, span_warning("ERROR: User has no valid bank account to substract neccesary funds from!"))
|
||||
return FALSE
|
||||
|
||||
// Explorer Firing Pin- Prevents use on station Z-Level, so it's justifiable to give Explorers guns that don't suck.
|
||||
@@ -318,7 +318,7 @@
|
||||
/obj/item/firing_pin/explorer/pin_auth(mob/living/user)
|
||||
var/turf/station_check = get_turf(user)
|
||||
if(!station_check||is_station_level(station_check.z))
|
||||
to_chat(user, "<span class='warning'>You cannot use your weapon while on the station!</span>")
|
||||
to_chat(user, span_warning("You cannot use your weapon while on the station!"))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
var/mob/living/carbon/human/M = user
|
||||
if(istype(M.wear_suit, suit_requirement))
|
||||
return TRUE
|
||||
to_chat(user, "<span class='warning'>You need to be wearing [tagcolor] laser tag armor!</span>")
|
||||
to_chat(user, span_warning("You need to be wearing [tagcolor] laser tag armor!"))
|
||||
return FALSE
|
||||
|
||||
/obj/item/firing_pin/tag/red
|
||||
|
||||
@@ -279,13 +279,13 @@
|
||||
playsound(loc, hitsound, 5, TRUE, -1)
|
||||
else if(suppressed)
|
||||
playsound(loc, hitsound, 5, TRUE, -1)
|
||||
to_chat(L, "<span class='userdanger'>You're shot by \a [src][organ_hit_text]!</span>")
|
||||
to_chat(L, span_userdanger("You're shot by \a [src][organ_hit_text]!"))
|
||||
else
|
||||
if(hitsound)
|
||||
var/volume = vol_by_damage()
|
||||
playsound(src, hitsound, volume, TRUE, -1)
|
||||
L.visible_message("<span class='danger'>[L] is hit by \a [src][organ_hit_text]!</span>", \
|
||||
"<span class='userdanger'>You're hit by \a [src][organ_hit_text]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
L.visible_message(span_danger("[L] is hit by \a [src][organ_hit_text]!"), \
|
||||
span_userdanger("You're hit by \a [src][organ_hit_text]!"), null, COMBAT_MESSAGE_RANGE)
|
||||
L.on_hit(src)
|
||||
|
||||
var/reagent_note
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
M.visible_message("<span class='danger'>[M] explodes into a shower of gibs!</span>")
|
||||
M.visible_message(span_danger("[M] explodes into a shower of gibs!"))
|
||||
M.gib()
|
||||
|
||||
//a shrink ray that shrinks stuff, which grows back after a short while.
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
return BULLET_ACT_HIT
|
||||
else
|
||||
blocked = 100
|
||||
target.visible_message("<span class='danger'>\The [src] is deflected!</span>", \
|
||||
"<span class='userdanger'>You are protected against \the [src]!</span>")
|
||||
target.visible_message(span_danger("\The [src] is deflected!"), \
|
||||
span_userdanger("You are protected against \the [src]!"))
|
||||
|
||||
..(target, blocked)
|
||||
reagents.flags &= ~(NO_REACT)
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
return BULLET_ACT_HIT
|
||||
else
|
||||
blocked = 100
|
||||
target.visible_message("<span class='danger'>\The [src] is deflected!</span>", \
|
||||
"<span class='userdanger'>You are protected against \the [src]!</span>")
|
||||
target.visible_message(span_danger("\The [src] is deflected!"), \
|
||||
span_userdanger("You are protected against \the [src]!"))
|
||||
return ..()
|
||||
|
||||
/obj/projectile/bullet/dnainjector/Destroy()
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
return
|
||||
|
||||
if(target.anti_magic_check())
|
||||
target.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
target.visible_message(span_warning("[src] vanishes on contact with [target]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
|
||||
if(target.mob_biotypes & MOB_UNDEAD) //negative energy heals the undead
|
||||
if(target.revive(full_heal = TRUE, admin_revive = TRUE))
|
||||
target.grab_ghost(force = TRUE) // even suicides
|
||||
to_chat(target, "<span class='notice'>You rise with a start, you're undead!!!</span>")
|
||||
to_chat(target, span_notice("You rise with a start, you're undead!!!"))
|
||||
else if(target.stat != DEAD)
|
||||
to_chat(target, "<span class='notice'>You feel great!</span>")
|
||||
to_chat(target, span_notice("You feel great!"))
|
||||
return
|
||||
|
||||
target.death()
|
||||
@@ -41,16 +41,16 @@
|
||||
. = ..()
|
||||
if(isliving(target))
|
||||
if(target.anti_magic_check())
|
||||
target.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
target.visible_message(span_warning("[src] vanishes on contact with [target]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
if(target.mob_biotypes & MOB_UNDEAD) //positive energy harms the undead
|
||||
target.death(0)
|
||||
else
|
||||
if(target.revive(full_heal = TRUE, admin_revive = TRUE))
|
||||
target.grab_ghost(force = TRUE) // even suicides
|
||||
to_chat(target, "<span class='notice'>You rise with a start, you're alive!!!</span>")
|
||||
to_chat(target, span_notice("You rise with a start, you're alive!!!"))
|
||||
else if(target.stat != DEAD)
|
||||
to_chat(target, "<span class='notice'>You feel great!</span>")
|
||||
to_chat(target, span_notice("You feel great!"))
|
||||
|
||||
/obj/projectile/magic/teleport
|
||||
name = "bolt of teleportation"
|
||||
@@ -66,7 +66,7 @@
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] fizzles on contact with [target]!</span>")
|
||||
M.visible_message(span_warning("[src] fizzles on contact with [target]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
var/teleammount = 0
|
||||
var/teleloc = target
|
||||
@@ -92,7 +92,7 @@
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] fizzles on contact with [target]!</span>")
|
||||
M.visible_message(span_warning("[src] fizzles on contact with [target]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
if(isturf(target))
|
||||
return BULLET_ACT_HIT
|
||||
@@ -147,7 +147,7 @@
|
||||
if(ismob(change))
|
||||
var/mob/M = change
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] fizzles on contact with [M]!</span>")
|
||||
M.visible_message(span_warning("[src] fizzles on contact with [M]!"))
|
||||
qdel(src)
|
||||
return BULLET_ACT_BLOCK
|
||||
wabbajack(change)
|
||||
@@ -294,7 +294,7 @@
|
||||
|
||||
M.wabbajack_act(new_mob)
|
||||
|
||||
to_chat(new_mob, "<span class='warning'>Your form morphs into that of a [randomize].</span>")
|
||||
to_chat(new_mob, span_warning("Your form morphs into that of a [randomize]."))
|
||||
|
||||
var/poly_msg = get_policy(POLICY_POLYMORPH)
|
||||
if(poly_msg)
|
||||
@@ -334,7 +334,7 @@
|
||||
if(L.mind)
|
||||
L.mind.transfer_to(S)
|
||||
if(owner)
|
||||
to_chat(S, "<span class='userdanger'>You are an animate statue. You cannot move when monitored, but are nearly invincible and deadly when unobserved! Do not harm [owner], your creator.</span>")
|
||||
to_chat(S, span_userdanger("You are an animate statue. You cannot move when monitored, but are nearly invincible and deadly when unobserved! Do not harm [owner], your creator."))
|
||||
P.forceMove(S)
|
||||
return
|
||||
else
|
||||
@@ -363,7 +363,7 @@
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
M.visible_message(span_warning("[src] vanishes on contact with [target]!"))
|
||||
qdel(src)
|
||||
return BULLET_ACT_BLOCK
|
||||
. = ..()
|
||||
@@ -382,7 +382,7 @@
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
M.visible_message(span_warning("[src] vanishes on contact with [target]!"))
|
||||
qdel(src)
|
||||
return BULLET_ACT_BLOCK
|
||||
. = ..()
|
||||
@@ -407,7 +407,7 @@
|
||||
if(isliving(A) && locker_suck)
|
||||
var/mob/living/M = A
|
||||
if(M.anti_magic_check()) // no this doesn't check if ..() returned to phase through do I care no it's magic ain't gotta explain shit
|
||||
M.visible_message("<span class='warning'>[src] vanishes on contact with [A]!</span>")
|
||||
M.visible_message(span_warning("[src] vanishes on contact with [A]!"))
|
||||
return PROJECTILE_DELETE_WITHOUT_HITTING
|
||||
if(!locker_temp_instance.insertion_allowed(M))
|
||||
return
|
||||
@@ -473,7 +473,7 @@
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(L.anti_magic_check())
|
||||
L.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
L.visible_message(span_warning("[src] vanishes on contact with [target]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
var/atom/throw_target = get_edge_target_turf(L, angle2dir(Angle))
|
||||
L.throw_at(throw_target, 200, 4)
|
||||
@@ -487,7 +487,7 @@
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(L.anti_magic_check() || !firer)
|
||||
L.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
L.visible_message(span_warning("[src] vanishes on contact with [target]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
L.apply_status_effect(STATUS_EFFECT_BOUNTY, firer)
|
||||
|
||||
@@ -500,7 +500,7 @@
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(L.anti_magic_check())
|
||||
L.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
L.visible_message(span_warning("[src] vanishes on contact with [target]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
L.apply_status_effect(STATUS_EFFECT_ANTIMAGIC)
|
||||
|
||||
@@ -513,7 +513,7 @@
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(L.anti_magic_check() || !firer)
|
||||
L.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
L.visible_message(span_warning("[src] vanishes on contact with [target]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
var/atom/throw_target = get_edge_target_turf(L, get_dir(L, firer))
|
||||
L.throw_at(throw_target, 200, 4)
|
||||
@@ -527,7 +527,7 @@
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
M.visible_message(span_warning("[src] vanishes on contact with [target]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, src, /datum/mood_event/sapped)
|
||||
|
||||
@@ -540,13 +540,13 @@
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(L.anti_magic_check() || !L.mind)
|
||||
L.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
L.visible_message(span_warning("[src] vanishes on contact with [target]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
to_chat(L, "<span class='danger'>Your body feels drained and there is a burning pain in your chest.</span>")
|
||||
to_chat(L, span_danger("Your body feels drained and there is a burning pain in your chest."))
|
||||
L.maxHealth -= 20
|
||||
L.health = min(L.health, L.maxHealth)
|
||||
if(L.maxHealth <= 0)
|
||||
to_chat(L, "<span class='userdanger'>Your weakened soul is completely consumed by the [src]!</span>")
|
||||
to_chat(L, span_userdanger("Your weakened soul is completely consumed by the [src]!"))
|
||||
return
|
||||
for(var/obj/effect/proc_holder/spell/spell in L.mind.spell_list)
|
||||
spell.charge_counter = spell.charge_max
|
||||
@@ -562,13 +562,13 @@
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
M.visible_message(span_warning("[src] vanishes on contact with [target]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
for(var/x in M.get_traumas())//checks to see if the victim is already going through possession
|
||||
if(istype(x, /datum/brain_trauma/special/imaginary_friend/trapped_owner))
|
||||
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
M.visible_message(span_warning("[src] vanishes on contact with [target]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
to_chat(M, "<span class='warning'>Your mind has been opened to possession!</span>")
|
||||
to_chat(M, span_warning("Your mind has been opened to possession!"))
|
||||
possession_test(M)
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
@@ -588,7 +588,7 @@
|
||||
return
|
||||
if(LAZYLEN(candidates))
|
||||
var/mob/dead/observer/C = pick(candidates)
|
||||
to_chat(M, "<span class='boldnotice'>You have been noticed by a ghost and it has possessed you!</span>")
|
||||
to_chat(M, span_boldnotice("You have been noticed by a ghost and it has possessed you!"))
|
||||
var/oldkey = M.key
|
||||
M.ghostize(0)
|
||||
M.key = C.key
|
||||
@@ -597,7 +597,7 @@
|
||||
trauma.friend.Show()
|
||||
trauma.friend_initialized = TRUE
|
||||
else
|
||||
to_chat(M, "<span class='notice'>Your mind has managed to go unnoticed in the spirit world.</span>")
|
||||
to_chat(M, span_notice("Your mind has managed to go unnoticed in the spirit world."))
|
||||
qdel(trauma)
|
||||
|
||||
/obj/projectile/magic/aoe
|
||||
@@ -639,7 +639,7 @@
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
if(M.anti_magic_check())
|
||||
visible_message("<span class='warning'>[src] fizzles on contact with [target]!</span>")
|
||||
visible_message(span_warning("[src] fizzles on contact with [target]!"))
|
||||
qdel(src)
|
||||
return BULLET_ACT_BLOCK
|
||||
tesla_zap(src, zap_range, zap_power, zap_flags)
|
||||
@@ -672,7 +672,7 @@
|
||||
if(ismob(target))
|
||||
var/mob/living/M = target
|
||||
if(M.anti_magic_check())
|
||||
visible_message("<span class='warning'>[src] vanishes into smoke on contact with [target]!</span>")
|
||||
visible_message(span_warning("[src] vanishes into smoke on contact with [target]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
M.take_overall_damage(0,10) //between this 10 burn, the 10 brute, the explosion brute, and the onfire burn, your at about 65 damage if you stop drop and roll immediately
|
||||
var/turf/T = get_turf(target)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
if(prob(15))
|
||||
L.rad_act(rand(30, 80))
|
||||
L.Paralyze(100)
|
||||
L.visible_message("<span class='warning'>[L] writhes in pain as [L.p_their()] vacuoles boil.</span>", "<span class='userdanger'>You writhe in pain as your vacuoles boil!</span>", "<span class='hear'>You hear the crunching of leaves.</span>")
|
||||
L.visible_message(span_warning("[L] writhes in pain as [L.p_their()] vacuoles boil."), span_userdanger("You writhe in pain as your vacuoles boil!"), span_hear("You hear the crunching of leaves."))
|
||||
if(iscarbon(L) && L.has_dna())
|
||||
var/mob/living/carbon/C = L
|
||||
if(prob(80))
|
||||
@@ -25,7 +25,7 @@
|
||||
C.domutcheck()
|
||||
else
|
||||
L.adjustFireLoss(rand(5, 15))
|
||||
L.show_message("<span class='userdanger'>The radiation beam singes you!</span>")
|
||||
L.show_message(span_userdanger("The radiation beam singes you!"))
|
||||
|
||||
/obj/projectile/energy/florayield
|
||||
name = "beta somatoray"
|
||||
@@ -55,7 +55,7 @@
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(L.mob_biotypes & MOB_PLANT)
|
||||
L.show_message("<span class='notice'>The radiation beam leaves you feeling disoriented!</span>")
|
||||
L.show_message(span_notice("The radiation beam leaves you feeling disoriented!"))
|
||||
L.Dizzy(15)
|
||||
L.emote("flip")
|
||||
L.emote("spin")
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
|
||||
/obj/projectile/hallucination/proc/target_on_hit(mob/M)
|
||||
if(M == hal_target)
|
||||
to_chat(hal_target, "<span class='userdanger'>[M] is hit by \a [src] in the chest!</span>")
|
||||
to_chat(hal_target, span_userdanger("[M] is hit by \a [src] in the chest!"))
|
||||
hal_apply_effect()
|
||||
else if(M in view(hal_target))
|
||||
to_chat(hal_target, "<span class='danger'>[M] is hit by \a [src] in the chest!!</span>")
|
||||
to_chat(hal_target, span_danger("[M] is hit by \a [src] in the chest!!"))
|
||||
if(damage_type == BRUTE)
|
||||
var/splatter_dir = dir
|
||||
if(starting)
|
||||
|
||||
Reference in New Issue
Block a user