lzrtag / LZRTag

AVR-Based easily modifyable DIY Lasertag!
GNU General Public License v3.0
94 stars 11 forks source link

Include "on_event" and "on_change" for hooks #43

Closed Xasin closed 5 years ago

Xasin commented 6 years ago

These functions should work similarly to Sinatra's functions and would allow the system to react to any type of property change that happens within either the global scope of the game or specific to a player (on_event vs. on_change)

They'd hook directly into the MQTT Subscription, and would be handled right after the player itself processed the MQTT data, allowing for hooks into any property update (ammo, dead, whatevs), game event, or custom properties, while retaining the removable nature of the hook itself. It'd also be much lower maintenance should new properties be added <3

Xasin commented 5 years ago

Pretty much done with the latest Ruby Rewrite - hell yeah!