<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39530 >
[EMAIL PROTECTED] wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=39530 >
> With rndCiv i use Wonders to define special races,
> ie if you build "The Elves" wonder you can build Elvish units.
> I found that this didn't work, so i made building "The Elves"
> allowed you to build "Elveshome" in your cities which allowed
> you to build Elvish units.
> It would be simpler for me, and prolly for the code, if Wonders
> could allow certain units to be built, either on a City, Island,
> Nation, or Planet wide basis.
> This wouldn't affect the default rulesets, but would allow more
> complexity in mods.
Ive looked through the code, and i find that the functions that check
whether a unit can be built...
- calls can_build_unit_direct & can_player_build_unit_direct
- calls can_player_build_unit_direct
- calls can_player_build_improvement_direct
end up calling...
which returns false, if the improvement is a wonder & the wonder has
Which means that a unit that's impr_req is a wonder will never be able
to be built as can_player_build_improvement_direct() will return false.
It seems that can_player_build_improvement_direct() is used for two
purposes, to check if a building can be built & to check if a unit can
im not a c coder, but my initial solution..
X = main code
Z = wonder check
Tests that come from unit functions use
Tests that come from building functions use
or something like that
Freeciv-dev mailing list