]> git.sesse.net Git - pkanalytics/blobdiff - events.h
Make it possible to insert new formations from the UI.
[pkanalytics] / events.h
index 545437b16d9f181c998cf707e99307b7c849b87f..6dc2faf2f069e3d0d8c8c35e0cdf54a8c7113e90 100644 (file)
--- a/events.h
+++ b/events.h
@@ -50,6 +50,11 @@ public:
        std::vector<int> sort_team(const std::set<int> &team) const;  // Ordered first by gender, then by number.
        void set_formation_at(uint64_t t, bool offense, unsigned formation);
 
+       // Used to notify when we've inserted a new one into the database.
+       void inserted_new_formation(int formation_id, const std::string &name) {
+               formations[formation_id] = Formation{ formation_id, name };
+       }
+
 private:
        struct Player {
                int player_id;