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
Tribes filtering #3693
Tribes filtering #3693
Conversation
…eparate file + cleanup includes. Removed some dead code from src/map_io/map_buildingdata_packet.cc.
… structures for player statistics.
…nted the inclusion of subdirectories.
…ands into tribes-filtering
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only two minor comments regarding the testsuite left, code LGTM. Will test this a bit more today.
test/maps/market_trading.wmf/scripting/tribes/custom_building/init.lua
Outdated
Show resolved
Hide resolved
sleep(2000) | ||
prefilled_buildings(p1, { "barbarians_custom_building", 22, 27 }) | ||
custom_building = map:get_field(22, 27).immovable | ||
-- NOCOM busy roads are broken |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then do please :)
This is the last nit, once this is done this is good to go in
Thanks a lot for this big review :) |
This PR contains code to only load the tribes that are actually being used.
I am planning to use the same design for loading the world, so that defining units will become orthogonal again. However, this branch is already big as it is.
Note that I relaxed the testing requirements a bit, because conquering is not working properly in the editor. This could be tested by merging the scenario editor branch once it's usable again.
Coding changes:
DescriptionManager
e.g. we can place a
frisian_fortress
if nobody is playing Frisians.If they need immovables with an attribute, these are loaded dynamically via the
attribute.
LuaFlag::set_wares
independent of wares ordergit mv
. It just somehow ended up in this branch...Changes to the Lua interface:
register.lua
.The
register.lua
registers the names and attributes with the engine, like this:than special Lua functions
just place an
init.lua
andregister.lua
below<scenario>/scripting/tribes
.There's no need to list it in
<scenario>/scripting/tribes/init.lua
as well.