Skip to content

Commit

Permalink
Add GunManager implementation
Browse files Browse the repository at this point in the history
- Responsible for managing all "permanent" weapons (i.e. not missiles) attached to a ship.
- Stores all associated data about a ship's hull configuration and mounted weapons directly, due to a lack of support for serialization of LuaSharedObject.
- Each weapon is assigned to a single group, which is responsible for sending fire commands to that weapon and managing targeting.
- Originally written (but not merged) in 2021.
- Future expansion is intended to support more flexible damage types, explosive projectiles, and dumbfire rocket launchers.
- This system is intended to handle turrets in the future, via extensions to the weapon mounting system to support multiple traverse options.

GunManager: add FiredThisFrame/StoppedThisFrame

- Supports our extremely hacky sound code system
- Ideally a "better" solution would be found at some point, but this is adequate for the time being

GunManager: add GetGroupLeadPos

- Temporary accessor that sums together the lead positions of all weapons in the group to support indicator rendering

GunManager: add GetGroupTemperatureState

- Temporary API to query the average temperature of all weapons in the group relative to their overheat threshold
  • Loading branch information
sturnclaw committed Dec 7, 2024
1 parent 3cb788f commit ab67426
Show file tree
Hide file tree
Showing 2 changed files with 741 additions and 0 deletions.
Loading

0 comments on commit ab67426

Please sign in to comment.