mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 13:05:36 +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:
@@ -32,8 +32,8 @@
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "artbad", /datum/mood_event/artbad)
|
||||
msg = "Wow, [source.p_they()] sucks."
|
||||
|
||||
user.visible_message("<span class='notice'>[user] stops and looks intently at [source].</span>", \
|
||||
"<span class='notice'>You appraise [source]... [msg]</span>")
|
||||
user.visible_message(span_notice("[user] stops and looks intently at [source]."), \
|
||||
span_notice("You appraise [source]... [msg]"))
|
||||
|
||||
/datum/element/art/proc/on_examine(atom/source, mob/user, list/examine_texts)
|
||||
SIGNAL_HANDLER
|
||||
@@ -42,7 +42,7 @@
|
||||
INVOKE_ASYNC(src, .proc/appraise, source, user) //Do not sleep the proc.
|
||||
|
||||
/datum/element/art/proc/appraise(atom/source, mob/user)
|
||||
to_chat(user, "<span class='notice'>You start appraising [source]...</span>")
|
||||
to_chat(user, span_notice("You start appraising [source]..."))
|
||||
if(!do_after(user, 2 SECONDS, target = source))
|
||||
return
|
||||
var/mult = 1
|
||||
@@ -62,5 +62,5 @@
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "artbad", /datum/mood_event/artbad)
|
||||
msg = "Wow, [source.p_they()] sucks."
|
||||
|
||||
user.visible_message("<span class='notice'>[user] stops to inspect [source].</span>", \
|
||||
"<span class='notice'>You appraise [source], inspecting the fine craftsmanship of the proletariat... [msg]</span>")
|
||||
user.visible_message(span_notice("[user] stops to inspect [source]."), \
|
||||
span_notice("You appraise [source], inspecting the fine craftsmanship of the proletariat... [msg]"))
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
if(!tucker.transferItemToLoc(tucked, target_bed.drop_location()))
|
||||
return
|
||||
|
||||
to_chat(tucker, "<span class='notice'>You lay [tucked] out on [target_bed].</span>")
|
||||
to_chat(tucker, span_notice("You lay [tucked] out on [target_bed]."))
|
||||
tucked.pixel_x = x_offset
|
||||
tucked.pixel_y = y_offset
|
||||
if(rotation_degree)
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
|
||||
if(!(flags & CALTROP_SILENT) && !H.has_status_effect(/datum/status_effect/caltropped))
|
||||
H.apply_status_effect(/datum/status_effect/caltropped)
|
||||
H.visible_message("<span class='danger'>[H] steps on [caltrop].</span>", \
|
||||
"<span class='userdanger'>You step on [caltrop]!</span>")
|
||||
H.visible_message(span_danger("[H] steps on [caltrop]."), \
|
||||
span_userdanger("You step on [caltrop]!"))
|
||||
|
||||
H.apply_damage(damage, BRUTE, picked_def_zone, wound_bonus = CANT_WOUND)
|
||||
H.Paralyze(60)
|
||||
|
||||
@@ -29,4 +29,4 @@
|
||||
if(cleaned_human.body_position == LYING_DOWN)
|
||||
cleaned_human.wash(CLEAN_SCRUB)
|
||||
cleaned_human.regenerate_icons()
|
||||
to_chat(cleaned_human, "<span class='danger'>[AM] cleans your face!</span>")
|
||||
to_chat(cleaned_human, span_danger("[AM] cleans your face!"))
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(can_climb(source, user))
|
||||
examine_texts += "<span class='notice'>[source] looks climbable.</span>"
|
||||
examine_texts += span_notice("[source] looks climbable.")
|
||||
|
||||
/datum/element/climbable/proc/can_climb(atom/source, mob/user)
|
||||
return TRUE
|
||||
@@ -46,15 +46,15 @@
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(climbed_thing)
|
||||
structure_climber.Paralyze(40)
|
||||
structure_climber.visible_message("<span class='warning'>[structure_climber] is knocked off [climbed_thing].</span>", "<span class='warning'>You're knocked off [climbed_thing]!</span>", "<span class='hear'>You hear a cry from [structure_climber], followed by a slam.</span>")
|
||||
structure_climber.visible_message(span_warning("[structure_climber] is knocked off [climbed_thing]."), span_warning("You're knocked off [climbed_thing]!"), span_hear("You hear a cry from [structure_climber], followed by a slam."))
|
||||
|
||||
|
||||
/datum/element/climbable/proc/climb_structure(atom/climbed_thing, mob/living/user)
|
||||
if(!can_climb(climbed_thing, user))
|
||||
return
|
||||
climbed_thing.add_fingerprint(user)
|
||||
user.visible_message("<span class='warning'>[user] starts climbing onto [climbed_thing].</span>", \
|
||||
"<span class='notice'>You start climbing onto [climbed_thing]...</span>")
|
||||
user.visible_message(span_warning("[user] starts climbing onto [climbed_thing]."), \
|
||||
span_notice("You start climbing onto [climbed_thing]..."))
|
||||
var/adjusted_climb_time = climb_time
|
||||
var/adjusted_climb_stun = climb_stun
|
||||
if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //climbing takes twice as long without help from the hands.
|
||||
@@ -69,13 +69,13 @@
|
||||
if(QDELETED(climbed_thing)) //Checking if structure has been destroyed
|
||||
return
|
||||
if(do_climb(climbed_thing, user))
|
||||
user.visible_message("<span class='warning'>[user] climbs onto [climbed_thing].</span>", \
|
||||
"<span class='notice'>You climb onto [climbed_thing].</span>")
|
||||
user.visible_message(span_warning("[user] climbs onto [climbed_thing]."), \
|
||||
span_notice("You climb onto [climbed_thing]."))
|
||||
log_combat(user, climbed_thing, "climbed onto")
|
||||
if(adjusted_climb_stun)
|
||||
user.Stun(adjusted_climb_stun)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fail to climb onto [climbed_thing].</span>")
|
||||
to_chat(user, span_warning("You fail to climb onto [climbed_thing]."))
|
||||
LAZYREMOVEASSOC(current_climbers, climbed_thing, user)
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
cursed_item.name = replacetext(cursed_item.name, quality_suffix_text,"")
|
||||
|
||||
//modifications to the item so it looks cursed
|
||||
to_chat(cursed, "<span class='userdanger'>[announcement_message]</span>")
|
||||
to_chat(cursed, span_userdanger("[announcement_message]"))
|
||||
cursed_item.add_filter("cursed_item", 9, list("type" = "outline", "color" = filter_color, "size" = 1))
|
||||
cursed_item.name = "[cursed_item][new_name]"
|
||||
|
||||
|
||||
@@ -28,5 +28,5 @@
|
||||
var/obj/item/item = source
|
||||
|
||||
if(prob(break_chance))
|
||||
user.visible_message("<span class='danger'>[user]'s [item.name] snap[item.p_s()] into tiny pieces in [user.p_their()] hand.</span>")
|
||||
user.visible_message(span_danger("[user]'s [item.name] snap[item.p_s()] into tiny pieces in [user.p_their()] hand."))
|
||||
item.deconstruct(disassembled = FALSE)
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
var/pen_mod = -(armor * penetrative_behaviour) // if our shrapnel is weak into armor, then we restore our armor to the full value.
|
||||
actual_chance += pen_mod // doing the armor pen as a separate calc just in case this ever gets expanded on
|
||||
if(actual_chance <= 0)
|
||||
victim.visible_message("<span class='danger'>[weapon] bounces off [victim]'s armor, unable to embed!</span>", "<span class='notice'>[weapon] bounces off your armor, unable to embed!</span>", vision_distance = COMBAT_MESSAGE_RANGE)
|
||||
victim.visible_message(span_danger("[weapon] bounces off [victim]'s armor, unable to embed!"), span_notice("[weapon] bounces off your armor, unable to embed!"), vision_distance = COMBAT_MESSAGE_RANGE)
|
||||
return
|
||||
|
||||
if(!prob(actual_chance))
|
||||
|
||||
@@ -43,15 +43,15 @@
|
||||
return
|
||||
|
||||
if (target.is_eyes_covered())
|
||||
to_chat(user, "<span class='warning'>You failed to stab [target.p_their()] eyes, you need to remove [target.p_their()] eye protection first!</span>")
|
||||
to_chat(user, span_warning("You failed to stab [target.p_their()] eyes, you need to remove [target.p_their()] eye protection first!"))
|
||||
return
|
||||
|
||||
if (isalien(target))
|
||||
to_chat(user, "<span class='warning'>You cannot locate any eyes on this creature!</span>")
|
||||
to_chat(user, span_warning("You cannot locate any eyes on this creature!"))
|
||||
return
|
||||
|
||||
if (isbrain(target))
|
||||
to_chat(user, "<span class='warning'>You cannot locate any organic eyes on this brain!</span>")
|
||||
to_chat(user, span_warning("You cannot locate any organic eyes on this brain!"))
|
||||
return
|
||||
|
||||
item.add_fingerprint(user)
|
||||
@@ -62,13 +62,13 @@
|
||||
|
||||
if (target == user)
|
||||
user.visible_message(
|
||||
"<span class='danger'>[user] stabs [user.p_them()]self in the eyes with [item]!</span>",
|
||||
"<span class='userdanger'>You stab yourself in the eyes with [item]!</span>",
|
||||
span_danger("[user] stabs [user.p_them()]self in the eyes with [item]!"),
|
||||
span_userdanger("You stab yourself in the eyes with [item]!"),
|
||||
)
|
||||
else
|
||||
target.visible_message(
|
||||
"<span class='danger'>[user] stabs [target] in the eye with [item]!</span>",
|
||||
"<span class='userdanger'>[user] stabs you in the eye with [item]!</span>",
|
||||
span_danger("[user] stabs [target] in the eye with [item]!"),
|
||||
span_userdanger("[user] stabs you in the eye with [item]!"),
|
||||
)
|
||||
|
||||
if (target_limb)
|
||||
@@ -92,23 +92,23 @@
|
||||
|
||||
target.adjust_blurriness(15)
|
||||
if (target.stat != DEAD)
|
||||
to_chat(target, "<span class='danger'>Your eyes start to bleed profusely!</span>")
|
||||
to_chat(target, span_danger("Your eyes start to bleed profusely!"))
|
||||
|
||||
if (!target.is_blind() && !HAS_TRAIT(target, TRAIT_NEARSIGHT))
|
||||
to_chat(target, "<span class='danger'>You become nearsighted!</span>")
|
||||
to_chat(target, span_danger("You become nearsighted!"))
|
||||
|
||||
target.become_nearsighted(EYE_DAMAGE)
|
||||
|
||||
if (prob(50))
|
||||
if (target.stat != DEAD && target.drop_all_held_items())
|
||||
to_chat(target, "<span class='danger'>You drop what you're holding and clutch at your eyes!</span>")
|
||||
to_chat(target, span_danger("You drop what you're holding and clutch at your eyes!"))
|
||||
target.adjust_blurriness(10)
|
||||
target.Unconscious(20)
|
||||
target.Paralyze(40)
|
||||
|
||||
if (prob(eyes.damage - EYESTAB_BLEEDING_THRESHOLD + 1))
|
||||
target.become_blind(EYE_DAMAGE)
|
||||
to_chat(target, "<span class='danger'>You go blind!</span>")
|
||||
to_chat(target, span_danger("You go blind!"))
|
||||
|
||||
#undef CLUMSY_ATTACK_SELF_CHANCE
|
||||
#undef EYESTAB_BLEEDING_THRESHOLD
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
var/obj/item/reagent_containers/container = target // the container we're trying to dunk into
|
||||
if(istype(container) && container.reagent_flags & DUNKABLE) // container should be a valid target for dunking
|
||||
if(!container.is_drainable())
|
||||
to_chat(user, "<span class='warning'>[container] is unable to be dunked in!</span>")
|
||||
to_chat(user, span_warning("[container] is unable to be dunked in!"))
|
||||
return
|
||||
var/obj/item/I = source // the item that has the dunkable element
|
||||
if(container.reagents.trans_to(I, dunk_amount, transfered_by = user)) //if reagents were transfered, show the message
|
||||
to_chat(user, "<span class='notice'>You dunk \the [I] into \the [container].</span>")
|
||||
to_chat(user, span_notice("You dunk \the [I] into \the [container]."))
|
||||
return
|
||||
if(!container.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[container] is empty!</span>")
|
||||
to_chat(user, span_warning("[container] is empty!"))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[I] is full!</span>")
|
||||
to_chat(user, span_warning("[I] is full!"))
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
playsound(source, 'sound/effects/chipbagpop.ogg', 100)
|
||||
|
||||
popper.visible_message("<span class='danger'>[popper] steps on \the [source], popping the bag!</span>", "<span class='danger'>You step on \the [source], popping the bag!</span>", "<span class='danger'>You hear a sharp crack!</span>", COMBAT_MESSAGE_RANGE)
|
||||
popper.visible_message(span_danger("[popper] steps on \the [source], popping the bag!"), span_danger("You step on \the [source], popping the bag!"), span_danger("You hear a sharp crack!"), COMBAT_MESSAGE_RANGE)
|
||||
INVOKE_ASYNC(src, .proc/async_generate_trash, source)
|
||||
qdel(source)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
/datum/element/food_trash/proc/open_trash(datum/source, mob/user)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
to_chat(user, "<span class='notice'>You open the [source], revealing \a [initial(trash.name)].</span>")
|
||||
to_chat(user, span_notice("You open the [source], revealing \a [initial(trash.name)]."))
|
||||
|
||||
INVOKE_ASYNC(src, .proc/async_generate_trash, source)
|
||||
qdel(source)
|
||||
|
||||
@@ -38,6 +38,6 @@
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(amount_created > 1)
|
||||
examine_list += "<span class='notice'>It can be turned into [amount_created] [initial(result_atom_type.name)]s with <b>[tool_behaviour_name(tool_behaviour)]</b>!</span>"
|
||||
examine_list += span_notice("It can be turned into [amount_created] [initial(result_atom_type.name)]s with <b>[tool_behaviour_name(tool_behaviour)]</b>!")
|
||||
else
|
||||
examine_list += "<span class='notice'>It can be turned into \a [initial(result_atom_type.name)] with <b>[tool_behaviour_name(tool_behaviour)]</b>!</span>"
|
||||
examine_list += span_notice("It can be turned into \a [initial(result_atom_type.name)] with <b>[tool_behaviour_name(tool_behaviour)]</b>!")
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
return
|
||||
|
||||
user.do_attack_animation(target)
|
||||
target.visible_message("<span class='warning'>[user] gently taps [target]'s knee with [item].</span>", \
|
||||
"<span class='userdanger'>[user] taps your knee with [item].</span>")
|
||||
target.visible_message(span_warning("[user] gently taps [target]'s knee with [item]."), \
|
||||
span_userdanger("[user] taps your knee with [item]."))
|
||||
|
||||
if(target.stat == DEAD) //dead men have no reflexes!
|
||||
return
|
||||
@@ -53,17 +53,17 @@
|
||||
|
||||
if(target_brain_damage < BRAIN_DAMAGE_MILD) //a healthy brain produces a normal reaction
|
||||
playsound(target, 'sound/weapons/punchmiss.ogg', 25, TRUE, -1)
|
||||
target.visible_message("<span class='danger'>[target]'s leg kicks out sharply!</span>", \
|
||||
"<span class='danger'>Your leg kicks out sharply!</span>")
|
||||
target.visible_message(span_danger("[target]'s leg kicks out sharply!"), \
|
||||
span_danger("Your leg kicks out sharply!"))
|
||||
|
||||
else if(target_brain_damage < BRAIN_DAMAGE_SEVERE) //a mildly damaged brain produces a delayed reaction
|
||||
playsound(target, 'sound/weapons/punchmiss.ogg', 15, TRUE, -1)
|
||||
target.visible_message("<span class='danger'>After a moment, [target]'s leg kicks out sharply!</span>", \
|
||||
"<span class='danger'>After a moment, your leg kicks out sharply!</span>")
|
||||
target.visible_message(span_danger("After a moment, [target]'s leg kicks out sharply!"), \
|
||||
span_danger("After a moment, your leg kicks out sharply!"))
|
||||
|
||||
else if(target_brain_damage < BRAIN_DAMAGE_DEATH) //a severely damaged brain produces a delayed + weaker reaction
|
||||
playsound(target, 'sound/weapons/punchmiss.ogg', 5, TRUE, -1)
|
||||
target.visible_message("<span class='danger'>After a moment, [target]'s leg kicks out weakly!</span>", \
|
||||
"<span class='danger'>After a moment, your leg kicks out weakly!</span>")
|
||||
target.visible_message(span_danger("After a moment, [target]'s leg kicks out weakly!"), \
|
||||
span_danger("After a moment, your leg kicks out weakly!"))
|
||||
|
||||
return
|
||||
|
||||
@@ -63,10 +63,10 @@
|
||||
/// Signal handler for light eater flavortext
|
||||
/datum/element/light_eaten/proc/on_examine(atom/eaten_light, mob/examiner, list/examine_text)
|
||||
SIGNAL_HANDLER
|
||||
examine_text += "<span class='warning'>It's dark and empty...</span>"
|
||||
examine_text += span_warning("It's dark and empty...")
|
||||
if(isliving(examiner) && prob(20))
|
||||
var/mob/living/target = examiner
|
||||
examine_text += "<span class='danger'>You can feel something in [eaten_light.p_them()] gnash at your eyes!</span>"
|
||||
examine_text += span_danger("You can feel something in [eaten_light.p_them()] gnash at your eyes!")
|
||||
target.blind_eyes(5)
|
||||
target.blur_eyes(10)
|
||||
return NONE
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
return
|
||||
|
||||
food.visible_message(
|
||||
"<span class='danger'>Something dark in [eater] lashes out at [food] and [food.p_their()] light goes out in an instant!</span>",
|
||||
"<span class='userdanger'>You feel something dark in [eater] lash out and gnaw through your light in an instant! It recedes just as fast, but you can feel that [eater.p_theyve()] left something hungry behind.</span>",
|
||||
"<span class='danger'>You feel a gnawing pulse eat at your sight.</span>"
|
||||
span_danger("Something dark in [eater] lashes out at [food] and [food.p_their()] light goes out in an instant!"),
|
||||
span_userdanger("You feel something dark in [eater] lash out and gnaw through your light in an instant! It recedes just as fast, but you can feel that [eater.p_theyve()] left something hungry behind."),
|
||||
span_danger("You feel a gnawing pulse eat at your sight.")
|
||||
)
|
||||
|
||||
/**
|
||||
|
||||
@@ -51,13 +51,13 @@
|
||||
ride_check_flags |= RIDER_NEEDS_ARMS
|
||||
|
||||
if(arms_needed && !equip_buckle_inhands(potential_rider, arms_needed, target_movable)) // can be either 1 (cyborg riding) or 2 (human piggybacking) hands
|
||||
potential_rider.visible_message("<span class='warning'>[potential_rider] can't get a grip on [target_movable] because [potential_rider.p_their()] hands are full!</span>",
|
||||
"<span class='warning'>You can't get a grip on [target_movable] because your hands are full!</span>")
|
||||
potential_rider.visible_message(span_warning("[potential_rider] can't get a grip on [target_movable] because [potential_rider.p_their()] hands are full!"),
|
||||
span_warning("You can't get a grip on [target_movable] because your hands are full!"))
|
||||
return COMPONENT_BLOCK_BUCKLE
|
||||
|
||||
if((ride_check_flags & RIDER_NEEDS_LEGS) && HAS_TRAIT(potential_rider, TRAIT_FLOORED))
|
||||
potential_rider.visible_message("<span class='warning'>[potential_rider] can't get [potential_rider.p_their()] footing on [target_movable]!</span>",
|
||||
"<span class='warning'>You can't get your footing on [target_movable]!</span>")
|
||||
potential_rider.visible_message(span_warning("[potential_rider] can't get [potential_rider.p_their()] footing on [target_movable]!"),
|
||||
span_warning("You can't get your footing on [target_movable]!"))
|
||||
return COMPONENT_BLOCK_BUCKLE
|
||||
|
||||
var/mob/living/target_living = target_movable
|
||||
@@ -65,8 +65,8 @@
|
||||
// need to see if !equip_buckle_inhands() checks are enough to skip any needed incapac/restrain checks
|
||||
// CARRIER_NEEDS_ARM shouldn't apply if the ridden isn't even a living mob
|
||||
if((ride_check_flags & CARRIER_NEEDS_ARM) && !equip_buckle_inhands(target_living, 1, target_living, potential_rider)) // hardcode 1 hand for now
|
||||
target_living.visible_message("<span class='warning'>[target_living] can't get a grip on [potential_rider] because [target_living.p_their()] hands are full!</span>",
|
||||
"<span class='warning'>You can't get a grip on [potential_rider] because your hands are full!</span>")
|
||||
target_living.visible_message(span_warning("[target_living] can't get a grip on [potential_rider] because [target_living.p_their()] hands are full!"),
|
||||
span_warning("You can't get a grip on [potential_rider] because your hands are full!"))
|
||||
return COMPONENT_BLOCK_BUCKLE
|
||||
|
||||
target_living.AddComponent(riding_component_type, potential_rider, force, ride_check_flags, potion_boost = potion_boosted)
|
||||
@@ -114,10 +114,10 @@
|
||||
if(!istype(speed_potion))
|
||||
return
|
||||
if(potion_boosted)
|
||||
to_chat(user, "<span class='warning'>[ridable_atom] has already been coated with red, that's as fast as it'll go!</span>")
|
||||
to_chat(user, span_warning("[ridable_atom] has already been coated with red, that's as fast as it'll go!"))
|
||||
return
|
||||
if(ridable_atom.has_buckled_mobs()) // effect won't take place til the next time someone mounts it, so just prevent that situation
|
||||
to_chat(user, "<span class='warning'>It's too dangerous to smear [speed_potion] on [ridable_atom] while it's being ridden!</span>")
|
||||
to_chat(user, span_warning("It's too dangerous to smear [speed_potion] on [ridable_atom] while it's being ridden!"))
|
||||
return
|
||||
|
||||
var/speed_limit = round(CONFIG_GET(number/movedelay/run_delay) * 0.85, 0.01)
|
||||
@@ -125,12 +125,12 @@
|
||||
var/theoretical_speed = initial(theoretical_riding_component.vehicle_move_delay)
|
||||
|
||||
if(theoretical_speed <= speed_limit) // i say speed but this is actually move delay, so you have to be ABOVE the speed limit to pass
|
||||
to_chat(user, "<span class='warning'>[ridable_atom] can't be made any faster!</span>")
|
||||
to_chat(user, span_warning("[ridable_atom] can't be made any faster!"))
|
||||
return
|
||||
|
||||
Detach(ridable_atom)
|
||||
ridable_atom.AddElement(/datum/element/ridable, component_type = riding_component_type, potion_boost = TRUE)
|
||||
to_chat(user, "<span class='notice'>You slather the red gunk over [ridable_atom], making it faster.</span>")
|
||||
to_chat(user, span_notice("You slather the red gunk over [ridable_atom], making it faster."))
|
||||
ridable_atom.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
ridable_atom.add_atom_colour("#FF0000", FIXED_COLOUR_PRIORITY)
|
||||
qdel(speed_potion)
|
||||
@@ -184,6 +184,6 @@
|
||||
return //Piggyback user.
|
||||
user.unbuckle_mob(rider)
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='notice'>You gently let go of [rider].</span>")
|
||||
to_chat(user, span_notice("You gently let go of [rider]."))
|
||||
return
|
||||
return rider
|
||||
|
||||
@@ -48,7 +48,7 @@ clamping the Knockback_Force value below. */
|
||||
var/target_angle = Get_Angle(attacktarget, usertarget)
|
||||
var/move_target = get_ranged_target_turf(usertarget, angle2dir(target_angle), knockback_force)
|
||||
usertarget.throw_at(move_target, knockback_force, knockback_speed)
|
||||
usertarget.visible_message("<span class='warning'>[usertarget] gets thrown back by the force of \the [I] impacting \the [attacktarget]!</span>", "<span class='warning'>The force of \the [I] impacting \the [attacktarget] sends you flying!</span>")
|
||||
usertarget.visible_message(span_warning("[usertarget] gets thrown back by the force of \the [I] impacting \the [attacktarget]!"), span_warning("The force of \the [I] impacting \the [attacktarget] sends you flying!"))
|
||||
|
||||
/datum/element/selfknockback/proc/Projectile_SelfKnockback(obj/projectile/P)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
scooby.forceMove(closet_turf)
|
||||
|
||||
if(!closet.close(scooby))
|
||||
to_chat(scooby, "<span class='warning'>You can't get [closet] to close!</span>")
|
||||
to_chat(scooby, span_warning("You can't get [closet] to close!"))
|
||||
if(closet.horizontal)
|
||||
scooby.set_resting(FALSE, silent = TRUE)
|
||||
return
|
||||
@@ -57,6 +57,6 @@
|
||||
if(closet.horizontal)
|
||||
scooby.set_resting(FALSE, silent = TRUE)
|
||||
|
||||
closet_turf.visible_message("<span class='warning'>[scooby] dives into [closet]!</span>")
|
||||
closet_turf.visible_message(span_warning("[scooby] dives into [closet]!"))
|
||||
// If you run into a locker, you don't want to run out immediately
|
||||
scooby.Immobilize(0.5 SECONDS)
|
||||
|
||||
@@ -50,19 +50,19 @@
|
||||
var/mob/living/crossing_mob = crossing_movable
|
||||
if(crossing_mob.mob_size > MOB_SIZE_SMALL && !(crossing_mob.movement_type & FLYING))
|
||||
if(HAS_TRAIT(crossing_mob, TRAIT_PACIFISM))
|
||||
crossing_mob.visible_message("<span class='notice'>[crossing_mob] carefully steps over [parent_as_living].</span>", "<span class='notice'>You carefully step over [parent_as_living] to avoid hurting it.</span>")
|
||||
crossing_mob.visible_message(span_notice("[crossing_mob] carefully steps over [parent_as_living]."), span_notice("You carefully step over [parent_as_living] to avoid hurting it."))
|
||||
return
|
||||
if(should_squash)
|
||||
crossing_mob.visible_message("<span class='notice'>[crossing_mob] squashed [parent_as_living].</span>", "<span class='notice'>You squashed [parent_as_living].</span>")
|
||||
crossing_mob.visible_message(span_notice("[crossing_mob] squashed [parent_as_living]."), span_notice("You squashed [parent_as_living]."))
|
||||
Squish(parent_as_living)
|
||||
else
|
||||
parent_as_living.visible_message("<span class='notice'>[parent_as_living] avoids getting crushed.</span>")
|
||||
parent_as_living.visible_message(span_notice("[parent_as_living] avoids getting crushed."))
|
||||
else if(isstructure(crossing_movable))
|
||||
if(should_squash)
|
||||
crossing_movable.visible_message("<span class='notice'>[parent_as_living] is crushed under [crossing_movable].</span>")
|
||||
crossing_movable.visible_message(span_notice("[parent_as_living] is crushed under [crossing_movable]."))
|
||||
Squish(parent_as_living)
|
||||
else
|
||||
parent_as_living.visible_message("<span class='notice'>[parent_as_living] avoids getting crushed.</span>")
|
||||
parent_as_living.visible_message(span_notice("[parent_as_living] avoids getting crushed."))
|
||||
|
||||
/datum/component/squashable/proc/Squish(mob/living/target)
|
||||
if(squash_flags & SQUASHED_SHOULD_BE_GIBBED)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
return FALSE
|
||||
|
||||
if (HAS_TRAIT(equipping, TRAIT_NODROP))
|
||||
to_chat(user, "<span class='warning'>You can't put [equipping] on [source], it's stuck to your hand!</span>")
|
||||
to_chat(user, span_warning("You can't put [equipping] on [source], it's stuck to your hand!"))
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
@@ -91,14 +91,14 @@
|
||||
var/obj/item/clothing/clothing = source
|
||||
if(clothing.clothing_flags & DANGEROUS_OBJECT)
|
||||
source.visible_message(
|
||||
"<span class='danger'>[user] tries to put [equipping] on [source].</span>",
|
||||
"<span class='userdanger'>[user] tries to put [equipping] on you.</span>",
|
||||
span_danger("[user] tries to put [equipping] on [source]."),
|
||||
span_userdanger("[user] tries to put [equipping] on you."),
|
||||
ignored_mobs = user,
|
||||
)
|
||||
else
|
||||
source.visible_message(
|
||||
"<span class='notice'>[user] tries to put [equipping] on [source].</span>",
|
||||
"<span class='notice'>[user] tries to put [equipping] on you.</span>",
|
||||
span_notice("[user] tries to put [equipping] on [source]."),
|
||||
span_notice("[user] tries to put [equipping] on you."),
|
||||
ignored_mobs = user,
|
||||
)
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
var/list/new_entry = list(list(user.name, "tried equipping you with [equipping]", world.time))
|
||||
LAZYADD(victim_human.afk_thefts, new_entry)
|
||||
|
||||
to_chat(user, "<span class='notice'>You try to put [equipping] on [source]...</span>")
|
||||
to_chat(user, span_notice("You try to put [equipping] on [source]..."))
|
||||
|
||||
var/log = "[key_name(source)] is having [equipping] put on them by [key_name(user)]"
|
||||
source.log_message(log, LOG_ATTACK, color="red")
|
||||
@@ -149,12 +149,12 @@
|
||||
return FALSE
|
||||
|
||||
source.visible_message(
|
||||
"<span class='warning'>[user] tries to remove [source]'s [item].</span>",
|
||||
"<span class='userdanger'>[user] tries to remove your [item].</span>",
|
||||
span_warning("[user] tries to remove [source]'s [item]."),
|
||||
span_userdanger("[user] tries to remove your [item]."),
|
||||
ignored_mobs = user,
|
||||
)
|
||||
|
||||
to_chat(user, "<span class='danger'>You try to remove [source]'s [item]...</span>")
|
||||
to_chat(user, span_danger("You try to remove [source]'s [item]..."))
|
||||
source.log_message("[key_name(source)] is being stripped of [item] by [key_name(user)]", LOG_ATTACK, color="red")
|
||||
user.log_message("[key_name(source)] is being stripped of [item] by [key_name(user)]", LOG_ATTACK, color="red", log_globally=FALSE)
|
||||
item.add_fingerprint(src)
|
||||
@@ -222,7 +222,7 @@
|
||||
disable_warning = TRUE,
|
||||
bypass_equip_delay_self = TRUE,
|
||||
))
|
||||
to_chat(user, "<span class='warning'>\The [equipping] doesn't fit in that place!</span>")
|
||||
to_chat(user, span_warning("\The [equipping] doesn't fit in that place!"))
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(item.force >= 5 || item.throwforce >= 5 || item.override_notes || item.offensive_notes) /// Only show this tag for items that could feasibly be weapons, shields, or those that have special notes
|
||||
examine_texts += "<span class='notice'>It appears to have an ever-updating bluespace <a href='?src=[REF(item)];examine=1'>warning label.</a></span>"
|
||||
examine_texts += span_notice("It appears to have an ever-updating bluespace <a href='?src=[REF(item)];examine=1'>warning label.</a>")
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -61,7 +61,7 @@
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(href_list["examine"])
|
||||
to_chat(user, "<span class='notice'>[build_label_text(source)]</span>")
|
||||
to_chat(user, span_notice("[build_label_text(source)]"))
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -76,22 +76,22 @@
|
||||
var/list/readout = list("") // Readout is used to store the text block output to the user so it all can be sent in one message
|
||||
|
||||
// Meaningless flavor text. The number of crimes is constantly changing because of the complex Nanotrasen legal system and the esoteric nature of time itself!
|
||||
readout += "<span class='warning'>WARNING:</span> This item has been marked as dangerous by the NT legal team because of its use in <span class='warning'>[rand(2,99)] [crimes[rand(1, crimes.len)]]</span> in the past hour.\n"
|
||||
readout += "[span_warning("WARNING:")] This item has been marked as dangerous by the NT legal team because of its use in [span_warning("[rand(2,99)] [crimes[rand(1, crimes.len)]]")] in the past hour.\n"
|
||||
|
||||
// Doesn't show the base notes for items that have the override notes variable set to true
|
||||
if(!source.override_notes)
|
||||
// Make sure not to divide by 0 on accident
|
||||
if(source.force > 0)
|
||||
readout += "Our extensive research has shown that it takes a mere <span class='warning'>[round((100 / source.force), 0.1)]</span> hit\s to beat down [victims[rand(1, victims.len)]] with no armor."
|
||||
readout += "Our extensive research has shown that it takes a mere [span_warning("[round((100 / source.force), 0.1)]")] hit\s to beat down [victims[rand(1, victims.len)]] with no armor."
|
||||
else
|
||||
readout += "Our extensive research found that you couldn't beat anyone to death with this if you tried."
|
||||
|
||||
if(source.throwforce > 0)
|
||||
readout += "If you decide to throw this object instead, one will take <span class='warning'>[round((100 / source.throwforce), 0.1)]</span> hit\s before collapsing."
|
||||
readout += "If you decide to throw this object instead, one will take [span_warning("[round((100 / source.throwforce), 0.1)]")] hit\s before collapsing."
|
||||
else
|
||||
readout += "If you decide to throw this object instead, then you will have trouble damaging anything."
|
||||
if(source.armour_penetration > 0 || source.block_chance > 0)
|
||||
readout += "This item has proven itself <span class='warning'>[weapon_tag_convert(source.armour_penetration)]</span> of piercing armor and <span class='warning'>[weapon_tag_convert(source.block_chance)]</span> of blocking attacks."
|
||||
readout += "This item has proven itself [span_warning("[weapon_tag_convert(source.armour_penetration)]")] of piercing armor and [span_warning("[weapon_tag_convert(source.block_chance)]")] of blocking attacks."
|
||||
// Custom manual notes
|
||||
if(source.offensive_notes)
|
||||
readout += source.offensive_notes
|
||||
|
||||
Reference in New Issue
Block a user