[Freeciv-Dev] Re: (PR#7399) RiverBoats
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7399 >
Per I. Mathisen wrote:
> The last time this came up, we pretty much decided this option would
> complicate the rules too much. We already have heaps of problems making
> the transportation code sane, and been through quite a lot of work making
> the attack code sane, and both will be much more difficult to work with
> once we lose the assumption that sailing units can only be in an ocean or
> a city (cities have lots of exceptions anyway).
>
> The experiences from the allied transport patch, which at first sight
> seemed quite simple but caused us no end of subtle bugs for nearly a year
> after, makes me quite cautious about accepting this patch.
The problem in both cases is that the rules are spread out too much.
They need to be concentrated in one or at most two locations: in common
and server. AI code (including common/aicore) should use accessor
functions to determine action validity.
Examples include the recent functions can_upgrade_unittype,
can_player_see_units_in_city, can_player_see_city_internals.
Of course this takes work, it's sometimes not obvious how to do it
right, and it is likely to slow down execution.
jason
|
|