memories are no longer added if the target isn't aware of them. (#61375)

Fixing an oversight with the memories system. Memories shouldn't be added to people who aren't possibly aware of them.
This commit is contained in:
Ghom
2021-09-20 23:39:37 +02:00
committed by GitHub
parent 57ac5b649f
commit a2d6c75f31
13 changed files with 42 additions and 17 deletions
@@ -429,7 +429,7 @@
LAZYADD(rev_mind.special_statuses, "<span class='bad'>Former revolutionary</span>")
else
LAZYADD(rev_mind.special_statuses, "<span class='bad'>Former head revolutionary</span>")
add_memory_in_range(rev_mind.current, 7, MEMORY_WON_REVOLUTION, list(DETAIL_PROTAGONIST = rev_mind.current, DETAIL_STATION_NAME = station_name()), story_value = STORY_VALUE_LEGENDARY, memory_flags = MEMORY_FLAG_NOSTATIONNAME)
add_memory_in_range(rev_mind.current, 7, MEMORY_WON_REVOLUTION, list(DETAIL_PROTAGONIST = rev_mind.current, DETAIL_STATION_NAME = station_name()), story_value = STORY_VALUE_LEGENDARY, memory_flags = MEMORY_FLAG_NOSTATIONNAME|MEMORY_CHECK_BLIND_AND_DEAF, protagonist_memory_flags = MEMORY_FLAG_NOSTATIONNAME)
if(!charter_given && rev_mind.current && rev_mind.current.stat == CONSCIOUS)
charter_given = TRUE
podspawn(list(
+2 -2
View File
@@ -9,7 +9,7 @@
INVOKE_ASYNC(src, .proc/emote, "deathgasp")
reagents.end_metabolization(src)
add_memory_in_range(src, 7, MEMORY_DEATH, list(DETAIL_PROTAGONIST = src), memory_flags = MEMORY_FLAG_NOMOOD, story_value = STORY_VALUE_OKAY)
add_memory_in_range(src, 7, MEMORY_DEATH, list(DETAIL_PROTAGONIST = src), memory_flags = MEMORY_FLAG_NOMOOD, story_value = STORY_VALUE_OKAY, memory_flags = MEMORY_CHECK_BLIND_AND_DEAF)
. = ..()
@@ -24,7 +24,7 @@
animate(src, time = 40, transform = M, easing = SINE_EASING)
/mob/living/carbon/gib(no_brain, no_organs, no_bodyparts, safe_gib = FALSE)
add_memory_in_range(src, 7, MEMORY_GIBBED, list(DETAIL_PROTAGONIST = src), STORY_VALUE_AMAZING, MEMORY_FLAG_NOMOOD)
add_memory_in_range(src, 7, MEMORY_GIBBED, list(DETAIL_PROTAGONIST = src), STORY_VALUE_AMAZING, MEMORY_FLAG_NOMOOD, memory_flags = MEMORY_CHECK_BLINDNESS)
if(safe_gib) // If you want to keep all the mob's items and not have them deleted
for(var/obj/item/W in src)
dropItemToGround(W)
@@ -68,7 +68,7 @@
collar_type = "[initial(collar_type)]_dead"
regenerate_icons()
add_memory_in_range(src, 7, MEMORY_PET_DEAD, list(DETAIL_DEUTERAGONIST = src), story_value = STORY_VALUE_AMAZING) //Protagonist is the person memorizing it
add_memory_in_range(src, 7, MEMORY_PET_DEAD, list(DETAIL_DEUTERAGONIST = src), story_value = STORY_VALUE_AMAZING, memory_flags = MEMORY_CHECK_BLIND_AND_DEAF) //Protagonist is the person memorizing it
/mob/living/simple_animal/pet/regenerate_icons()
cut_overlays()
@@ -177,7 +177,7 @@
for(var/mob/living/L in grant_achievement)
if(L.stat || !L.client)
continue
L?.mind.add_memory(MEMORY_MEGAFAUNA_KILL, list(DETAIL_PROTAGONIST = L, DETAIL_DEUTERAGONIST = src), STORY_VALUE_LEGENDARY)
L?.mind.add_memory(MEMORY_MEGAFAUNA_KILL, list(DETAIL_PROTAGONIST = L, DETAIL_DEUTERAGONIST = src), STORY_VALUE_LEGENDARY, memory_flags = MEMORY_CHECK_BLIND_AND_DEAF)
L.client.give_award(/datum/award/achievement/boss/boss_killer, L)
L.client.give_award(achievement_type, L)
if(crusher_kill && istype(L.get_active_held_item(), /obj/item/kinetic_crusher))
@@ -939,7 +939,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
cause = "contact"
nom.visible_message(vis_msg, mob_msg, span_hear("You hear an unearthly noise as a wave of heat washes over you."))
investigate_log("has been attacked ([cause]) by [key_name(nom)]", INVESTIGATE_SUPERMATTER)
add_memory_in_range(src, 7, MEMORY_SUPERMATTER_DUSTED, list(DETAIL_PROTAGONIST = nom, DETAIL_WHAT_BY = src), story_value = STORY_VALUE_OKAY)
add_memory_in_range(src, 7, MEMORY_SUPERMATTER_DUSTED, list(DETAIL_PROTAGONIST = nom, DETAIL_WHAT_BY = src), story_value = STORY_VALUE_OKAY, memory_flags = MEMORY_CHECK_BLIND_AND_DEAF)
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE)
Consume(nom)
+1 -1
View File
@@ -617,7 +617,7 @@ GLOBAL_LIST_EMPTY(vending_products)
. = TRUE
playsound(L, 'sound/effects/blobattack.ogg', 40, TRUE)
playsound(L, 'sound/effects/splat.ogg', 50, TRUE)
add_memory_in_range(L, 7, MEMORY_VENDING_CRUSHED, list(DETAIL_PROTAGONIST = L, DETAIL_WHAT_BY = src), story_value = STORY_VALUE_AMAZING)
add_memory_in_range(L, 7, MEMORY_VENDING_CRUSHED, list(DETAIL_PROTAGONIST = L, DETAIL_WHAT_BY = src), story_value = STORY_VALUE_AMAZING, memory_flags = MEMORY_CHECK_BLINDNESS, protagonist_memory_flags = MEMORY_SKIP_UNCONSCIOUS)
var/matrix/M = matrix()
M.Turn(pick(90, 270))