apetavern / grubs

A worms-inspired artillery game for s&box with randomly generated levels.
MIT License
35 stars 7 forks source link

Weapon Input Hints #403

Closed DrewBritt closed 3 months ago

DrewBritt commented 3 months ago

Input Hint World UI that follows the player and tells them what kind of interaction their equipped weapon has.

Truthfully meant to tackle https://github.com/apetavern/grubs/issues/348 with this in a 2-in-1, but after looking over the weapon code and some discussion with Cameron, I believe a refactor will be required because of the number of different ways we do "ammo" (_tracesFired on HitScanComponent, _currentJetFuel on JetpackTool, _currentStrikeCount on MultiHitMeleeWeapon, etc.). We can probably do some kind of Ammo component that weapons will control, and in which the UI can pull data from (including the type of ammo (fuel, gun ammo) to determine which UI to display). However, I didn't want to do a big refactor right before playtest, and I felt that this was worth merging on its own.

https://github.com/apetavern/grubs/assets/43252311/0194a47f-a017-416c-a24e-fc73f8c69bcb

https://github.com/apetavern/grubs/assets/43252311/8571f708-b6ee-498c-b977-2d9d38026fae

https://github.com/apetavern/grubs/assets/43252311/6b81eaca-2218-4ec9-b9b3-71e287a0477e

https://github.com/apetavern/grubs/assets/43252311/6f10b477-1139-40bc-9030-7571ebe1cc07