Logs cleanup

This commit is contained in:
simon
2017-11-05 10:20:38 -05:00
parent 41b981f3ab
commit 626c55bcce
21 changed files with 97 additions and 76 deletions

View File

@@ -54,14 +54,14 @@ public class CubotLaser extends CpuHardware {
} else {
//The inventory holder can't provide this item
//todo Add emote here
System.out.println("FAILED: take (The inventory holder can't provide this item)");
System.out.println("DEBUG: FAILED: take (The inventory holder can't provide this item)");
}
}
} else {
//Nothing in front
//todo Add emote here
System.out.println("FAILED: take (Nothing in front)");
System.out.println("DEBUG: FAILED: take (Nothing in front)");
}
}

View File

@@ -3,9 +3,9 @@ package net.simon987.cubotplugin;
import net.simon987.cubotplugin.event.CpuInitialisationListener;
import net.simon987.cubotplugin.event.UserCreationListener;
import net.simon987.server.assembly.CpuHardware;
import net.simon987.server.game.CpuHardwareDeserializer;
import net.simon987.server.game.GameObject;
import net.simon987.server.game.GameObjectDeserializer;
import net.simon987.server.io.CpuHardwareDeserializer;
import net.simon987.server.io.GameObjectDeserializer;
import net.simon987.server.logging.LogManager;
import net.simon987.server.plugin.ServerPlugin;
import org.json.simple.JSONObject;

View File

@@ -98,7 +98,7 @@ public class CubotRadar extends CpuHardware implements JSONSerialisable {
mem[counter] = -1;
}
System.out.println("path to" + destX + "," + destY);
System.out.println("DEBUG: path to" + destX + "," + destY);
break;
case GET_MAP:

View File

@@ -5,6 +5,7 @@ import net.simon987.server.assembly.CPU;
import net.simon987.server.event.CpuInitialisationEvent;
import net.simon987.server.event.GameEvent;
import net.simon987.server.event.GameEventListener;
import net.simon987.server.logging.LogManager;
import net.simon987.server.user.User;
public class CpuInitialisationListener implements GameEventListener {
@@ -15,7 +16,7 @@ public class CpuInitialisationListener implements GameEventListener {
@Override
public void handle(GameEvent event) {
System.out.println("CPU Init");
LogManager.LOGGER.fine("(Plugin) Handled CPU Initialisation event (Cubot Plugin)");
CPU cpu = (CPU)event.getSource();
User user = ((CpuInitialisationEvent)event).getUser();

View File

@@ -5,6 +5,7 @@ import net.simon987.server.GameServer;
import net.simon987.server.event.GameEvent;
import net.simon987.server.event.GameEventListener;
import net.simon987.server.event.UserCreationEvent;
import net.simon987.server.logging.LogManager;
import net.simon987.server.user.User;
import java.awt.*;
@@ -20,6 +21,7 @@ public class UserCreationListener implements GameEventListener {
User user = (User)event.getSource();
LogManager.LOGGER.fine("(Plugin) Handled User creation event (Cubot Plugin)");
Cubot cubot = new Cubot();
@@ -28,6 +30,8 @@ public class UserCreationListener implements GameEventListener {
cubot.setObjectId(GameServer.INSTANCE.getGameUniverse().getNextObjectId());
cubot.setHeldItem(GameServer.INSTANCE.getConfig().getInt("new_user_item"));
cubot.setParent(user);
Point point = cubot.getWorld().getRandomPassableTile();