From d19e8dfb0f0494777c36cea44e0630e09a1916b6 Mon Sep 17 00:00:00 2001 From: Coolrune206 <71326864+Coolrune206@users.noreply.github.com> Date: Thu, 16 Mar 2023 06:40:39 +1100 Subject: [PATCH] Reworks Cling Hivemind (#20375) * reworks Cling Hivemind * bye bye old vars * protects starting DNA --- code/datums/mind.dm | 1 - .../changeling/changeling_power.dm | 1 + .../changeling/datum_changeling.dm | 8 +- .../antagonists/changeling/powers/hivemind.dm | 21 ++++- .../antagonists/changeling/powers/linglink.dm | 76 ------------------- code/modules/mob/language.dm | 2 - paradise.dme | 1 - 7 files changed, 21 insertions(+), 89 deletions(-) delete mode 100644 code/modules/antagonists/changeling/powers/linglink.dm diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 30b2623c0c7..b251ae729c4 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -53,7 +53,6 @@ var/miming = 0 // Mime's vow of silence var/list/antag_datums - var/linglink var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD diff --git a/code/modules/antagonists/changeling/changeling_power.dm b/code/modules/antagonists/changeling/changeling_power.dm index a2c1669e310..4a00b88fcbd 100644 --- a/code/modules/antagonists/changeling/changeling_power.dm +++ b/code/modules/antagonists/changeling/changeling_power.dm @@ -43,6 +43,7 @@ return cling = C Grant(user) + return TRUE /datum/action/changeling/Destroy(force, ...) cling.acquired_powers -= src diff --git a/code/modules/antagonists/changeling/datum_changeling.dm b/code/modules/antagonists/changeling/datum_changeling.dm index 6c1fd388bb4..6da8e9ecaec 100644 --- a/code/modules/antagonists/changeling/datum_changeling.dm +++ b/code/modules/antagonists/changeling/datum_changeling.dm @@ -40,8 +40,6 @@ var/genetic_damage = 0 /// If the changeling is in the process of absorbing someone. var/is_absorbing = FALSE - /// If the changeling is in the process of linking with someone. - var/is_linking = FALSE /// The amount of points available to purchase changeling abilities. var/genetic_points = 10 /// A name that will display in place of the changeling's real name when speaking. @@ -77,7 +75,7 @@ absorbed_languages = list() var/mob/living/carbon/human/H = owner.current - absorbed_dna += H.dna.Clone() + protected_dna += H.dna.Clone() ..() /datum/antagonist/changeling/Destroy() @@ -90,7 +88,7 @@ /datum/antagonist/changeling/greet() ..() SEND_SOUND(owner.current, sound('sound/ambience/antag/ling_alert.ogg')) - to_chat(owner.current, "Use say \":g message\" to communicate with your fellow changelings. Remember: you get all of their absorbed DNA if you absorb them.") + to_chat(owner.current, "Remember: you get all of their absorbed DNA if you absorb a fellow changeling.") /datum/antagonist/changeling/farewell() to_chat(owner.current, "You grow weak and lose your powers! You are no longer a changeling and are stuck in your current form!") @@ -101,7 +99,6 @@ START_PROCESSING(SSobj, src) add_new_languages(L.languages) // Absorb the languages of the new body. update_languages() // But also, give the changeling the languages they've already absorbed before this. - L.add_language("Changeling") // If there's a mob_override, this is a body transfer, and therefore we should give them back their powers they had while in the old body. if(mob_override) for(var/datum/action/changeling/power in acquired_powers) @@ -129,7 +126,6 @@ if(L.hud_used?.lingstingdisplay) L.hud_used.lingstingdisplay.invisibility = 101 L.hud_used.lingchemdisplay.invisibility = 101 - L.remove_language("Changeling") remove_unnatural_languages(L) UnregisterSignal(L, COMSIG_MOB_DEATH) // If there's a mob_override, this is a body transfer, and therefore we should only remove their powers from the old body. diff --git a/code/modules/antagonists/changeling/powers/hivemind.dm b/code/modules/antagonists/changeling/powers/hivemind.dm index e7604c979d7..fee6b8d834c 100644 --- a/code/modules/antagonists/changeling/powers/hivemind.dm +++ b/code/modules/antagonists/changeling/powers/hivemind.dm @@ -2,11 +2,19 @@ GLOBAL_LIST_EMPTY(hivemind_bank) /datum/action/changeling/hivemind_pick - name = "Hive Channel DNA" - desc = "Allows us to upload or absorb DNA in the airwaves. Does not count towards absorb objectives. Costs 10 chemicals." + name = "Hivemind Access" + desc = "Allows us to upload or absorb DNA in the airwaves. Does not count towards absorb objectives. Allows us to speak over the Changeling Hivemind using :g. Costs 10 chemicals." + helptext = "Tunes our chemical receptors for hivemind communication, which passively grants us access to the Changeling Hivemind." button_icon_state = "hive_absorb" chemical_cost = 10 - power_type = CHANGELING_INNATE_POWER + dna_cost = 2 + power_type = CHANGELING_PURCHASABLE_POWER + +/datum/action/changeling/hivemind_pick/on_purchase(mob/user, datum/antagonist/changeling/C) + if(!..()) + return + user.add_language("Changeling") + to_chat(user, "We feel our consciousness become capable of communion with the hivemind.") /datum/action/changeling/hivemind_pick/sting_action(mob/user) var/channel_pick = alert("Upload or Absorb DNA?", "Channel Select", "Upload", "Absorb") @@ -50,3 +58,10 @@ GLOBAL_LIST_EMPTY(hivemind_bank) to_chat(user, "We absorb the DNA of [S] from the air.") SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]")) return TRUE + +/datum/action/changeling/hivemind_pick/Remove(mob/user) + if(!istype(user)) + return + user.remove_language("Changeling") + to_chat(user, "We feel a slight emptiness as we shut ourselves off from the hivemind.") + ..() diff --git a/code/modules/antagonists/changeling/powers/linglink.dm b/code/modules/antagonists/changeling/powers/linglink.dm deleted file mode 100644 index f1803a92ee5..00000000000 --- a/code/modules/antagonists/changeling/powers/linglink.dm +++ /dev/null @@ -1,76 +0,0 @@ -/datum/action/changeling/linglink - name = "Hivemind Link" - desc = "We link our victim's mind into the hivemind for personal interrogation." - helptext = "If we find a human mad enough to support our cause, this can be a helpful tool to stay in touch." - button_icon_state = "hivemind_link" - chemical_cost = 0 - power_type = CHANGELING_INNATE_POWER - req_human = TRUE - -/datum/action/changeling/linglink/can_sting(mob/living/carbon/user) - if(!..()) - return FALSE - var/obj/item/grab/G = user.get_active_hand() - - if(cling.is_linking) - to_chat(user, "We have already formed a link with the victim!") - return FALSE - if(!istype(G)) - to_chat(user, "We must be tightly grabbing a creature in our active hand to link with them!") - return FALSE - if(G.state <= GRAB_AGGRESSIVE) - to_chat(user, "We must have a tighter grip to link with this creature!") - return FALSE - if(iscarbon(G.affecting)) - var/mob/living/carbon/target = G.affecting - if(!target.mind) - to_chat(user, "The victim has no mind to link to!") - return FALSE - if(target.stat == DEAD) - to_chat(user, "The victim is dead, you cannot link to a dead mind!") - return FALSE - if(target.mind.has_antag_datum(/datum/antagonist/changeling)) - to_chat(user, "The victim is already a part of the hivemind!") - return FALSE - return cling.can_absorb_dna(target) - -/datum/action/changeling/linglink/sting_action(mob/user) - var/obj/item/grab/G = user.get_active_hand() - var/mob/living/carbon/target = G.affecting - cling.is_linking = TRUE - SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]")) - - for(var/stage in 1 to 3) - switch(stage) - if(1) - to_chat(user, "This creature is compatible. We must hold still...") - if(2) - to_chat(user, "We stealthily stab [target] with a minor proboscis...") - to_chat(target, "You experience a stabbing sensation and your ears begin to ring...") - if(3) - to_chat(user, "You mold [target]'s mind like clay, [target.p_they()] can now speak in the hivemind!") - to_chat(target, "A migraine throbs behind your eyes, you hear yourself screaming - but your mouth has not opened!") - for(var/mob/M in GLOB.mob_list) - if(GLOB.all_languages["Changeling"] in M.languages) - to_chat(M, "We can sense a foreign presence in the hivemind...") - target.mind.linglink = TRUE - target.add_language("Changeling") - target.say(":g AAAAARRRRGGGGGHHHHH!!") - to_chat(target, "You can now communicate in the changeling hivemind, say \":g message\" to communicate!") - target.reagents.add_reagent("salbutamol", 40) // So they don't choke to death while you interrogate them - addtimer(CALLBACK(src, PROC_REF(end_link), user, target), 180 SECONDS) - - if(!do_mob(user, target, 2 SECONDS)) - to_chat(user, "Our link with [target] has ended!") - target.remove_language("Changeling") - cling.is_linking = FALSE - target.mind.linglink = FALSE - return FALSE - -/datum/action/changeling/linglink/proc/end_link(mob/living/user, mob/living/carbon/target) - target.remove_language("Changeling") - cling.is_linking = FALSE - target.mind.linglink = FALSE - to_chat(user, "You cannot sustain the connection any longer, your victim fades from the hivemind") - to_chat(target, "The link cannot be sustained any longer, your connection to the hivemind has faded!") - return TRUE diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index a14df05fdb4..02461ce53d5 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -541,8 +541,6 @@ var/datum/antagonist/changeling/cling = speaker.mind?.has_antag_datum(/datum/antagonist/changeling) if(cling) ..(speaker, message, cling.changelingID) - else if(speaker.mind?.linglink) - ..() else ..(speaker,message) diff --git a/paradise.dme b/paradise.dme index fe577532827..d1117559b37 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1322,7 +1322,6 @@ #include "code\modules\antagonists\changeling\powers\hivemind.dm" #include "code\modules\antagonists\changeling\powers\humanform.dm" #include "code\modules\antagonists\changeling\powers\lesserform.dm" -#include "code\modules\antagonists\changeling\powers\linglink.dm" #include "code\modules\antagonists\changeling\powers\mimic_voice.dm" #include "code\modules\antagonists\changeling\powers\mutations.dm" #include "code\modules\antagonists\changeling\powers\panacea.dm"