Package zombie.network
Class GameServer
java.lang.Object
zombie.network.GameServer
public class GameServer
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description static boolean
bDebug
static boolean
bFastForward
static boolean
bServer
static java.lang.String
checksum
static java.util.HashSet
DebugPlayer
static int
DEFAULT_PORT
static float
FastForwardMultiplier
static int
FPS
static java.lang.String
GameMap
static java.util.HashMap
IDToPlayerMap
static java.lang.String
ip
static java.lang.String
IPCommandline
static int
MAX_PLAYERS
static int
MaxTicksSinceKeepAliveBeforeStall
static java.util.ArrayList
Players
static java.util.HashMap
PlayerToBody
static int
PortCommandline
static int
ResetID
static java.util.ArrayList
ServerMods
static java.lang.String
ServerName
static KahluaTable
SpawnRegions
static int
SteamPortCommandline1
static int
SteamPortCommandline2
static java.lang.Boolean
SteamVACCommandline
static int
test
static float
timeSinceKeepAlive
static java.util.HashMap
transactionIDMap
static UdpEngine
udpEngine
static boolean
UseTCPForMapDownloads
static java.lang.String[]
WorkshopInstallFolders
static java.util.ArrayList
WorkshopItems
static long[]
WorkshopTimeStamps
-
Constructor Summary
Constructors Constructor Description GameServer()
-
Method Summary
Modifier and Type Method Description static void
addConnection(UdpConnection con)
static void
addDisconnect(UdpConnection con)
static void
AddExplosiveTrap(HandWeapon weapon, IsoGridSquare sq, boolean sensor)
static void
addIncoming(short id, java.nio.ByteBuffer bb, UdpConnection connection)
static void
AddItemToMap(java.nio.ByteBuffer bb, UdpConnection connection)
static void
addXp(IsoPlayer p, PerkFactory.Perks perk, int xp)
static void
Chat(java.lang.String chat, UdpConnection connection, boolean sayIt)
static void
Chat(java.lang.String chat, UdpConnection connection, boolean sayIt, byte chatType)
static boolean
CheckPlayerStillValid(IsoPlayer p)
static void
createZombie()
static void
disconnect(UdpConnection connection)
static void
disconnectPlayer(IsoPlayer player, UdpConnection connection)
static void
doDamage(IsoGameCharacter chr, float pain)
static void
doMinimumInit()
static boolean
doSendZombies()
static void
doZombieDie(IsoZombie z, IsoGameCharacter wielder)
static void
doZomboidDataInMainLoop(ZomboidNetData d)
static UdpConnection
getConnectionFromPlayer(IsoPlayer player)
java.lang.String
getDifficulty()
static int
getFreeSlot()
static int
getPlayerCount()
static java.util.ArrayList
getPlayers()
java.lang.String
getPoisonousBerry()
java.lang.String
getPoisonousMushroom()
static void
heartBeat()
static boolean
isSpawnBuilding(BuildingDef def)
static void
loadModData(IsoGridSquare sq)
static void
main(java.lang.String[] args)
static void
PauseAllClients()
static void
PlaySoundAtEveryPlayer(java.lang.String name, int x, int y, int z)
static void
PlayWorldSoundServer(java.lang.String name, boolean loop, IsoGridSquare source, float pitchVar, float radius, float maxGain, boolean ignoreOutside)
static void
PlayWorldSoundWavServer(java.lang.String name, boolean loop, IsoGridSquare source, float pitchVar, float radius, float maxGain, boolean ignoreOutside)
static java.lang.String
rcon(java.lang.String command)
static void
receiveClientConnect(UdpConnection connection, ServerWorldDatabase.LogonResult r)
static void
receivePlayerInfo(java.nio.ByteBuffer bb, UdpConnection connection)
static void
receivePlayerListensChannel(java.nio.ByteBuffer bb)
static void
receiveRadioDeviceDataState(java.nio.ByteBuffer bb, UdpConnection connection)
static void
receiveWaveSignal(java.nio.ByteBuffer bb)
static void
removeCorpseFromMap(IsoDeadBody corpse)
static void
RemoveItemFromMap(IsoObject obj)
static void
RemoveSpecialObjectFromSquare(IsoObject obj)
static void
requestingChunk(ByteBufferReader bb, UdpConnection connection)
static void
sendAddItemToContainer(ItemContainer container, InventoryItem item)
static void
sendAdminMessage(java.lang.String message, int x, int y, int z)
static void
sendAlarm(int x, int y)
static void
sendAmbient(java.lang.String name, int x, int y, int radius, float volume)
static void
sendBloodSplatter(HandWeapon weapon, float x, float y, float z, Vector2 hitDir, boolean closeKilled, boolean radial)
static void
sendCompost(IsoCompost compost, UdpConnection connection)
static void
sendCorpse(IsoDeadBody body)
static void
sendDeadZombie(IsoZombie owner)
static void
SendDeath(IsoPlayer player)
static void
sendDeleteZombie(IsoZombie died)
static void
sendFuranceChange(BSFurnace furnace, UdpConnection connection)
static void
sendGenerator(IsoGenerator generator)
static void
sendHelicopter(float x, float y, boolean active)
static void
sendIsoWaveSignal(int sourceX, int sourceY, int channel, java.lang.String msg, java.lang.String codes, float r, float g, float b, int signalStrength, boolean isTV)
static boolean
sendItemListNet(UdpConnection ignore, IsoPlayer sender, java.util.ArrayList items, IsoPlayer receiver, java.lang.String sessionID, java.lang.String custom)
static void
sendItemsInContainer(IsoObject o)
static void
sendMetaGrid(int cellX, int cellY, int roomID)
static void
sendMetaGrid(int cellX, int cellY, int roomID, UdpConnection connection)
static void
sendNonPvpZone(NonPvpZone zone, boolean remove, UdpConnection connection)
static void
sendObjectChange(IsoObject o, java.lang.String change, java.lang.Object[] objects)
static void
sendObjectChange(IsoObject o, java.lang.String change, KahluaTable tbl)
static void
sendObjectModData(IsoObject o)
static void
sendOptionsToClients()
static void
sendReanimatedZombieID(IsoPlayer player, IsoZombie zombie)
static void
sendRemoveItemFromContainer(ItemContainer container, InventoryItem item)
static void
sendSafehouse(SafeHouse safehouse, boolean remove, UdpConnection connection)
static void
sendServerCommand(java.lang.String module, java.lang.String command, java.lang.Object[] objects)
static void
sendServerCommand(java.lang.String module, java.lang.String command, KahluaTable args)
static void
sendServerCommand(java.lang.String module, java.lang.String command, KahluaTable args, UdpConnection c)
static void
sendServerCommand(IsoPlayer player, java.lang.String module, java.lang.String command, KahluaTable args)
static void
sendSlowFactor(IsoGameCharacter chr)
static void
sendWeather()
static void
sendZombie(IsoZombie zombie)
static void
sendZombie(IsoZombie zombie, int minrange, int maxrange)
static void
sendZombieSound(IsoZombie.ZombieSound sound, IsoZombie zombie)
static void
sendZone(IsoMetaGrid.Zone zone, UdpConnection connection)
void
setDifficulty(java.lang.String difficulty)
void
setPoisonousBerry(java.lang.String poisonousBerry)
void
setPoisonousMushroom(java.lang.String poisonousMushroom)
static void
setupCoop()
static void
smashWindow(IsoWindow isoWindow, int action)
static void
startFireOnClient(java.nio.ByteBuffer bb, UdpConnection connection)
static void
startFireOnClient(IsoGridSquare gridSquare, int fireStartingEnergy, boolean igniteOnAny, int Life, boolean smoke)
static void
startRain()
static void
startServer()
static void
stopFire(java.nio.ByteBuffer bb, UdpConnection connection)
static void
stopRain()
static void
syncClock()
static void
SyncCustomLightSwitchSettings(java.nio.ByteBuffer bb, UdpConnection connection)
static void
SyncDoorKey(java.nio.ByteBuffer bb, UdpConnection connection)
static void
SyncIsoObject(java.nio.ByteBuffer bb, UdpConnection connection)
static void
SyncIsoObjectReq(java.nio.ByteBuffer bb, UdpConnection connection)
static void
SyncThumpable(java.nio.ByteBuffer bb, UdpConnection connection)
static void
toggleSafety(java.nio.ByteBuffer bb, UdpConnection playerConnection)
static void
UnPauseAllClients()
static void
updateOverlayForClients(IsoObject object, java.lang.String spriteName, float r, float g, float b, float a, UdpConnection playerConnection)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
MAX_PLAYERS
public static final int MAX_PLAYERS- See Also:
- Constant Field Values
-
test
public static int test -
DEFAULT_PORT
public static int DEFAULT_PORT -
IPCommandline
public static java.lang.String IPCommandline -
PortCommandline
public static int PortCommandline -
SteamPortCommandline1
public static int SteamPortCommandline1 -
SteamPortCommandline2
public static int SteamPortCommandline2 -
SteamVACCommandline
public static java.lang.Boolean SteamVACCommandline -
FPS
public static final int FPS- See Also:
- Constant Field Values
-
bServer
public static boolean bServer -
bDebug
public static boolean bDebug -
udpEngine
-
IDToPlayerMap
public static java.util.HashMap IDToPlayerMap -
Players
public static java.util.ArrayList Players -
timeSinceKeepAlive
public static float timeSinceKeepAlive -
MaxTicksSinceKeepAliveBeforeStall
public static int MaxTicksSinceKeepAliveBeforeStall -
PlayerToBody
public static java.util.HashMap PlayerToBody -
DebugPlayer
public static java.util.HashSet DebugPlayer -
ResetID
public static int ResetID -
ServerMods
public static java.util.ArrayList ServerMods -
WorkshopItems
public static java.util.ArrayList WorkshopItems -
WorkshopInstallFolders
public static java.lang.String[] WorkshopInstallFolders -
WorkshopTimeStamps
public static long[] WorkshopTimeStamps -
SpawnRegions
-
ServerName
public static java.lang.String ServerName -
checksum
public static java.lang.String checksum -
GameMap
public static java.lang.String GameMap -
bFastForward
public static boolean bFastForward -
FastForwardMultiplier
public static float FastForwardMultiplier -
UseTCPForMapDownloads
public static boolean UseTCPForMapDownloads -
transactionIDMap
public static java.util.HashMap transactionIDMap -
ip
public static java.lang.String ip
-
-
Constructor Details
-
GameServer
public GameServer()
-
-
Method Details
-
PauseAllClients
public static void PauseAllClients() -
UnPauseAllClients
public static void UnPauseAllClients() -
setupCoop
public static void setupCoop() throws java.io.FileNotFoundException- Throws:
java.io.FileNotFoundException
-
main
public static void main(java.lang.String[] args) -
rcon
public static java.lang.String rcon(java.lang.String command) -
doMinimumInit
public static void doMinimumInit() -
startServer
public static void startServer() throws java.net.ConnectException- Throws:
java.net.ConnectException
-
sendNonPvpZone
-
sendCompost
-
sendGenerator
-
AddExplosiveTrap
-
sendHelicopter
public static void sendHelicopter(float x, float y, boolean active) -
sendZone
-
addXp
-
stopFire
-
startFireOnClient
-
startFireOnClient
public static void startFireOnClient(IsoGridSquare gridSquare, int fireStartingEnergy, boolean igniteOnAny, int Life, boolean smoke) -
sendOptionsToClients
public static void sendOptionsToClients() -
sendCorpse
-
removeCorpseFromMap
-
loadModData
-
Chat
-
Chat
public static void Chat(java.lang.String chat, UdpConnection connection, boolean sayIt, byte chatType) -
doZomboidDataInMainLoop
-
PlayWorldSoundServer
public static void PlayWorldSoundServer(java.lang.String name, boolean loop, IsoGridSquare source, float pitchVar, float radius, float maxGain, boolean ignoreOutside) -
PlayWorldSoundWavServer
public static void PlayWorldSoundWavServer(java.lang.String name, boolean loop, IsoGridSquare source, float pitchVar, float radius, float maxGain, boolean ignoreOutside) -
PlaySoundAtEveryPlayer
public static void PlaySoundAtEveryPlayer(java.lang.String name, int x, int y, int z) -
sendZombieSound
-
getConnectionFromPlayer
-
sendAddItemToContainer
-
sendRemoveItemFromContainer
-
sendItemsInContainer
-
CheckPlayerStillValid
-
addConnection
-
addDisconnect
-
disconnectPlayer
-
heartBeat
public static void heartBeat() -
receivePlayerInfo
-
getFreeSlot
public static int getFreeSlot() -
receiveClientConnect
public static void receiveClientConnect(UdpConnection connection, ServerWorldDatabase.LogonResult r) -
sendMetaGrid
-
sendMetaGrid
public static void sendMetaGrid(int cellX, int cellY, int roomID) -
sendObjectModData
-
sendSlowFactor
-
sendObjectChange
-
sendObjectChange
public static void sendObjectChange(IsoObject o, java.lang.String change, java.lang.Object[] objects) -
sendZombie
-
sendZombie
-
createZombie
public static void createZombie() -
requestingChunk
-
SyncCustomLightSwitchSettings
-
SyncIsoObject
-
SyncIsoObjectReq
-
SyncDoorKey
-
SyncThumpable
-
RemoveItemFromMap
-
doZombieDie
-
sendBloodSplatter
public static void sendBloodSplatter(HandWeapon weapon, float x, float y, float z, Vector2 hitDir, boolean closeKilled, boolean radial) -
AddItemToMap
-
sendDeleteZombie
-
disconnect
-
addIncoming
-
smashWindow
-
SendDeath
-
doSendZombies
public static boolean doSendZombies() -
sendDeadZombie
-
doDamage
-
startRain
public static void startRain() -
stopRain
public static void stopRain() -
sendWeather
public static void sendWeather() -
syncClock
public static void syncClock() -
sendServerCommand
public static void sendServerCommand(java.lang.String module, java.lang.String command, KahluaTable args, UdpConnection c) -
sendServerCommand
public static void sendServerCommand(java.lang.String module, java.lang.String command, KahluaTable args) -
sendServerCommand
public static void sendServerCommand(java.lang.String module, java.lang.String command, java.lang.Object[] objects) -
sendServerCommand
public static void sendServerCommand(IsoPlayer player, java.lang.String module, java.lang.String command, KahluaTable args) -
getPlayers
public static java.util.ArrayList getPlayers() -
getPlayerCount
public static int getPlayerCount() -
sendAmbient
public static void sendAmbient(java.lang.String name, int x, int y, int radius, float volume) -
toggleSafety
-
updateOverlayForClients
public static void updateOverlayForClients(IsoObject object, java.lang.String spriteName, float r, float g, float b, float a, UdpConnection playerConnection) -
sendReanimatedZombieID
-
RemoveSpecialObjectFromSquare
-
sendSafehouse
-
receiveRadioDeviceDataState
-
sendIsoWaveSignal
public static void sendIsoWaveSignal(int sourceX, int sourceY, int channel, java.lang.String msg, java.lang.String codes, float r, float g, float b, int signalStrength, boolean isTV) -
receiveWaveSignal
public static void receiveWaveSignal(java.nio.ByteBuffer bb) -
receivePlayerListensChannel
public static void receivePlayerListensChannel(java.nio.ByteBuffer bb) -
getPoisonousBerry
public java.lang.String getPoisonousBerry() -
setPoisonousBerry
public void setPoisonousBerry(java.lang.String poisonousBerry) -
getPoisonousMushroom
public java.lang.String getPoisonousMushroom() -
setPoisonousMushroom
public void setPoisonousMushroom(java.lang.String poisonousMushroom) -
getDifficulty
public java.lang.String getDifficulty() -
setDifficulty
public void setDifficulty(java.lang.String difficulty) -
sendAlarm
public static void sendAlarm(int x, int y) -
isSpawnBuilding
-
sendFuranceChange
-
sendAdminMessage
public static void sendAdminMessage(java.lang.String message, int x, int y, int z) -
sendItemListNet
public static boolean sendItemListNet(UdpConnection ignore, IsoPlayer sender, java.util.ArrayList items, IsoPlayer receiver, java.lang.String sessionID, java.lang.String custom)
-