-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose growth and planning logic as Events and EventReceivers #29
Comments
Exposing these kinds of events is a good idea, please go ahead and just make a PR for it! A lot of the stuff that is happening in DynamicCities is somewhat hard coded, breaking this up definitely helps to reuse the code and adapt it to other use cases. @Vizaxo is currently integrating his work on sectors with DynamicCities - maybe you want to have a talk with him to learn about new features/advantages of this approach. Depends a bit on what your goals are in the long run. |
Hey :) As mentioned, I'm in the middle of changing some stuff for DC too (the first PR, #30, was just merged). It's using the sectors stuff I've been working on, to convert DC from using the I agree that exposing these events would be good. One example that @Cervator mentioned the other day was allowing for things like underwater/lake cities; the default DC behaviour is to ignore any areas with water, but a module could choose to handle the events instead and pick underwater areas to build in. I think my changes are compatible with yours. I've converted the I've been making some other changes too, such as trying to convert the module to directly access the facets instead of using the region entity system. This might be more intrusive, but that would mainly just change how the default event handlers you have implemented work, so I don't think there would be any major conflicts. Most of my changes are dependent on the |
Hey @kaen, any news on this? Feel free to open a PR for more discussions! |
I'd like to use DynamicCities as a framework for planning and rasterizing settlements in my own game, but much of the logic is hard coded into the various systems and I'd like to override it with my own. I have some changes prepared that will expose this logic as consumable events and add default event receivers to implement the existing logic. The idea is that user code can just define an event receiver with the same signature and higher priority to use custom logic, then simply consume the event to prevent the default logic from taking place.
Some things I'd like to expose as events:
This is an initial list, and I'm sure I'll discover more use cases as I press on. But I wanted to get your opinion on this suggestion, and whether you'd be interested in such a change.
Here's the WIP branch, with the general idea implemented for some basic logic
The text was updated successfully, but these errors were encountered: