Skip to content

Commit

Permalink
Version 1.9.1
Browse files Browse the repository at this point in the history
There is now a small icon on the bottom right of the main frame of the player that lets you save the current adventure state. View changelog for more.
  • Loading branch information
YanWittmann committed Jan 20, 2021
1 parent 7fd8537 commit 1da79ec
Show file tree
Hide file tree
Showing 27 changed files with 452 additions and 348 deletions.
Binary file modified adventures/Test.adv
Binary file not shown.
3 changes: 2 additions & 1 deletion intellij/create/res/config/main.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ee:false
stylesheet:dark
stylesheet:dark
actionEditorOpenDirectlyInExternalEditor:true
116 changes: 0 additions & 116 deletions intellij/create/res/txt/actioneditor/1918965984_walk.advtemp

This file was deleted.

2 changes: 1 addition & 1 deletion intellij/create/src/GuiActionEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class GuiActionEditor extends JFrame {
private Entity entity;
private int event;
private String eventName;
private boolean isActionEditorOpenDirectlyInExternalEditor = Manager.isActionEditorOpenDirectlyInExternalEditor();
private final boolean isActionEditorOpenDirectlyInExternalEditor = Manager.isActionEditorOpenDirectlyInExternalEditor();

public GuiActionEditor(Entity entity, int event) {
int size_x = 1000;
Expand Down
22 changes: 18 additions & 4 deletions intellij/create/src/GuiHub.java
Original file line number Diff line number Diff line change
Expand Up @@ -490,17 +490,23 @@ public void windowClosing(WindowEvent e) {
new Thread(() -> {
while (true) {
Sleep.seconds(StaticStuff.randomNumber(30, 120));
l_credits.setBounds(20, 845, creditsWidth, 29);

l_credits.setBounds(creditsHoverPosX, creditsHoverPosY, creditsWidth, 29);
l_credits.setForeground(StaticStuff.getRandomSaturatedColorForCreditsHover());

Sleep.milliseconds(StaticStuff.randomNumber(600, 2000));
l_credits.setBounds(20, 848, creditsWidth, 26);

l_credits.setBounds(creditsUpPosX, creditsUpPosY, creditsWidth, 26);
l_credits.setForeground(StaticStuff.getColor("text_color"));

Sleep.milliseconds(StaticStuff.randomNumber(200, 1000));
l_credits.setBounds(20, 845, creditsWidth, 29);

l_credits.setBounds(creditsHoverPosX, creditsHoverPosY, creditsWidth, 29);
l_credits.setForeground(StaticStuff.getRandomSaturatedColorForCreditsHover());

Sleep.milliseconds(StaticStuff.randomNumber(600, 2000));
l_credits.setBounds(20, 848, creditsWidth, 26);

l_credits.setBounds(creditsUpPosX, creditsUpPosY, creditsWidth, 26);
l_credits.setForeground(StaticStuff.getColor("text_color"));
}
}).start();
Expand Down Expand Up @@ -819,6 +825,7 @@ public void generateMenu() {
JMenuItem delete = new JMenuItem("Delete ");

JMenuItem selectStylesheet = new JMenuItem("Set stylesheet ");
JMenuItem toggleActionEditor = new JMenuItem("Toggle open actions directly in editor ");
JMenuItem shortcuts = new JMenuItem("Shortcuts ");
JMenuItem documentation = new JMenuItem("Documentation ");
JMenuItem website = new JMenuItem("Website ");
Expand All @@ -845,6 +852,8 @@ public void generateMenu() {

selectStylesheet.addActionListener(evt -> selectStylesheet());

toggleActionEditor.addActionListener(evt -> toggleActionEditor());

project.addActionListener(evt -> projectSettings());

player.addActionListener(evt -> playerSettings());
Expand All @@ -864,6 +873,7 @@ public void generateMenu() {
menuBar.add(properties);

help.add(selectStylesheet);
help.add(toggleActionEditor);
help.add(shortcuts);
help.add(documentation);
help.add(website);
Expand All @@ -881,6 +891,10 @@ private void selectStylesheet() {
System.exit(0);
}

private void toggleActionEditor() {
manager.toggleActionEditor();
}

private boolean refactorUIDwarningShow = true;
public static final String REFACTOR_UID_WARNING_MESSAGE = "It seems like you try to replace a UID with a string that does not match the pattern of a UID.\n" +
"If you replace a UID with a string that is not a UID, you cannot adress the object any more (meaning that you can't edit or delete the object).\n" +
Expand Down
12 changes: 10 additions & 2 deletions intellij/create/src/Manager.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.util.Arrays;

public class Manager {
public static String pathExtension = "../../", filename = "", version = "1.9";
public static String pathExtension = "../../", filename = "", version = "1.9.1";
public static ArrayList<Location> locations = new ArrayList<>();
public static ArrayList<NPC> npcs = new ArrayList<>();
public static ArrayList<Item> items = new ArrayList<>();
Expand Down Expand Up @@ -920,6 +920,7 @@ private void generateEvents() {
events.get(0).addEvent("audioStart");
events.get(0).addEvent("audioStop");
events.get(0).addEvent("audioEnd");
events.get(0).addEvent("showAvailableCommands");
}

private void generateInventories() {
Expand Down Expand Up @@ -951,7 +952,14 @@ private void generateInventories() {
}

public static boolean isActionEditorOpenDirectlyInExternalEditor() {
return projectSettings.getValue("actionEditorOpenDirectlyInExternalEditor").equals("true");
myself.cfg.refresh();
return myself.cfg.get("actionEditorOpenDirectlyInExternalEditor").equals("true");
//return projectSettings.getValue("actionEditorOpenDirectlyInExternalEditor").equals("true");
}

public static void toggleActionEditor() {
myself.cfg.refresh();
myself.cfg.set("actionEditorOpenDirectlyInExternalEditor", !myself.cfg.get("actionEditorOpenDirectlyInExternalEditor").equals("true") + "");
}

public void setMainCfgSetting(String name, String value) {
Expand Down
1 change: 0 additions & 1 deletion intellij/create/src/ProjectSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ private void addAllRequired() {
addIfNotContain("debugModeForceable", "false");
addIfNotContain("password", "");
addIfNotContain("requirePasswordToPlay", "false");
addIfNotContain("actionEditorOpenDirectlyInExternalEditor", "false");
}

private void addIfNotContain(String option, String value) {
Expand Down
Binary file modified intellij/launcher/files/adventures/Introduction.adv
Binary file not shown.
10 changes: 10 additions & 0 deletions intellij/launcher/files/create/versions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
1.9.1
1.9
1.8.1
1.7
1.6
1.5
1.4
1.2
1.1
1
11 changes: 11 additions & 0 deletions intellij/launcher/files/play/versions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
1.9.1
1.9
1.8.1
1.7
1.6
1.5
1.4
1.3
1.2
1.1
1
1 change: 1 addition & 0 deletions intellij/launcher/files/res/txt/main.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fastsetup:false

0 comments on commit 1da79ec

Please sign in to comment.