summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2022-10-20 19:41:09 +0600
committerilotterytea <iltsu@alright.party>2022-10-20 19:41:09 +0600
commit61463eb65f3afbe18cc187bd3eb563ce0e6b907a (patch)
tree2410de6469e6d228e9b567719d1efc9de550fd4a
parentbc0899bf28a9d5307acf84a4606134da0b83580f (diff)
default values to avoid null pointer exceptions
-rw-r--r--core/src/com/ilotterytea/maxoning/player/MaxonSavegame.java22
1 files changed, 11 insertions, 11 deletions
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<Integer> inv;
+ public ArrayList<Integer> inv = new ArrayList<>();
/** Outside Inventory. */
- public ArrayList<Integer> outInv;
+ public ArrayList<Integer> 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