From 480ab2efabab39a0d2ecae5dea1919e701c5e585 Mon Sep 17 00:00:00 2001 From: Doxxmedearly <38594443+Doxxmedearly@users.noreply.github.com> Date: Wed, 29 Jul 2020 13:55:27 -0500 Subject: [PATCH] Actually gets ling hivemind in (#9473) Hey remember when ling reworks were a thing? Anyway this implements the hivemind thing that Geeves was working on (And then I was working on). It actually works for messages, ghosting, kicking, etc now. Succ'd people can now remain as part of the changeling's local hivemind and chat with them. If they salt, ling can kick them. If they don't want to participate this way, they can ghost. If I actually get around to it, this also serves as the basis for allowing the ling to do things with them, such as creating horror mobs, injecting them into corpses, or other ideas that might get the succ'd person back into the round in a different way. Which, should hopefully reduce complaints and make ling way cooler. --- aurorastation.dme | 2 + code/__defines/color.dm | 1 + .../changeling/helpers/_framework.dm | 3 +- .../gamemodes/changeling/helpers/_store.dm | 13 +++++ .../changeling/implements/hivemind.dm | 56 +++++++++++++++++++ .../changeling/implements/powers/hivemind.dm | 37 ++++++++++++ .../doxxmedearly - ling_hivemind.yml | 8 +++ 7 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 code/game/gamemodes/changeling/implements/hivemind.dm create mode 100644 code/game/gamemodes/changeling/implements/powers/hivemind.dm create mode 100644 html/changelogs/doxxmedearly - ling_hivemind.yml diff --git a/aurorastation.dme b/aurorastation.dme index 1fbc5053b7e..5ec73f861c6 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -446,8 +446,10 @@ #include "code\game\gamemodes\changeling\helpers\_framework.dm" #include "code\game\gamemodes\changeling\helpers\_store.dm" #include "code\game\gamemodes\changeling\helpers\changeling.dm" +#include "code\game\gamemodes\changeling\implements\hivemind.dm" #include "code\game\gamemodes\changeling\implements\items.dm" #include "code\game\gamemodes\changeling\implements\powers\body.dm" +#include "code\game\gamemodes\changeling\implements\powers\hivemind.dm" #include "code\game\gamemodes\changeling\implements\powers\resources.dm" #include "code\game\gamemodes\changeling\implements\powers\stings.dm" #include "code\game\gamemodes\changeling\implements\powers\suck.dm" diff --git a/code/__defines/color.dm b/code/__defines/color.dm index a9923fb21d7..522b3fffbfc 100644 --- a/code/__defines/color.dm +++ b/code/__defines/color.dm @@ -91,6 +91,7 @@ #define COLOR_OIL "#030303" #define COLOR_ASH "#615C5B" #define COLOR_SNOW "#9CADAD" +#define COLOR_LING_HIVEMIND "#94582e" // Blood colors diff --git a/code/game/gamemodes/changeling/helpers/_framework.dm b/code/game/gamemodes/changeling/helpers/_framework.dm index 70bb8dc5e9f..ab87aa2783e 100644 --- a/code/game/gamemodes/changeling/helpers/_framework.dm +++ b/code/game/gamemodes/changeling/helpers/_framework.dm @@ -3,6 +3,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E /datum/changeling //stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind) var/list/datum/absorbed_dna/absorbed_dna = list() var/list/absorbed_languages = list() + var/list/hivemind_members = list() var/absorbedcount = 0 var/chem_charges = 20 var/chem_recharge_rate = 0.5 @@ -12,7 +13,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E var/geneticdamage = 0 var/isabsorbing = 0 var/geneticpoints = 5 - var/purchasedpowers = list() + var/list/purchasedpowers = list() var/mimicing = "" var/mimiced_accent = "Biesellite" var/justate diff --git a/code/game/gamemodes/changeling/helpers/_store.dm b/code/game/gamemodes/changeling/helpers/_store.dm index 4cb69be6eb9..4aa63b2050b 100644 --- a/code/game/gamemodes/changeling/helpers/_store.dm +++ b/code/game/gamemodes/changeling/helpers/_store.dm @@ -75,6 +75,19 @@ var/list/datum/power/changeling/powerinstances = list() genomecost = 0 verbpath = /mob/proc/changeling_hivedownload +/datum/power/changeling/hivemind_commune + name = "Hivemind Commune" + desc = "We can speak with the members of our Hivemind, without it being apparent to the people in our view." + genomecost = 0 + verbpath = /mob/proc/changeling_hivemind_commune + +/datum/power/changeling/hivemind_eject + name = "Hivemind Eject" + desc = "We can eject a pesky hivemind from ourselves, if it complains a lot. This won't free up space, but will prevent them from screaming at us." + helptext = "Ghosts the chosen hivemind. Use it on salty people spamming you to send them to deadchat." + genomecost = 0 + verbpath = /mob/proc/changeling_eject_hivemind + //Stings and sting accessorries //Rest in pieces, unfat sting. - Geeves diff --git a/code/game/gamemodes/changeling/implements/hivemind.dm b/code/game/gamemodes/changeling/implements/hivemind.dm new file mode 100644 index 00000000000..4fddfda3fe6 --- /dev/null +++ b/code/game/gamemodes/changeling/implements/hivemind.dm @@ -0,0 +1,56 @@ +/mob/abstract/hivemind + name = "internal hivemind" + see_in_dark = 2 + see_invisible = SEE_INVISIBLE_LIVING + + var/mob/living/carbon/human/changeling_mob // the head honcho + +/mob/abstract/hivemind/Destroy() + changeling_mob = null + return ..() + +/mob/abstract/hivemind/verb/ghost() + set category = "OOC" + set name = "Ghost" + set desc = "Relinquish your life and enter the land of the dead." + + announce_ghost_joinleave(ghostize(1, 0)) + changeling_mob.mind.changeling.hivemind_members -= src + relay_hivemind(SPAN_NOTICE("[src] has left our hivemind to join the living dead."), changeling_mob) + +/mob/abstract/hivemind/proc/add_to_hivemind(var/mob/original_body, var/mob/living/carbon/human/ling) + name = original_body.real_name + languages = original_body.languages + for(var/language in ling.languages) + add_language(language) + remove_language(LANGUAGE_CHANGELING) // no actual changeling speak for you, buddy + if(original_body.ckey) + ckey = original_body.ckey + changeling_mob = ling + if(changeling_mob) + changeling_mob.mind.changeling.hivemind_members[name] = src + introduction(changeling_mob) + +/mob/abstract/hivemind/proc/introduction(var/mob/living/carbon/human/ling) + to_chat(src, SPAN_DANGER(FONT_LARGE("You are a member of a Changeling's Hivemind!"))) + to_chat(src, SPAN_DANGER("You have been absorbed by [ling]! Do not fret.")) + to_chat(src, SPAN_DANGER("You are now a part of their hivemind.")) + to_chat(src, SPAN_DANGER("You can use 'say' to speak with them and the rest of the hivemind.")) + to_chat(src, SPAN_DANGER("What you say can only be heard by [ling] and the other members of their local hivemind.")) + +/mob/abstract/hivemind/say(message) + message = sanitize_text(message) + + if(!message) + return + + log_say("[changeling_mob] Hivemind/[src.key] : [message]", ckey=key_name(src)) + + if(src.client?.prefs.muted & (MUTE_DEADCHAT|MUTE_IC)) + to_chat(src, SPAN_WARNING("You cannot talk. (Admin Muted)")) + return + relay_hivemind(changeling_message_process(message), changeling_mob) + +/mob/abstract/hivemind/emote() + to_chat(src, SPAN_WARNING("You cannot emote.")) + return \ No newline at end of file diff --git a/code/game/gamemodes/changeling/implements/powers/hivemind.dm b/code/game/gamemodes/changeling/implements/powers/hivemind.dm new file mode 100644 index 00000000000..16a5b761e20 --- /dev/null +++ b/code/game/gamemodes/changeling/implements/powers/hivemind.dm @@ -0,0 +1,37 @@ +//To get rid of pesky moaners +/mob/proc/changeling_eject_hivemind() + set category = "Changeling" + set name = "Hivemind Eject" + set desc = "Ejects a member of our internal hivemind." + + if(!(mind?.changeling)) + return + if(!mind.changeling.hivemind_members.len) + return + var/chosen_player = input("Choose a hivemind member to eject.", "Eject") as null|anything in mind.changeling.hivemind_members + if(!chosen_player || chosen_player == "None") + return + var/mob/abstract/hivemind/M = mind.changeling.hivemind_members[chosen_player] + M.ghost() //Deuces + return TRUE + +/mob/proc/changeling_hivemind_commune() + set category = "Changeling" + set name = "Hivemind Commune" + set desc = "Speak with all members of the hivemind." + + var/message = input(src, "What do you wish to tell your Hivemind?", "Hivemind Commune") as text + if(!message) + return + relay_hivemind(changeling_message_process(message), src) + return TRUE + +/mob/proc/relay_hivemind(var/message, var/mob/ling) + if(ling.mind?.changeling) + for(var/H in ling.mind.changeling.hivemind_members) // tell the others in the hivemind + var/mob/M = ling.mind.changeling.hivemind_members[H] + to_chat(M, message) + to_chat(ling, message) + +/mob/proc/changeling_message_process(var/message) + return "[src] says, \"[message]\"" \ No newline at end of file diff --git a/html/changelogs/doxxmedearly - ling_hivemind.yml b/html/changelogs/doxxmedearly - ling_hivemind.yml new file mode 100644 index 00000000000..1a53171ac09 --- /dev/null +++ b/html/changelogs/doxxmedearly - ling_hivemind.yml @@ -0,0 +1,8 @@ +author: Doxxmedearly, Geeves + +delete-after: True + +changes: + - rscadd: "When lings suck people dry, those people are added to the ling's internal hivemind, where they can communicate with each other." + - rscadd: "The hiveminded person can ghost, which will tell the ling and the others in the hivemind that they have left." + - rscadd: "The ling can eject people out of their hivemind. This has no benefit to the ling, unless the person was salty. This ability does not make salt okay."