From 2f3b56467c6cd78d36e2e3b686461d661fbc8892 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Fri, 9 Jun 2017 10:13:32 -0400 Subject: [PATCH] Minor NIF and Soulcatcher Tweaks - Brainmob can understand galcom so they can understand radio announcements if they're allowed to hear things. - Adds admin verb in Fun tab for "Quick NIF" to quickly implant someone with a NIF, if for example they lost theirs via bug, or for antags in events. - Some tweaks in Persist VR to not 'hard crash' just in case runtiming prevents other things. - Added titles to top of *nsay and *nme boxes so you can remember what you're doing. --- code/modules/admin/admin_verbs.dm | 1 + code/modules/admin/verbs/debug_vr.dm | 31 +++++++++++++++++++ .../mob/living/carbon/human/emote_vr.dm | 4 +-- code/modules/nifsoft/nif.dm | 3 +- .../nifsoft/software/13_soulcatcher.dm | 1 + code/modules/vore/persist/persist_vr.dm | 11 +++++-- vorestation.dme | 1 + 7 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 code/modules/admin/verbs/debug_vr.dm diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index e4ee4806e2..5fe32308d3 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -125,6 +125,7 @@ var/list/admin_verbs_fun = list( /client/proc/toggle_random_events, /client/proc/editappear, /client/proc/roll_dices, + /datum/admins/proc/quick_nif, //VOREStation Add, /datum/admins/proc/call_supply_drop, /datum/admins/proc/call_drop_pod ) diff --git a/code/modules/admin/verbs/debug_vr.dm b/code/modules/admin/verbs/debug_vr.dm new file mode 100644 index 0000000000..7012ed46d7 --- /dev/null +++ b/code/modules/admin/verbs/debug_vr.dm @@ -0,0 +1,31 @@ +/datum/admins/proc/quick_nif() + set category = "Fun" + set name = "Quick NIF" + set desc = "Spawns a NIF into someone in quick-implant mode." + + if(!check_rights(R_FUN)) + return + + var/mob/living/carbon/human/H = input("Pick a humanoid","Quick NIF") as null|anything in human_mob_list + + if(!H) + return + + if(!H.get_organ(BP_HEAD)) + to_chat(usr,"Target is unsuitable.") + return + + if(H.nif) + to_chat(usr,"Target already has a NIF.") + return + + if(H.species.flags & NO_SCAN) + new /obj/item/device/nif/bioadap(H) + else + new /obj/item/device/nif(H) + + to_chat(usr,"Implanted NIF in [H].") + + log_admin("[key_name(src)] Quick NIF'd [H.real_name].") + message_admins("[key_name_admin(src)] Quick NIF'd [H.real_name].") + feedback_add_details("admin_verb","QNIF") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/mob/living/carbon/human/emote_vr.dm b/code/modules/mob/living/carbon/human/emote_vr.dm index 4b3091b440..fb62e0ca22 100644 --- a/code/modules/mob/living/carbon/human/emote_vr.dm +++ b/code/modules/mob/living/carbon/human/emote_vr.dm @@ -24,7 +24,7 @@ if(!SC.brainmob.mind) to_chat(src,"You need a loaded mind to use *nme.") return 1 - var/nifmessage = sanitize(input("Type a message to say.") as text|null) + var/nifmessage = sanitize(input("Type a message to say.","Speak into NIF") as text|null) if(nifmessage) nifmessage = "\[\icon[nif.big_icon]NIF\] [src] speaks, \"[nifmessage]\"" to_chat(SC.brainmob,nifmessage) @@ -42,7 +42,7 @@ if(!SC.brainmob.mind) to_chat(src,"You need a loaded mind to use *nme.") return 1 - var/nifmessage = sanitize(input("Type an action to perform.") as text|null) + var/nifmessage = sanitize(input("Type an action to perform.","Emote into NIF") as text|null) if(nifmessage) nifmessage = "\[\icon[nif.big_icon]NIF\] [src] [nifmessage]" to_chat(SC.brainmob,nifmessage) diff --git a/code/modules/nifsoft/nif.dm b/code/modules/nifsoft/nif.dm index 8dc8d9c52e..28925741b0 100644 --- a/code/modules/nifsoft/nif.dm +++ b/code/modules/nifsoft/nif.dm @@ -133,7 +133,8 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable src.forceMove(head) head.implants += src spawn(0) //Let the character finish spawning yo. - owner = H.mind.name + if(H.mind) + owner = H.mind.name implant(H) return TRUE diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm index f1eac1bef3..583e7c5ec7 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -27,6 +27,7 @@ brainmob.stat = 0 brainmob.silent = FALSE dead_mob_list -= src.brainmob + brainmob.add_language(LANGUAGE_GALCOM) load_settings() Destroy() diff --git a/code/modules/vore/persist/persist_vr.dm b/code/modules/vore/persist/persist_vr.dm index eb124f58f6..173400347d 100644 --- a/code/modules/vore/persist/persist_vr.dm +++ b/code/modules/vore/persist/persist_vr.dm @@ -39,7 +39,9 @@ * Prep for save: returns a preferences object if we're ready and allowed to save this mob. */ /proc/prep_for_persist(var/mob/persister) - ASSERT(istype(persister)) + if(!istype(persister)) + crash_with("prep_for_persist given non-mob [persister]") + return // Find out of this mob is a proper mob! if (persister.mind && persister.mind.loaded_from_ckey) @@ -71,7 +73,9 @@ return 1 /proc/persist_interround_data(var/mob/occupant, var/datum/spawnpoint/new_spawn_point_type) - ASSERT(istype(occupant)) + if(!istype(occupant)) + crash_with("persist_interround_data given non-mob [occupant]") + return var/datum/preferences/prefs = prep_for_persist(occupant) if(!prefs) @@ -219,7 +223,8 @@ */ /proc/persist_nif_data(var/mob/living/carbon/human/H,var/datum/preferences/prefs) if(!istype(H)) - CRASH("persist_nif_data given a nonhuman: [H]") + crash_with("persist_nif_data given a nonhuman: [H]") + return if(!prefs) prefs = prep_for_persist(H) diff --git a/vorestation.dme b/vorestation.dme index 8325921369..31eeacc2fb 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1191,6 +1191,7 @@ #include "code\modules\admin\verbs\custom_event.dm" #include "code\modules\admin\verbs\deadsay.dm" #include "code\modules\admin\verbs\debug.dm" +#include "code\modules\admin\verbs\debug_vr.dm" #include "code\modules\admin\verbs\diagnostics.dm" #include "code\modules\admin\verbs\dice.dm" #include "code\modules\admin\verbs\getlogs.dm"