mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-25 08:05:31 +01:00
bb744805a0
## About The Pull Request Port from https://github.com/Monkestation/Monkestation2.0/pull/10330, as promised in https://github.com/tgstation/tgstation/pull/94757 This adds a proximity monitor to all turrets - they now track "interesting" targets within the turret's range, and the turret will only process if at least 1 thing is being tracked. The proximity monitor's checks for what's "interesting" are slightly less thorough than the turret's, and thus, it may still track something the turret will ignore regardless - but that's still better than the turret processing when nothing's nearby anyways. This also makes a new processing subsystem, SSturrets, as turret processing can be somewhat intensive in process, so like, let's not let them hog the SSmachines tick (plus, I honestly believe that splitting things into more specific processing subsystems is better for allowing the MC to manage tick time with more granularity). SSturrets has the same flags and wait as SSmachines. ## Why It's Good For The Game Should improve performance quite a bit - mainly, turrets on space ruins shouldn't waste tick time when there's nothing even near them. ## Changelog 🆑 refactor: Refactored turrets so they only process if something potentially "interesting" is within its range. /🆑
7 lines
342 B
Plaintext
7 lines
342 B
Plaintext
/// The subsystem used for portable turrets, as they're relatively more intensive compared to most other machines, so we don't want them hogging tick usage from everything else.
|
|
PROCESSING_SUBSYSTEM_DEF(turrets)
|
|
name = "Turret Processing"
|
|
flags = SS_NO_INIT | SS_KEEP_TIMING
|
|
wait = 2 SECONDS
|
|
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|