converts our spans (#9185)

This commit is contained in:
Kashargul
2024-10-07 20:47:23 +02:00
committed by GitHub
parent f4155aa973
commit a92a42b85b
162 changed files with 1360 additions and 1269 deletions
@@ -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()