overthesun / simoc-web

This is the web interface to SIMOC
https://ngs.simoc.space/
Other
3 stars 0 forks source link

Broken food storage in full garden sim #289

Open ezio-melotti opened 1 year ago

ezio-melotti commented 1 year ago

Steps to reproduce:

  1. select the 4 Humans + Garden preset
  2. change one of the panels to Storage Ratios
  3. from the panel dropdown, select "Food Storage 1"

This will raise an error and the graph will be missing.

hiyaryan commented 1 year ago

After reproducing the same error with SAM: 1 Human + Garden, I determined that any simulation using a Crew Quarters other than 'Small' will reproduce the same error. In these other Crew Quarters there appears to be an attribute storage_type that is either not being parsed correctly on the frontend or has not been fully defined on the backend hence the TypeError: this.setsinfo[this.storage_type] is undefined. Perhaps @granawkins may know more?

granawkins commented 1 year ago

Easy fix: In StorageRatios.vue line 64, update to if (currencies.length > 2 && stor_name !== 'food_storage') {

Medium fix: In LevelsGraph.vue, after line 54, define the colors/order for all food currencies.

Proper fix: Redesign LevelsGraph to build/color/order programmatically