Files
Bubberstation/code/datums/components
SkyratBot fcf3b20e92 [MIRROR] Mobs spawners won't spawn more mobs than they are supposed to (#27760)
* Mobs spawners won't spawn more mobs than they are supposed to (#83266)

## About The Pull Request

At some point we added a new parameter to spawners which randomised the
number of mobs they could spawn up to a maximum.
For some reason the default value here was set to "2", meaning that
every mob spawner in the game would be spawning an average of 1.5 mobs
per update instead of 1.
As the place it was _intended_ for (mining vents) already provides a
value in the constructor, I just set the default back to 1.

Additionally, this randomised value did not actually obey the "maximum
mobs" parameter of the component and could spawn mobs above what was
supposed to be the cap of mobs created by the spawner.

This PR fixes those things.

## Changelog

🆑
fix: Mob spawners (such as lavaland tendrils) won't spawn more mobs than
they are supposed to, faster than they should.
/🆑

* Mobs spawners won't spawn more mobs than they are supposed to

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2024-05-18 03:16:47 +02:00
..
2024-04-26 01:22:24 +02:00
2024-04-28 22:24:01 +02:00
2024-04-29 21:15:33 +02:00
2024-04-28 22:24:01 +02:00
2024-04-26 01:22:24 +02:00
2024-02-20 01:00:11 +01:00
2024-03-01 19:05:23 +01:00
2024-04-26 01:22:24 +02:00
2024-04-26 01:22:24 +02:00
2024-04-26 01:22:24 +02:00
2024-04-29 21:15:33 +02:00
2024-04-29 21:15:33 +02:00
2024-04-28 22:24:01 +02:00
2024-04-28 22:24:01 +02:00
2024-04-23 20:43:45 +02:00
2024-04-29 21:15:33 +02:00
2024-04-28 22:24:01 +02:00
2024-04-16 06:05:57 +00:00
2024-04-26 01:22:24 +02: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