We used to constantly re-assign the top-level database tables on every tick because we assigned straight from the parsed full host snapshot JSON. Now we have deltas from the host, and only update the parts of the database that change.
Most elements (e.g. science, comms, engineering) still rely on full re-assignment for their change observers. They don't notice when something changes within the table. To make things work short term we are manually re-allocating some of the tables every tick. We should refactor to use wildcard observers.
I've done crew selection (3a3bbb081148751e438c356d4a187a6a45057044) and the power bars (96664c2e8819dfe9d88b1354cc235e4bae8b1777). I'm also trying to push some logic out of the templates by introducing intermediate models that turn the flat database tables into something better structured for each specific element.
We used to constantly re-assign the top-level database tables on every tick because we assigned straight from the parsed full host snapshot JSON. Now we have deltas from the host, and only update the parts of the database that change.
Most elements (e.g. science, comms, engineering) still rely on full re-assignment for their change observers. They don't notice when something changes within the table. To make things work short term we are manually re-allocating some of the tables every tick. We should refactor to use wildcard observers.
I've done crew selection (3a3bbb081148751e438c356d4a187a6a45057044) and the power bars (96664c2e8819dfe9d88b1354cc235e4bae8b1777). I'm also trying to push some logic out of the templates by introducing intermediate models that turn the flat database tables into something better structured for each specific element.