Convert most spans to defines (#31080)

* spanish?

* aaaagain

* keep maptext

* Update robot_items.dm

* Update span_defines.dm

* compiles

* Update silicon_mob.dm

* compile
This commit is contained in:
kyunkyunkyun
2025-12-13 23:55:48 +00:00
committed by GitHub
parent e5f0a6fffb
commit b0463d3c83
1624 changed files with 15737 additions and 15581 deletions
+6 -6
View File
@@ -80,19 +80,19 @@
var/healed = heal_amt && eater.health < eater.maxHealth
eater.heal_overall_damage(heal_amt)
eater.visible_message(
"<span class='notice'>[eater] [eat_verb]s [target].</span>",
"<span class='notice'>You [eat_verb] [target][healed ? ", restoring some health" : ""].</span>")
SPAN_NOTICE("[eater] [eat_verb]s [target]."),
SPAN_NOTICE("You [eat_verb] [target][healed ? ", restoring some health" : ""]."))
else if(damage_amount > 0 && damage_type)
eater.apply_damage(damage_amount, damage_type)
eater.visible_message(
"<span class='notice'>[eater] [eat_verb]s [target], and seems to hurt itself.</span>",
"<span class='notice'>You [eat_verb] [target], hurting yourself in the process.</span>")
SPAN_NOTICE("[eater] [eat_verb]s [target], and seems to hurt itself."),
SPAN_NOTICE("You [eat_verb] [target], hurting yourself in the process."))
else
eater.visible_message(
"<span class='notice'>[eater] [eat_verb]s [target].</span>",
"<span class='notice'>You [eat_verb] [target].</span>")
SPAN_NOTICE("[eater] [eat_verb]s [target]."),
SPAN_NOTICE("You [eat_verb] [target]."))
finish_eating(eater, target, feeder)
return TRUE
+1 -1
View File
@@ -38,4 +38,4 @@
/// Show a little extra on examine
/datum/element/bombable_turf/proc/on_examined(turf/source, mob/user, list/examine_list)
SIGNAL_HANDLER
examine_list += "<span class='notice'>It seems to be slightly cracked...</span>"
examine_list += SPAN_NOTICE("It seems to be slightly cracked...")
+3 -3
View File
@@ -17,7 +17,7 @@
/datum/element/butchers_humans/proc/on_examine(datum/source, mob/user, list/examine_list)
SIGNAL_HANDLER // COMSIG_PARENT_EXAMINE
examine_list += "<span class='warning'>Can be used to butcher dead people into meat while on harm intent.</span>"
examine_list += SPAN_WARNING("Can be used to butcher dead people into meat while on harm intent.")
/datum/element/butchers_humans/proc/on_attack(datum/source, mob/living/victim, mob/living/user, params)
SIGNAL_HANDLER // COMSIG_ATTACK
@@ -37,7 +37,7 @@
human.meatleft--
if(human.meatleft)
to_chat(user, "<span class='warning'>You hack off a chunk of meat from [human]!</span>")
to_chat(user, SPAN_WARNING("You hack off a chunk of meat from [human]!"))
// fallthrough so we get side-effects like blood splatter and limb
// flyoff from human attacked_by while we still have a corpse around
return
@@ -49,6 +49,6 @@
if(item.hitsound)
playsound(get_turf(item), item.hitsound, item.get_clamped_volume(), TRUE, extrarange = item.stealthy_audio ? SILENCED_SOUND_EXTRARANGE : -1, falloff_distance = 0)
add_attack_logs(user, human, "Chopped up into meat with [item.name] ([uppertext(user.a_intent)])", human.ckey ? null : ATKLOG_ALMOSTALL)
to_chat(user, "<span class='warning'>You reduce [human] to a pile of meat!</span>")
to_chat(user, SPAN_WARNING("You reduce [human] to a pile of meat!"))
qdel(human)
return COMPONENT_CANCEL_ATTACK_CHAIN
+9 -9
View File
@@ -54,16 +54,16 @@
ride_check_flags |= RIDER_NEEDS_ARMS
if(arms_needed && !equip_buckle_inhands(potential_rider, arms_needed, target_movable))
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
if((ride_check_flags & RIDER_CARBON_OR_SILICON_NO_LARGE_MOBS) && !(iscarbon(potential_rider) || issilicon(potential_rider) || potential_rider.mob_size <= MOB_SIZE_SMALL))
potential_rider.visible_message("<span class='warning'>[potential_rider] is too big to get [potential_rider.p_their()] footing on [target_movable]!</span>",
"<span class='warning'>You are too big to get your footing on [target_movable]!</span>")
potential_rider.visible_message(SPAN_WARNING("[potential_rider] is too big to get [potential_rider.p_their()] footing on [target_movable]!"),
SPAN_WARNING("You are too big to get your footing on [target_movable]!"))
return COMPONENT_BLOCK_BUCKLE
var/mob/living/target_living = target_movable
@@ -113,20 +113,20 @@
SIGNAL_HANDLER
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(GLOB.configuration.movement.human_delay * 0.85, 0.01)
var/datum/component/riding/theoretical_riding_component = riding_component_type
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("#6e6e86", FIXED_COLOUR_PRIORITY)
ADD_TRAIT(ridable_atom, TRAIT_OIL_SLICKED, "potion")
+4 -4
View File
@@ -34,7 +34,7 @@
/datum/element/rust/proc/handle_examine(datum/source, mob/user, list/examine_list)
SIGNAL_HANDLER //COMSIG_PARENT_EXAMINE
examine_list += "<span class='notice'>[source] is very rusty, you could probably <b>burn</b> it off.</span>"
examine_list += SPAN_NOTICE("[source] is very rusty, you could probably <b>burn</b> it off.")
/datum/element/rust/proc/apply_rust_overlay(atom/parent_atom, list/overlays)
SIGNAL_HANDLER //COMSIG_ATOM_UPDATE_OVERLAYS
@@ -55,11 +55,11 @@
if(TOOL_WELDER)
if(!item.tool_start_check(source, user, amount=1))
return
to_chat(user, "<span class='notice'>You start burning off the rust...</span>")
to_chat(user, SPAN_NOTICE("You start burning off the rust..."))
if(!item.use_tool(source, user, 5 SECONDS, volume = item.tool_volume))
return
to_chat(user, "<span class='notice'>You burn off the rust!</span>")
to_chat(user, SPAN_NOTICE("You burn off the rust!"))
Detach(source)
return
@@ -67,7 +67,7 @@
/datum/element/rust/proc/on_interaction(datum/source, mob/living/user, obj/item/tool, list/modifiers)
SIGNAL_HANDLER // COMSIG_INTERACT_TARGET
if(istype(tool, /obj/item/stack/tile) || istype(tool, /obj/item/stack/rods) || istype(tool, /obj/item/rcd))
to_chat(user, "<span class='warning'>[source] is too rusted to build on!</span>")
to_chat(user, SPAN_WARNING("[source] is too rusted to build on!"))
return ITEM_INTERACT_COMPLETE
/// For rust applied by heretics (if that ever happens) / revenants
+9 -9
View File
@@ -64,7 +64,7 @@
/// It should not perform the equipping itself.
/datum/strippable_item/proc/try_equip(atom/source, obj/item/equipping, mob/user)
if(equipping.flags & 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
if(equipping.flags & ABSTRACT)
@@ -78,13 +78,13 @@
var/thief_mode = in_thief_mode(user)
if(!thief_mode)
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."),
)
if(ishuman(source))
var/mob/living/carbon/human/victim_human = source
if(!victim_human.has_vision())
to_chat(victim_human, "<span class='userdanger'>You feel someone trying to put something on you.</span>")
to_chat(victim_human, SPAN_USERDANGER("You feel someone trying to put something on you."))
if(!do_mob(user, source, equipping.put_on_delay, hidden = thief_mode))
return FALSE
@@ -124,21 +124,21 @@
if(isnull(item))
return FALSE
to_chat(user, "<span class='danger'>You try to remove [source]'s [item.name]...</span>")
to_chat(user, SPAN_DANGER("You try to remove [source]'s [item.name]..."))
add_attack_logs(user, source, "Attempting stripping of [item]")
item.add_fingerprint(user)
var/thief_mode = in_thief_mode(user)
if(!thief_mode)
source.visible_message(
"<span class='warning'>[user] tries to remove [source]'s [item.name].</span>",
"<span class='userdanger'>[user] tries to remove your [item.name].</span>",
SPAN_WARNING("[user] tries to remove [source]'s [item.name]."),
SPAN_USERDANGER("[user] tries to remove your [item.name]."),
"You hear rustling."
)
if(ishuman(source))
var/mob/living/carbon/human/victim_human = source
if(!victim_human.has_vision())
to_chat(source, "<span class='userdanger'>You feel someone fumble with your belongings.</span>")
to_chat(source, SPAN_USERDANGER("You feel someone fumble with your belongings."))
return start_unequip_mob(get_item(source), source, user, hidden = thief_mode)
@@ -204,7 +204,7 @@
return FALSE
if(!equipping.mob_can_equip(source, item_slot, disable_warning = 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
+3 -3
View File
@@ -89,14 +89,14 @@
if(!istype(attacking_item, /obj/item/petcollar))
return NONE
if(locate(/obj/item/petcollar) in source)
to_chat(user, "<span class='warning'>[source] is already wearing a collar!</span>")
to_chat(user, SPAN_WARNING("[source] is already wearing a collar!"))
return COMPONENT_SKIP_AFTERATTACK
if(user.drop_item())
attacking_item.forceMove(source)
to_chat(user, "<span class='notice'>You put [attacking_item] around [source]'s neck.</span>")
to_chat(user, SPAN_NOTICE("You put [attacking_item] around [source]'s neck."))
else
to_chat(user, "<span class='warning'>[attacking_item] is stuck to your hand!</span>")
to_chat(user, SPAN_WARNING("[attacking_item] is stuck to your hand!"))
return COMPONENT_SKIP_AFTERATTACK