-
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.
Refactored some, continuing to add functionality
- Loading branch information
1 parent
d8796bb
commit 22c6997
Showing
30 changed files
with
203 additions
and
40 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
17 changes: 17 additions & 0 deletions
17
src/main/java/io/azraein/inkfx/controls/tab/groups/SystemGroupTab.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,17 @@ | ||
package io.azraein.inkfx.controls.tab.groups; | ||
|
||
import io.azraein.inkfx.InkFX; | ||
import io.azraein.inkfx.controls.tab.systemTabs.ActionTab; | ||
import io.azraein.inkfx.controls.tab.systemTabs.LuaTab; | ||
|
||
public class SystemGroupTab extends PaperGroupTab { | ||
|
||
public SystemGroupTab(InkFX inkFX) { | ||
super(inkFX); | ||
setText("System Editors"); | ||
addTab(new ActionTab(inkFX)); | ||
addTab(new LuaTab(inkFX)); | ||
|
||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/io/azraein/inkfx/controls/tab/systemTabs/ActionTab.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,13 @@ | ||
package io.azraein.inkfx.controls.tab.systemTabs; | ||
|
||
import io.azraein.inkfx.InkFX; | ||
import io.azraein.inkfx.controls.tab.PaperEditorTab; | ||
|
||
public class ActionTab extends PaperEditorTab { | ||
|
||
public ActionTab(InkFX inkFX) { | ||
super(inkFX); | ||
setText("Action Editor"); | ||
} | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/io/azraein/inkfx/controls/tab/systemTabs/LuaTab.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,21 @@ | ||
package io.azraein.inkfx.controls.tab.systemTabs; | ||
|
||
import io.azraein.inkfx.InkFX; | ||
import io.azraein.inkfx.controls.tab.PaperEditorTab; | ||
|
||
// TODO: Get basic Lua Syntax Highlighting Started and we can call this finished | ||
/* | ||
* Ultimately it'd be nice to have a few more features than just being | ||
* a glorified text editor, but it'd honestly add a lot of bloat and the | ||
* text editor part itself is already going to be a hassle. | ||
*/ | ||
|
||
|
||
public class LuaTab extends PaperEditorTab { | ||
|
||
public LuaTab(InkFX inkFX) { | ||
super(inkFX); | ||
setText("Lua Editor"); | ||
} | ||
|
||
} |
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
60 changes: 60 additions & 0 deletions
60
src/main/java/io/azraein/paperfx/system/inventory/items/equipment/Equipment.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,60 @@ | ||
package io.azraein.paperfx.system.inventory.items.equipment; | ||
|
||
import java.io.Serializable; | ||
|
||
import org.luaj.vm2.lib.jse.CoerceJavaToLua; | ||
|
||
import io.azraein.paperfx.system.Paper; | ||
import io.azraein.paperfx.system.actors.Actor; | ||
|
||
public class Equipment implements Serializable { | ||
|
||
private static final long serialVersionUID = 6870777223465173466L; | ||
|
||
private String equipmentId; | ||
private String equipmentName; | ||
private String equipmentDescription; | ||
|
||
private String equipmentScript; | ||
|
||
private EquipmentSlot equipmentSlotType; | ||
|
||
public Equipment(String equipmentId, String equipmentName, String equipmentDescription, | ||
EquipmentSlot equipmentSlotType) { | ||
this.equipmentId = equipmentId; | ||
this.equipmentName = equipmentName; | ||
this.equipmentDescription = equipmentDescription; | ||
this.equipmentSlotType = equipmentSlotType; | ||
|
||
equipmentScript = ""; | ||
} | ||
|
||
public void onEquip(Actor actor) { | ||
if (!equipmentScript.isEmpty()) { | ||
Paper.SE.runFunction(equipmentScript, "onEquip", CoerceJavaToLua.coerce(actor.getActorState())); | ||
} | ||
|
||
actor.getActorState().setActorEquipment(this, equipmentSlotType); | ||
} | ||
|
||
public void onUnequip(Actor actor) { | ||
if (!equipmentScript.isEmpty()) { | ||
Paper.SE.runFunction(equipmentScript, "onUnequip", CoerceJavaToLua.coerce(actor.getActorState())); | ||
} | ||
|
||
actor.getActorState().setActorEquipment(null, equipmentSlotType); | ||
} | ||
|
||
public String getEquipmentId() { | ||
return equipmentId; | ||
} | ||
|
||
public String getEquipmentName() { | ||
return equipmentName; | ||
} | ||
|
||
public String getEquipmentDescription() { | ||
return equipmentDescription; | ||
} | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/io/azraein/paperfx/system/inventory/items/equipment/EquipmentSlot.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,7 @@ | ||
package io.azraein.paperfx.system.inventory.items.equipment; | ||
|
||
public enum EquipmentSlot { | ||
|
||
HEAD, NECK, HANDS, CHEST, FEET | ||
|
||
} |
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
2 changes: 1 addition & 1 deletion
2
...raein/paperfx/controls/LocationMover.java → ...in/paperfx/ui/controls/LocationMover.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package io.azraein.paperfx.controls; | ||
package io.azraein.paperfx.ui.controls; | ||
|
||
import org.tinylog.Logger; | ||
|
||
|
8 changes: 4 additions & 4 deletions
8
...zraein/paperfx/controls/LocationView.java → ...ein/paperfx/ui/controls/LocationView.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
2 changes: 1 addition & 1 deletion
2
.../azraein/paperfx/controls/PaperClock.java → ...raein/paperfx/ui/controls/PaperClock.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
4 changes: 2 additions & 2 deletions
4
...aein/paperfx/controls/PlayerControls.java → ...n/paperfx/ui/controls/PlayerControls.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
2 changes: 1 addition & 1 deletion
2
...aperfx/controls/cells/ActionListCell.java → ...rfx/ui/controls/cells/ActionListCell.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
2 changes: 1 addition & 1 deletion
2
...erfx/controls/cells/BuildingListCell.java → ...x/ui/controls/cells/BuildingListCell.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
2 changes: 1 addition & 1 deletion
2
...n/paperfx/controls/cells/NpcListCell.java → ...aperfx/ui/controls/cells/NpcListCell.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
4 changes: 2 additions & 2 deletions
4
...ntrols/cells/PaperPluginMetadataCell.java → ...ntrols/cells/PaperPluginMetadataCell.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
2 changes: 1 addition & 1 deletion
2
...trols/dialog/CharacterCreationDialog.java → ...trols/dialog/CharacterCreationDialog.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
Oops, something went wrong.