-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added entity records to keep track of actor info after death. * Modified max damage.
- Loading branch information
1 parent
f0b7290
commit 0cdf92a
Showing
18 changed files
with
303 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/main/java/dansapps/interakt/exceptions/ActorNotFoundException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package dansapps.interakt.exceptions; | ||
|
||
public class ActorNotFoundException extends Exception { | ||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/dansapps/interakt/exceptions/EntityRecordNotFoundException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package dansapps.interakt.exceptions; | ||
|
||
public class EntityRecordNotFoundException extends Exception { | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/dansapps/interakt/exceptions/NameTakenException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package dansapps.interakt.exceptions; | ||
|
||
public class NameTakenException extends Exception { | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/dansapps/interakt/exceptions/ZeroFriendshipsExistentException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package dansapps.interakt.exceptions; | ||
|
||
public class ZeroFriendshipsExistentException extends Exception { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/dansapps/interakt/factories/EntityRecordFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package dansapps.interakt.factories; | ||
|
||
import dansapps.interakt.data.PersistentData; | ||
import dansapps.interakt.objects.EntityRecord; | ||
import dansapps.interakt.objects.Actor; | ||
|
||
import java.util.Map; | ||
|
||
public class EntityRecordFactory { | ||
private static EntityRecordFactory instance; | ||
|
||
private EntityRecordFactory() { | ||
|
||
} | ||
|
||
public static EntityRecordFactory getInstance() { | ||
if (instance == null) { | ||
instance = new EntityRecordFactory(); | ||
} | ||
return instance; | ||
} | ||
|
||
public void createEntityRecord(Actor actor) { | ||
EntityRecord entityRecord = new EntityRecord(actor.getUUID(), actor.getName()); | ||
PersistentData.getInstance().addEntityRecord(entityRecord); | ||
} | ||
|
||
public void createEntityRecord(Map<String, String> data) { | ||
EntityRecord entityRecord = new EntityRecord(data); | ||
PersistentData.getInstance().addEntityRecord(entityRecord); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.