mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-18 11:44:05 +01:00
converts our spans (#9185)
This commit is contained in:
@@ -176,21 +176,21 @@
|
||||
if(pai != null) //Have a person in them already?
|
||||
return ..()
|
||||
if(is_damage_critical())
|
||||
to_chat(usr, "<span class='warning'>That card is too damaged to activate!</span>")
|
||||
to_chat(usr, span_warning("That card is too damaged to activate!"))
|
||||
return
|
||||
var/time_till_respawn = user.time_till_respawn()
|
||||
if(time_till_respawn == -1) // Special case, never allowed to respawn
|
||||
to_chat(usr, "<span class='warning'>Respawning is not allowed!</span>")
|
||||
to_chat(usr, span_warning("Respawning is not allowed!"))
|
||||
else if(time_till_respawn) // Nonzero time to respawn
|
||||
to_chat(usr, "<span class='warning'>You can't do that yet! You died too recently. You need to wait another [round(time_till_respawn/10/60, 0.1)] minutes.</span>")
|
||||
to_chat(usr, span_warning("You can't do that yet! You died too recently. You need to wait another [round(time_till_respawn/10/60, 0.1)] minutes."))
|
||||
return
|
||||
if(jobban_isbanned(usr, "pAI"))
|
||||
to_chat(usr,"<span class='warning'>You cannot join a pAI card when you are banned from playing as a pAI.</span>")
|
||||
to_chat(usr,span_warning("You cannot join a pAI card when you are banned from playing as a pAI."))
|
||||
return
|
||||
|
||||
for(var/ourkey in paikeys)
|
||||
if(ourkey == user.ckey)
|
||||
to_chat(usr, "<span class='warning'>You can't just rejoin any old pAI card!!! Your card still exists.</span>")
|
||||
to_chat(usr, span_warning("You can't just rejoin any old pAI card!!! Your card still exists."))
|
||||
return
|
||||
|
||||
var/choice = tgui_alert(user, "You sure you want to inhabit this PAI, or submit yourself to being recruited?", "Confirmation", list("Inhabit", "Recruit", "Cancel"))
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
|
||||
/obj/item/mindbinder/proc/toggle_self_bind()
|
||||
if(possessed_voice.len == 1)
|
||||
to_chat(usr,"<span class='warning'>The device beeps a warning that there is already a mind loaded!</span>")
|
||||
to_chat(usr,span_warning("The device beeps a warning that there is already a mind loaded!"))
|
||||
return
|
||||
self_bind = !self_bind
|
||||
if(self_bind)
|
||||
to_chat(usr,"<span class='notice'>You prepare the device to use your own mind!</span>")
|
||||
to_chat(usr,span_notice("You prepare the device to use your own mind!"))
|
||||
else
|
||||
to_chat(usr,"<span class='notice'>You disable the device from using your mind.</span>")
|
||||
to_chat(usr,span_notice("You disable the device from using your mind."))
|
||||
update_icon()
|
||||
|
||||
/obj/item/mindbinder/pre_attack(atom/A)
|
||||
@@ -44,7 +44,7 @@
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/M = A
|
||||
if(!M.allow_mind_transfer)
|
||||
to_chat(usr,"<span class='danger'>The target's mind is too complex to be affected!</span>")
|
||||
to_chat(usr,span_danger("The target's mind is too complex to be affected!"))
|
||||
return
|
||||
if(usr == M)
|
||||
toggle_self_bind()
|
||||
@@ -66,11 +66,11 @@
|
||||
// Handle placing a mind into a mob
|
||||
/obj/item/mindbinder/proc/bind_mob(mob/living/target)
|
||||
if(possessed_voice.len == 0 && !self_bind)
|
||||
to_chat(usr,"<span class='warning'>The device beeps a warning that it doesn't contain a mind to bind!</span>")
|
||||
to_chat(usr,span_warning("The device beeps a warning that it doesn't contain a mind to bind!"))
|
||||
return
|
||||
|
||||
if(target.ckey)
|
||||
to_chat(usr,"<span class='warning'>The device beeps a warning that the target is already sentient!</span>")
|
||||
to_chat(usr,span_warning("The device beeps a warning that the target is already sentient!"))
|
||||
return
|
||||
|
||||
if(self_bind)
|
||||
@@ -78,17 +78,17 @@
|
||||
if(!choice || choice == "Cancel") return
|
||||
choice = tgui_alert(usr,"No really. You cannot OOC Escape this. Are you sure?","Confirmation",list("Yes I'm sure","Cancel"))
|
||||
if(choice == "Yes I'm sure" && usr.get_active_hand() == src && usr.Adjacent(target))
|
||||
usr.visible_message("<span class='warning'>[usr] presses [src] against [target]. The device beginning to let out a series of beeps!</span>","<span class='notice'>You begin to bind yourself into [target]!</span>")
|
||||
usr.visible_message(span_warning("[usr] presses [src] against [target]. The device beginning to let out a series of beeps!"),span_notice("You begin to bind yourself into [target]!"))
|
||||
log_and_message_admins("attempted to bind themselves to \an [target] with a Mind Binder.")
|
||||
if(do_after(usr,30 SECONDS,target))
|
||||
if(!target.ckey)
|
||||
usr.mind.transfer_to(target)
|
||||
self_bind = !self_bind
|
||||
update_icon()
|
||||
to_chat(usr,"<span class='notice'>Your mind as been bound to [target].</span>")
|
||||
to_chat(usr,span_notice("Your mind as been bound to [target]."))
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[usr] presses [src] against [target]. The device beginning to let out a series of beeps!</span>","<span class='notice'>You begin to bind someone's mind into [target]!</span>")
|
||||
usr.visible_message(span_warning("[usr] presses [src] against [target]. The device beginning to let out a series of beeps!"),span_notice("You begin to bind someone's mind into [target]!"))
|
||||
log_and_message_admins("attempted to bind [key_name(src.possessed_voice[1])] to \an [target] with a Mind Binder.")
|
||||
var/doTime = 30 SECONDS
|
||||
if(ishuman(target) || issilicon(target) || isanimal(target))
|
||||
@@ -99,22 +99,22 @@
|
||||
V.mind.transfer_to(target)
|
||||
V.Destroy()
|
||||
possessed_voice = list()
|
||||
to_chat(usr,"<span class='notice'>Mind bound to [target].</span>")
|
||||
to_chat(usr,span_notice("Mind bound to [target]."))
|
||||
|
||||
update_icon()
|
||||
|
||||
// Handle placing a mind into an item
|
||||
/obj/item/mindbinder/proc/bind_item(obj/item/item)
|
||||
if(possessed_voice.len == 0 && !self_bind)
|
||||
to_chat(usr,"<span class='warning'>The device beeps a warning that it doesn't contain a mind to bind!</span>")
|
||||
to_chat(usr,span_warning("The device beeps a warning that it doesn't contain a mind to bind!"))
|
||||
return
|
||||
|
||||
if(item.possessed_voice && item.possessed_voice.len)
|
||||
to_chat(usr,"<span class='warning'>The device beeps a warning that the target is already sentient!</span>")
|
||||
to_chat(usr,span_warning("The device beeps a warning that the target is already sentient!"))
|
||||
return
|
||||
|
||||
if(is_type_in_list(item, item_vore_blacklist))
|
||||
to_chat(usr,"<span class='danger'>The item resists your transfer attempt!</span>")
|
||||
to_chat(usr,span_danger("The item resists your transfer attempt!"))
|
||||
return
|
||||
|
||||
if(self_bind)
|
||||
@@ -123,34 +123,34 @@
|
||||
choice = tgui_alert(usr,"No really. You cannot OOC Escape this. Are you sure?","Confirmation",list("Yes I'm sure","Cancel"))
|
||||
if(choice == "Yes I'm sure" && usr.get_active_hand() == src && usr.Adjacent(item))
|
||||
log_and_message_admins("attempted to bind themselves to \an [item] with a Mind Binder.")
|
||||
usr.visible_message("<span class='warning'>[usr] presses [src] against [item]. The device beginning to let out a series of beeps!</span>","<span class='notice'>You begin to bind yourself into [item]!</span>")
|
||||
usr.visible_message(span_warning("[usr] presses [src] against [item]. The device beginning to let out a series of beeps!"),span_notice("You begin to bind yourself into [item]!"))
|
||||
if(do_after(usr,30 SECONDS,item))
|
||||
item.inhabit_item(usr, null, null, TRUE)
|
||||
self_bind = !self_bind
|
||||
update_icon()
|
||||
to_chat(usr,"<span class='notice'>Your mind as been bound to [item].</span>")
|
||||
to_chat(usr,span_notice("Your mind as been bound to [item]."))
|
||||
return
|
||||
|
||||
log_and_message_admins("attempted to bind [key_name(src.possessed_voice[1])] to \an [item] with a Mind Binder.")
|
||||
usr.visible_message("<span class='warning'>[usr] presses [src] against [item]. The device beginning to let out a series of beeps!</span>","<span class='notice'>You begin to bind someone's mind into [item]!</span>")
|
||||
usr.visible_message(span_warning("[usr] presses [src] against [item]. The device beginning to let out a series of beeps!"),span_notice("You begin to bind someone's mind into [item]!"))
|
||||
if(do_after(usr,5 SECONDS,item))
|
||||
if(possessed_voice.len == 1)
|
||||
var/mob/living/voice/V = possessed_voice[1]
|
||||
item.inhabit_item(V, null, V.tf_mob_holder, TRUE)
|
||||
V.Destroy()
|
||||
possessed_voice = list()
|
||||
to_chat(usr,"<span class='notice'>Mind bound to [item].</span>")
|
||||
to_chat(usr,span_notice("Mind bound to [item]."))
|
||||
|
||||
update_icon()
|
||||
|
||||
// Handle taking a mind out of a mob
|
||||
/obj/item/mindbinder/proc/store_mob(mob/living/target)
|
||||
if(possessed_voice.len != 0)
|
||||
to_chat(usr,"<span class='warning'>The device beeps a warning that there is already a mind loaded!</span>")
|
||||
to_chat(usr,span_warning("The device beeps a warning that there is already a mind loaded!"))
|
||||
return
|
||||
|
||||
if(!target.mind || (target.mind.name in prevent_respawns))
|
||||
to_chat(usr,"<span class='warning'>The device beeps a warning that the target isn't sentient.</span>")
|
||||
to_chat(usr,span_warning("The device beeps a warning that the target isn't sentient."))
|
||||
return
|
||||
|
||||
var/choice = tgui_alert(usr,"This will download the target's mind into the device. Once their mind is loaded you can then bind it into an item. This will result in the target being stuck until you put them back in their original body. Please make sure OOC prefs align! Continue?","Confirmation",list("Continue","Cancel"))
|
||||
@@ -159,18 +159,18 @@
|
||||
log_and_message_admins("attempted to take [key_name(target)]'s mind with a Mind Binder while they were SSD!")
|
||||
else
|
||||
log_and_message_admins("attempted to take [key_name(target)]'s mind with a Mind Binder.")
|
||||
usr.visible_message("<span class='warning'>[usr] presses [src] against [target]'s head. The device beginning to let out a series of beeps!</span>","<span class='notice'>You begin to download [target]'s mind!</span>")
|
||||
usr.visible_message(span_warning("[usr] presses [src] against [target]'s head. The device beginning to let out a series of beeps!"),span_notice("You begin to download [target]'s mind!"))
|
||||
if(do_after(usr,30 SECONDS,target))
|
||||
if(possessed_voice.len == 0 && target.mind)
|
||||
inhabit_item(target, target.real_name, null)
|
||||
to_chat(usr,"<span class='notice'>Mind successfully stored!</span>")
|
||||
to_chat(usr,span_notice("Mind successfully stored!"))
|
||||
|
||||
update_icon()
|
||||
|
||||
// Handle taking a mind out of an item
|
||||
/obj/item/mindbinder/proc/store_item(obj/item/item)
|
||||
if(possessed_voice.len != 0)
|
||||
to_chat(usr,"<span class='warning'>The device beeps a warning that there is already a mind loaded!</span>")
|
||||
to_chat(usr,span_warning("The device beeps a warning that there is already a mind loaded!"))
|
||||
return
|
||||
|
||||
if(!(item.possessed_voice && item.possessed_voice.len))
|
||||
@@ -179,13 +179,13 @@
|
||||
var/mob/living/voice/target = item.possessed_voice[1]
|
||||
|
||||
log_and_message_admins("attempted to take [key_name(target)]'s mind out of \an [item] with a Mind Binder.")
|
||||
usr.visible_message("<span class='warning'>[usr] presses [src] against [item]. The device beginning to let out a series of beeps!</span>","<span class='notice'>You begin to download someone's mind from [item]!</span>")
|
||||
usr.visible_message(span_warning("[usr] presses [src] against [item]. The device beginning to let out a series of beeps!"),span_notice("You begin to download someone's mind from [item]!"))
|
||||
if(do_after(usr,5 SECONDS,item))
|
||||
if(possessed_voice.len == 0 && item.possessed_voice.Find(target))
|
||||
inhabit_item(target, target.real_name, target.tf_mob_holder)
|
||||
target.Destroy()
|
||||
item.possessed_voice.Remove(target)
|
||||
to_chat(usr,"<span class='notice'>Mind successfully stored!</span>")
|
||||
to_chat(usr,span_notice("Mind successfully stored!"))
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
spark_system.set_up(5, 0, user.loc)
|
||||
spark_system.start()
|
||||
playsound(src, "sparks", 50, 1)
|
||||
user.visible_message("<span class='danger'>[user] is abruptly flung somewhere else in response to the damage!</span>")
|
||||
user.visible_message(span_danger("[user] is abruptly flung somewhere else in response to the damage!"))
|
||||
do_teleport(user, locate(telex,teley,telez), local = 0, bohsafe = 1)
|
||||
tele_threshold = initial(tele_threshold)
|
||||
return TRUE
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if(set_input)
|
||||
if(set_input == "output destination")
|
||||
if(vac_owner && user != vac_owner)
|
||||
to_chat(user, "<span class='warning'>Only designated owner can change this setting.</span>")
|
||||
to_chat(user, span_warning("Only designated owner can change this setting."))
|
||||
return
|
||||
var/vac_options = list("Vore Belly", "Trash Bag") //Dont show option for borg belly if the user isnt even a borg. QOL!
|
||||
if(isrobot(user))
|
||||
@@ -50,7 +50,7 @@
|
||||
if(istype(S))
|
||||
output_dest = S
|
||||
return
|
||||
to_chat(user, "<span class='warning'>Borg belly not found.</span>")
|
||||
to_chat(user, span_warning("Borg belly not found."))
|
||||
if("Trash Bag")
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
@@ -63,7 +63,7 @@
|
||||
if(istype(T))
|
||||
output_dest = T
|
||||
return
|
||||
to_chat(user, "<span class='warning'>Trash bag not found.</span>")
|
||||
to_chat(user, span_warning("Trash bag not found."))
|
||||
if("Vore Belly")
|
||||
if(user.vore_selected)
|
||||
output_dest = user.vore_selected
|
||||
@@ -84,20 +84,20 @@
|
||||
vac_power = 0
|
||||
icon_state = "sucker-0"
|
||||
output_dest = null
|
||||
to_chat(user, "<span class='warning'>Trash bag not found. Shutting down.</span>")
|
||||
to_chat(user, span_warning("Trash bag not found. Shutting down."))
|
||||
return
|
||||
var/obj/item/storage/bag/trash/B = output_dest
|
||||
if(LAZYLEN(B.contents) >= B.max_storage_space) //A bit more lenient than the w_class system to avoid complicated spaghetti.
|
||||
to_chat(user, "<span class='warning'>Trash bag full. Empty trash bag contents to continue.</span>")
|
||||
to_chat(user, span_warning("Trash bag full. Empty trash bag contents to continue."))
|
||||
return
|
||||
if(istype(output_dest,/obj/item/dogborg/sleeper))
|
||||
var/obj/item/dogborg/sleeper/B = output_dest
|
||||
if(LAZYLEN(B.contents) >= B.max_item_count)
|
||||
to_chat(user, "<span class='warning'>[B.name] full. Empty or process contents to continue.</span>")
|
||||
to_chat(user, span_warning("[B.name] full. Empty or process contents to continue."))
|
||||
return
|
||||
if(B.ore_storage)
|
||||
if(B.current_capacity >= B.max_ore_storage)
|
||||
to_chat(user, "<span class='warning'>Ore storage full. Deposit ore contents to a box continue.</span>")
|
||||
to_chat(user, span_warning("Ore storage full. Deposit ore contents to a box continue."))
|
||||
return
|
||||
if(isbelly(output_dest))
|
||||
var/turf/T = get_turf(output_dest)
|
||||
@@ -107,12 +107,12 @@
|
||||
vac_power = 0
|
||||
icon_state = "sucker-0"
|
||||
output_dest = null
|
||||
to_chat(user, "<span class='warning'>Target destination not found. Shutting down.</span>")
|
||||
to_chat(user, span_warning("Target destination not found. Shutting down."))
|
||||
return
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
var/auto_setting = 1
|
||||
if(isturf(target))
|
||||
user.visible_message("<span class='filter_notice'>[user] begins vacuuming the mess off \the [target.name]...</span>", "<span class='notice'>You begin vacuuming the mess off \the [target.name]...</span>")
|
||||
user.visible_message(span_filter_notice("[user] begins vacuuming the mess off \the [target.name]..."), span_notice("You begin vacuuming the mess off \the [target.name]..."))
|
||||
var/list/suckables = list()
|
||||
if(vac_power >= 1)
|
||||
for(var/obj/effect/decal/cleanable/C in target)
|
||||
@@ -184,7 +184,7 @@
|
||||
if(istype(output_dest,/obj/item/storage/bag/trash))
|
||||
var/obj/item/storage/bag/trash/B = output_dest
|
||||
if(LAZYLEN(B.contents) >= B.max_storage_space)
|
||||
to_chat(user, "<span class='warning'>Trash bag full. Empty trash bag contents to continue.</span>")
|
||||
to_chat(user, span_warning("Trash bag full. Empty trash bag contents to continue."))
|
||||
return
|
||||
if(vac_conga < 100)
|
||||
vac_conga += 3
|
||||
@@ -220,7 +220,7 @@
|
||||
else
|
||||
auto_setting = vac_power
|
||||
playsound(src, 'sound/machines/kitchen/candymaker/candymaker-mid1.ogg', auto_setting * 20, 1, -1)
|
||||
user.visible_message("<span class='filter_notice'>[user] vacuums up \the [target.name].</span>", "<span class='notice'>You vacuum up \the [target.name]...</span>")
|
||||
user.visible_message(span_filter_notice("[user] vacuums up \the [target.name]."), span_notice("You vacuum up \the [target.name]..."))
|
||||
I.SpinAnimation(5,1)
|
||||
spawn(5)
|
||||
if(!I.Adjacent(user) || src.loc != user || vac_power < 2) //Cancel if moved/unpowered/dropped
|
||||
@@ -231,7 +231,7 @@
|
||||
I.forceMove(output_dest)
|
||||
else if(istype(target,/obj/effect/decal/cleanable))
|
||||
playsound(src, 'sound/machines/kitchen/candymaker/candymaker-mid1.ogg', auto_setting * 20, 1, -1)
|
||||
user.visible_message("<span class='filter_notice'>[user] vacuums up \the [target.name].</span>", "<span class='notice'>You vacuum up \the [target.name]...</span>")
|
||||
user.visible_message(span_filter_notice("[user] vacuums up \the [target.name]."), span_notice("You vacuum up \the [target.name]..."))
|
||||
qdel(target)
|
||||
else if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
@@ -247,7 +247,7 @@
|
||||
auto_setting = 6
|
||||
if(valid_to_suck)
|
||||
playsound(src, 'sound/machines/kitchen/candymaker/candymaker-mid1.ogg', auto_setting * 20, 1, -1)
|
||||
user.visible_message("<span class='filter_notice'>[user] vacuums up \the [target.name].</span>", "<span class='notice'>You vacuum up \the [target.name]...</span>")
|
||||
user.visible_message(span_filter_notice("[user] vacuums up \the [target.name]."), span_notice("You vacuum up \the [target.name]..."))
|
||||
L.SpinAnimation(5,1)
|
||||
spawn(5)
|
||||
if(!L.Adjacent(user) || src.loc != user || vac_power < 2) //Cancel if moved/unpowered/dropped
|
||||
|
||||
Reference in New Issue
Block a user