From 61463eb65f3afbe18cc187bd3eb563ce0e6b907a Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Thu, 20 Oct 2022 19:41:09 +0600 Subject: default values to avoid null pointer exceptions --- .../ilotterytea/maxoning/player/MaxonSavegame.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'core/src') diff --git a/core/src/com/ilotterytea/maxoning/player/MaxonSavegame.java b/core/src/com/ilotterytea/maxoning/player/MaxonSavegame.java index 301840b..63d0051 100644 --- a/core/src/com/ilotterytea/maxoning/player/MaxonSavegame.java +++ b/core/src/com/ilotterytea/maxoning/player/MaxonSavegame.java @@ -10,31 +10,31 @@ import java.util.ArrayList; */ public class MaxonSavegame implements Serializable { /** Earned Squish Points. */ - public int points; + public int points = 0; /** Multiplier. */ - public short multiplier; + public short multiplier = 0; /** Home inventory. */ - public ArrayList inv; + public ArrayList inv = new ArrayList<>(); /** Outside Inventory. */ - public ArrayList outInv; + public ArrayList outInv = new ArrayList<>(); /** Seed. */ - public long seed; + public long seed = System.currentTimeMillis(); /** Player name. */ - public String name; + public String name = System.getProperty("user.name"); /** Pet name. */ - public String petName; + public String petName = "Maxon"; /** Pet ID. */ - public byte petId; + public byte petId = 0; /** Elapsed time from game start. */ - public long elapsedTime; + public long elapsedTime = 0; /** Last timestamp when save game was used. */ - public long lastTimestamp; + public long lastTimestamp = System.currentTimeMillis(); /** Location. */ - public short roomId; + public short roomId = 0; } \ No newline at end of file -- cgit v1.2.3