Package megamek.client
Class HeadlessClient
java.lang.Object
megamek.client.AbstractClient
megamek.client.Client
megamek.client.HeadlessClient
- All Implemented Interfaces:
IClient
This class is instantiated for the player. It allows to communicate with the server with no GUI attached.
-
Nested Class Summary
Nested classes/interfaces inherited from class megamek.client.AbstractClient
AbstractClient.ConnectionHandler -
Field Summary
FieldsFields inherited from class megamek.client.AbstractClient
awaitingSave, bots, connected, connection, connectionListener, connThread, disconnectFlag, host, iconCache, localPlayerNumber, log, name, phaseReport, port, roundReport, unitNameTracker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcacheImgTag(Entity entity) A client with no GUI has nothing to show an entity's picture in, so it does not cache one.voidchangePhase(GamePhase phase) Changes the game phase, and the displays that go along with it.voidsetSendDoneOnVictoryAutomatically(boolean value) Methods inherited from class megamek.client.Client
canUnloadStranded, changeTurnIndex, deploy, getAvailableMapSizes, getBoard, getBoard, getEntitiesVector, getEntity, getFirstDeployableEntityNum, getFirstEntityNum, getGame, getMapSettings, getMyTurn, getNextDeployableEntityNum, getNextEntityNum, getPrevEntityNum, getSelectedEntities, getSkillGenerator, handleGameSpecificPacket, isMyTurn, moveEntity, receiveAttack, receiveBuildingAdd, receiveBuildingCollapse, receiveBuildingRemove, receiveBuildingUpdate, receiveDeployMinefields, receiveEntities, receiveEntitiesUpdate, receiveEntityRemove, receiveEntityUpdate, receiveEntityVisibilityIndicator, receiveForcesDelete, receiveForceUpdate, receiveIlluminatedHexes, receiveRemoveMinefield, receiveReport, receiveRevealMinefield, receiveSendingMinefields, receiveTurns, receiveUpdateCutHexes, receiveUpdateGroundObjects, receiveUpdateIndustrialElevators, receiveUpdateMinefields, sendActivateHidden, sendAddEntitiesToForce, sendAddEntity, sendAddForce, sendAddSquadron, sendAmmoChange, sendAMSAssignCFRResponse, sendAPDSAssignCFRResponse, sendArtyAutoHitHexes, sendAssignForceFull, sendAttackData, sendBotSettingsToServer, sendBuildTrain, sendCalledShotChange, sendChangeOwner, sendChangeTeam, sendChargeLevelChange, sendCustomInit, sendDamageEdit, sendDeleteEntities, sendDeleteEntity, sendDeleteForces, sendDeployBridge, sendDeployFortifications, sendDeployGroundObjects, sendDeploymentUnload, sendDeployMinefields, sendDominoCFRResponse, sendEntityWeaponOrderUpdate, sendExplodeBuilding, sendForceParent, sendGameOptions, sendGhostTargetAction, sendHiddenPBSCFRResponse, sendLoadEntity, sendLoadGame, sendLobbyBoardGenerationRequest, sendMapDimensions, sendMapSettings, sendModeChange, sendMountFacingChange, sendNovaChange, sendPlanetaryConditions, sendPlayerPickedPassThrough, sendPrePhaseData, sendRerollInitiativeRequest, sendResetRoundDeployment, sendSensorChange, sendSinksChange, sendSpecialHexDisplayAppend, sendSpecialHexDisplayDelete, sendSystemModeChange, sendTAGTargetCFRResponse, sendTelemissileTargetCFRResponse, sendTowEntity, sendUnitAbandonmentAnnouncement, sendUnloadStranded, sendUpdateEntity, sendUpdateEntity, sendUpdateForce, sendUpdateForce, sendVariableRangeTargetingModeChange, setSkillGeneratorMethods inherited from class megamek.client.AbstractClient
addCloseClientListener, checkDuplicateNamesDuringAdd, connect, correctName, die, disconnected, fireSaveCompleted, flushConn, getBots, getHost, getLocalPlayerNumber, getName, getPort, handleGameIndependentPacket, handlePacket, initGameLog, isAwaitingSave, isBot, isConnected, keepGameLog, memDump, possiblyWriteToLog, receivePlayerInfo, receiveUnitReplace, send, sendArtilleryRevealPreference, sendChat, sendDone, sendNextPlayer, sendPause, sendPlayerInfo, sendPlayerInfo, sendServerChat, sendUnpause, setAwaitingSave, setLocalPlayerNumber, setName, setSaveCompletionCallback, updateConnectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface megamek.client.IClient
getBotClient, getInGameObject, getInGameObjects, getLocalPlayer, getPlayer, isLocalBot, playerExists
-
Field Details
-
PREFERENCES
-
-
Constructor Details
-
HeadlessClient
-
-
Method Details
-
cacheImgTag
A client with no GUI has nothing to show an entity's picture in, so it does not cache one.Building that cache is what pulls in the hex tile set, which parses thousands of template hexes and their terrain.
BotClientalready declines it for the same reason; a headless client wants it no more than a bot does, and anywhere clients are created repeatedly - a benchmark playing many games in one process - the cost is paid and retained once per game.- Overrides:
cacheImgTagin classClient- Parameters:
entity- ignored
-
setSendDoneOnVictoryAutomatically
public void setSendDoneOnVictoryAutomatically(boolean value) -
changePhase
Description copied from class:ClientChanges the game phase, and the displays that go along with it.- Overrides:
changePhasein classClient- Parameters:
phase- the phase switching from.
-