From: Erik V. <eri...@xs...> - 2010-05-19 19:03:39
|
I think it was John David Galt's request to add token abbreviations ("Br" en "Tu" in 1856). I'd appreciate his opinion. I'm fine with the location names. People might find names easier, but names can only be applied to fixed-location bonuses anyway. Erik. -----Original Message----- From: Phil Davies [mailto:de...@gm...] Sent: Wednesday 19 May 2010 14:53 To: Development list for Rails: an 18xx game Subject: Re: [Rails-devel] RevenueManager and RevenueStaticModifier Hmm, not sure what the majority of people would prefer but I think it would be nice to clearly show that a given location has received a bonus for a token. I'm not sure most people care what or where the token came from, particularly in 1856 they are usually fairly obvious anyway. Phil On 18 May 2010 23:23, Stefan Frey (web.de) <ste...@we...> wrote: > Again some more results from working on Rails during train rides: > > I added the RevenueManager and the RevenueStaticModifier in Rails. > By those 18Kaas is fully supported and in 1856 Bonus the bonus tokens are > implemented (1856 still misses the support to allow run through the Gooderich > tile). > > Some details: > > -> RevenueManager > A new component similar to the ones like TrainManager, CompanyManager. > This is the only permanent object related to the revenue calculation and > stores the revenue modifiers. > > -> RevenueStaticModifier > This is a (simple) Interface, that requires the implementation of one method: > public void modifyCalculator(RevenueAdapter revenueAdapter) > > This method allows to manipulate all elements for the revenue calculation via > the public methods defined for the revenue adapater. This allows to create > e.g. new vertices, change values of vertices, define additional > RevenueBonuses or vertex sets. Current company and phase are also available. > > The method is called each time a revenue adapter was created and populated > from Rails object, but before the revenue calculation occurs. > For this it has to register itself to the RevenueManager via its > addStaticModifier() method. > > Both the RevenueManager and game specific RevenueModifiers can be defined > in Game.xml. > > Example Definition in Game.xml for 18Kaas: > > <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> > <StaticModifier class="rails.game.specific._18Kaas.RuhrRevenueModifier" /> > </Component> > > Modifiers defined in that fashion are already registered, thus they do not > need to call addStaticModifier(). > > -> Bonus implements RevenueStaticModifier > The Rails class Bonus, which represents an actual Bonus on a hex (exactly what > was neeeded!), implements the modifier above and converts the Rails Bonus > into a RevenueBonus in the calculator. > > An issue here: > Due to a typo in LocatedBonus and SellBonusToken prevented the call to > finishConfiguration (GameManagerI gameManager) > and thus the location variable in Bonus was never parsed. > An side effect of that fix that in the OR window of 1856 the bonus tokens are > shown not a s Tunnel and Bridge token, but by their location codes. I do not > know, what users prefer? > > Stefan > > ---------------------------------------------------------------------------- -- > > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > ---------------------------------------------------------------------------- -- _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |