Khaligufzel / Dimensionfall

A survival game inspired by Cataclysm: Dark Days Ahead and Bright Nights.
MIT License
12 stars 5 forks source link

Centralize and save player equipment #279

Closed snipercup closed 2 months ago

snipercup commented 2 months ago

Requires #278 Fixes #273 Fixes #274

The ui components shouldn't do any data manipulation so I removed that from the equipmentslots. Instead, the ItemManager will manage the items in the player equipment. Previously, the weapon magazine was saved and loaded separately from the gun, but it seems to work without separation so I left it like that.

The create_starting_items function is a bit ugly now. Maybe we can find a better way to create starting items