refactors most spans

This commit is contained in:
Kashargul
2024-10-02 21:10:31 +02:00
parent 5417c7772c
commit a2c673ab7a
1517 changed files with 12436 additions and 12347 deletions
+4 -4
View File
@@ -27,11 +27,11 @@
if(inflamed == 1)
if(prob(5))
to_chat(owner, "<span class='warning'>You feel a stinging pain in your abdomen!</span>")
to_chat(owner, span_warning("You feel a stinging pain in your abdomen!"))
owner.custom_emote(VISIBLE_MESSAGE, "winces slightly.")
if(inflamed > 1)
if(prob(3))
to_chat(owner, "<span class='warning'>You feel a stabbing pain in your abdomen!</span>")
to_chat(owner, span_warning("You feel a stabbing pain in your abdomen!"))
owner.custom_emote(VISIBLE_MESSAGE, "winces painfully.")
owner.adjustToxLoss(1)
if(inflamed > 2)
@@ -39,7 +39,7 @@
owner.vomit()
if(inflamed > 3)
if(prob(1))
to_chat(owner, "<span class='danger'>Your abdomen is a world of pain!</span>")
to_chat(owner, span_danger("Your abdomen is a world of pain!"))
owner.Weaken(10)
var/obj/item/organ/external/groin = owner.get_organ(BP_GROIN)
@@ -52,4 +52,4 @@
if(inflamed)
icon_state = "[initial(icon_state)]inflamed"
name = "inflamed appendix"
..()
..()
+3 -3
View File
@@ -65,7 +65,7 @@
return
if(robotic && owner.get_restraining_bolt())
to_chat(owner, "<span class='warning'>\The [src] doesn't respond.</span>")
to_chat(owner, span_warning("\The [src] doesn't respond."))
return
var/item_to_equip = integrated_object
@@ -153,11 +153,11 @@
if(buckled)
var/obj/Ob = buckled
if(Ob.buckle_lying)
to_chat(M, "<span class='notice'>You cannot use your augments when restrained.</span>")
to_chat(M, span_notice("You cannot use your augments when restrained."))
return 0
if((slot == slot_l_hand && l_hand) || (slot == slot_r_hand && r_hand))
to_chat(M,"<span class='warning'>Your hand is full. Drop something first.</span>")
to_chat(M,span_warning("Your hand is full. Drop something first."))
return 0
var/del_if_failure = destroy_on_drop
@@ -31,7 +31,7 @@
organ_tag = O_AUG_L_FOREARM
parent_organ = BP_L_ARM
target_slot = slot_l_hand
to_chat(user, "<span class='notice'>You swap \the [src]'s servos to install neatly into \the lower [parent_organ] mount.</span>")
to_chat(user, span_notice("You swap \the [src]'s servos to install neatly into \the lower [parent_organ] mount."))
return
. = ..()
@@ -76,7 +76,7 @@
organ_tag = O_AUG_L_HAND
parent_organ = BP_L_HAND
target_slot = slot_l_hand
to_chat(user, "<span class='notice'>You swap \the [src]'s servos to install neatly into \the upper [parent_organ] mount.</span>")
to_chat(user, span_notice("You swap \the [src]'s servos to install neatly into \the upper [parent_organ] mount."))
return
. = ..()
@@ -120,7 +120,7 @@
organ_tag = O_AUG_L_UPPERARM
parent_organ = BP_L_ARM
target_slot = slot_l_hand
to_chat(user, "<span class='notice'>You swap \the [src]'s servos to install neatly into \the upper [parent_organ] mount.</span>")
to_chat(user, span_notice("You swap \the [src]'s servos to install neatly into \the upper [parent_organ] mount."))
return
. = ..()
+6 -7
View File
@@ -53,28 +53,28 @@
drop_from_inventory(glasses)
aug.integrated_object.forceMove(aug)
if(!glasses)
to_chat(src, "<span class='alien'>Your [aug.integrated_object] retract into your skull.</span>")
to_chat(src, span_alien("Your [aug.integrated_object] retract into your skull."))
else if(!istype(glasses, /obj/item/clothing/glasses/hud/security/jensenshades))
to_chat(src, "<span class='notice'>\The [glasses] block your shades from deploying.</span>")
to_chat(src, span_notice("\The [glasses] block your shades from deploying."))
else if(istype(glasses, /obj/item/clothing/glasses/hud/security/jensenshades))
var/obj/item/G = glasses
if(G.canremove)
to_chat(src, "<span class='notice'>\The [G] are not your integrated shades.</span>")
to_chat(src, span_notice("\The [G] are not your integrated shades."))
else
drop_from_inventory(G)
to_chat(src, "<span class='notice'>\The [G] retract into your skull.</span>")
to_chat(src, span_notice("\The [G] retract into your skull."))
qdel(G)
else
if(aug && aug.integrated_object)
to_chat(src, "<span class='alien'>Your [aug.integrated_object] deploy.</span>")
to_chat(src, span_alien("Your [aug.integrated_object] deploy."))
equip_to_slot(aug.integrated_object, slot_glasses, 0, 1)
if(!glasses || glasses != aug.integrated_object)
aug.integrated_object.forceMove(aug)
else
var/obj/item/clothing/glasses/hud/security/jensenshades/J = new(get_turf(src))
equip_to_slot(J, slot_glasses, 1, 1)
to_chat(src, "<span class='notice'>Your [aug.integrated_object] deploy.</span>")
to_chat(src, span_notice("Your [aug.integrated_object] deploy."))
/obj/item/organ/internal/augment/bioaugment/sprint_enhance
name = "locomotive optimization implant"
@@ -101,4 +101,3 @@
if(istype(owner, /mob/living/carbon/human))
var/mob/living/carbon/human/H = owner
H.add_modifier(/datum/modifier/sprinting, 1 MINUTES)
+3 -3
View File
@@ -117,7 +117,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
brainmob.languages = H.languages
to_chat(brainmob, "<span class='notice'>You feel slightly disoriented. That's normal when you're just \a [initial(src.name)].</span>")
to_chat(brainmob, span_notice("You feel slightly disoriented. That's normal when you're just \a [initial(src.name)]."))
callHook("debrain", list(brainmob))
/obj/item/organ/internal/brain/examine(mob/user) // -- TLE
@@ -295,9 +295,9 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
/decl/chemical_reaction/instant/promethean_brain_revival/on_reaction(var/datum/reagents/holder)
var/obj/item/organ/internal/brain/slime/brain = holder.my_atom
if(brain.reviveBody())
brain.visible_message("<span class='notice'>[brain] bubbles, surrounding itself with a rapidly expanding mass of slime!</span>")
brain.visible_message(span_notice("[brain] bubbles, surrounding itself with a rapidly expanding mass of slime!"))
else
brain.visible_message("<span class='warning'>[brain] shifts strangely, but falls still.</span>")
brain.visible_message(span_warning("[brain] shifts strangely, but falls still."))
/obj/item/organ/internal/brain/golem
name = "chem"
+1 -1
View File
@@ -73,7 +73,7 @@
var/oldbroken = is_broken()
..()
if(is_broken() && !oldbroken && owner && !owner.stat)
to_chat(owner, "<span class='danger'>You go blind!</span>")
to_chat(owner, span_danger("You go blind!"))
/obj/item/organ/internal/eyes/process() //Eye damage replaces the old eye_stat var.
..()
+4 -4
View File
@@ -197,7 +197,7 @@ var/list/organ_cache = list()
/obj/item/organ/examine(mob/user)
. = ..()
if(status & ORGAN_DEAD)
. += "<span class='notice'>Decay appears to have set in.</span>"
. += span_notice("Decay appears to have set in.")
//A little wonky: internal organs stop calling this (they return early in process) when dead, but external ones cause further damage when dead
/obj/item/organ/proc/handle_germ_effects()
@@ -451,7 +451,7 @@ var/list/organ_cache = list()
if(robotic >= ORGAN_ROBOT)
return
to_chat(user, "<span class='notice'>You take an experimental bite out of \the [src].</span>")
to_chat(user, span_notice("You take an experimental bite out of \the [src]."))
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list
blood_splatter(src,B,1)
@@ -503,10 +503,10 @@ var/list/organ_cache = list()
/obj/item/organ/proc/butcher(var/obj/item/O, var/mob/living/user, var/atom/newtarget)
if(robotic >= ORGAN_ROBOT)
user?.visible_message("<span class='notice'>[user] disassembles \the [src].</span>")
user?.visible_message(span_notice("[user] disassembles \the [src]."))
else
user?.visible_message("<span class='notice'>[user] butchers \the [src].</span>")
user?.visible_message(span_notice("[user] butchers \the [src]."))
if(!newtarget)
newtarget = get_turf(src)
+39 -39
View File
@@ -157,7 +157,7 @@
I.loc = get_turf(user) //just in case something was embedded that is not an item
if(istype(I))
user.put_in_hands(I)
user.visible_message("<span class='danger'>\The [user] rips \the [I] out of \the [src]!</span>")
user.visible_message(span_danger("\The [user] rips \the [I] out of \the [src]!"))
return //no eating the limb until everything's been removed
return ..()
@@ -167,18 +167,18 @@
for(var/obj/item/I in contents)
if(istype(I, /obj/item/organ))
continue
. += "<span class='danger'>There is \a [I] sticking out of it.</span>"
. += span_danger("There is \a [I] sticking out of it.")
/obj/item/organ/external/attackby(obj/item/W as obj, mob/living/user as mob)
switch(stage)
if(0)
if(istype(W,/obj/item/surgical/scalpel))
user.visible_message("<span class='danger'><b>[user]</b> cuts [src] open with [W]!</span>")
user.visible_message(span_danger("<b>[user]</b> cuts [src] open with [W]!"))
stage++
return
if(1)
if(istype(W,/obj/item/surgical/retractor))
user.visible_message("<span class='danger'><b>[user]</b> cracks [src] open like an egg with [W]!</span>")
user.visible_message(span_danger("<b>[user]</b> cracks [src] open like an egg with [W]!"))
stage++
return
if(2)
@@ -187,9 +187,9 @@
var/obj/item/removing = pick(contents)
removing.loc = get_turf(user.loc)
user.put_in_hands(removing)
user.visible_message("<span class='danger'><b>[user]</b> extracts [removing] from [src] with [W]!</span>")
user.visible_message(span_danger("<b>[user]</b> extracts [removing] from [src] with [W]!"))
else
user.visible_message("<span class='danger'><b>[user]</b> fishes around fruitlessly in [src] with [W].</span>")
user.visible_message(span_danger("<b>[user]</b> fishes around fruitlessly in [src] with [W]."))
return
..()
@@ -445,11 +445,11 @@
else return 0
if(!damage_amount)
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
to_chat(user, span_notice("Nothing to fix!"))
return 0
if(brute_dam + burn_dam >= min_broken_damage) //VOREStation Edit - Makes robotic limb damage scalable
to_chat(user, "<span class='danger'>The damage is far too severe to patch over externally.</span>")
to_chat(user, span_danger("The damage is far too severe to patch over externally."))
return 0
if(user == src.owner)
@@ -460,12 +460,12 @@
grasp = "r_hand"
if(grasp)
to_chat(user, "<span class='warning'>You can't reach your [src.name] while holding [tool] in your [owner.get_bodypart_name(grasp)].</span>")
to_chat(user, span_warning("You can't reach your [src.name] while holding [tool] in your [owner.get_bodypart_name(grasp)]."))
return 0
user.setClickCooldown(user.get_attack_speed(tool))
if(!do_mob(user, owner, 10))
to_chat(user, "<span class='warning'>You must stand still to do that.</span>")
to_chat(user, span_warning("You must stand still to do that."))
return 0
switch(damage_type)
@@ -567,13 +567,13 @@ This function completely restores a damaged organ to perfect condition.
W.open_wound(damage)
if(prob(25))
if(robotic >= ORGAN_ROBOT)
owner.visible_message("<span class='danger'>The damage to [owner.name]'s [name] worsens.</span>",\
"<span class='danger'>The damage to your [name] worsens.</span>",\
"<span class='danger'>You hear the screech of abused metal.</span>")
owner.visible_message(span_danger("The damage to [owner.name]'s [name] worsens."),\
span_danger("The damage to your [name] worsens."),\
span_danger("You hear the screech of abused metal."))
else
owner.visible_message("<span class='danger'>The wound on [owner.name]'s [name] widens with a nasty ripping noise.</span>",\
"<span class='danger'>The wound on your [name] widens with a nasty ripping noise.</span>",\
"<span class='danger'>You hear a nasty ripping noise, as if flesh is being torn apart.</span>")
owner.visible_message(span_danger("The wound on [owner.name]'s [name] widens with a nasty ripping noise."),\
span_danger("The wound on your [name] widens with a nasty ripping noise."),\
span_danger("You hear a nasty ripping noise, as if flesh is being torn apart."))
return
//Creating wound
@@ -731,7 +731,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if(. >= 3 && antibiotics < ANTIBIO_OD) //INFECTION_LEVEL_THREE
if (!(status & ORGAN_DEAD))
status |= ORGAN_DEAD
to_chat(owner, "<span class='notice'>You can't feel your [name] anymore...</span>")
to_chat(owner, span_notice("You can't feel your [name] anymore..."))
owner.update_icons_body()
for (var/obj/item/organ/external/child in children)
child.germ_level += 110 //Burst of infection from a parent organ becoming necrotic
@@ -889,26 +889,26 @@ Note that amputating the affected organ does in fact remove the infection from t
if(!clean)
var/gore_sound = "[(robotic >= ORGAN_ROBOT) ? "tortured metal" : "ripping tendons and flesh"]"
owner.visible_message(
"<span class='danger'>\The [owner]'s [src.name] flies off in an arc!</span>",\
"<span class='moderate'><b>Your [src.name] goes flying off!</b></span>",\
"<span class='danger'>You hear a terrible sound of [gore_sound].</span>")
span_danger("\The [owner]'s [src.name] flies off in an arc!"),\
span_moderate("<b>Your [src.name] goes flying off!</b>"),\
span_danger("You hear a terrible sound of [gore_sound]."))
if(DROPLIMB_BURN)
if(cannot_gib)
return
var/gore = "[(robotic >= ORGAN_ROBOT) ? "": " of burning flesh"]"
owner.visible_message(
"<span class='danger'>\The [owner]'s [src.name] flashes away into ashes!</span>",\
"<span class='moderate'><b>Your [src.name] flashes away into ashes!</b></span>",\
"<span class='danger'>You hear a crackling sound[gore].</span>")
span_danger("\The [owner]'s [src.name] flashes away into ashes!"),\
span_moderate("<b>Your [src.name] flashes away into ashes!</b>"),\
span_danger("You hear a crackling sound[gore]."))
if(DROPLIMB_BLUNT)
if(cannot_gib)
return
var/gore = "[(robotic >= ORGAN_ROBOT) ? "": " in shower of gore"]"
var/gore_sound = "[(status >= ORGAN_ROBOT) ? "rending sound of tortured metal" : "sickening splatter of gore"]"
owner.visible_message(
"<span class='danger'>\The [owner]'s [src.name] explodes[gore]!</span>",\
"<span class='moderate'><b>Your [src.name] explodes[gore]!</b></span>",\
"<span class='danger'>You hear the [gore_sound].</span>")
span_danger("\The [owner]'s [src.name] explodes[gore]!"),\
span_moderate("<b>Your [src.name] explodes[gore]!</b>"),\
span_danger("You hear the [gore_sound]."))
var/mob/living/carbon/human/victim = owner //Keep a reference for post-removed().
var/obj/item/organ/external/parent_organ = parent
@@ -1085,9 +1085,9 @@ Note that amputating the affected organ does in fact remove the infection from t
if(owner) //VOREStation Edit Start
if(organ_can_feel_pain() && !isbelly(owner.loc) && !isliving(owner.loc))
owner.visible_message(\
"<span class='danger'>You hear a loud cracking sound coming from \the [owner].</span>",\
"<span class='danger'>Something feels like it shattered in your [name]!</span>",\
"<span class='danger'>You hear a sickening crack.</span>")
span_danger("You hear a loud cracking sound coming from \the [owner]."),\
span_danger("Something feels like it shattered in your [name]!"),\
span_danger("You hear a sickening crack."))
owner.emote("scream")
jostle_bone() //VOREStation Edit End
@@ -1220,7 +1220,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if(!owner || loc != owner)
return
if(!silent)
owner.visible_message("<span class='danger'>\The [W] sticks in the wound!</span>")
owner.visible_message(span_danger("\The [W] sticks in the wound!"))
implants += W
owner.embedded_flag = 1
owner.verbs += /mob/proc/yank_out_object
@@ -1277,9 +1277,9 @@ Note that amputating the affected organ does in fact remove the infection from t
//Robotic limbs explode if sabotaged.
if(is_robotic && sabotaged)
victim.visible_message(
"<span class='danger'>\The [victim]'s [src.name] explodes violently!</span>",\
"<span class='danger'>Your [src.name] explodes!</span>",\
"<span class='danger'>You hear an explosion!</span>")
span_danger("\The [victim]'s [src.name] explodes violently!"),\
span_danger("Your [src.name] explodes!"),\
span_danger("You hear an explosion!"))
explosion(get_turf(owner),-1,-1,2,3)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, victim)
@@ -1297,13 +1297,13 @@ Note that amputating the affected organ does in fact remove the infection from t
return
if(owner)
if(type == "brute")
owner.visible_message("<span class='danger'>You hear a sickening cracking sound coming from \the [owner]'s [name].</span>", \
"<span class='danger'>Your [name] becomes a mangled mess!</span>", \
"<span class='danger'>You hear a sickening crack.</span>")
owner.visible_message(span_danger("You hear a sickening cracking sound coming from \the [owner]'s [name]."), \
span_danger("Your [name] becomes a mangled mess!"), \
span_danger("You hear a sickening crack."))
else
owner.visible_message("<span class='danger'>\The [owner]'s [name] melts away, turning into mangled mess!</span>", \
"<span class='danger'>Your [name] melts away!</span>", \
"<span class='danger'>You hear a sickening sizzle.</span>")
owner.visible_message(span_danger("\The [owner]'s [name] melts away, turning into mangled mess!"), \
span_danger("Your [name] melts away!"), \
span_danger("You hear a sickening sizzle."))
disfigured = 1
/obj/item/organ/external/proc/jostle_bone(force)
+1 -1
View File
@@ -13,7 +13,7 @@
/mob/living/carbon/proc/custom_pain(message, power, force)
if((!message || stat || !can_feel_pain() || chem_effects[CE_PAINKILLER] > power) && !synth_cosmetic_pain)
return 0
message = "<span class='danger'>[message]</span>"
message = span_danger("[message]")
if(power >= 50)
message = "<font size=3>[message]</font>"
+2 -2
View File
@@ -16,7 +16,7 @@
// This is very ghetto way of rebooting an IPC. TODO better way.
if(owner && owner.stat == DEAD)
owner.set_stat(CONSCIOUS)
owner.visible_message("<span class='danger'>\The [owner] twitches visibly!</span>")
owner.visible_message(span_danger("\The [owner] twitches visibly!"))
/obj/item/organ/internal/cell/emp_act(severity)
..()
@@ -89,7 +89,7 @@
owner.set_stat(CONSCIOUS)
dead_mob_list -= owner
living_mob_list |= owner
owner.visible_message("<span class='danger'>\The [owner] twitches visibly!</span>")
owner.visible_message(span_danger("\The [owner] twitches visibly!"))
/obj/item/organ/internal/mmi_holder/removed(var/mob/living/user)
+2 -2
View File
@@ -336,8 +336,8 @@
/obj/item/organ/external/head/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/toy/plushie) || istype(I, /obj/item/organ/external/head))
user.visible_message("<span class='notice'>[user] makes \the [I] kiss \the [src]!.</span>", \
"<span class='notice'>You make \the [I] kiss \the [src]!.</span>")
user.visible_message(span_notice("[user] makes \the [I] kiss \the [src]!."), \
span_notice("You make \the [I] kiss \the [src]!."))
return ..()
/obj/item/organ/external/head/get_icon(var/skeletal, var/can_apply_transparency = TRUE)