mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Reworks Cling Hivemind (#20375)
* reworks Cling Hivemind * bye bye old vars * protects starting DNA
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
return
|
||||
cling = C
|
||||
Grant(user)
|
||||
return TRUE
|
||||
|
||||
/datum/action/changeling/Destroy(force, ...)
|
||||
cling.acquired_powers -= src
|
||||
|
||||
@@ -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, "<span class='danger'>Use say \":g message\" to communicate with your fellow changelings. Remember: you get all of their absorbed DNA if you absorb them.</span>")
|
||||
to_chat(owner.current, "<span class='danger'>Remember: you get all of their absorbed DNA if you absorb a fellow changeling.</span>")
|
||||
|
||||
/datum/antagonist/changeling/farewell()
|
||||
to_chat(owner.current, "<span class='biggerdanger'><B>You grow weak and lose your powers! You are no longer a changeling and are stuck in your current form!</span>")
|
||||
@@ -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.
|
||||
|
||||
@@ -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, "<span class='notice'>We feel our consciousness become capable of communion with the hivemind.</span>")
|
||||
|
||||
/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, "<span class='notice'>We absorb the DNA of [S] from the air.</span>")
|
||||
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, "<span class='notice'>We feel a slight emptiness as we shut ourselves off from the hivemind.</span>")
|
||||
..()
|
||||
|
||||
@@ -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, "<span class='warning'>We have already formed a link with the victim!</span>")
|
||||
return FALSE
|
||||
if(!istype(G))
|
||||
to_chat(user, "<span class='warning'>We must be tightly grabbing a creature in our active hand to link with them!</span>")
|
||||
return FALSE
|
||||
if(G.state <= GRAB_AGGRESSIVE)
|
||||
to_chat(user, "<span class='warning'>We must have a tighter grip to link with this creature!</span>")
|
||||
return FALSE
|
||||
if(iscarbon(G.affecting))
|
||||
var/mob/living/carbon/target = G.affecting
|
||||
if(!target.mind)
|
||||
to_chat(user, "<span class='warning'>The victim has no mind to link to!</span>")
|
||||
return FALSE
|
||||
if(target.stat == DEAD)
|
||||
to_chat(user, "<span class='warning'>The victim is dead, you cannot link to a dead mind!</span>")
|
||||
return FALSE
|
||||
if(target.mind.has_antag_datum(/datum/antagonist/changeling))
|
||||
to_chat(user, "<span class='warning'>The victim is already a part of the hivemind!</span>")
|
||||
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, "<span class='notice'>This creature is compatible. We must hold still...</span>")
|
||||
if(2)
|
||||
to_chat(user, "<span class='notice'>We stealthily stab [target] with a minor proboscis...</span>")
|
||||
to_chat(target, "<span class='userdanger'>You experience a stabbing sensation and your ears begin to ring...</span>")
|
||||
if(3)
|
||||
to_chat(user, "<span class='notice'>You mold [target]'s mind like clay, [target.p_they()] can now speak in the hivemind!</span>")
|
||||
to_chat(target, "<span class='userdanger'>A migraine throbs behind your eyes, you hear yourself screaming - but your mouth has not opened!</span>")
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if(GLOB.all_languages["Changeling"] in M.languages)
|
||||
to_chat(M, "<span class='changeling'>We can sense a foreign presence in the hivemind...</span>")
|
||||
target.mind.linglink = TRUE
|
||||
target.add_language("Changeling")
|
||||
target.say(":g AAAAARRRRGGGGGHHHHH!!")
|
||||
to_chat(target, "<font color=#800040><span class='boldannounce'>You can now communicate in the changeling hivemind, say \":g message\" to communicate!</span>")
|
||||
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, "<span class='warning'>Our link with [target] has ended!</span>")
|
||||
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, "<span class='notice'>You cannot sustain the connection any longer, your victim fades from the hivemind</span>")
|
||||
to_chat(target, "<span class='userdanger'>The link cannot be sustained any longer, your connection to the hivemind has faded!</span>")
|
||||
return TRUE
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user