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:
@@ -77,7 +77,7 @@
|
||||
string += "-\a [CI.container.label(null, CI.combine_target)], [report_progress(CI)]</br>"
|
||||
return string
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It is empty.</span>")
|
||||
to_chat(user, span_notice("It is empty."))
|
||||
|
||||
/obj/machinery/appliance/proc/report_progress_tgui(datum/cooking_item/CI)
|
||||
if(!CI || !CI.max_cookwork)
|
||||
@@ -114,17 +114,17 @@
|
||||
if (progress < 0.25)
|
||||
return "It's barely started cooking."
|
||||
if (progress < 0.75)
|
||||
return "<span class='notice'>It's cooking away nicely.</span>"
|
||||
return span_notice("It's cooking away nicely.")
|
||||
if (progress < 1)
|
||||
return "<span class='notice'><b>It's almost ready!</b></span>"
|
||||
return span_notice("<b>It's almost ready!</b>")
|
||||
|
||||
var/half_overcook = (CI.overcook_mult - 1)*0.5
|
||||
if (progress < 1+half_overcook)
|
||||
return "<span class='soghun'><b>It is done !</b></span>"
|
||||
return span_soghun("<b>It is done !</b>")
|
||||
if (progress < CI.overcook_mult)
|
||||
return "<span class='warning'>It looks overcooked, get it out!</span>"
|
||||
return span_warning("It looks overcooked, get it out!")
|
||||
else
|
||||
return "<span class='danger'>It is burning!</span>"
|
||||
return span_danger("It is burning!")
|
||||
|
||||
/obj/machinery/appliance/update_icon()
|
||||
if (!stat && cooking_objs.len)
|
||||
@@ -145,25 +145,25 @@
|
||||
return
|
||||
|
||||
if (!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You lack the dexterity to do that!</span>")
|
||||
to_chat(user, span_warning("You lack the dexterity to do that!"))
|
||||
return
|
||||
|
||||
if (user.stat || user.restrained() || user.incapacitated())
|
||||
return
|
||||
|
||||
if (!Adjacent(user) && !issilicon(user))
|
||||
to_chat(user, "<span class='warning'>You can't reach [src] from here!</span>")
|
||||
to_chat(user, span_warning("You can't reach [src] from here!"))
|
||||
return
|
||||
|
||||
if (stat & POWEROFF)//Its turned off
|
||||
stat &= ~POWEROFF
|
||||
use_power = 1
|
||||
user.visible_message("<span class='filter_notice'>[user] turns [src] on.</span>", "<span class='filter_notice'>You turn on [src].</span>")
|
||||
user.visible_message(span_filter_notice("[user] turns [src] on."), span_filter_notice("You turn on [src]."))
|
||||
|
||||
else //Its on, turn it off
|
||||
stat |= POWEROFF
|
||||
use_power = 0
|
||||
user.visible_message("<span class='filter_notice'>[user] turns [src] off.</span>", "<span class='filter_notice'>You turn off [src].</span>")
|
||||
user.visible_message(span_filter_notice("[user] turns [src] off."), span_filter_notice("You turn off [src]."))
|
||||
cooking = FALSE // Stop cooking here, too, just in case.
|
||||
|
||||
playsound(src, 'sound/machines/click.ogg', 40, 1)
|
||||
@@ -181,14 +181,14 @@
|
||||
return
|
||||
|
||||
if (!usr.IsAdvancedToolUser())
|
||||
to_chat(usr, "<span class='filter_notice'>You lack the dexterity to do that!</span>")
|
||||
to_chat(usr, span_filter_notice("You lack the dexterity to do that!"))
|
||||
return
|
||||
|
||||
if (usr.stat || usr.restrained() || usr.incapacitated())
|
||||
return
|
||||
|
||||
if (!Adjacent(usr) && !issilicon(usr))
|
||||
to_chat(usr, "<span class='filter_notice'>You can't adjust the [src] from this distance, get closer!</span>")
|
||||
to_chat(usr, span_filter_notice("You can't adjust the [src] from this distance, get closer!"))
|
||||
return
|
||||
|
||||
if(output_options.len)
|
||||
@@ -197,10 +197,10 @@
|
||||
return
|
||||
if(choice == "Default")
|
||||
selected_option = null
|
||||
to_chat(usr, "<span class='notice'>You decide not to make anything specific with \the [src].</span>")
|
||||
to_chat(usr, span_notice("You decide not to make anything specific with \the [src]."))
|
||||
else
|
||||
selected_option = choice
|
||||
to_chat(usr, "<span class='notice'>You prepare \the [src] to make \a [selected_option] with the next thing you put in. Try putting several ingredients in a container!</span>")
|
||||
to_chat(usr, span_notice("You prepare \the [src] to make \a [selected_option] with the next thing you put in. Try putting several ingredients in a container!"))
|
||||
|
||||
//Handles all validity checking and error messages for inserting things
|
||||
/obj/machinery/appliance/proc/can_insert(var/obj/item/I, var/mob/user)
|
||||
@@ -214,18 +214,18 @@
|
||||
if(istype(G))
|
||||
|
||||
if(!can_cook_mobs)
|
||||
to_chat(user, "<span class='warning'>That's not going to fit.</span>")
|
||||
to_chat(user, span_warning("That's not going to fit."))
|
||||
return 0
|
||||
|
||||
if(!isliving(G.affecting))
|
||||
to_chat(user, "<span class='warning'>You can't cook that.</span>")
|
||||
to_chat(user, span_warning("You can't cook that."))
|
||||
return 0
|
||||
|
||||
return 2
|
||||
|
||||
|
||||
if (!has_space(I))
|
||||
to_chat(user, "<span class='warning'>There's no room in [src] for that!</span>")
|
||||
to_chat(user, span_warning("There's no room in [src] for that!"))
|
||||
return 0
|
||||
|
||||
|
||||
@@ -235,18 +235,18 @@
|
||||
// We're trying to cook something else. Check if it's valid.
|
||||
var/obj/item/reagent_containers/food/snacks/check = I
|
||||
if(istype(check) && islist(check.cooked) && (cook_type in check.cooked))
|
||||
to_chat(user, "<span class='warning'>\The [check] has already been [cook_type].</span>")
|
||||
to_chat(user, span_warning("\The [check] has already been [cook_type]."))
|
||||
return 0
|
||||
else if(istype(check, /obj/item/reagent_containers/glass))
|
||||
to_chat(user, "<span class='warning'>That would probably break [src].</span>")
|
||||
to_chat(user, span_warning("That would probably break [src]."))
|
||||
return 0
|
||||
else if(istype(check, /obj/item/disk/nuclear))
|
||||
to_chat(user, "<span class='warning'>You can't cook that.</span>")
|
||||
to_chat(user, span_warning("You can't cook that."))
|
||||
return 0
|
||||
else if(I.has_tool_quality(TOOL_CROWBAR) || I.has_tool_quality(TOOL_SCREWDRIVER) || istype(I, /obj/item/storage/part_replacer)) // You can't cook tools, dummy.
|
||||
return 0
|
||||
else if(!istype(check) && !istype(check, /obj/item/holder))
|
||||
to_chat(user, "<span class='warning'>That's not edible.</span>")
|
||||
to_chat(user, span_warning("That's not edible."))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
@@ -261,7 +261,7 @@
|
||||
|
||||
/obj/machinery/appliance/attackby(var/obj/item/I, var/mob/user)
|
||||
if(!cook_type || (stat & (BROKEN)))
|
||||
to_chat(user, "<span class='warning'>\The [src] is not working.</span>")
|
||||
to_chat(user, span_warning("\The [src] is not working."))
|
||||
return FALSE
|
||||
|
||||
var/obj/item/ToCook = I
|
||||
@@ -595,7 +595,7 @@
|
||||
new /obj/item/reagent_containers/food/snacks/badrecipe(CI.container)
|
||||
|
||||
// Produce nasty smoke.
|
||||
visible_message("<span class='danger'>\The [src] vomits a gout of rancid smoke!</span>")
|
||||
visible_message(span_danger("\The [src] vomits a gout of rancid smoke!"))
|
||||
var/datum/effect/effect/system/smoke_spread/bad/burntfood/smoke = new /datum/effect/effect/system/smoke_spread/bad/burntfood
|
||||
playsound(src, 'sound/effects/smoke.ogg', 20, 1)
|
||||
smoke.attach(src)
|
||||
@@ -666,7 +666,7 @@
|
||||
CI.reset()//reset instead of deleting if the container is left inside
|
||||
|
||||
if(user)
|
||||
user.visible_message("<span class='notice'>\The [user] remove \the [thing] from \the [src].</span>")
|
||||
user.visible_message(span_notice("\The [user] remove \the [thing] from \the [src]."))
|
||||
else
|
||||
src.visible_message("<b>\The [src]</b> pings as it automatically ejects its contents!")
|
||||
if(cooked_sound)
|
||||
|
||||
@@ -76,12 +76,12 @@
|
||||
if(.) //no need to duplicate adjacency check
|
||||
if(!stat)
|
||||
if (temperature < min_temp)
|
||||
. += "<span class='warning'>\The [src] is still heating up and is too cold to cook anything yet.</span>"
|
||||
. += span_warning("\The [src] is still heating up and is too cold to cook anything yet.")
|
||||
else
|
||||
. += "<span class='notice'>It is running at [round(get_efficiency(), 0.1)]% efficiency!</span>"
|
||||
. += span_notice("It is running at [round(get_efficiency(), 0.1)]% efficiency!")
|
||||
. += "Temperature: [round(temperature - T0C, 0.1)]C / [round(optimal_temp - T0C, 0.1)]C"
|
||||
else
|
||||
. += "<span class='warning'>It is switched off.</span>"
|
||||
. += span_warning("It is switched off.")
|
||||
|
||||
/obj/machinery/appliance/cooker/list_contents(var/mob/user)
|
||||
if (cooking_objs.len)
|
||||
@@ -94,7 +94,7 @@
|
||||
string += "- [CI.container.label(num)], [report_progress(CI)]</br>"
|
||||
to_chat(user, string)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It's empty.</span>")
|
||||
to_chat(user, span_notice("It's empty."))
|
||||
|
||||
/obj/machinery/appliance/cooker/proc/get_efficiency()
|
||||
// to_world("Our cooking_power is [cooking_power] and our efficiency is [(cooking_power / optimal_power) * 100].") // Debug lines, uncomment if you need to test.
|
||||
@@ -199,5 +199,5 @@
|
||||
/obj/machinery/appliance/cooker/add_content(var/obj/item/I, var/mob/user)
|
||||
var/datum/cooking_item/CI = ..()
|
||||
if(istype(CI) && CI.combine_target)
|
||||
to_chat(user, "<span class='filter_notice'>\The [I] will be used to make a [selected_option]. Output selection is returned to default for future items.</span>")
|
||||
selected_option = null
|
||||
to_chat(user, span_filter_notice("\The [I] will be used to make a [selected_option]. Output selection is returned to default for future items."))
|
||||
selected_option = null
|
||||
|
||||
@@ -18,7 +18,7 @@ fundamental differences
|
||||
/obj/machinery/appliance/mixer/examine(var/mob/user)
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "<span class='notice'>It is currently set to make a [selected_option]</span>"
|
||||
. += span_notice("It is currently set to make a [selected_option]")
|
||||
|
||||
/obj/machinery/appliance/mixer/Initialize()
|
||||
. = ..()
|
||||
@@ -43,7 +43,7 @@ fundamental differences
|
||||
return
|
||||
|
||||
if (!usr.IsAdvancedToolUser())
|
||||
to_chat(usr, "<span class='notice'>You can't operate [src].</span>")
|
||||
to_chat(usr, span_notice("You can't operate [src]."))
|
||||
return
|
||||
|
||||
if(output_options.len)
|
||||
@@ -52,7 +52,7 @@ fundamental differences
|
||||
return
|
||||
else
|
||||
selected_option = choice
|
||||
to_chat(usr, "<span class='notice'>You prepare \the [src] to make \a [selected_option].</span>")
|
||||
to_chat(usr, span_notice("You prepare \the [src] to make \a [selected_option]."))
|
||||
var/datum/cooking_item/CI = cooking_objs[1]
|
||||
CI.combine_target = selected_option
|
||||
|
||||
@@ -73,7 +73,7 @@ fundamental differences
|
||||
return 1
|
||||
else
|
||||
if(show_warning)
|
||||
to_chat(user, "<span class='warning'>You can't remove ingredients while it's turned on! Turn it off first or wait for it to finish.</span>")
|
||||
to_chat(user, span_warning("You can't remove ingredients while it's turned on! Turn it off first or wait for it to finish."))
|
||||
return 0
|
||||
|
||||
//Container is not removable
|
||||
@@ -83,7 +83,7 @@ fundamental differences
|
||||
for(var/datum/cooking_item/CI as anything in cooking_objs)
|
||||
if (CI.container)
|
||||
if (!CI.container.check_contents())
|
||||
to_chat(user, "<span class='filter_notice'>There's nothing in [src] you can remove!</span>")
|
||||
to_chat(user, span_filter_notice("There's nothing in [src] you can remove!"))
|
||||
return
|
||||
|
||||
for (var/obj/item/I in CI.container)
|
||||
@@ -106,26 +106,26 @@ fundamental differences
|
||||
|
||||
var/datum/cooking_item/CI = cooking_objs[1]
|
||||
if(!CI.container.check_contents())
|
||||
to_chat(usr, "<span class='filter_notice'>There's nothing in it! Add ingredients before turning [src] on!</span>")
|
||||
to_chat(usr, span_filter_notice("There's nothing in it! Add ingredients before turning [src] on!"))
|
||||
return
|
||||
|
||||
if(stat & POWEROFF)//Its turned off
|
||||
stat &= ~POWEROFF
|
||||
if(usr)
|
||||
usr.visible_message("<span class='filter_notice'>[usr] turns the [src] on.</span>", "<span class='filter_notice'>You turn on \the [src].</span>")
|
||||
usr.visible_message(span_filter_notice("[usr] turns the [src] on."), span_filter_notice("You turn on \the [src]."))
|
||||
get_cooking_work(CI)
|
||||
use_power = 2
|
||||
else //Its on, turn it off
|
||||
stat |= POWEROFF
|
||||
use_power = 0
|
||||
if(usr)
|
||||
usr.visible_message("<span class='filter_notice'>[usr] turns the [src] off.</span>", "<span class='filter_notice'>You turn off \the [src].</span>")
|
||||
usr.visible_message(span_filter_notice("[usr] turns the [src] off."), span_filter_notice("You turn off \the [src]."))
|
||||
playsound(src, 'sound/machines/click.ogg', 40, 1)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/appliance/mixer/can_insert(var/obj/item/I, var/mob/user)
|
||||
if(!stat)
|
||||
to_chat(user, "<span class='warning'>,You can't add items while \the [src] is running. Wait for it to finish or turn the power off to abort.</span>")
|
||||
to_chat(user, span_warning(",You can't add items while \the [src] is running. Wait for it to finish or turn the power off to abort."))
|
||||
return 0
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
var/string = "It contains....</br>"
|
||||
for (var/atom/movable/A in contents)
|
||||
string += "[A.name] </br>"
|
||||
. += "<span class='notice'>[string]</span>"
|
||||
. += span_notice("[string]")
|
||||
if (reagents.total_volume)
|
||||
. += "<span class='notice'>It contains [reagents.total_volume]u of reagents.</span>"
|
||||
. += span_notice("It contains [reagents.total_volume]u of reagents.")
|
||||
|
||||
|
||||
/obj/item/reagent_containers/cooking_container/attackby(var/obj/item/I as obj, var/mob/user as mob)
|
||||
@@ -53,13 +53,13 @@
|
||||
for (var/possible_type in insertable)
|
||||
if (istype(I, possible_type))
|
||||
if (!can_fit(I))
|
||||
to_chat(user, "<span class='warning'>There's no more space in the [src] for that!</span>")
|
||||
to_chat(user, span_warning("There's no more space in the [src] for that!"))
|
||||
return 0
|
||||
|
||||
if(!user.unEquip(I) && !isturf(I.loc))
|
||||
return
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You put the [I] into the [src].</span>")
|
||||
to_chat(user, span_notice("You put the [I] into the [src]."))
|
||||
food_items += 1
|
||||
update_icon()
|
||||
return
|
||||
@@ -78,21 +78,21 @@
|
||||
return
|
||||
|
||||
if (user.stat || user.restrained())
|
||||
to_chat(user, "<span class='notice'>You are in no fit state to do this.</span>")
|
||||
to_chat(user, span_notice("You are in no fit state to do this."))
|
||||
return
|
||||
|
||||
if (!Adjacent(user))
|
||||
to_chat(user, "<span class='filter_notice'>You can't reach [src] from here.</span>")
|
||||
to_chat(user, span_filter_notice("You can't reach [src] from here."))
|
||||
return
|
||||
|
||||
if (!contents.len)
|
||||
to_chat(user, "<span class='warning'>There's nothing in the [src] you can remove!</span>")
|
||||
to_chat(user, span_warning("There's nothing in the [src] you can remove!"))
|
||||
return
|
||||
|
||||
for (var/atom/movable/A in contents)
|
||||
A.forceMove(get_turf(src))
|
||||
|
||||
to_chat(user, "<span class='notice'>You remove all the solid items from the [src].</span>")
|
||||
to_chat(user, span_notice("You remove all the solid items from the [src]."))
|
||||
|
||||
/obj/item/reagent_containers/cooking_container/proc/check_contents()
|
||||
if (contents.len == 0)
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
if(!istype(victim))
|
||||
return
|
||||
|
||||
// user.visible_message("<span class='danger'>\The [user] starts pushing \the [victim] into \the [src]!</span>")
|
||||
// user.visible_message(span_danger("\The [user] starts pushing \the [victim] into \the [src]!"))
|
||||
|
||||
//Removed delay on this action in favour of a cooldown after it
|
||||
//If you can lure someone close to the fryer and grab them then you deserve success.
|
||||
@@ -193,7 +193,7 @@
|
||||
return
|
||||
|
||||
if(!victim || !victim.Adjacent(user))
|
||||
to_chat(user, "<span class='danger'>Your victim slipped free!</span>")
|
||||
to_chat(user, span_danger("Your victim slipped free!"))
|
||||
cooking = FALSE
|
||||
icon_state = off_icon
|
||||
fry_loop.stop(src)
|
||||
@@ -214,7 +214,7 @@
|
||||
else if(E.robotic >= ORGAN_ROBOT)
|
||||
nopain = 1
|
||||
|
||||
user.visible_message("<span class='danger'>\The [user] shoves \the [victim][E ? "'s [E.name]" : ""] into \the [src]!</span>")
|
||||
user.visible_message(span_danger("\The [user] shoves \the [victim][E ? "'s [E.name]" : ""] into \the [src]!"))
|
||||
if (damage > 0)
|
||||
if(E)
|
||||
if(E.children && E.children.len)
|
||||
@@ -228,10 +228,10 @@
|
||||
victim.apply_damage(damage, BURN, user.zone_sel.selecting)
|
||||
|
||||
if(!nopain)
|
||||
to_chat(victim, "<span class='danger'>Agony consumes you as searing hot oil scorches your [E ? E.name : "flesh"] horribly!</span>")
|
||||
to_chat(victim, span_danger("Agony consumes you as searing hot oil scorches your [E ? E.name : "flesh"] horribly!"))
|
||||
victim.emote("scream")
|
||||
else
|
||||
to_chat(victim, "<span class='danger'>Searing hot oil scorches your [E ? E.name : "flesh"]!</span>")
|
||||
to_chat(victim, span_danger("Searing hot oil scorches your [E ? E.name : "flesh"]!"))
|
||||
|
||||
user.attack_log += text("\[[time_stamp()]\] [span_red("Has [cook_type] \the [victim] ([victim.ckey]) in \a [src]")]")
|
||||
victim.attack_log += text("\[[time_stamp()]\] [span_orange("Has been [cook_type] in \a [src] by [user.name] ([user.ckey])")]")
|
||||
@@ -253,7 +253,7 @@
|
||||
if (I.reagents.total_volume <= 0 && oil)
|
||||
//Its empty, handle scooping some hot oil out of the fryer
|
||||
oil.trans_to(I, I.reagents.maximum_volume)
|
||||
user.visible_message("<span class='filter_notice'>[user] scoops some oil out of \the [src].</span>", span_notice("You scoop some oil out of \the [src]."))
|
||||
user.visible_message(span_filter_notice("[user] scoops some oil out of \the [src]."), span_notice("You scoop some oil out of \the [src]."))
|
||||
return 1
|
||||
else
|
||||
//It contains stuff, handle pouring any oil into the fryer
|
||||
@@ -269,7 +269,7 @@
|
||||
I.reagents.remove_reagent(R.id, delta)
|
||||
amount += delta
|
||||
if (amount > 0)
|
||||
user.visible_message("<span class='filter_notice'>[user] pours some oil into \the [src].</span>", "<span class='notice'>You pour [amount]u of oil into \the [src].</span>", "<span class='notice'>You hear something viscous being poured into a metal container.</span>")
|
||||
user.visible_message(span_filter_notice("[user] pours some oil into \the [src]."), span_notice("You pour [amount]u of oil into \the [src]."), span_notice("You hear something viscous being poured into a metal container."))
|
||||
return 1
|
||||
//If neither of the above returned, then call parent as normal
|
||||
..()
|
||||
|
||||
@@ -86,11 +86,11 @@
|
||||
return
|
||||
|
||||
if(!usr.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='notice'>You lack the dexterity to do that.</span>")
|
||||
to_chat(user, span_notice("You lack the dexterity to do that."))
|
||||
return
|
||||
|
||||
if(!Adjacent(usr))
|
||||
to_chat(user, "<span class='notice'>You can't reach the [src] from there, get closer!</span>")
|
||||
to_chat(user, span_notice("You can't reach the [src] from there, get closer!"))
|
||||
return
|
||||
|
||||
if(open)
|
||||
@@ -104,7 +104,7 @@
|
||||
cooking = FALSE
|
||||
|
||||
playsound(src, 'sound/machines/hatch_open.ogg', 20, 1)
|
||||
to_chat(user, "<span class='notice'>You [open? "open":"close"] the oven door</span>")
|
||||
to_chat(user, span_notice("You [open? "open":"close"] the oven door"))
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/appliance/cooker/oven/proc/manip(var/obj/item/I)
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
/obj/machinery/appliance/cooker/oven/can_insert(var/obj/item/I, var/mob/user)
|
||||
if(!open && !manip(I))
|
||||
to_chat(user, "<span class='warning'>You can't put anything in while the door is closed!</span>")
|
||||
to_chat(user, span_warning("You can't put anything in while the door is closed!"))
|
||||
return 0
|
||||
|
||||
else
|
||||
@@ -136,7 +136,7 @@
|
||||
/obj/machinery/appliance/cooker/oven/can_remove_items(var/mob/user, show_warning = TRUE)
|
||||
if(!open)
|
||||
if(show_warning)
|
||||
to_chat(user, "<span class='warning'>You can't take anything out while the door is closed!</span>")
|
||||
to_chat(user, span_warning("You can't take anything out while the door is closed!"))
|
||||
return 0
|
||||
|
||||
else
|
||||
|
||||
@@ -82,18 +82,18 @@
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(operating)
|
||||
to_chat(user, "<span class='danger'>The gibber is locked and running, wait for it to finish.</span>")
|
||||
to_chat(user, span_danger("The gibber is locked and running, wait for it to finish."))
|
||||
return
|
||||
else
|
||||
src.startgibbing(user)
|
||||
|
||||
/obj/machinery/gibber/examine()
|
||||
. = ..()
|
||||
. += "The safety guard is [emagged ? "<span class='danger'>disabled</span>" : "enabled"]."
|
||||
. += "The safety guard is [emagged ? span_danger("disabled") : "enabled"]."
|
||||
|
||||
/obj/machinery/gibber/emag_act(var/remaining_charges, var/mob/user)
|
||||
emagged = !emagged
|
||||
to_chat(user, "<span class='danger'>You [emagged ? "disable" : "enable"] the gibber safety guard.</span>")
|
||||
to_chat(user, span_danger("You [emagged ? "disable" : "enable"] the gibber safety guard."))
|
||||
return 1
|
||||
|
||||
/obj/machinery/gibber/attackby(var/obj/item/W, var/mob/user)
|
||||
@@ -106,7 +106,7 @@
|
||||
return ..()
|
||||
|
||||
if(G.state < 2)
|
||||
to_chat(user, "<span class='danger'>You need a better grip to do that!</span>")
|
||||
to_chat(user, span_danger("You need a better grip to do that!"))
|
||||
return
|
||||
|
||||
move_into_gibber(user,G.affecting)
|
||||
@@ -129,30 +129,30 @@
|
||||
/obj/machinery/gibber/proc/move_into_gibber(var/mob/user,var/mob/living/victim)
|
||||
|
||||
if(src.occupant)
|
||||
to_chat(user, "<span class='danger'>The gibber is full, empty it first!</span>")
|
||||
to_chat(user, span_danger("The gibber is full, empty it first!"))
|
||||
return
|
||||
|
||||
if(operating)
|
||||
to_chat(user, "<span class='danger'>The gibber is locked and running, wait for it to finish.</span>")
|
||||
to_chat(user, span_danger("The gibber is locked and running, wait for it to finish."))
|
||||
return
|
||||
|
||||
if(!(istype(victim, /mob/living/carbon)) && !(istype(victim, /mob/living/simple_mob)) )
|
||||
to_chat(user, "<span class='danger'>This is not suitable for the gibber!</span>")
|
||||
to_chat(user, span_danger("This is not suitable for the gibber!"))
|
||||
return
|
||||
|
||||
if(istype(victim,/mob/living/carbon/human) && !emagged)
|
||||
to_chat(user, "<span class='danger'>The gibber safety guard is engaged!</span>")
|
||||
to_chat(user, span_danger("The gibber safety guard is engaged!"))
|
||||
return
|
||||
|
||||
|
||||
if(victim.abiotic(1))
|
||||
to_chat(user, "<span class='danger'>Subject may not have abiotic items on.</span>")
|
||||
to_chat(user, span_danger("Subject may not have abiotic items on."))
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>[user] starts to put [victim] into the gibber!</span>")
|
||||
user.visible_message(span_danger("[user] starts to put [victim] into the gibber!"))
|
||||
src.add_fingerprint(user)
|
||||
if(do_after(user, 30) && victim.Adjacent(src) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
|
||||
user.visible_message("<span class='danger'>[user] stuffs [victim] into the gibber!</span>")
|
||||
user.visible_message(span_danger("[user] stuffs [victim] into the gibber!"))
|
||||
if(victim.client)
|
||||
victim.client.perspective = EYE_PERSPECTIVE
|
||||
victim.client.eye = src
|
||||
@@ -189,11 +189,11 @@
|
||||
if(src.operating)
|
||||
return
|
||||
if(!src.occupant)
|
||||
visible_message("<span class='danger'>You hear a loud metallic grinding sound.</span>")
|
||||
visible_message(span_danger("You hear a loud metallic grinding sound."))
|
||||
return
|
||||
|
||||
use_power(1000)
|
||||
visible_message("<span class='danger'>You hear a loud [occupant.isSynthetic() ? "metallic" : "squelchy"] grinding sound.</span>")
|
||||
visible_message(span_danger("You hear a loud [occupant.isSynthetic() ? "metallic" : "squelchy"] grinding sound."))
|
||||
src.operating = 1
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -106,9 +106,9 @@
|
||||
if(I.reagents.total_volume < 10)
|
||||
I.reagents.add_reagent("sugar", 10 - I.reagents.total_volume)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There is not enough icecream left!</span>")
|
||||
to_chat(user, span_warning("There is not enough icecream left!"))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[O] already has icecream in it.</span>")
|
||||
to_chat(user, span_notice("[O] already has icecream in it."))
|
||||
return 1
|
||||
else if(O.is_open_container())
|
||||
return
|
||||
@@ -127,11 +127,11 @@
|
||||
product_types[make_type] += amount
|
||||
var/flavour = get_flavour_name(make_type)
|
||||
if(make_type > 4)
|
||||
src.visible_message("<span class='info'>[user] cooks up some [flavour] cones.</span>")
|
||||
src.visible_message(span_info("[user] cooks up some [flavour] cones."))
|
||||
else
|
||||
src.visible_message("<span class='info'>[user] whips up some [flavour] icecream.</span>")
|
||||
src.visible_message(span_info("[user] whips up some [flavour] icecream."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You don't have the ingredients to make this.</span>")
|
||||
to_chat(user, span_warning("You don't have the ingredients to make this."))
|
||||
|
||||
/obj/machinery/icecream_vat/Topic(href, href_list)
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
if(href_list["select"])
|
||||
dispense_flavour = text2num(href_list["select"])
|
||||
flavour_name = get_flavour_name(dispense_flavour)
|
||||
src.visible_message("<span class='notice'>[usr] sets [src] to dispense [flavour_name] flavoured icecream.</span>")
|
||||
src.visible_message(span_notice("[usr] sets [src] to dispense [flavour_name] flavoured icecream."))
|
||||
|
||||
if(href_list["cone"])
|
||||
var/dispense_cone = text2num(href_list["cone"])
|
||||
@@ -152,9 +152,9 @@
|
||||
I.cone_type = cone_name
|
||||
I.icon_state = "icecream_cone_[cone_name]"
|
||||
I.desc = "Delicious [cone_name] cone, but no ice cream."
|
||||
src.visible_message("<span class='info'>[usr] dispenses a crunchy [cone_name] cone from [src].</span>")
|
||||
src.visible_message(span_info("[usr] dispenses a crunchy [cone_name] cone from [src]."))
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>There are no [cone_name] cones left!</span>")
|
||||
to_chat(usr, span_warning("There are no [cone_name] cones left!"))
|
||||
|
||||
if(href_list["make"])
|
||||
var/amount = (text2num(href_list["amount"]))
|
||||
|
||||
@@ -80,43 +80,43 @@
|
||||
if(src.broken == 2 && O.has_tool_quality(TOOL_SCREWDRIVER)) // If it's broken and they're using a screwdriver
|
||||
user.visible_message( \
|
||||
"<b>\The [user]</b> starts to fix part of the microwave.", \
|
||||
"<span class='notice'>You start to fix part of the microwave.</span>" \
|
||||
span_notice("You start to fix part of the microwave.") \
|
||||
)
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
if (do_after(user,20 * O.toolspeed))
|
||||
user.visible_message( \
|
||||
"<b>\The [user]</b> fixes part of the microwave.", \
|
||||
"<span class='notice'>You have fixed part of the microwave.</span>" \
|
||||
span_notice("You have fixed part of the microwave.") \
|
||||
)
|
||||
src.broken = 1 // Fix it a bit
|
||||
else if(src.broken == 1 && O.has_tool_quality(TOOL_WRENCH)) // If it's broken and they're doing the wrench
|
||||
user.visible_message( \
|
||||
"<b>\The [user]</b> starts to fix part of the microwave.", \
|
||||
"<span class='notice'>You start to fix part of the microwave.</span>" \
|
||||
span_notice("You start to fix part of the microwave.") \
|
||||
)
|
||||
if (do_after(user,20 * O.toolspeed))
|
||||
user.visible_message( \
|
||||
"<b>\The [user]</b> fixes the microwave.", \
|
||||
"<span class='notice'>You have fixed the microwave.</span>" \
|
||||
span_notice("You have fixed the microwave.") \
|
||||
)
|
||||
src.icon_state = "mw"
|
||||
src.broken = 0 // Fix it!
|
||||
src.dirty = 0 // just to be sure
|
||||
src.flags = OPENCONTAINER | NOREACT
|
||||
else
|
||||
to_chat(user, "<span class='warning'>It's broken!</span>")
|
||||
to_chat(user, span_warning("It's broken!"))
|
||||
return 1
|
||||
|
||||
else if(src.dirty==100) // The microwave is all dirty so can't be used!
|
||||
if(istype(O, /obj/item/reagent_containers/spray/cleaner) || istype(O, /obj/item/soap)) // If they're trying to clean it then let them
|
||||
user.visible_message( \
|
||||
"<b>\The [user]</b> starts to clean the microwave.", \
|
||||
"<span class='notice'>You start to clean the microwave.</span>" \
|
||||
span_notice("You start to clean the microwave.") \
|
||||
)
|
||||
if (do_after(user,20))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] has cleaned the microwave.</span>", \
|
||||
"<span class='notice'>You have cleaned the microwave.</span>" \
|
||||
span_notice("\The [user] has cleaned the microwave."), \
|
||||
span_notice("You have cleaned the microwave.") \
|
||||
)
|
||||
src.dirty = 0 // It's clean!
|
||||
src.broken = 0 // just to be sure
|
||||
@@ -124,27 +124,27 @@
|
||||
src.flags = OPENCONTAINER | NOREACT
|
||||
SStgui.update_uis(src)
|
||||
else //Otherwise bad luck!!
|
||||
to_chat(user, "<span class='warning'>It's dirty!</span>")
|
||||
to_chat(user, span_warning("It's dirty!"))
|
||||
return 1
|
||||
else if(is_type_in_list(O,acceptable_items))
|
||||
var/list/workingList = cookingContents()
|
||||
if(workingList.len>=(max_n_of_items + circuit_item_capacity)) //Adds component_parts to the maximum number of items. changed 1 to actually just be the circuit item capacity var.
|
||||
to_chat(user, "<span class='warning'>This [src] is full of ingredients, you cannot put more.</span>")
|
||||
to_chat(user, span_warning("This [src] is full of ingredients, you cannot put more."))
|
||||
return 1
|
||||
if(istype(O, /obj/item/stack) && O:get_amount() > 1) // This is bad, but I can't think of how to change it
|
||||
var/obj/item/stack/S = O
|
||||
new O.type (src)
|
||||
S.use(1)
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] has added one of [O] to \the [src].</span>", \
|
||||
"<span class='notice'>You add one of [O] to \the [src].</span>")
|
||||
span_notice("\The [user] has added one of [O] to \the [src]."), \
|
||||
span_notice("You add one of [O] to \the [src]."))
|
||||
return
|
||||
else
|
||||
// user.remove_from_mob(O) //This just causes problems so far as I can tell. -Pete - Man whoever you are, it's been years. o7
|
||||
user.drop_from_inventory(O,src)
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] has added \the [O] to \the [src].</span>", \
|
||||
"<span class='notice'>You add \the [O] to \the [src].</span>")
|
||||
span_notice("\The [user] has added \the [O] to \the [src]."), \
|
||||
span_notice("You add \the [O] to \the [src]."))
|
||||
SStgui.update_uis(src)
|
||||
return
|
||||
else if (istype(O,/obj/item/storage/bag/plants)) // There might be a better way about making plant bags dump their contents into a microwave, but it works.
|
||||
@@ -155,7 +155,7 @@
|
||||
continue
|
||||
failed = 0
|
||||
if(contents.len>=(max_n_of_items + component_parts.len + circuit_item_capacity))
|
||||
to_chat(user, "<span class='warning'>This [src] is full of ingredients, you cannot put more.</span>")
|
||||
to_chat(user, span_warning("This [src] is full of ingredients, you cannot put more."))
|
||||
return 0
|
||||
else
|
||||
bag.remove_from_storage(G, src)
|
||||
@@ -183,12 +183,12 @@
|
||||
return 1
|
||||
for (var/datum/reagent/R in O.reagents.reagent_list)
|
||||
if (!(R.id in acceptable_reagents))
|
||||
to_chat(user, "<span class='warning'>Your [O] contains components unsuitable for cookery.</span>")
|
||||
to_chat(user, span_warning("Your [O] contains components unsuitable for cookery."))
|
||||
return 1
|
||||
return
|
||||
else if(istype(O,/obj/item/grab))
|
||||
var/obj/item/grab/G = O
|
||||
to_chat(user, "<span class='warning'>This is ridiculous. You can not fit \the [G.affecting] in this [src].</span>")
|
||||
to_chat(user, span_warning("This is ridiculous. You can not fit \the [G.affecting] in this [src]."))
|
||||
return 1
|
||||
else if(O.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
default_deconstruction_screwdriver(user, O)
|
||||
@@ -198,24 +198,24 @@
|
||||
return
|
||||
else
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] begins [src.anchored ? "unsecuring" : "securing"] the microwave.</span>", \
|
||||
"<span class='notice'>You attempt to [src.anchored ? "unsecure" : "secure"] the microwave.</span>"
|
||||
span_notice("\The [user] begins [src.anchored ? "unsecuring" : "securing"] the microwave."), \
|
||||
span_notice("You attempt to [src.anchored ? "unsecure" : "secure"] the microwave.")
|
||||
)
|
||||
if (do_after(user,20/O.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] [src.anchored ? "unsecures" : "secures"] the microwave.</span>", \
|
||||
"<span class='notice'>You [src.anchored ? "unsecure" : "secure"] the microwave.</span>"
|
||||
span_notice("\The [user] [src.anchored ? "unsecures" : "secures"] the microwave."), \
|
||||
span_notice("You [src.anchored ? "unsecure" : "secure"] the microwave.")
|
||||
)
|
||||
src.anchored = !src.anchored
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You decide not to do that.</span>")
|
||||
to_chat(user, span_notice("You decide not to do that."))
|
||||
else if(default_part_replacement(user, O))
|
||||
return
|
||||
else if(istype(O, /obj/item/paicard))
|
||||
if(!paicard)
|
||||
insertpai(user, O)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You have no idea what you can cook with this [O].</span>")
|
||||
to_chat(user, span_warning("You have no idea what you can cook with this [O]."))
|
||||
..()
|
||||
SStgui.update_uis(src)
|
||||
|
||||
@@ -507,7 +507,7 @@
|
||||
return 0
|
||||
|
||||
/obj/machinery/microwave/proc/start()
|
||||
src.visible_message("<span class='notice'>The microwave turns on.</span>", "<span class='notice'>You hear a microwave.</span>")
|
||||
src.visible_message(span_notice("The microwave turns on."), span_notice("You hear a microwave."))
|
||||
soundloop.start()
|
||||
src.operating = TRUE
|
||||
src.icon_state = "mw1"
|
||||
@@ -535,7 +535,7 @@
|
||||
src.dirty++
|
||||
src.reagents.clear_reagents()
|
||||
if(message)
|
||||
to_chat(usr, "<span class='notice'>You dispose of the microwave contents.</span>")
|
||||
to_chat(usr, span_notice("You dispose of the microwave contents."))
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/microwave/proc/muck_start()
|
||||
@@ -543,7 +543,7 @@
|
||||
src.icon_state = "mwbloody1" // Make it look dirty!!
|
||||
|
||||
/obj/machinery/microwave/proc/muck_finish()
|
||||
src.visible_message("<span class='warning'>The microwave gets covered in muck!</span>")
|
||||
src.visible_message(span_warning("The microwave gets covered in muck!"))
|
||||
src.dirty = 100 // Make it dirty so it can't be used util cleaned
|
||||
src.flags = null //So you can't add condiments
|
||||
src.icon_state = "mwbloody0" // Make it look dirty too
|
||||
@@ -557,7 +557,7 @@
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
src.icon_state = "mwb" // Make it look all busted up and shit
|
||||
src.visible_message("<span class='warning'>The microwave breaks!</span>") //Let them know they're stupid
|
||||
src.visible_message(span_warning("The microwave breaks!")) //Let them know they're stupid
|
||||
src.broken = 2 // Make it broken so it can't be used util fixed
|
||||
src.flags = null //So you can't add condiments
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
@@ -589,20 +589,20 @@
|
||||
set category = "Object"
|
||||
set name = "Eject content"
|
||||
usr.visible_message(
|
||||
"<span class='notice'>[usr] tries to open [src] and remove its contents.</span>" ,
|
||||
"<span class='notice'>You try to open [src] and remove its contents.</span>"
|
||||
span_notice("[usr] tries to open [src] and remove its contents.") ,
|
||||
span_notice("You try to open [src] and remove its contents.")
|
||||
)
|
||||
|
||||
if(!do_after(usr, 1 SECONDS, target = src))
|
||||
return
|
||||
|
||||
if(operating)
|
||||
to_chat(usr, "<span class='warning'>You can't do that, [src] door is locked!</span>")
|
||||
to_chat(usr, span_warning("You can't do that, [src] door is locked!"))
|
||||
return
|
||||
|
||||
usr.visible_message(
|
||||
"<span class='notice'>[usr] opened [src] and has taken out [english_list(cookingContents())].</span>" ,
|
||||
"<span class='notice'>You have opened [src] and taken out [english_list(cookingContents())].</span>"
|
||||
span_notice("[usr] opened [src] and has taken out [english_list(cookingContents())].") ,
|
||||
span_notice("You have opened [src] and taken out [english_list(cookingContents())].")
|
||||
)
|
||||
dispose()
|
||||
|
||||
@@ -642,7 +642,7 @@
|
||||
/datum/recipe/splat/make_food(obj/container)
|
||||
for(var/obj/item/holder/H in container)
|
||||
if(H.held_mob)
|
||||
to_chat(H.held_mob, "<span class='danger'>You hear an earsplitting humming and your head aches!</span>")
|
||||
to_chat(H.held_mob, span_danger("You hear an earsplitting humming and your head aches!"))
|
||||
qdel(H.held_mob)
|
||||
H.held_mob = null
|
||||
qdel(H)
|
||||
@@ -665,4 +665,3 @@
|
||||
if(istype(M, circuit)) // Yes, we remove circuit twice. Yes, it's necessary. Yes, it's stupid.
|
||||
workingList -= M
|
||||
return workingList
|
||||
|
||||
|
||||
@@ -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