[Freeciv-Dev] (PR#4420) New traderoute rules
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
[bursig - Sat Jun 28 22:50:20 2003]:
> Hi all
>
> This is next version of this code. It fix small bug and make some code
> clean. New function is added to common tree :
> get_caravan_enter_city_bonus(...) - which calculate caravan gold and
> science bonus and now is avilable to server and all clients. SDLClient
> try use it in new caravan dialog.
There are some style/naming issues. New functions
(can_enter_marketplace) should have descriptive block comments, not the
dreaded '...' comment. Operators (&& and ||) should go on the beginning
of a new line, not the end of the old line.
I think can_enter_marketplace is an unhelpful name. Perhaps
can_cities_trade would be better (not to be confused with
can_establish_trade_route - what you call "entering the marketplace" is
basically "trade" as opposed to a "trade route")?
+ if (pcity_homecity->owner == pcity_dest->owner
+ && map_distance(pcity_homecity->x, pcity_homecity->y,
+ pcity_dest->x, pcity_dest->y) <= 8) {
+ return FALSE;
+ }
The above code should just call can_enter_marketplace, right?
I also have the problem that the patch doesn't compile; see unihand.c:1211.
jason
- [Freeciv-Dev] (PR#4420) New traderoute rules,
Jason Short <=
[Freeciv-Dev] (PR#4420) New traderoute rules, Jason Short, 2003/07/18
[Freeciv-Dev] (PR#4420) New traderoute rules, Jason Short, 2003/07/20
|
|