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
+31 -31
View File
@@ -89,7 +89,7 @@
if(damage < STRUCTURE_MIN_DAMAGE_THRESHOLD)
return 0
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
visible_message(span_danger("[user] [attack_message] the [src]!"))
spawn(1) dismantle()
return 1
@@ -111,7 +111,7 @@
damage = round(new_damage)
Proj.damage = outgoing_damage
visible_message("<span class='danger'>\The [src] reflects \the [Proj]!</span>")
visible_message(span_danger("\The [src] reflects \the [Proj]!"))
// Find a turf near or on the original location to bounce to
var/new_x = Proj.starting.x + pick(0, 0, 0, -1, 1, -2, 2)
@@ -149,58 +149,58 @@
if(W.has_tool_quality(TOOL_WRENCH) && state == 0)
if(anchored && !reinf_material)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now disassembling the girder...</span>")
to_chat(user, span_notice("Now disassembling the girder..."))
if(do_after(user,(35 + round(max_health/50)) * W.toolspeed))
if(!src) return
to_chat(user, "<span class='notice'>You dissasembled the girder!</span>")
to_chat(user, span_notice("You dissasembled the girder!"))
dismantle()
else if(!anchored)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now securing the girder...</span>")
to_chat(user, span_notice("Now securing the girder..."))
if(do_after(user, 40 * W.toolspeed, src))
to_chat(user, "<span class='notice'>You secured the girder!</span>")
to_chat(user, span_notice("You secured the girder!"))
reset_girder()
else if(istype(W, /obj/item/pickaxe/plasmacutter))
to_chat(user, "<span class='notice'>Now slicing apart the girder...</span>")
to_chat(user, span_notice("Now slicing apart the girder..."))
if(do_after(user,30 * W.toolspeed))
if(!src) return
to_chat(user, "<span class='notice'>You slice apart the girder!</span>")
to_chat(user, span_notice("You slice apart the girder!"))
dismantle()
else if(istype(W, /obj/item/pickaxe/diamonddrill))
to_chat(user, "<span class='notice'>You drill through the girder!</span>")
to_chat(user, span_notice("You drill through the girder!"))
dismantle()
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(state == 2)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now unsecuring support struts...</span>")
to_chat(user, span_notice("Now unsecuring support struts..."))
if(do_after(user,40 * W.toolspeed))
if(!src) return
to_chat(user, "<span class='notice'>You unsecured the support struts!</span>")
to_chat(user, span_notice("You unsecured the support struts!"))
state = 1
else if(anchored && !reinf_material)
playsound(src, W.usesound, 100, 1)
reinforcing = !reinforcing
to_chat(user, "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>")
to_chat(user, span_notice("\The [src] can now be [reinforcing? "reinforced" : "constructed"]!"))
else if(W.has_tool_quality(TOOL_WIRECUTTER) && state == 1)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now removing support struts...</span>")
to_chat(user, span_notice("Now removing support struts..."))
if(do_after(user,40 * W.toolspeed))
if(!src) return
to_chat(user, "<span class='notice'>You removed the support struts!</span>")
to_chat(user, span_notice("You removed the support struts!"))
reinf_material.place_dismantled_product(get_turf(src))
reinf_material = null
reset_girder()
else if(W.has_tool_quality(TOOL_CROWBAR) && state == 0 && anchored)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now dislodging the girder...</span>")
to_chat(user, span_notice("Now dislodging the girder..."))
if(do_after(user, 40 * W.toolspeed))
if(!src) return
to_chat(user, "<span class='notice'>You dislodged the girder!</span>")
to_chat(user, span_notice("You dislodged the girder!"))
displace()
else if(istype(W, /obj/item/stack/material))
@@ -225,7 +225,7 @@
/obj/structure/girder/proc/construct_wall(obj/item/stack/material/S, mob/user)
var/amount_to_use = reinf_material ? 1 : 2
if(S.get_amount() < amount_to_use)
to_chat(user, "<span class='notice'>There isn't enough material here to construct a wall.</span>")
to_chat(user, span_notice("There isn't enough material here to construct a wall."))
return 0
var/datum/material/M = name_to_material[S.default_type]
@@ -236,18 +236,18 @@
add_hiddenprint(usr)
if(M.integrity < 50)
to_chat(user, "<span class='notice'>This material is too soft for use in wall construction.</span>")
to_chat(user, span_notice("This material is too soft for use in wall construction."))
return 0
to_chat(user, "<span class='notice'>You begin adding the plating...</span>")
to_chat(user, span_notice("You begin adding the plating..."))
if(!do_after(user,40) || !S.use(amount_to_use))
return 1 //once we've gotten this far don't call parent attackby()
if(anchored)
to_chat(user, "<span class='notice'>You added the plating!</span>")
to_chat(user, span_notice("You added the plating!"))
else
to_chat(user, "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>")
to_chat(user, span_notice("You create a false wall! Push on it to open or close the passage."))
wall_fake = 1
var/turf/Tsrc = get_turf(src)
@@ -262,11 +262,11 @@
/obj/structure/girder/proc/reinforce_with_material(obj/item/stack/material/S, mob/user) //if the verb is removed this can be renamed.
if(reinf_material)
to_chat(user, "<span class='notice'>\The [src] is already reinforced.</span>")
to_chat(user, span_notice("\The [src] is already reinforced."))
return 0
if(S.get_amount() < 1)
to_chat(user, "<span class='notice'>There isn't enough material here to reinforce the girder.</span>")
to_chat(user, span_notice("There isn't enough material here to reinforce the girder."))
return 0
var/datum/material/M = name_to_material[S.default_type]
@@ -274,10 +274,10 @@
to_chat(user, "You cannot reinforce \the [src] with that; it is too soft.")
return 0
to_chat(user, "<span class='notice'>Now reinforcing...</span>")
to_chat(user, span_notice("Now reinforcing..."))
if (!do_after(user,40) || !S.use(1))
return 1 //don't call parent attackby() past this point
to_chat(user, "<span class='notice'>You added reinforcement!</span>")
to_chat(user, span_notice("You added reinforcement!"))
reinf_material = M
reinforce_girder()
@@ -296,7 +296,7 @@
/obj/structure/girder/attack_hand(mob/user as mob)
if (HULK in user.mutations)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
visible_message(span_danger("[user] smashes [src] apart!"))
dismantle()
return
return ..()
@@ -341,19 +341,19 @@
/obj/structure/girder/cult/attackby(obj/item/W as obj, mob/user as mob)
if(W.has_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now disassembling the girder...</span>")
to_chat(user, span_notice("Now disassembling the girder..."))
if(do_after(user,40 * W.toolspeed))
to_chat(user, "<span class='notice'>You dissasembled the girder!</span>")
to_chat(user, span_notice("You dissasembled the girder!"))
dismantle()
else if(istype(W, /obj/item/pickaxe/plasmacutter))
to_chat(user, "<span class='notice'>Now slicing apart the girder...</span>")
to_chat(user, span_notice("Now slicing apart the girder..."))
if(do_after(user,30 * W.toolspeed))
to_chat(user, "<span class='notice'>You slice apart the girder!</span>")
to_chat(user, span_notice("You slice apart the girder!"))
dismantle()
else if(istype(W, /obj/item/pickaxe/diamonddrill))
to_chat(user, "<span class='notice'>You drill through the girder!</span>")
to_chat(user, span_notice("You drill through the girder!"))
new /obj/effect/decal/remains/human(get_turf(src))
dismantle()