mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
[MIRROR] refactors most spans (#9139)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
@@ -134,7 +134,7 @@
|
||||
if(try_load_materials(user, W))
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You cannot insert this item into \the [src]!</span>")
|
||||
to_chat(user, span_notice("You cannot insert this item into \the [src]!"))
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/algae_farm/attack_hand(mob/user)
|
||||
@@ -249,7 +249,7 @@
|
||||
if(!istype(S))
|
||||
return 0
|
||||
if(!(S.material.name in stored_material))
|
||||
to_chat(user, "<span class='warning'>\The [src] doesn't accept [material_display_name(S.material)]!</span>")
|
||||
to_chat(user, span_warning("\The [src] doesn't accept [material_display_name(S.material)]!"))
|
||||
return 1
|
||||
var/max_res_amount = storage_capacity[S.material.name]
|
||||
if(stored_material[S.material.name] + S.perunit <= max_res_amount)
|
||||
@@ -258,10 +258,10 @@
|
||||
stored_material[S.material.name] += S.perunit
|
||||
S.use(1)
|
||||
count++
|
||||
user.visible_message("\The [user] inserts [S.name] into \the [src].", "<span class='notice'>You insert [count] [S.name] into \the [src].</span>")
|
||||
user.visible_message("\The [user] inserts [S.name] into \the [src].", span_notice("You insert [count] [S.name] into \the [src]."))
|
||||
updateUsrDialog()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] cannot hold more [S.name].</span>")
|
||||
to_chat(user, span_warning("\The [src] cannot hold more [S.name]."))
|
||||
return 1
|
||||
|
||||
/datum/material/algae
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
return
|
||||
add_fingerprint(usr)
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
to_chat(user, span_warning("Access denied."))
|
||||
return
|
||||
tgui_interact(user)
|
||||
|
||||
@@ -282,18 +282,18 @@
|
||||
if (!W.has_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
if (unlocked)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>")
|
||||
to_chat(user, span_warning("You cannot unwrench \the [src], turn it off first."))
|
||||
return 1
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it too exerted due to internal pressure.</span>")
|
||||
to_chat(user, span_warning("You cannot unwrench \the [src], it too exerted due to internal pressure."))
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<b>\The [user]</b> unfastens \the [src].", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
span_notice("You have unfastened \the [src]."), \
|
||||
"You hear ratchet.")
|
||||
deconstruct()
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
if(W.has_tool_quality(TOOL_WRENCH))
|
||||
anchored = !anchored
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor.</span>")
|
||||
to_chat(user, span_notice("You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor."))
|
||||
|
||||
if(anchored)
|
||||
if(dir & (NORTH|SOUTH))
|
||||
@@ -260,7 +260,7 @@
|
||||
anchored = !anchored
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
turbine = null
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor.</span>")
|
||||
to_chat(user, span_notice("You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor."))
|
||||
updateConnection()
|
||||
else
|
||||
..()
|
||||
@@ -283,4 +283,4 @@
|
||||
if (usr.stat || usr.restrained() || anchored)
|
||||
return
|
||||
|
||||
src.set_dir(turn(src.dir, 90))
|
||||
src.set_dir(turn(src.dir, 90))
|
||||
|
||||
@@ -205,7 +205,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
return
|
||||
add_fingerprint(usr)
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
to_chat(user, span_warning("Access denied."))
|
||||
return
|
||||
tgui_interact(user)
|
||||
|
||||
@@ -242,17 +242,17 @@ Thus, the two variables affect pump operation are set in New():
|
||||
if (!W.has_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && use_power)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>")
|
||||
to_chat(user, span_warning("You cannot unwrench this [src], turn it off first."))
|
||||
return 1
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], it too exerted due to internal pressure.</span>")
|
||||
to_chat(user, span_warning("You cannot unwrench this [src], it too exerted due to internal pressure."))
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<b>\The [user]</b> unfastens \the [src].", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
span_notice("You have unfastened \the [src]."), \
|
||||
"You hear ratchet.")
|
||||
deconstruct()
|
||||
|
||||
Reference in New Issue
Block a user