mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-27 23:07:41 +01:00
Compare commits
5 Commits
miss-effec
...
fix-releas
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8399ae60ee | ||
|
|
1b643f4aa1 | ||
|
|
4293095e8e | ||
|
|
5f2927e00c | ||
|
|
79eddde155 |
97
.github/workflows/release.yml
vendored
97
.github/workflows/release.yml
vendored
@@ -2,55 +2,68 @@ name: Release Build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [created]
|
types: [ created ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: windows-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Get Version
|
- name: Get Version
|
||||||
id: get_version
|
id: get_version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Reading version from file:"
|
echo "Reading version from file:"
|
||||||
cat res/ATCS_latest
|
cat res/ATCS_latest
|
||||||
echo ""
|
echo ""
|
||||||
VERSION=$(tr -d '[:space:]' < "res/ATCS_latest")
|
VERSION=$(tr -d '[:space:]' < "res/ATCS_latest")
|
||||||
echo "Processed version: $VERSION"
|
echo "Processed version: $VERSION"
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
echo "Environment variable set to: $VERSION"
|
echo "Environment variable set to: $VERSION"
|
||||||
|
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
|
|
||||||
- name: Build JAR
|
- name: Build JAR
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd packaging
|
cd packaging
|
||||||
chmod +x package.sh
|
chmod +x package.sh
|
||||||
echo "Building JAR and ZIP for version: ${{ env.VERSION }}"
|
echo "Building JAR and ZIP for version: ${{ env.VERSION }}"
|
||||||
./package.sh -windows
|
./package.sh
|
||||||
echo "Created artifacts:"
|
echo "Created artifacts:"
|
||||||
ls -la common/ATCS.jar
|
ls -la common/ATCS.jar
|
||||||
ls -la ATCS_${{ env.VERSION }}.zip
|
ls -la ATCS_${{ env.VERSION }}.zip
|
||||||
|
|
||||||
- name: Install NSIS
|
- name: Upload Release Assets (zip)
|
||||||
uses: joncloud/makensis-action@v4
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
env:
|
||||||
script-file: packaging/Windows/ATCS_Installer.nsi
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
arguments: /DVERSION="${{ env.VERSION }}"
|
with:
|
||||||
|
files: |
|
||||||
|
./packaging/ATCS_${{ env.VERSION }}.zip
|
||||||
|
|
||||||
- name: Upload Release Assets
|
- name: 'Install makensis (apt)'
|
||||||
uses: softprops/action-gh-release@v1
|
run: sudo apt update && sudo apt install -y nsis nsis-pluginapi
|
||||||
env:
|
continue-on-error: true
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
- name: Create Windows-Installer with NSIS
|
||||||
files: |
|
uses: joncloud/makensis-action@v4
|
||||||
./packaging/ATCS_${{ env.VERSION }}.zip
|
with:
|
||||||
./packaging/ATCS_${{ env.VERSION }}_Setup.exe
|
script-file: packaging/Windows/ATCS_Installer.nsi
|
||||||
|
arguments: -DVERSION="${{ env.VERSION }}"
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Upload Release Assets (exe)
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
files: ./packaging/ATCS_${{ env.VERSION }}_Setup.exe
|
||||||
|
continue-on-error: true
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
v0.6.24
|
v0.6.23
|
||||||
@@ -38,7 +38,6 @@ public class NPC extends JSONElement {
|
|||||||
public Integer attack_damage_min = null;
|
public Integer attack_damage_min = null;
|
||||||
public String spawngroup_id = null;
|
public String spawngroup_id = null;
|
||||||
public String faction_id = null;
|
public String faction_id = null;
|
||||||
public Integer spriteFlipChance = null;
|
|
||||||
public String dialogue_id = null;
|
public String dialogue_id = null;
|
||||||
public String droplist_id = null;
|
public String droplist_id = null;
|
||||||
public Integer attack_cost = null;
|
public Integer attack_cost = null;
|
||||||
@@ -156,7 +155,6 @@ public class NPC extends JSONElement {
|
|||||||
}
|
}
|
||||||
this.spawngroup_id = (String) npcJson.get("spawnGroup");
|
this.spawngroup_id = (String) npcJson.get("spawnGroup");
|
||||||
this.faction_id = (String) npcJson.get("faction");
|
this.faction_id = (String) npcJson.get("faction");
|
||||||
this.spriteFlipChance = JSONElement.getInteger((Number) npcJson.get("spriteFlipChance"));
|
|
||||||
this.dialogue_id = (String) npcJson.get("phraseID");
|
this.dialogue_id = (String) npcJson.get("phraseID");
|
||||||
this.droplist_id = (String) npcJson.get("droplistID");
|
this.droplist_id = (String) npcJson.get("droplistID");
|
||||||
this.attack_cost = JSONElement.getInteger((Number) npcJson.get("attackCost"));
|
this.attack_cost = JSONElement.getInteger((Number) npcJson.get("attackCost"));
|
||||||
@@ -246,7 +244,6 @@ public class NPC extends JSONElement {
|
|||||||
}
|
}
|
||||||
clone.droplist_id = this.droplist_id;
|
clone.droplist_id = this.droplist_id;
|
||||||
clone.faction_id = this.faction_id;
|
clone.faction_id = this.faction_id;
|
||||||
clone.spriteFlipChance = this.spriteFlipChance;
|
|
||||||
if (this.hit_effect != null) {
|
if (this.hit_effect != null) {
|
||||||
clone.hit_effect = new HitEffect();
|
clone.hit_effect = new HitEffect();
|
||||||
copyHitEffectValues(clone.hit_effect, this.hit_effect, clone);
|
copyHitEffectValues(clone.hit_effect, this.hit_effect, clone);
|
||||||
@@ -305,7 +302,6 @@ public class NPC extends JSONElement {
|
|||||||
writeMinMaxToMap(npcJson, "attackDamage", this.attack_damage_min, attack_damage_max, 0);
|
writeMinMaxToMap(npcJson, "attackDamage", this.attack_damage_min, attack_damage_max, 0);
|
||||||
if (this.spawngroup_id != null) npcJson.put("spawnGroup", this.spawngroup_id);
|
if (this.spawngroup_id != null) npcJson.put("spawnGroup", this.spawngroup_id);
|
||||||
if (this.faction_id != null) npcJson.put("faction", this.faction_id);
|
if (this.faction_id != null) npcJson.put("faction", this.faction_id);
|
||||||
if (this.spriteFlipChance != null) npcJson.put("spriteFlipChance", this.spriteFlipChance);
|
|
||||||
if (this.dialogue != null) {
|
if (this.dialogue != null) {
|
||||||
npcJson.put("phraseID", this.dialogue.id);
|
npcJson.put("phraseID", this.dialogue.id);
|
||||||
} else if (this.dialogue_id != null) {
|
} else if (this.dialogue_id != null) {
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ public class NPCEditor extends JSONElementEditor {
|
|||||||
private JTextField nameField;
|
private JTextField nameField;
|
||||||
private JTextField spawnGroupField;
|
private JTextField spawnGroupField;
|
||||||
private JTextField factionField;
|
private JTextField factionField;
|
||||||
private JSpinner spriteFlipChanceField;
|
|
||||||
private JSpinner experienceField;
|
private JSpinner experienceField;
|
||||||
private MyComboBox dialogueBox;
|
private MyComboBox dialogueBox;
|
||||||
private MyComboBox droplistBox;
|
private MyComboBox droplistBox;
|
||||||
@@ -129,7 +128,6 @@ public class NPCEditor extends JSONElementEditor {
|
|||||||
nameField = addTranslatableTextField(pane, "Display name: ", npc.name, npc.writable, listener);
|
nameField = addTranslatableTextField(pane, "Display name: ", npc.name, npc.writable, listener);
|
||||||
spawnGroupField = addTextField(pane, "Spawn group ID: ", npc.spawngroup_id, npc.writable, listener);
|
spawnGroupField = addTextField(pane, "Spawn group ID: ", npc.spawngroup_id, npc.writable, listener);
|
||||||
factionField = addTextField(pane, "Faction ID: ", npc.faction_id, npc.writable, listener);
|
factionField = addTextField(pane, "Faction ID: ", npc.faction_id, npc.writable, listener);
|
||||||
spriteFlipChanceField = addIntegerField(pane, "Icon Flip Chance: ", npc.spriteFlipChance, false, npc.writable, listener);
|
|
||||||
experienceField = addIntegerField(pane, "Experience reward: ", npc.getMonsterExperience(), false, false, listener);
|
experienceField = addIntegerField(pane, "Experience reward: ", npc.getMonsterExperience(), false, false, listener);
|
||||||
dialogueBox = addDialogueBox(pane, npc.getProject(), "Initial phrase: ", npc.dialogue, npc.writable, listener);
|
dialogueBox = addDialogueBox(pane, npc.getProject(), "Initial phrase: ", npc.dialogue, npc.writable, listener);
|
||||||
droplistBox = addDroplistBox(pane, npc.getProject(), "Droplist / Shop inventory: ", npc.droplist, npc.writable, listener);
|
droplistBox = addDroplistBox(pane, npc.getProject(), "Droplist / Shop inventory: ", npc.droplist, npc.writable, listener);
|
||||||
@@ -207,8 +205,6 @@ public class NPCEditor extends JSONElementEditor {
|
|||||||
npc.spawngroup_id = (String) value;
|
npc.spawngroup_id = (String) value;
|
||||||
} else if (source == factionField) {
|
} else if (source == factionField) {
|
||||||
npc.faction_id = (String) value;
|
npc.faction_id = (String) value;
|
||||||
} else if (source == spriteFlipChanceField) {
|
|
||||||
npc.spriteFlipChance = (Integer) value;
|
|
||||||
} else if (source == dialogueBox) {
|
} else if (source == dialogueBox) {
|
||||||
if (npc.dialogue != null) {
|
if (npc.dialogue != null) {
|
||||||
npc.dialogue.removeBacklink(npc);
|
npc.dialogue.removeBacklink(npc);
|
||||||
|
|||||||
Reference in New Issue
Block a user