code/__HELPERS/memory_helpers.dm
add_memory_in_range | Adds a memory to all carbon mobs in a certain range of a certain atom. |
---|---|
/proc/_add_memory_in_range | Unless you need to use this for an explicit reason, use the add_memory_in_range macro wrapper. |
add_mob_memory | Adds a memory to the target mob. |
add_memory | Adds a memory to the target mind. |
Define Details
add_memory
Adds a memory to the target mind.
The first argument should be a typepath of a /datum/memory.
If the mob already has a memory of that type, it will be deleted.
Beyond that, can be supplied with named arguments pertaining to your memory type. Common arguments include:
- protagonist: The main subject of the memory
- deuteragonist: The side subject of the memory. Doesn't necessarily have to be a mob!
- antagonist: The main villain of the memory. Also doesn't necessarily have to be a mob!
Returns the datum memory created, or null otherwise.
add_memory_in_range
Adds a memory to all carbon mobs in a certain range of a certain atom.
The third argument should be a typepath of a /datum/memory.
Two things of note when using this:
- If the source atom is a mob, it will be added to that mob if possible.
- The protagonist of the memory is set to the memorizer by default. If sourced from a mob, you need to set the protagonist manually.
Beyond that, can be supplied with named arguments pertaining to your memory type. Common arguments include:
- protagonist: The main subject of the memory
- deuteragonist: The side subject of the memory. Doesn't necessarily have to be a mob!
- antagonist: The main villain of the memory. Also doesn't necessarily have to be a mob!
add_mob_memory
Adds a memory to the target mob.
The first argument should be a typepath of a /datum/memory.
If the mob already has a memory of that type, it will be deleted.
Beyond that, can be supplied with named arguments pertaining to your memory type. Common arguments include:
- protagonist: The main subject of the memory
- deuteragonist: The side subject of the memory. Doesn't necessarily have to be a mob!
- antagonist: The main villain of the memory. Also doesn't necessarily have to be a mob!
Returns the datum memory created, or null otherwise.