mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Merge pull request #6342 from uraniummeltdown/clingmemory
Changeling Absorb Memory Fix
This commit is contained in:
+10
-6
@@ -105,11 +105,13 @@
|
||||
/datum/mind/proc/wipe_memory()
|
||||
memory = null
|
||||
|
||||
/datum/mind/proc/show_memory(mob/recipient)
|
||||
var/output = "<B>[current.real_name]'s Memory</B><HR>"
|
||||
/datum/mind/proc/show_memory(mob/recipient, window=1)
|
||||
if(!recipient)
|
||||
recipient = current
|
||||
var/output = "<B>[current.real_name]'s Memories:</B><HR>"
|
||||
output += memory
|
||||
|
||||
if(objectives.len>0)
|
||||
if(objectives.len)
|
||||
output += "<HR><B>Objectives:</B>"
|
||||
|
||||
var/obj_count = 1
|
||||
@@ -117,7 +119,7 @@
|
||||
output += "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
|
||||
if(job_objectives.len>0)
|
||||
if(job_objectives.len)
|
||||
output += "<HR><B>Job Objectives:</B><UL>"
|
||||
|
||||
var/obj_count = 1
|
||||
@@ -125,8 +127,10 @@
|
||||
output += "<LI><B>Task #[obj_count]</B>: [objective.get_description()]</LI>"
|
||||
obj_count++
|
||||
output += "</UL>"
|
||||
|
||||
recipient << browse(output,"window=memory")
|
||||
if(window)
|
||||
recipient << browse(output,"window=memory")
|
||||
else
|
||||
to_chat(recipient, "<i>[output]</i>")
|
||||
|
||||
/datum/mind/proc/edit_memory()
|
||||
if(!ticker || !ticker.mode)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define LING_ABSORB_RECENT_SPEECH 8 //The amount of recent spoken lines to gain on absorbing a mob
|
||||
|
||||
/obj/effect/proc_holder/changeling/absorbDNA
|
||||
name = "Absorb DNA"
|
||||
desc = "Absorb the DNA of our victim."
|
||||
@@ -26,8 +28,6 @@
|
||||
var/mob/living/carbon/target = G.affecting
|
||||
return changeling.can_absorb_dna(user,target)
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/changeling/absorbDNA/sting_action(var/mob/user)
|
||||
var/datum/changeling/changeling = user.mind.changeling
|
||||
var/obj/item/weapon/grab/G = user.get_active_hand()
|
||||
@@ -63,7 +63,25 @@
|
||||
|
||||
if(target.mind)//if the victim has got a mind
|
||||
|
||||
target.mind.show_memory(src, 0) //I can read your mind, kekeke. Output all their notes.
|
||||
target.mind.show_memory(user, 0) //I can read your mind, kekeke. Output all their notes.
|
||||
|
||||
//Some of target's recent speech, so the changeling can attempt to imitate them better.
|
||||
//Recent as opposed to all because rounds tend to have a LOT of text.
|
||||
var/list/recent_speech = list()
|
||||
|
||||
if(target.say_log.len > LING_ABSORB_RECENT_SPEECH)
|
||||
recent_speech = target.say_log.Copy(target.say_log.len-LING_ABSORB_RECENT_SPEECH+1,0) //0 so len-LING_ARS+1 to end of list
|
||||
else
|
||||
recent_speech = target.say_log.Copy()
|
||||
|
||||
if(recent_speech.len)
|
||||
user.mind.store_memory("<B>Some of [target]'s speech patterns, we should study these to better impersonate them!</B>")
|
||||
to_chat(user, "<span class='boldnotice'>Some of [target]'s speech patterns, we should study these to better impersonate them!</span>")
|
||||
for(var/spoken_memory in recent_speech)
|
||||
user.mind.store_memory("\"[spoken_memory]\"")
|
||||
to_chat(user, "<span class='notice'>\"[spoken_memory]\"</span>")
|
||||
user.mind.store_memory("<B>We have no more knowledge of [target]'s speech patterns.</B>")
|
||||
to_chat(user, "<span class='boldnotice'>We have no more knowledge of [target]'s speech patterns.</span>")
|
||||
|
||||
if(target.mind.changeling)//If the target was a changeling, suck out their extra juice and objective points!
|
||||
changeling.chem_charges += min(target.mind.changeling.chem_charges, changeling.chem_storage)
|
||||
@@ -72,7 +90,6 @@
|
||||
target.mind.changeling.absorbed_dna.len = 1
|
||||
target.mind.changeling.absorbedcount = 0
|
||||
|
||||
|
||||
changeling.chem_charges=min(changeling.chem_charges+10, changeling.chem_storage)
|
||||
|
||||
changeling.isabsorbing = 0
|
||||
@@ -82,8 +99,6 @@
|
||||
target.Drain()
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
//Absorbs the target DNA.
|
||||
/datum/changeling/proc/absorb_dna(mob/living/carbon/T, var/mob/user)
|
||||
T.dna.real_name = T.real_name //Set this again, just to be sure that it's properly set.
|
||||
@@ -104,3 +119,5 @@
|
||||
return
|
||||
absorbed_dna |= new_dna
|
||||
trim_dna()
|
||||
|
||||
#undef LING_ABSORB_RECENT_SPEECH
|
||||
|
||||
@@ -52,5 +52,7 @@
|
||||
var/list/surgeries = list() //a list of surgery datums. generally empty, they're added when the player wants them.
|
||||
|
||||
var/gene_stability = DEFAULT_GENE_STABILITY
|
||||
|
||||
|
||||
var/obj/effect/proc_holder/ranged_ability //Any ranged ability the mob has, as a click override
|
||||
|
||||
var/list/say_log = list() //a log of what we've said, plain text, no spans or junk, essentially just each individual "message"
|
||||
|
||||
@@ -149,7 +149,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
if(speaking && (speaking.flags & HIVEMIND))
|
||||
speaking.broadcast(src,trim(message))
|
||||
return 1
|
||||
|
||||
|
||||
if(message_mode == "cords")
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C = src
|
||||
@@ -282,6 +282,9 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
if(O) //It's possible that it could be deleted in the meantime.
|
||||
O.hear_talk(src, message, verb, speaking)
|
||||
|
||||
//Log of what we've said, plain message, no spans or junk
|
||||
say_log += message
|
||||
|
||||
log_say("[name]/[key] : [message]")
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user