Files
Bubberstation/code/datums/components
Ghom 911005e03c Makes the "Ian's Adventure" station trait more interesting by making the dog deadchat controllable plus extra lives. (#62617)
About The Pull Request

Makes the "Ian Adventure" station trait more interesting by giving him deadchat control (democracy mode, 3 seconds cooldown on inputs) and a couple extra lives* to survive early round tiding.

*Basically, a new component that respawns the critter when he dies. The component itself is simple enough, but it sends a signal each respawn to allow other datums to expand this behavior how they want. I've contemplated adding a signal that can stop death, dusting and gibbing instead of respawning the mob at first but because death(), dust() and gib() were made with the assertion that the mob is always going to die I've quickly realized it'd require a refactor that's way too big and out of scope.

The deadchat control of corgis only include commands to change and drop hats, "speak" (random lines from the speak list of the mob) and spin (other than cardinal movement) for now. I'd have loved to add more complex commands (like, argumented) that can potentially be relayed to the AI controller, but I guess that'll have to wait until the thing gets refactored a little.
Why It's Good For The Game

"Ian's Adventure" is a really bland station trait at the moment. All it does is move Ian somewhere else at the start of the round. Even by the station traits standard of being small things this is insignificant, and also pretty bad considering Ian is not actually going on an adventure since he lacks the initiative to do anything being an npc dog.
This PR aims to breath fresh air into this station trait and push it toward a slighty more engaging direction, though it relies on observers to work, while still being a small """"cute"""" station trait.
Changelog

cl
expansion: The "Ian's Adventure" station trait now makes Ian deadchat controllable and gives him a couple extra lives (to survive early round tiding)
/cl
2021-11-18 13:13:57 +13:00
..
2021-09-24 18:44:23 -07:00
2021-08-02 18:14:14 -07:00
2021-10-15 07:01:02 +01:00

Datum Component System (DCS)

Concept

Loosely adapted from /vg/. This is an entity component system for adding behaviours to datums when inheritance doesn't quite cut it. By using signals and events instead of direct inheritance, you can inject behaviours without hacky overloads. It requires a different method of thinking, but is not hard to use correctly. If a behaviour can have application across more than one thing. Make it generic, make it a component. Atom/mob/obj event? Give it a signal, and forward it's arguments with a SendSignal() call. Now every component that want's to can also know about this happening.

HackMD page for an introduction to the system as a whole.

See/Define signals and their arguments in __DEFINES\components.dm