amethyst / evoli

An ecosystem-simulation game made with Amethyst
https://community.amethyst.rs/t/evoli-introduction/770
Other
217 stars 33 forks source link

Define factions using a prefab #58

Closed marotili closed 5 years ago

marotili commented 5 years ago

This should allow us to be a little bit more flexible. In the future, we are going to replace the concept of factions with a more continuous data model. Our simulation should not be black and white.

sunreef commented 5 years ago

This PR looks good to me. However, if we want to move the load_factions to a separate LoadingState, we're gonna hit a problem. The WriteStorage<FactionEnemies> is not setup yet at that stage since it is setup with the main game state dispatcher.

marotili commented 5 years ago

@sunreef I tested this and it works because PrefabLoaderSystem::<combat::FactionPrefabData> is declared in the game state dispatcher. The prefab loader system has WriteStorage<FactionEnemies> in its system data.