remove server monitor surprise
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package core.game.system;
|
package core.game.system;
|
||||||
|
|
||||||
import core.game.system.security.EncryptionManager;
|
import core.game.system.security.EncryptionManager;
|
||||||
import gui.ServerMonitor;
|
|
||||||
import rs09.game.world.GameWorld;
|
import rs09.game.world.GameWorld;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import core.gui.ConsoleFrame
|
|||||||
import core.net.NioReactor
|
import core.net.NioReactor
|
||||||
import core.net.amsc.WorldCommunicator
|
import core.net.amsc.WorldCommunicator
|
||||||
import core.tools.TimeStamp
|
import core.tools.TimeStamp
|
||||||
import gui.ServerMonitor
|
|
||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package rs09.game.system
|
|||||||
import com.github.ajalt.mordant.rendering.TextColors
|
import com.github.ajalt.mordant.rendering.TextColors
|
||||||
import com.github.ajalt.mordant.terminal.Terminal
|
import com.github.ajalt.mordant.terminal.Terminal
|
||||||
import gui.GuiEvent
|
import gui.GuiEvent
|
||||||
import gui.ServerMonitor
|
|
||||||
import rs09.ServerConstants
|
import rs09.ServerConstants
|
||||||
import java.io.*
|
import java.io.*
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
@@ -47,7 +46,6 @@ object SystemLogger {
|
|||||||
val msg = "${getTime()}: [INFO] $m"
|
val msg = "${getTime()}: [INFO] $m"
|
||||||
if(m.isNotBlank()) {
|
if(m.isNotBlank()) {
|
||||||
t.println(msg)
|
t.println(msg)
|
||||||
ServerMonitor.eventQueue.add(GuiEvent.AddDefaultMessage(msg))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -57,7 +55,6 @@ object SystemLogger {
|
|||||||
val msg = "${getTime()}: [ ERR] $message"
|
val msg = "${getTime()}: [ ERR] $message"
|
||||||
if(message.isNotBlank()) {
|
if(message.isNotBlank()) {
|
||||||
t.println(msg)
|
t.println(msg)
|
||||||
ServerMonitor.eventQueue.add(GuiEvent.AddDebugMessage(msg))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +63,6 @@ object SystemLogger {
|
|||||||
val msg = "${getTime()}: [WARN] $message"
|
val msg = "${getTime()}: [WARN] $message"
|
||||||
if(message.isNotBlank()) {
|
if(message.isNotBlank()) {
|
||||||
t.println(msg)
|
t.println(msg)
|
||||||
ServerMonitor.eventQueue.add(GuiEvent.AddDebugMessage(msg))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +71,6 @@ object SystemLogger {
|
|||||||
val msg = "${getTime()}: [ALRT] $message"
|
val msg = "${getTime()}: [ALRT] $message"
|
||||||
if(message.isNotBlank()) {
|
if(message.isNotBlank()) {
|
||||||
t.println(msg)
|
t.println(msg)
|
||||||
ServerMonitor.eventQueue.add(GuiEvent.AddDebugMessage(msg))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,7 +79,6 @@ object SystemLogger {
|
|||||||
val msg = "${getTime()}: [AIPL] $message"
|
val msg = "${getTime()}: [AIPL] $message"
|
||||||
if(message.isNotBlank()) {
|
if(message.isNotBlank()) {
|
||||||
t.println(msg)
|
t.println(msg)
|
||||||
ServerMonitor.eventQueue.add(GuiEvent.AddAIPMessage(msg))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package rs09.net.packet
|
|||||||
import core.net.packet.OutgoingPacket
|
import core.net.packet.OutgoingPacket
|
||||||
import core.net.packet.out.*
|
import core.net.packet.out.*
|
||||||
import gui.GuiEvent
|
import gui.GuiEvent
|
||||||
import gui.ServerMonitor
|
|
||||||
import rs09.game.system.SystemLogger
|
import rs09.game.system.SystemLogger
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
@@ -30,7 +29,6 @@ object PacketWriteQueue {
|
|||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun flush(){
|
fun flush(){
|
||||||
ServerMonitor.eventQueue.add(GuiEvent.UpdateQueuedPackets(PacketsToWrite.size))
|
|
||||||
while(!PacketsToWrite.isEmpty()){
|
while(!PacketsToWrite.isEmpty()){
|
||||||
val p = PacketsToWrite.poll() ?: continue
|
val p = PacketsToWrite.poll() ?: continue
|
||||||
write(p.out,p.context)
|
write(p.out,p.context)
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import core.game.system.SystemState
|
|||||||
import core.game.system.task.Pulse
|
import core.game.system.task.Pulse
|
||||||
import core.plugin.CorePluginTypes.Managers
|
import core.plugin.CorePluginTypes.Managers
|
||||||
import gui.GuiEvent
|
import gui.GuiEvent
|
||||||
import gui.ServerMonitor
|
|
||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@@ -118,8 +117,6 @@ class MajorUpdateWorker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val end = System.currentTimeMillis()
|
val end = System.currentTimeMillis()
|
||||||
ServerMonitor.eventQueue.add(GuiEvent.UpdateTickTime(end - start))
|
|
||||||
ServerMonitor.eventQueue.add(GuiEvent.UpdatePulseCount(GameWorld.Pulser.TASKS.size))
|
|
||||||
Thread.sleep(max(600 - (end - start), 0))
|
Thread.sleep(max(600 - (end - start), 0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user