@Override void doEndPhaseChanges(Vector<Report> vPhaseReport) { game = server.getGame(); this.vPhaseReport = vPhaseReport; resolveScreen(); this.vPhaseReport = null; }
@Override void doEndPhaseChanges(Vector<Report> vPhaseReport) { game = server.getGame(); this.vPhaseReport = vPhaseReport; resolveQuicksand(); this.vPhaseReport = null; }
@Override void doEndPhaseChanges(Vector<Report> vPhaseReport) { game = server.getGame(); this.vPhaseReport = vPhaseReport; resolveWeather(); this.vPhaseReport = null; }
private static String formatArmor(Entity e) { if (e instanceof Mech) { return formatArmorMech((Mech) e); } else if (e instanceof GunEmplacement) { return formatArmorGunEmplacement((GunEmplacement) e); } else if (e instanceof Tank) { return formatArmorTank((Tank) e); } else if (e instanceof BattleArmor) { return formatArmorBattleArmor((BattleArmor) e); } else if (e instanceof Infantry) { return formatArmorInfantry((Infantry) e); } else if (e instanceof Protomech) { return formatArmorProtomech((Protomech) e); } return ""; }
@Override public void run(int connId, String[] args) { String result = new AddBotUtil().addBot(args, server.getGame(), server.getHost(), server.getPort()); server.sendServerChat(connId, result); } }
private void parsePassword() throws ParseException { if (getToken() == TOK_LITERAL) { password = getTokenValue(); } else { error("password expected"); //$NON-NLS-1$ } }
private void reset(int connId) { server.sendServerChat(server.getPlayer(connId).getName() + " reset the server."); server.resetGame(); }
@Override void doEndPhaseChanges(Vector<Report> vPhaseReport) { game = server.getGame(); this.vPhaseReport = vPhaseReport; resolveSmoke(); this.vPhaseReport = null; }
public synchronized void stopHost() { if(null != myServer) { //myServer.getGame().removeGameListener(this); myServer.die(); myServer = null; } currentScenario = null; }
private void resolveSmoke() { updateSmoke(); removeEmptyClouds(); }
protected static GameOptions getGameOptions() { if (Server.getServerInstance() == null) { return null; } else if (Server.getServerInstance().getGame() == null) { return null; } return Server.getServerInstance().getGame().getOptions(); }
@Override void doEndPhaseChanges(Vector<Report> vPhaseReport) { game = server.getGame(); if (game.getOptions().booleanOption(OptionsConstants.ADVCOMBAT_TACOPS_START_FIRE)) { this.vPhaseReport = vPhaseReport; resolveFire(); this.vPhaseReport = null; } }
/** * Override for the main driftAddSmoke to allow for 0 direction changes * @param x * @param y * @param windDir * @param windStr * @return */ public Coords driftAddSmoke(Coords coords, int windDir, int windStr) { return driftAddSmoke(coords, windDir, windStr, 0); }
/** * Run this command with the arguments supplied */ @Override public void run(int connId, String[] args) { String fileName = "savegame.sav"; if (args.length > 1) { fileName = args[1]; } server.saveGame(fileName); } }
public String getString(String key) { return getString(key, SEPARATOR_COMMA); }
public static void main(String[] args) { start(args); }
private static String renderArmor(int nArmor) { return renderArmor(nArmor, 2); }
/** @return the number of values for this key in the file */ public int getNumValues(String key) { Collection<String> values = get(key); return (null == values) ? 0 : values.size(); } }
private void setNewNetworkID(int connID, Entity ent, String net) { ent.setNewRoundNovaNetworkString(net); // TODO: Send packet to client. server.send_Nova_Change(ent.getId(), net); }
private void parseAnnounce() throws ParseException { if (getToken() == TOK_LITERAL) { announceUrl = getTokenValue(); } else { error("meta server announce URL expected"); //$NON-NLS-1$ } }