mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +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:
@@ -117,7 +117,7 @@
|
||||
/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(O.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
panel_open = !panel_open
|
||||
user.visible_message("<span class='filter_notice'>[user] [panel_open ? "opens" : "closes"] the maintenance panel of \the [src].</span>", "<span class='filter_notice'>You [panel_open ? "open" : "close"] the maintenance panel of \the [src].</span>")
|
||||
user.visible_message(span_filter_notice("[user] [panel_open ? "opens" : "closes"] the maintenance panel of \the [src]."), span_filter_notice("You [panel_open ? "open" : "close"] the maintenance panel of \the [src]."))
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
update_icon()
|
||||
return
|
||||
@@ -131,13 +131,13 @@
|
||||
return
|
||||
|
||||
if(stat & NOPOWER)
|
||||
to_chat(user, "<span class='notice'>\The [src] is unpowered and useless.</span>")
|
||||
to_chat(user, span_notice("\The [src] is unpowered and useless."))
|
||||
return
|
||||
|
||||
if(accept_check(O))
|
||||
user.remove_from_mob(O)
|
||||
stock(O)
|
||||
user.visible_message("<span class='notice'>[user] has added \the [O] to \the [src].</span>", "<span class='notice'>You add \the [O] to \the [src].</span>")
|
||||
user.visible_message(span_notice("[user] has added \the [O] to \the [src]."), span_notice("You add \the [O] to \the [src]."))
|
||||
sortTim(item_records, GLOBAL_PROC_REF(cmp_stored_item_name))
|
||||
|
||||
else if(istype(O, /obj/item/storage/bag))
|
||||
@@ -149,29 +149,29 @@
|
||||
stock(G)
|
||||
plants_loaded = 1
|
||||
if(plants_loaded)
|
||||
user.visible_message("<span class='notice'>[user] loads \the [src] with \the [P].</span>", "<span class='notice'>You load \the [src] with \the [P].</span>")
|
||||
user.visible_message(span_notice("[user] loads \the [src] with \the [P]."), span_notice("You load \the [src] with \the [P]."))
|
||||
if(P.contents.len > 0)
|
||||
to_chat(user, "<span class='notice'>Some items are refused.</span>")
|
||||
to_chat(user, span_notice("Some items are refused."))
|
||||
|
||||
else if(istype(O, /obj/item/gripper)) // Grippers. ~Mechoid.
|
||||
var/obj/item/gripper/B = O //B, for Borg.
|
||||
if(!B.wrapped)
|
||||
to_chat(user, "<span class='filter_notice'>\The [B] is not holding anything.</span>")
|
||||
to_chat(user, span_filter_notice("\The [B] is not holding anything."))
|
||||
return
|
||||
else
|
||||
var/B_held = B.wrapped
|
||||
to_chat(user, "<span class='filter_notice'>You use \the [B] to put \the [B_held] into \the [src].</span>")
|
||||
to_chat(user, span_filter_notice("You use \the [B] to put \the [B_held] into \the [src]."))
|
||||
return
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>\The [src] smartly refuses [O].</span>")
|
||||
to_chat(user, span_notice("\The [src] smartly refuses [O]."))
|
||||
return 1
|
||||
|
||||
/obj/machinery/smartfridge/secure/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
locked = -1
|
||||
to_chat(user, "<span class='filter_notice'>You short out the product lock on [src].</span>")
|
||||
to_chat(user, span_filter_notice("You short out the product lock on [src]."))
|
||||
return 1
|
||||
|
||||
/obj/machinery/smartfridge/proc/find_record(var/obj/item/O)
|
||||
@@ -272,7 +272,7 @@
|
||||
return FALSE
|
||||
spawn(0)
|
||||
throw_item.throw_at(target,16,3,src)
|
||||
src.visible_message("<span class='warning'>[src] launches [throw_item.name] at [target.name]!</span>")
|
||||
src.visible_message(span_warning("[src] launches [throw_item.name] at [target.name]!"))
|
||||
SStgui.update_uis(src)
|
||||
update_icon()
|
||||
return TRUE
|
||||
@@ -285,6 +285,6 @@
|
||||
return TRUE
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf)))
|
||||
if((!allowed(usr) && scan_id) && !emagged && locked != -1 && action == "Release")
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
to_chat(usr, span_warning("Access denied."))
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
@@ -65,4 +65,4 @@
|
||||
attached = above
|
||||
item_records = attached.item_records
|
||||
else
|
||||
to_chat(world,"<span class='danger'>[src] at [x],[y],[z] cannot find the unit above it!</span>")
|
||||
to_chat(world,span_danger("[src] at [x],[y],[z] cannot find the unit above it!"))
|
||||
|
||||
Reference in New Issue
Block a user