<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39530 >

On 23/08/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> [EMAIL PROTECTED] wrote:
>
> > 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...
>
>    common/city.c:490 can_build_unit
>     - calls can_build_unit_direct & can_player_build_unit_direct
>
>    common/city.c:463 can_build_unit_direct
>     - calls can_player_build_unit_direct
>
>    common/unittypes.c:503 can_player_build_unit_direct
>   - calls can_player_build_improvement_direct
>
> end up calling...
>
>    common/improvement.c:312 can_player_build_improvement_direct
>
> which returns false, if the improvement is a wonder & the wonder has
> been built.

 Actual problem is that unit improvement requirement has no ruleset
defined range. Building is always required in "City" range. This is
what we usually want for normal buildings, and for some wonders.
 Just changing hardcoded range to be "Player" for wonders would
replace bug with another. Do we want *all* the wonders to provide unit
building abilities in all cities?


 - ML



_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to