On Sun, 18 Aug 2013 09:20:04 +0200
Michael Vehrs <michael.bursc...@gmx.de> wrote:
> I'll have a look at that. And I think that all getName/getLabel code 
> should be moved to Messages if possible.

Messages is a good place.  The only real alternative I see is to try to
have a common "public StringTemplate getLabel()" method across the FCOs.

> ...I really don't understand the rationale for this code, either. I assume 
> it is like that for historical reasons (TM).

Almost certainly.  I wonder if we have a Col1 labelling scheme onto which we
have bolted individual unit names.  ISTM that at one point there was an effort
to put all the label generating code into Unit.getLabel, but the job was
never completed coherently.

> I think it would be best to reconsider what we would like unit labels to look
> like and start from there.  In the above case, the best label would be "Dutch
> Seasoned Scout", wouldn't it? The number problem might be due to 
> AbstractUnit, 
> which is probably the only place we do need a number of units. And I 
> think it shouldn't consider the default role, but the expert role.
> So how about something along these lines:
>
> Abstract Unit (always with number, never named, probably never with nation):
> expert role: 7 Seasoned Scouts
> other role: 7 Carpenters (Scouts)
> 
> Unit (never with number, but with name if not null):
> expert role: Seasoned Scout
> expert role, with name: Natty Bumppo (Seasoned Scout)
> other role: Expert Lumberjack (Scout)
> other role, with name: Paul Bunyan (Expert Lumberjack/Scout)
>
> Unit (again, with nation):
> expert role: Dutch Seasoned Scout
> expert role, with name: Natty Bumppo (Dutch Seasoned Scout)
> other role: Dutch Expert Lumberjack (Scout)
> other role, with name: Paul Bunyan (Dutch Expert Lumberjack/Scout)

Agreed on the first two groups.  The third will require transitional
work as the nation part is specified separately in existing messages
(lots of "%nation% %unit%").  If we want to avoid the effort there for
now we could keep the nation separate and just do:

Seasoned Scout
Seasoned Scout Natty Bumpo
Expert Lumberjack (Scout)
Expert Lumberjack (Scout) Natty Bumpo

at the cost of sounding a bit mechanical.

> Well, we could just put the equipment in the spec, but my long-term goal 
> is to get rid of the equipment type entirely. We know what goods a unit 
> with a role carries, since these were the goods used to equip it. And 
> Role.getRoleEquipment() would simply become role.getRequiredGoods().

OK, yes you have mentioned that plan, I remember now.  However we are not
quite 1:1 between role and goods because of pioneers being able to carry
variable amounts of their requiredGoods.  The goods could live in a Unit
goods container, but I can see complication arising there with braves
carrying both tribute/gift goods and equipment goods.

Cheers,
Mike Pope

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Freecol-developers mailing list
Freecol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to