mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
SC transfer verb (#8849)
This commit is contained in:
@@ -415,18 +415,15 @@
|
||||
if(!valid_objects || !valid_objects.len)
|
||||
return
|
||||
var/obj/target = tgui_input_list(owner, "Select where you want to store the mind into.", "Mind Transfer Target", valid_objects)
|
||||
transfer_mob_selector(selected_soul, target)
|
||||
|
||||
// Transfer selector proc
|
||||
/obj/soulgem/proc/transfer_mob_selector(var/mob/M, var/obj/target)
|
||||
if(!M || !target) return
|
||||
if(istype(target, /obj/soulgem))
|
||||
var/obj/soulgem/gem = target
|
||||
if(!gem.owner)
|
||||
return
|
||||
if((tgui_alert(gem.owner, "Do you want to allow [owner] to transfer [selected_soul] to your soulcatcher?", "Allow Transfer", list("No", "Yes")) == "Yes"))
|
||||
if(!in_range(gem.owner, owner))
|
||||
return
|
||||
if(!(gem.owner.soulcatcher_pref_flags & SOULCATCHER_ALLOW_TRANSFER))
|
||||
return
|
||||
transfer_mob_soulcatcher(selected_soul, gem)
|
||||
transfer_mob_soulcatcher(M, target)
|
||||
return
|
||||
transfer_mob(selected_soul, target)
|
||||
transfer_mob(M, target)
|
||||
|
||||
// Transfers a captured soul to a valid object (sleevemate, mmi)
|
||||
/obj/soulgem/proc/transfer_mob(var/mob/M, var/obj/target)
|
||||
@@ -461,6 +458,12 @@
|
||||
/obj/soulgem/proc/transfer_mob_soulcatcher(var/mob/living/carbon/brain/caught_soul/vore/M, var/obj/soulgem/gem)
|
||||
if(is_taken_over()) return
|
||||
if(!istype(M) || !gem) return
|
||||
if(!gem.owner) return
|
||||
if((tgui_alert(gem.owner, "Do you want to allow [owner] to transfer [selected_soul] to your soulcatcher?", "Allow Transfer", list("No", "Yes")) == "Yes"))
|
||||
if(!in_range(gem.owner, owner))
|
||||
return
|
||||
if(!(gem.owner.soulcatcher_pref_flags & SOULCATCHER_ALLOW_TRANSFER))
|
||||
return
|
||||
if(M.mind == own_mind)
|
||||
own_mind = null
|
||||
brainmobs -= M
|
||||
|
||||
@@ -72,14 +72,20 @@
|
||||
soulgem.catch_mob(src, to_use_custom_name)
|
||||
|
||||
// Speak to the captured souls within the own soulcatcher
|
||||
/mob/proc/nsay_vore()
|
||||
/mob/proc/nsay_vore(message as message)
|
||||
set name = "NSay Vore"
|
||||
set desc = "Speak into your Soulcatcher."
|
||||
|
||||
src.nsay_vore_act(message)
|
||||
|
||||
/mob/proc/nsay_vore_ch()
|
||||
set name = "NSay Vore CH"
|
||||
set desc = "Speak into your Soulcatcher."
|
||||
set category = "IC.Vore"
|
||||
|
||||
src.nsay_vore_act()
|
||||
|
||||
/mob/proc/nsay_vore_act()
|
||||
/mob/proc/nsay_vore_act(var/message)
|
||||
if(stat != CONSCIOUS)
|
||||
to_chat(src, span_warning("You can't use NSay Vore while unconscious."))
|
||||
return
|
||||
@@ -89,20 +95,28 @@
|
||||
if(!gem.brainmobs.len)
|
||||
to_chat(src, span_warning("You need a devoured soul to use NSay Vore."))
|
||||
return
|
||||
var/message = tgui_input_text(usr, "Type a message to say.","Speak into Soulcatcher", multiline=TRUE)
|
||||
|
||||
if(!message)
|
||||
message = tgui_input_text(usr, "Type a message to say.","Speak into Soulcatcher", multiline=TRUE)
|
||||
if(message)
|
||||
var/sane_message = sanitize(message)
|
||||
gem.use_speech(sane_message, src)
|
||||
|
||||
// Emote to the captured souls within the soulcatcher
|
||||
/mob/proc/nme_vore()
|
||||
/mob/proc/nme_vore(message as message)
|
||||
set name = "NMe Vore"
|
||||
set desc = "Emote into your Soulcatcher."
|
||||
|
||||
src.nme_vore_act(message)
|
||||
|
||||
/mob/proc/nme_vore_ch()
|
||||
set name = "NMe Vore CH"
|
||||
set desc = "Emote into your Soulcatcher."
|
||||
set category = "IC.Vore"
|
||||
|
||||
src.nme_vore_act()
|
||||
|
||||
/mob/proc/nme_vore_act()
|
||||
/mob/proc/nme_vore_act(var/message)
|
||||
if(stat != CONSCIOUS)
|
||||
to_chat(src, span_warning("You can't use NMe Vore while unconscious."))
|
||||
return
|
||||
@@ -113,7 +127,8 @@
|
||||
to_chat(src, span_warning("You need a devoured soul to use NMe Vore."))
|
||||
return
|
||||
|
||||
var/message = tgui_input_text(usr, "Type an action to perform.","Emote into Soulcatcher", multiline=TRUE)
|
||||
if(!message)
|
||||
message = tgui_input_text(usr, "Type an action to perform.","Emote into Soulcatcher", multiline=TRUE)
|
||||
if(message)
|
||||
var/sane_message = sanitize(message)
|
||||
gem.use_emote(sane_message, src)
|
||||
@@ -201,8 +216,10 @@
|
||||
var/list/valid_objects = gem.find_transfer_objects()
|
||||
if(!valid_objects || !valid_objects.len)
|
||||
return
|
||||
var/obj/item/target = tgui_input_list(src, "Select where you want to store your own mind into.", "Mind Transfer Target", valid_objects)
|
||||
gem.transfer_mob(src, target)
|
||||
|
||||
var/obj/target = tgui_input_list(src, "Select where you want to store your own mind into.", "Mind Transfer Target", valid_objects)
|
||||
|
||||
gem.transfer_mob_selector(src, target)
|
||||
|
||||
// Allows the owner to reenter the body after being caught or having given away control
|
||||
/mob/living/carbon/brain/caught_soul/vore/proc/reenter_body()
|
||||
|
||||
Reference in New Issue
Block a user