-
-
Notifications
You must be signed in to change notification settings - Fork 991
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
support scenario files in map_file #4804
Conversation
Now a scenario generated by teh scenario editor can be loaded just like a simple map file
Can you explain how the merge works for this case? Will it be different from macro-including the scenario file? I kinda question the addition of |
Yes, is basically like the inclusion,except that it tries to merge [side] tags, so that you can still overwrite the contents of each [side] in the handwritten .cfg file, but still create units in the scenario editor.
Well, one usecase is enough. Its clearly a function that does a basic config operation so it belongs in config.hpp and fits well along the existing append/inherit etc functions. |
Well, this is precisely what I was questioning… Also, isn't it identical to the existing |
We coudl improve the merging for exampy by also marking it merge the [unit]s in each [side], correctly, but im not convonced that this actually better than makring people use something liek [modify_unit]+prestart events. |
no, inherit_attributes choose the already existent attributes over the new ones, but the existing functions config::append_attributes and config::merge_attributes do basicially the same thing. |
I think merging the units in each side would be more confusing than just appending them. Also, did you miss my question just above? |
Sure, but doesn't that just mean that |
No, these function all change the |
I don't quite get how this makes them not equivalent? Whichever object ends up changed, the operation is the same, right? In fact, isn't |
No, on both cases you end up with a config that has x values with y as fallback, but in one method you'll also end up with another config with x values and with the other method you'll end up with another config with y values.
So? Obviously merge is not the same as copy-merge-swap |
This means they are equivalent if you first make a copy of the LHS config. So if nothing else, the |
I disagree, and I doubt your suggested implemtation would be noticable smaller or easier to read, but if you want you can do it. |
Now a scenario generated by teh scenario editor can be loaded
just like a simple map file
fixes #4803