mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Disable server monitor for now (note to self: Kotlin objects instantiate no matter what, even if not being called to.)
This commit is contained in:
parent
777e9b7f04
commit
daf050230c
3 changed files with 8 additions and 11 deletions
|
|
@ -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,7 @@ 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))
|
//ServerMonitor.eventQueue.add(GuiEvent.AddDefaultMessage(msg))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -57,7 +56,7 @@ 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))
|
//ServerMonitor.eventQueue.add(GuiEvent.AddDebugMessage(msg))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -66,7 +65,7 @@ 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))
|
//ServerMonitor.eventQueue.add(GuiEvent.AddDebugMessage(msg))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -75,7 +74,7 @@ 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))
|
//ServerMonitor.eventQueue.add(GuiEvent.AddDebugMessage(msg))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -84,7 +83,7 @@ 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))
|
//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,7 @@ object PacketWriteQueue {
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun flush(){
|
fun flush(){
|
||||||
ServerMonitor.eventQueue.add(GuiEvent.UpdateQueuedPackets(PacketsToWrite.size))
|
//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)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import api.*
|
||||||
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.launch
|
import kotlinx.coroutines.launch
|
||||||
import rs09.Server
|
import rs09.Server
|
||||||
|
|
@ -66,8 +65,8 @@ class WorldClock {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val end = System.currentTimeMillis()
|
val end = System.currentTimeMillis()
|
||||||
ServerMonitor.eventQueue.add(GuiEvent.UpdateTickTime(end - start))
|
//ServerMonitor.eventQueue.add(GuiEvent.UpdateTickTime(end - start))
|
||||||
ServerMonitor.eventQueue.add(GuiEvent.UpdatePulseCount(World.Pulser.TASKS.size))
|
//ServerMonitor.eventQueue.add(GuiEvent.UpdatePulseCount(World.Pulser.TASKS.size))
|
||||||
Thread.sleep(max(600 - (end - start), 0))
|
Thread.sleep(max(600 - (end - start), 0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue