Files
Bubberstation/code/datums/brain_damage/brain_trauma.dm
SkyratBot ffa5c01b30 [MIRROR] Adds three brain traumas (feat. returning to monkey) (#26981)
* Adds colorblindness as a mild brain trauma (#76527)

## About The Pull Request

What the title says. 
The brain trauma makes the whole screen monochrome until cured.

![image](https://github.com/tgstation/tgstation/assets/82850673/442d24a8-6625-454c-bc28-64b786b03f49)

## Why It's Good For The Game

I feel like the current pool for mild brain traumas is quite lame, this
helps spice it up a bit with something that is quite annoying and
distracting but not game breaking (as mild brain traumas should
generally be).

## Changelog

🆑
add: Added colorblindness as a mild brain trauma.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>

* Adds three brain traumas (feat. returning to monkey)  (#82129)

## About The Pull Request

- Adds "Primal Instincts" brain trama. 
   - Special trauma
   - Randomly, your body will be taken over by monkey AI. 
- You will still be in control of the body, but you will have to fight
against the monkey ai for actions.
- There is a probability the monkey AI that takes control is aggressive,
meaning it will attack anyone nearby.
   - While primal, you can understand monkey language. 

- Adds "Kleptomania" brain trauma
   - Severe trauma
- When you have empty hands, you will passively try to pick up things
near you.
- There is no feedback message associated, so you may not even notice
you did this.
- This effect is temporarily disabled if you have taken damage recently.

- Adds "Possessive" brain trauma
   - Mild trauma
- Randomly, your held items will become undroppable for a short to
medium length of time.

## Why It's Good For The Game

I was looking through AI stuff recently and remembered we support
allowing AI controllers to work in cliented mobs, but we don't use it
anywhere (outside of adminbus)

So I wanted to add a brain trauma themed around that. Simple enough. 

But I didn't want to PR just a single trauma, that's boring so I thought
of some additional ones. Just to spice up the other two trauma pools. I
especially wanted to add some traumas that interact with inventory and
items, because while a lot of our traumas involving how a person
interacts with the world, not many involve how a person interacts with
themself.

## Changelog

🆑 Melbert
add: Adds 3 Traumas: Primal Instincts (special), Kleptomania (severe),
and Possessive (mild)
/🆑

* lewd

* Is this it?

* Hmmm

* Oh, this was unnecessary.

---------

Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
2024-04-03 21:03:57 +02:00

64 lines
2.3 KiB
Plaintext

//Brain Traumas are the new actual brain damage. Brain damage itself acts as a way to acquire traumas: every time brain damage is dealt, there's a chance of receiving a trauma.
//This chance gets higher the higher the mob's brainloss is. Removing traumas is a separate thing from removing brain damage: you can get restored to full brain operativity,
// but keep the quirks, until repaired by neurine, surgery, lobotomy or magic; depending on the resilience
// of the trauma.
/datum/brain_trauma
var/name = "Brain Trauma"
var/desc = "A trauma caused by brain damage, which causes issues to the patient."
var/scan_desc = "generic brain trauma" //description when detected by a health scanner
var/mob/living/carbon/owner //the poor bastard
var/obj/item/organ/internal/brain/brain //the poor bastard's brain
var/gain_text = span_notice("You feel traumatized.")
var/lose_text = span_notice("You no longer feel traumatized.")
var/can_gain = TRUE
var/random_gain = TRUE //can this be gained through random traumas?
var/resilience = TRAUMA_RESILIENCE_BASIC //how hard is this to cure?
/// Tracks abstract types of brain traumas, useful for determining traumas that should not exist
var/abstract_type = /datum/brain_trauma
/datum/brain_trauma/Destroy()
// Handles our references with our brain
brain?.remove_trauma_from_traumas(src)
if(owner)
on_lose()
owner = null
return ..()
//Called on life ticks
/datum/brain_trauma/proc/on_life(seconds_per_tick, times_fired)
return
//Called on death
/datum/brain_trauma/proc/on_death()
return
//Called when given to a mob
/datum/brain_trauma/proc/on_gain()
SHOULD_CALL_PARENT(TRUE)
if(gain_text)
to_chat(owner, gain_text)
RegisterSignal(owner, COMSIG_MOB_SAY, PROC_REF(handle_speech))
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, PROC_REF(handle_hearing))
//Called when removed from a mob
/datum/brain_trauma/proc/on_lose(silent)
SHOULD_CALL_PARENT(TRUE)
if(!silent && lose_text)
to_chat(owner, lose_text)
UnregisterSignal(owner, COMSIG_MOB_SAY)
UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
//Called when hearing a spoken message
/datum/brain_trauma/proc/handle_hearing(datum/source, list/hearing_args)
SIGNAL_HANDLER
UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
//Called when speaking
/datum/brain_trauma/proc/handle_speech(datum/source, list/speech_args)
SIGNAL_HANDLER
UnregisterSignal(owner, COMSIG_MOB_SAY)