Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2004:
[Freeciv-Dev] Re: (PR#8914) ruleset starting units list
Home

[Freeciv-Dev] Re: (PR#8914) ruleset starting units list

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: use_less@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8914) ruleset starting units list
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 8 Jun 2004 20:15:16 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8914 >

James Canete wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8914 >
> 
> Here's an implementation of startunits as a server string variable.
> 
> startunits defaults to "cwx"
> 
> Characters and corresponding roles:
> c: F_CITIES
> w: F_SETTLERS
> x: L_EXPLORER
> k: F_GAMELOSS
> s: F_DIPLOMAT
> f: L_FERRYBOAT
> d: L_DEFEND_GOOD
> a: L_ATTACK_FAST
> A: L_ATTACK_STRONG
> 
> issues:
> -Choosing a unit role for which there is no corresponding unit type
> (such as gameloss) will crash the server.  I'm not sure where to put a
> check for this.

Right after the get_role_unit call in place_starting_unit?

> -A ferryboat can be created in a completely landlocked area.

Too bad for that player.

> -There was a minor bug in aidiplomat.c which caused a crash when a
> diplomat unit had nothing to do.  This was fixed.

I don't understand.  Why does the original code use the comma?  Where 
does "map" come from?  Why is the same method used 2 lines above?  How 
could "map" ever be NULL?  Per and Greg, can you explain?

One other question I have is about get_role_unit().  Doesn't this 
function need to have a player parameter?  How does it check tech 
dependencies for the unit's role?  I guess it doesn't, since explorers 
are given now even though they can't be built.  But this seems bad...

jason




[Prev in Thread] Current Thread [Next in Thread]