Added support for varying log levels configurable in the server config (see log_level in default.conf)

Error logs now properly print to stderr when possible
Colour-coded logs
Addressed a scenario in which outgoing packet writes could get hung up
Fixed interface incorrect definition message on server startup
This commit is contained in:
Ceikry
2023-03-01 08:01:14 +00:00
committed by Ryan
parent e1faa64af7
commit 88a2f354b4
171 changed files with 723 additions and 475 deletions
@@ -1,7 +1,9 @@
package content.global.skill.magic
import core.api.log
import core.game.node.Node
import core.game.node.entity.player.Player
import core.tools.Log
import core.tools.SystemLogger
object SpellListeners {
@@ -18,12 +20,12 @@ object SpellListeners {
}
fun get(spellID: Int, type: Int, book: String): ((Player,Node?) -> Unit)?{
SystemLogger.logInfo(this::class.java, "Getting $book:$spellID:$type")
log(this::class.java, Log.FINE, "Getting $book:$spellID:$type")
return castMap["$book:$spellID:$type"]
}
fun get(spellID: Int, type: Int, id: Int, book: String): ((Player,Node?) -> Unit)?{
SystemLogger.logInfo(this::class.java, "Getting $book:$spellID:$type:$id")
log(this::class.java, Log.FINE, "Getting $book:$spellID:$type:$id")
return castMap["$book:$spellID:$type:$id"]
}
@@ -105,7 +105,7 @@ public final class ChargeOrbSpells extends MagicSpell {
&& objectId == 2151
&& p.getInventory().containsItems(Runes.COSMIC_RUNE.getItem(15), Runes.WATER_RUNE.getItem(150), new Item(UNPOWERED_ORB.getId(), 5))) {
p.setAttribute("/save:diary:seers:water-orb-can-earn", true);
System.out.println("can_earn_true");
p.setAttribute("/save:diary:seers:water-orb", 1);
}
if (!meetsRequirements(entity, true, true)) {