Skip to content

Commit

Permalink
Cognitohazard Component and Graffiti [Atomized]
Browse files Browse the repository at this point in the history
add: visual cognito hazard graffiti
add: cognitohazard component

Kikimora
  • Loading branch information
InsightfulParasite committed Nov 26, 2024
1 parent feec2bd commit 2c284a9
Show file tree
Hide file tree
Showing 8 changed files with 188 additions and 0 deletions.
Binary file modified ModularTegustation/Teguicons/32x48.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/tegu_effects10x10.dmi
Binary file not shown.
Binary file added ModularTegustation/Teguicons/wall_markings.dmi
Binary file not shown.
13 changes: 13 additions & 0 deletions ModularTegustation/lc13_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,16 @@
return
animate(src, alpha = 100, time = 30)
addtimer(CALLBACK(src, PROC_REF(StartAnimation)),30)

//Kikimora Graffiti
/obj/effect/decal/cleanable/crayon/cognito
name = "graffiti"
desc = "strange graffiti. You can almost make out what it says."
icon = 'ModularTegustation/Teguicons/wall_markings.dmi'
icon_state = "gibberish"
anchored = TRUE
var/datum/status_effect/inflicted_effect = /datum/status_effect/display/dyscrasone_withdrawl

/obj/effect/decal/cleanable/crayon/cognito/ComponentInitialize()
. = ..()
AddComponent(/datum/component/cognitohazard_visual, _cognitohazard_visual_effect=inflicted_effect, obvious=TRUE)
46 changes: 46 additions & 0 deletions code/datums/components/cognitohazard_visual.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/datum/component/cognitohazard_visual
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
var/last_blink = 0
var/check_every = 20 SECONDS
/// The name of the cognitohazard_visual the player is applying to the parent.
var/datum/status_effect/cognitohazard_visual_effect

/datum/component/cognitohazard_visual/Initialize(_cognitohazard_visual_effect, obvious = FALSE)
if(!isatom(parent) || !_cognitohazard_visual_effect)
return COMPONENT_INCOMPATIBLE

cognitohazard_visual_effect = _cognitohazard_visual_effect

if(obvious)
START_PROCESSING(SSdcs, src)

/datum/component/cognitohazard_visual/RegisterWithParent()
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(Examine))

/**
This proc will trigger when someone examines the parent.
It will attach the text found in the body of the proc to the `examine_list` and display it to the player examining the parent.
Arguments:
* source: The parent.
* user: The mob exmaining the parent.
* examine_list: The current list of text getting passed from the parent's normal examine() proc.
*/
/datum/component/cognitohazard_visual/proc/Examine(datum/source, mob/user, list/examine_list)
SIGNAL_HANDLER

if(user)
var/mob/living/L = user
L.apply_status_effect(cognitohazard_visual_effect)

/datum/component/cognitohazard_visual/process()
if(world.time > (last_blink + check_every))
for(var/mob/living/L in oviewers(4, get_turf(parent)))
if(!L.client)
continue
if(L.stat != CONSCIOUS)
continue
if(L.has_status_effect(cognitohazard_visual_effect))
continue
L.apply_status_effect(cognitohazard_visual_effect)
to_chat(L, span_smallnotice("Your eye catches some weird detail about [parent]."))
113 changes: 113 additions & 0 deletions code/modules/mob/living/simple_animal/abnormality/teth/kikimora.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/mob/living/simple_animal/hostile/abnormality/kikimora
name = "Kikimora"
desc = "A beaked woman with one leg idly sweeping the floor with a broom."
icon = 'ModularTegustation/Teguicons/32x48.dmi'
icon_state = "kikimora"
icon_living = "kikimora"
icon_dead = "kikimora"
maxHealth = 1300
health = 1300
rapid_melee = 1
melee_queue_distance = 2
move_to_delay = 3
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 1, WHITE_DAMAGE = 1, BLACK_DAMAGE = 1.5, PALE_DAMAGE = 2)
threat_level = TETH_LEVEL
start_qliphoth = 2
work_chances = list(
ABNORMALITY_WORK_INSTINCT = list(60, 60, 50, 50, 50),
ABNORMALITY_WORK_INSIGHT = 50,
ABNORMALITY_WORK_ATTACHMENT = list(50, 50, 40, 40, 40),
ABNORMALITY_WORK_REPRESSION = list(30, 20, 0, -80, -80),
)
work_damage_amount = 6
work_damage_type = WHITE_DAMAGE
death_message = "falls over."
ego_list = list(
)
gift_type = null

/mob/living/simple_animal/hostile/abnormality/kikimora/ZeroQliphoth(mob/living/carbon/human/user)
. = ..()
if(GLOB.department_centers.len)
var/turf/W = pick(GLOB.department_centers)
W = locate(W.x + rand(1,3), W.y + rand(1,3), W.z)
var/obj/effect/decal/cleanable/crayon/cognito/kikimora/K = new (get_turf(W))
K.dir = pick(WEST, EAST)
datum_reference.qliphoth_change(2)

/mob/living/simple_animal/hostile/abnormality/kikimora/examine(mob/user)
. = ..()
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_status_effect(/datum/status_effect/kikimora)
to_chat(H, span_mind_control("Kikimora."))

//Graffiti
/obj/effect/decal/cleanable/crayon/cognito/kikimora
name = "graffiti"
desc = "Kikimora?"
icon_state = "kikimora"
mergeable_decal = TRUE
inflicted_effect = /datum/status_effect/kikimora

//Status Effect
/datum/status_effect/kikimora
id = "kikimora"
status_type = STATUS_EFFECT_UNIQUE
duration = -1
alert_type = null
on_remove_on_mob_delete = TRUE
var/words_per_say = 1
var/static/spread_cooldown = 0
var/spread_cooldown_delay = 5 SECONDS
var/static/words_taken = list()

/datum/status_effect/kikimora/on_apply()
. = ..()
RegisterSignal(owner, COMSIG_MOB_SAY, PROC_REF(CorruptWords))
RegisterSignal(owner, COMSIG_LIVING_STATUS_SLEEP, PROC_REF(Bedtime))

/datum/status_effect/kikimora/proc/Bedtime()
SIGNAL_HANDLER
var/turf/T = get_turf(owner)
var/obj/item/food/offering = locate(/obj/item/food) in T
if(offering)
if(!(offering.foodtypes & JUNKFOOD) && !(offering.foodtypes & RAW) && !(offering.foodtypes & GROSS) && !(offering.foodtypes & TOXIC))
playsound(get_turf(owner),'sound/items/eatfood.ogg', 50, TRUE)
qdel(offering)
qdel(src)
else
to_chat(owner, span_notice("You sense something examined your offering of food."))

/datum/status_effect/kikimora/proc/CorruptWords(datum/source, list/speech_args)
SIGNAL_HANDLER
var/words_to_take = words_per_say
var/words_said = 0

var/message = speech_args[SPEECH_MESSAGE]
var/list/split_message = splittext(message, " ") //List each word in the message
for (var/i in 1 to length(split_message))
if(findtext(split_message[i], "*") || findtext(split_message[i], ";") || findtext(split_message[i], ":") || findtext(split_message[i], "kiki") || findtext(split_message[i], "mora"))
continue
var/standardize_text = uppertext(split_message[i])
if(standardize_text in words_taken)
split_message[i] = pick("kiki", "mora")
//Higher chance of spreading if the user said kiki or mora alot.
words_said++
continue
//Unsure if this is processor intensive.
if(prob(25) && words_to_take > 0)
words_taken += standardize_text
words_to_take--

message = jointext(split_message, " ")
speech_args[SPEECH_MESSAGE] = message

//Infection Mechanic
if(ishuman(owner))
var/mob/living/carbon/human/L = owner
if(spread_cooldown <= world.time)
for(var/mob/living/carbon/human/H in hearers(7, L))
if(prob(5 * words_said))
H.apply_status_effect(/datum/status_effect/kikimora)
spread_cooldown = world.time + spread_cooldown_delay
14 changes: 14 additions & 0 deletions code/modules/paperwork/records/info/teth.dm
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,20 @@
"When the Qliphoth Counter reached zero, the physical condition of the abnormality improved significantly.",
"After its condition improves beyond a certain point, the abnormality will breach containment and travel through the facility on a horizontal path, dealing massive WHITE damage to everything it impacts.")

//Kikimora
/obj/item/paper/fluff/info/teth/kikimora
abno_type = /mob/living/simple_animal/hostile/abnormality/kikimora
abno_code = "F-02-"
abno_info = list(
"Do not closely examine the entity.",
"When F-02- breached, cognitohazardous F-02--02 graffiti appeared in a random appartment.",
"Graffiti can be removed with regular cleaning products or a mop.",
"F-02--02 is a phenomenon that replaces spoken word until the subject is unintelligible.",
"Each time a cursed employee speaks there is a chance a word will be taken by F-02--02.",
"Intances of F-02--02 will share taken words.",
"Curing the F-02--02 requires the host to fall asleep with a offering of food ontop of them.",
"It is considered bad luck if F-02- does not accept the offering.",)

//Dealer of the Damned
/obj/item/paper/fluff/info/teth/dealerdamned
abno_type = /mob/living/simple_animal/hostile/abnormality/dealerdamned
Expand Down
2 changes: 2 additions & 0 deletions lobotomy-corp13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@
#include "code\datums\components\bloodysoles.dm"
#include "code\datums\components\butchering.dm"
#include "code\datums\components\chasm.dm"
#include "code\datums\components\cognitohazard_visual.dm"
#include "code\datums\components\construction.dm"
#include "code\datums\components\creamed.dm"
#include "code\datums\components\customizable_reagent_holder.dm"
Expand Down Expand Up @@ -2862,6 +2863,7 @@
#include "code\modules\mob\living\simple_animal\abnormality\teth\forsaken_employee.dm"
#include "code\modules\mob\living\simple_animal\abnormality\teth\forsaken_murderer.dm"
#include "code\modules\mob\living\simple_animal\abnormality\teth\fragment.dm"
#include "code\modules\mob\living\simple_animal\abnormality\teth\kikimora.dm"
#include "code\modules\mob\living\simple_animal\abnormality\teth\lady_facing_the_wall.dm"
#include "code\modules\mob\living\simple_animal\abnormality\teth\meat_lantern.dm"
#include "code\modules\mob\living\simple_animal\abnormality\teth\MHz.dm"
Expand Down

0 comments on commit 2c284a9

Please sign in to comment.