lua minigame for micrometeorites point defense #1886
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is some plugin style lua script that provides an extremly simple "minigame" for the weapons console.
It is basically an attempt to keep weapons on their toes outside of combat or scripted events.
Every now and then, a micrometeorite is detected, and weapons has a short time windows to shoot it down by pressing the right button.
In can be en- and disabled per player ship. With shields on, it is always inactive, as this is a rough indicator of being in combat. In game, this could be explained by stating that micrometeorites are just absorbed by the shield.
It is also inactive when no weapons officer is present, as tactical and single pilot are busy enough.
I am not quite sure about the actual utility of this, but I figured publishing I might be useful anyways, at the very least as an example of modularization for scenario writers, so one might be encouraged to outsource systems so that they can be reused in other scenarios.
Shoutout to @hemmond, looking into the custom elements wrapper helped me a lot with OOP-izing the minigame.
I also added translation tags, although I am not sure if utility scripts are translatable at all. But as those tags did no harm either, I added them anyway