From b44f14cd7aeb2e8ff6c7bd6f9ee5b9e9df100fc4 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Wed, 5 May 2021 13:49:10 -0400 Subject: [PATCH] Touchup soulcatcher emoting --- code/modules/emotes/definitions/helpers_vr.dm | 16 -------- code/modules/emotes/emote_mob.dm | 8 ++++ code/modules/mob/living/carbon/human/emote.dm | 3 -- .../nifsoft/software/13_soulcatcher.dm | 40 ++++++++++++------- 4 files changed, 34 insertions(+), 33 deletions(-) diff --git a/code/modules/emotes/definitions/helpers_vr.dm b/code/modules/emotes/definitions/helpers_vr.dm index 1859142080..6dc3a79bdd 100644 --- a/code/modules/emotes/definitions/helpers_vr.dm +++ b/code/modules/emotes/definitions/helpers_vr.dm @@ -1,20 +1,4 @@ // Not specifically /human type because those won't allow FBPs to use them -/decl/emote/helper/nif/check_user(mob/living/carbon/human/user) - if(!istype(user) || !user.nif) - return FALSE - return ..() - -/decl/emote/helper/nif/nsay - key = "nsay" -/decl/emote/helper/nsay/do_emote(var/mob/living/carbon/human/user, var/extra_params) - user.nsay() - -/decl/emote/helper/nif/nme - key = "nme" -/decl/emote/helper/nme/do_emote(var/mob/living/carbon/human/user, var/extra_params) - user.nme() - - /decl/emote/helper/vwag key = "vwag" emote_message_3p = "" diff --git a/code/modules/emotes/emote_mob.dm b/code/modules/emotes/emote_mob.dm index 3ca98e6b00..3e45f05091 100644 --- a/code/modules/emotes/emote_mob.dm +++ b/code/modules/emotes/emote_mob.dm @@ -44,6 +44,14 @@ act = copytext(tempstr,1,splitpoint) message = copytext(tempstr,splitpoint+1,0) + //VOREStation Add - NIF soulcatcher shortcuts + if(act == "nsay") + return nsay(message) + + if(act == "nme") + return nme(message) + //VOREStation Add End + var/decl/emote/use_emote = usable_emotes[act] if(!use_emote) to_chat(src, SPAN_WARNING("Unknown emote '[act]'. Type say *help for a list of usable emotes.")) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 157cf5f63b..a705f03450 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -128,9 +128,6 @@ var/list/_human_default_emotes = list( /decl/emote/visible/mlem, /decl/emote/visible/blep, - /decl/emote/helper/nif/nsay, - /decl/emote/helper/nif/nme, - /decl/emote/helper/vwag, /decl/emote/helper/vflap //VOREStation Add End diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm index c1de085532..07607216fb 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -45,14 +45,14 @@ /datum/nifsoft/soulcatcher/install() if((. = ..())) nif.set_flag(NIF_O_SCOTHERS,NIF_FLAGS_OTHER) //Required on install, because other_flags aren't sufficient for our complicated settings. - nif.human.verbs |= /mob/living/carbon/human/proc/nsay - nif.human.verbs |= /mob/living/carbon/human/proc/nme + nif.human.verbs |= /mob/living/carbon/human/nsay + nif.human.verbs |= /mob/living/carbon/human/nme /datum/nifsoft/soulcatcher/uninstall() QDEL_LIST_NULL(brainmobs) if((. = ..()) && nif && nif.human) //Sometimes NIFs are deleted outside of a human - nif.human.verbs -= /mob/living/carbon/human/proc/nsay - nif.human.verbs -= /mob/living/carbon/human/proc/nme + nif.human.verbs -= /mob/living/carbon/human/nsay + nif.human.verbs -= /mob/living/carbon/human/nme /datum/nifsoft/soulcatcher/proc/save_settings() if(!nif) @@ -476,20 +476,26 @@ /////////////////// //Verbs for humans -/mob/living/carbon/human/proc/nsay(message as text|null) +/mob/proc/nsay(message as text|null) set name = "NSay" set desc = "Speak into your NIF's Soulcatcher." set category = "IC" + to_chat(src, SPAN_WARNING("You must be a humanoid with a NIF implanted to use that.")) + +/mob/living/carbon/human/nsay(message as text|null) + if(stat != CONSCIOUS) + to_chat(src,SPAN_WARNING("You can't use NSay while unconscious.")) + return if(!nif) - to_chat(src,"You can't use NSay without a NIF.") + to_chat(src,SPAN_WARNING("You can't use NSay without a NIF.")) return var/datum/nifsoft/soulcatcher/SC = nif.imp_check(NIF_SOULCATCHER) if(!SC) - to_chat(src,"You need the Soulcatcher software to use NSay.") + to_chat(src,SPAN_WARNING("You need the Soulcatcher software to use NSay.")) return if(!SC.brainmobs.len) - to_chat(src,"You need a loaded mind to use NSay.") + to_chat(src,SPAN_WARNING("You need a loaded mind to use NSay.")) return if(!message) message = input("Type a message to say.","Speak into Soulcatcher") as text|null @@ -497,20 +503,26 @@ var/sane_message = sanitize(message) SC.say_into(sane_message,src) -/mob/living/carbon/human/proc/nme(message as text|null) +/mob/proc/nme(message as text|null) set name = "NMe" set desc = "Emote into your NIF's Soulcatcher." set category = "IC" + + to_chat(src, SPAN_WARNING("You must be a humanoid with a NIF implanted to use that.")) +/mob/living/carbon/human/nme(message as text|null) + if(stat != CONSCIOUS) + to_chat(src,SPAN_WARNING("You can't use NMe while unconscious.")) + return if(!nif) - to_chat(src,"You can't use NMe without a NIF.") + to_chat(src,SPAN_WARNING("You can't use NMe without a NIF.")) return var/datum/nifsoft/soulcatcher/SC = nif.imp_check(NIF_SOULCATCHER) if(!SC) - to_chat(src,"You need the Soulcatcher software to use NMe.") + to_chat(src,SPAN_WARNING("You need the Soulcatcher software to use NMe.")) return if(!SC.brainmobs.len) - to_chat(src,"You need a loaded mind to use NMe.") + to_chat(src,SPAN_WARNING("You need a loaded mind to use NMe.")) return if(!message) @@ -563,7 +575,7 @@ QDEL_NULL(eyeobj) soulcatcher.notify_into("[src] ended AR projection.") -/mob/living/carbon/brain/caught_soul/verb/nsay(message as text|null) +/mob/living/carbon/brain/caught_soul/verb/nsay_brain(message as text|null) set name = "NSay" set desc = "Speak into the NIF's Soulcatcher (circumventing AR speaking)." set category = "Soulcatcher" @@ -574,7 +586,7 @@ var/sane_message = sanitize(message) soulcatcher.say_into(sane_message,src,null) -/mob/living/carbon/brain/caught_soul/verb/nme(message as text|null) +/mob/living/carbon/brain/caught_soul/verb/nme_brain(message as text|null) set name = "NMe" set desc = "Emote into the NIF's Soulcatcher (circumventing AR speaking)." set category = "Soulcatcher"