← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/find_attack_soldiers into lp:widelands

 

> - update military site window when the user changes the soldier preference
(at the moment you have to close and open the window again to see the soldiers in the right ordering)

use a Boost::signal for that - i.e. the militarysite has one, and the ui can connect to it to update it whenever something is changed.

> - make sure healthy soldiers defend when the preference is set for rookies (instead of wounded ones who have lower power and are therefore prefered)

How do you want to deal with that? It sounds like you want a different sorting for this.

> nice to have: when upgrading soldiers/occupying a building send the best soldiers available (according to the preference set)

Actually that has been discussed before. It makes for an interesting strategic element when new buildings are not immediately manned with an invincible army. It gives the other player an opportunity to strike. I think this is cool and more dynamic than immediately having the best soldiers at the front. 

> keeping the soldiers sorted permanently is more difficult than I expected, the soldiercontrol interface does not offer a unified way of storing them, so for military sites they are upcasted from workers each time.

Why not change that? Remove the soldier control interface and instead make a HasSoldier container that can be owned by a building and handles all soldiers in the building. This gets rid of some inheritance which is usually bad and will solve your case. Just a suggestion of course.

Is this branch ready for review/merging now or do you still want to work on it?
-- 
https://code.launchpad.net/~widelands-dev/widelands/find_attack_soldiers/+merge/245276
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/find_attack_soldiers.


References