rid of old span macros

This commit is contained in:
Kashargul
2024-10-01 23:51:48 +02:00
parent ded60639bc
commit e0d694e8ac
205 changed files with 862 additions and 868 deletions
+7 -7
View File
@@ -204,9 +204,9 @@ two tiles on initialization, and which way a cliff is facing may change during m
safe_fall = H.species.handle_falling(H, T, silent = TRUE, planetary = FALSE)
if(safe_fall)
visible_message(span("notice", "\The [L] glides down from \the [src]."))
visible_message(span_notice("\The [L] glides down from \the [src]."))
else
visible_message(span("danger", "\The [L] falls off \the [src]!"))
visible_message(span_danger("\The [L] falls off \the [src]!"))
L.forceMove(T)
var/harm = !is_double_cliff ? 1 : 0.5
@@ -215,7 +215,7 @@ two tiles on initialization, and which way a cliff is facing may change during m
if(istype(L.buckled, /obj/vehicle)) // People falling off in vehicles will take less damage, but will damage the vehicle severely.
var/obj/vehicle/vehicle = L.buckled
vehicle.adjust_health(40 * harm)
to_chat(L, span("warning", "\The [vehicle] absorbs some of the impact, damaging it."))
to_chat(L, span_warning("\The [vehicle] absorbs some of the impact, damaging it."))
harm /= 2
playsound(L, 'sound/effects/break_stone.ogg', 70, 1)
@@ -228,14 +228,14 @@ two tiles on initialization, and which way a cliff is facing may change during m
sleep(fall_time) // A brief delay inbetween the two sounds helps sell the 'ouch' effect.
if(safe_fall)
visible_message(span("notice", "\The [L] lands on \the [T]."))
visible_message(span_notice("\The [L] lands on \the [T]."))
playsound(L, "rustle", 25, 1)
return
playsound(L, "punch", 70, 1)
shake_camera(L, 1, 1)
visible_message(span("danger", "\The [L] hits \the [T]!"))
visible_message(span_danger("\The [L] hits \the [T]!"))
// The bigger they are, the harder they fall.
// They will take at least 20 damage at the minimum, and tries to scale up to 40% of their max health.
@@ -250,7 +250,7 @@ two tiles on initialization, and which way a cliff is facing may change during m
// Now fall off more cliffs below this one if they exist.
var/obj/structure/cliff/bottom_cliff = locate() in T
if(bottom_cliff)
visible_message(span("danger", "\The [L] rolls down towards \the [bottom_cliff]!"))
visible_message(span_danger("\The [L] rolls down towards \the [bottom_cliff]!"))
sleep(5)
bottom_cliff.fall_off_cliff(L)
@@ -262,7 +262,7 @@ two tiles on initialization, and which way a cliff is facing may change during m
if(shoes && shoes.rock_climbing)
return ..() // Do the other checks too.
to_chat(user, span("warning", "\The [src] is too steep to climb unassisted."))
to_chat(user, span_warning("\The [src] is too steep to climb unassisted."))
return FALSE
// This tells AI mobs to not be dumb and step off cliffs willingly.
+13 -13
View File
@@ -71,30 +71,30 @@
/obj/structure/fence/attackby(obj/item/W, mob/user)
if(W.has_tool_quality(TOOL_WIRECUTTER))
if(!cuttable)
to_chat(user, span("warning", "This section of the fence can't be cut."))
to_chat(user, span_warning("This section of the fence can't be cut."))
return
if(invulnerable)
to_chat(user, span("warning", "This fence is too strong to cut through."))
to_chat(user, span_warning("This fence is too strong to cut through."))
return
var/current_stage = hole_size
if(current_stage >= MAX_HOLE_SIZE)
to_chat(user, span("notice", "This fence has too much cut out of it already."))
to_chat(user, span_notice("This fence has too much cut out of it already."))
return
user.visible_message(span("danger", "\The [user] starts cutting through \the [src] with \the [W]."),\
span("danger", "You start cutting through \the [src] with \the [W]."))
user.visible_message(span_danger("\The [user] starts cutting through \the [src] with \the [W]."),\
span_danger("You start cutting through \the [src] with \the [W]."))
playsound(src, W.usesound, 50, 1)
if(do_after(user, CUT_TIME * W.toolspeed, target = src))
if(current_stage == hole_size)
switch(++hole_size)
if(MEDIUM_HOLE)
visible_message(span("notice", "\The [user] cuts into \the [src] some more."))
to_chat(user, span("notice", "You could probably fit yourself through that hole now. Although climbing through would be much faster if you made it even bigger."))
visible_message(span_notice("\The [user] cuts into \the [src] some more."))
to_chat(user, span_notice("You could probably fit yourself through that hole now. Although climbing through would be much faster if you made it even bigger."))
climbable = TRUE
if(LARGE_HOLE)
visible_message(span("notice", "\The [user] completely cuts through \the [src]."))
to_chat(user, span("notice", "The hole in \the [src] is now big enough to walk through."))
visible_message(span_notice("\The [user] completely cuts through \the [src]."))
to_chat(user, span_notice("The hole in \the [src] is now big enough to walk through."))
climbable = FALSE
update_cut_status()
return TRUE
@@ -140,17 +140,17 @@
if(can_open(user))
toggle(user)
else
to_chat(user, span("warning", "\The [src] is [!open ? "locked" : "stuck open"]."))
to_chat(user, span_warning("\The [src] is [!open ? "locked" : "stuck open"]."))
return TRUE
/obj/structure/fence/door/proc/toggle(mob/user)
switch(open)
if(FALSE)
visible_message(span("notice", "\The [user] opens \the [src]."))
visible_message(span_notice("\The [user] opens \the [src]."))
open = TRUE
if(TRUE)
visible_message(span("notice", "\The [user] closes \the [src]."))
visible_message(span_notice("\The [user] closes \the [src]."))
open = FALSE
update_door_status()
@@ -211,4 +211,4 @@
#undef NO_HOLE
#undef MEDIUM_HOLE
#undef LARGE_HOLE
#undef MAX_HOLE_SIZE
#undef MAX_HOLE_SIZE
+6 -6
View File
@@ -43,11 +43,11 @@
. += get_harvestable_desc()
if(harvest_tool)
var/obj/item/tool = harvest_tool
. += SPAN_NOTICE("\The [src] can be harvested with \a [initial(tool.name)].")
. += span_notice("\The [src] can be harvested with \a [initial(tool.name)].")
if(removal_tool)
var/obj/item/tool = removal_tool
. += SPAN_NOTICE("\The [src] can be removed with \a [initial(tool.name)].")
. += span_notice("\The [src] can be removed with \a [initial(tool.name)].")
/obj/structure/flora/proc/get_harvestable_desc()
return "<span class='notice'>\The [src] seems to have something hanging from it.</span>"
@@ -58,15 +58,15 @@
var/harvest_spawn = pickweight(harvest_loot)
var/atom/movable/AM = spawn_harvest(harvest_spawn, user)
if(AM)
to_chat(user, SPAN_NOTICE("You harvest \the [AM] from \the [src]."))
to_chat(user, span_notice("You harvest \the [AM] from \the [src]."))
else
to_chat(user, SPAN_NOTICE("You fail to harvest anything from \the [src]."))
to_chat(user, span_notice("You fail to harvest anything from \the [src]."))
return
if(removal_tool && istype(W, removal_tool))
to_chat(user, SPAN_WARNING("You start uprooting \the [src]..."))
to_chat(user, span_warning("You start uprooting \the [src]..."))
if(do_after(user, 30))
visible_message(SPAN_NOTICE("\The [user] uproots and discards \the [src]!"))
visible_message(span_notice("\The [user] uproots and discards \the [src]!"))
qdel(src)
return
+2 -3
View File
@@ -177,9 +177,9 @@
return
if(ckeys_that_took[user.ckey])
to_chat(user, span("warning", "There are no presents with your name on."))
to_chat(user, span_warning("There are no presents with your name on."))
return
to_chat(user, span("notice", "After a bit of rummaging, you locate a gift with your name on it!"))
to_chat(user, span_notice("After a bit of rummaging, you locate a gift with your name on it!"))
ckeys_that_took[user.ckey] = TRUE
var/obj/item/G = new gift_type(src)
user.put_in_hands(G)
@@ -295,4 +295,3 @@
set_light(bulbs, 1, "#33ccff") // 5 variants, missing bulbs. 5th has no bulbs, so no glow.
add_overlay(mutable_appearance(icon, "[base_state][bulbs]_glow"))
add_overlay(emissive_appearance(icon, "[base_state][bulbs]_glow"))
@@ -44,9 +44,9 @@
/obj/structure/ghost_pod/manual/survivor/trigger()
. = ..()
desc += "\n The Pod's stasis is broken!"
visible_message(message = SPAN_WARNING("\The [src] hisses and blinks in a myriad of lights as its stasis ceases! \n \
visible_message(message = span_warning("\The [src] hisses and blinks in a myriad of lights as its stasis ceases! \n \
What or whoever lays beneath may yet stir once more, but their wounds may be too grevious... "),
blind_message = SPAN_WARNING("You hear hissing from [src]!"),
blind_message = span_warning("You hear hissing from [src]!"),
runemessage = "HISS")
+2 -2
View File
@@ -397,7 +397,7 @@
switch(passed_mode)
if(RCD_FLOORWALL)
to_chat(user, span("notice", "You finish a wall."))
to_chat(user, span_notice("You finish a wall."))
// This is mostly the same as using on a floor. The girder's material is preserved, however.
T.ChangeTurf(wall_type)
var/turf/simulated/wall/new_T = get_turf(src) // Ref to the wall we just built.
@@ -410,7 +410,7 @@
return TRUE
if(RCD_DECONSTRUCT)
to_chat(user, span("notice", "You deconstruct \the [src]."))
to_chat(user, span_notice("You deconstruct \the [src]."))
qdel(src)
return TRUE
+2 -3
View File
@@ -270,13 +270,13 @@
/obj/structure/grille/rcd_act(mob/living/user, obj/item/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_DECONSTRUCT)
to_chat(user, span("notice", "You deconstruct \the [src]."))
to_chat(user, span_notice("You deconstruct \the [src]."))
qdel(src)
return TRUE
if(RCD_WINDOWGRILLE)
if(locate(/obj/structure/window) in loc)
return FALSE
to_chat(user, span("notice", "You construct a window."))
to_chat(user, span_notice("You construct a window."))
var/obj/structure/window/WD = new the_rcd.window_type(loc)
WD.anchored = TRUE
return TRUE
@@ -286,4 +286,3 @@
health -= damage
spawn(1) healthcheck()
return 1
+1 -1
View File
@@ -158,7 +158,7 @@
O.forceMove(loc)
auto_align(I, params, TRUE)
else
to_chat(user, SPAN_WARNING("\The [I] is too big for you to move!"))
to_chat(user, span_warning("\The [I] is too big for you to move!"))
return
/obj/structure/low_wall/proc/handle_rod_use(mob/user, obj/item/stack/rods/R)
@@ -8,7 +8,7 @@
/obj/structure/prop/fake_ai/attackby(obj/O, mob/user)
if(istype(O, /obj/item/aicard)) // People trying to card the fake AI will get told its impossible.
to_chat(user, span("warning", "This core does not appear to have a suitable port to use \the [O] on..."))
to_chat(user, span_warning("This core does not appear to have a suitable port to use \the [O] on..."))
return TRUE
return ..()
@@ -17,4 +17,4 @@
/obj/structure/prop/fake_ai/dead/crashed_med_shuttle
name = "V.I.T.A."
icon_state = "ai-heartline-crash"
icon_state = "ai-heartline-crash"
+8 -8
View File
@@ -17,7 +17,7 @@
else ..()
/obj/structure/sign/proc/unfasten(mob/user)
user.visible_message(SPAN_NOTICE("\The [user] unfastens \the [src]."), SPAN_NOTICE("You unfasten \the [src]."))
user.visible_message(span_notice("\The [user] unfastens \the [src]."), span_notice("You unfasten \the [src]."))
var/obj/item/sign/S = new(src.loc)
S.name = name
S.desc = desc
@@ -1539,12 +1539,12 @@
return
if((!iswall(A) && !istype(A, /obj/structure/window)) || !isturf(user.loc))
to_chat(user, SPAN_WARNING("You can't place this here!"))
to_chat(user, span_warning("You can't place this here!"))
return
var/placement_dir = get_dir(user, A)
if (!(placement_dir in cardinal))
to_chat(user, SPAN_WARNING("You must stand directly in front of the location you wish to place that on."))
to_chat(user, span_warning("You must stand directly in front of the location you wish to place that on."))
return
var/obj/structure/sign/flag/P = new(user.loc)
@@ -1613,11 +1613,11 @@
/obj/structure/sign/flag/unfasten(mob/user)
if(!ripped)
user.visible_message(SPAN_NOTICE("\The [user] unfastens \the [src] and folds it back up."), SPAN_NOTICE("You unfasten \the [src] and fold it back up."))
user.visible_message(span_notice("\The [user] unfastens \the [src] and folds it back up."), span_notice("You unfasten \the [src] and fold it back up."))
var/obj/item/flag/F = new flagtype(get_turf(user))
user.put_in_hands(F)
else
user.visible_message(SPAN_NOTICE("\The [user] unfastens the tattered remnants of \the [src]."), SPAN_NOTICE("You unfasten the tattered remains of \the [src]."))
user.visible_message(span_notice("\The [user] unfastens the tattered remnants of \the [src]."), span_notice("You unfasten the tattered remains of \the [src]."))
if(linked_flag)
qdel(linked_flag) //otherwise you're going to get weird duping nonsense
qdel(src)
@@ -1626,7 +1626,7 @@
if(alert("Do you want to rip \the [src] from its place?","You think...","Yes","No") == "Yes")
if(!Adjacent(user)) //Cannot bring up dialogue and walk away
return FALSE
visible_message(SPAN_WARNING("\The [user] rips \the [src] in a single, decisive motion!" ))
visible_message(span_warning("\The [user] rips \the [src] in a single, decisive motion!" ))
playsound(src.loc, 'sound/items/poster_ripped.ogg', 100, 1)
add_fingerprint(user)
rip()
@@ -1645,10 +1645,10 @@
/obj/structure/sign/flag/attackby(obj/item/W, mob/user)
..()
if(istype(W, /obj/item/flame/lighter) || istype(W, /obj/item/weldingtool))
visible_message(SPAN_WARNING("\The [user] starts to burn \the [src] down!"))
visible_message(span_warning("\The [user] starts to burn \the [src] down!"))
if(!do_after(user, 2 SECONDS))
return FALSE
visible_message(SPAN_WARNING("\The [user] burns \the [src] down!"))
visible_message(span_warning("\The [user] burns \the [src] down!"))
playsound(src.loc, 'sound/items/cigs_lighters/cig_light.ogg', 100, 1)
new /obj/effect/decal/cleanable/ash(src.loc)
if(linked_flag)
@@ -35,10 +35,10 @@
. = ..()
if(.)
if(M.mob_size < min_mob_buckle_size)
to_chat(M, SPAN_WARNING("You are too small to use \the [src]."))
to_chat(M, span_warning("You are too small to use \the [src]."))
. = FALSE
else if(M.mob_size >= max_mob_buckle_size)
to_chat(M, SPAN_WARNING("You are too large to use \the [src]."))
to_chat(M, span_warning("You are too large to use \the [src]."))
. = FALSE
/obj/structure/bed/chair/wheelchair/update_icon()
+1 -1
View File
@@ -698,7 +698,7 @@
/obj/structure/window/rcd_act(mob/living/user, obj/item/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_DECONSTRUCT)
to_chat(user, span("notice", "You deconstruct \the [src]."))
to_chat(user, span_notice("You deconstruct \the [src]."))
qdel(src)
return TRUE
return FALSE