[Megameknet-cvs] MegaMekNET/src/server/campaign SPlayer.java,1.86,1.87 NewbieHouse.java,1.26,1.27
Status: Inactive
Brought to you by:
mcwizard
From: Helge R. <mcw...@us...> - 2005-03-26 16:05:27
|
Update of /cvsroot/megameknet/MegaMekNET/src/server/campaign In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28650/src/server/campaign Modified Files: SPlayer.java NewbieHouse.java Log Message: -> S 1. Remove all task benefits from raiding SOL (Mechs, Comps) 2. Reduce EXP payout so that House players gain 1 RP for the game. 3. Make sure neither side suffers any losses from the game. Units on either side gain no EXP or kills. 4. Make it so SOL players can reset their hangar after a game. Coaches should be able to reset at any point (Yet untested...) McW 2005-03-26 Index: NewbieHouse.java =================================================================== RCS file: /cvsroot/megameknet/MegaMekNET/src/server/campaign/NewbieHouse.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** NewbieHouse.java 26 Mar 2005 12:22:13 -0000 1.26 --- NewbieHouse.java 26 Mar 2005 16:05:18 -0000 1.27 *************** *** 146,151 **** String result; if (!(p.getActivityStatus() == PlayerStatus.FIGHTING)) { ! if (p.getAllUnits().size() < 5) { p.stripOfAllUnits(false); addLanceToPlayer(1, p); SUnit c = this.getRandomMech(SUnit.LIGHT); --- 146,152 ---- String result; if (!(p.getActivityStatus() == PlayerStatus.FIGHTING)) { ! if (p.getAllUnits().size() < 5 || p.isMayReset()) { p.stripOfAllUnits(false); + p.setMayReset(false); addLanceToPlayer(1, p); SUnit c = this.getRandomMech(SUnit.LIGHT); Index: SPlayer.java =================================================================== RCS file: /cvsroot/megameknet/MegaMekNET/src/server/campaign/SPlayer.java,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** SPlayer.java 26 Mar 2005 12:22:13 -0000 1.86 --- SPlayer.java 26 Mar 2005 16:05:17 -0000 1.87 *************** *** 67,70 **** --- 67,71 ---- private boolean retasking = false; private int externalRank = 0; + private boolean mayReset = true; // cache fields. *************** *** 950,953 **** --- 951,958 ---- if (this.getAverageRating() < t.getMinRatingNeeded()) return res; + //Check if the house is allowed to participate + if (!t.isAllowedToParticipate(getMyHouse())){ + return res; + } //Immune players don't count as well. if (this.getImmunetill() > System.currentTimeMillis()) *************** *** 1771,1773 **** --- 1776,1792 ---- return visitor instanceof ServerVisitor ? ((ServerVisitor) visitor).visitSPlayer(this) : super.visit(visitor); } + + /** + * @param mayReset The mayReset to set. + */ + public void setMayReset(boolean mayReset) { + this.mayReset = mayReset; + } + + /** + * @return Returns the mayReset. + */ + public boolean isMayReset() { + return mayReset; + } } \ No newline at end of file |