Compare commits

..

10 Commits

Author SHA1 Message Date
Nut.andor
6ec4cbf83d Merge branch 'pulls/1195352/15'
Miss effect added, add comments to start script
2025-10-03 15:56:10 +02:00
Nut.andor
5b2480920e Version 24 2025-10-03 15:53:37 +02:00
Nut.andor
e6f89b8802 Miss effect 2025-10-03 15:18:15 +02:00
Nut.andor
f2008de3e2 Merge branch 'pulls/1195352/13' 2025-10-03 15:15:35 +02:00
Nut.andor
0df961c8d3 forgotten parameter 2025-10-03 15:12:00 +02:00
Nut.andor
15b98eedcf Added field for Sprite Flip Chance 2025-10-03 14:59:04 +02:00
Nut.andor
c94c5fb41b Pull Request #15: Miss effect 2025-10-02 16:39:45 +02:00
Nut.andor
7df75482eb Pull Request #13: Added field for Sprite Flip Chance 2025-09-08 14:40:23 +02:00
Raphi
f93d865da7 Add spriteFlipChance as attribute in NPC.java 2025-09-04 21:41:27 +02:00
Raphi
bad86eec93 Add Sprite Flip Chance Field to NPCEditor.java 2025-09-04 21:29:04 +02:00
4 changed files with 51 additions and 59 deletions

View File

@@ -2,71 +2,55 @@ name: Release Build
on:
release:
types: [ created ]
workflow_dispatch:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- name: Get Version
id: get_version
shell: bash
run: |
echo "Reading version from file:"
cat res/ATCS_latest
echo ""
VERSION=$(tr -d '[:space:]' < "res/ATCS_latest")
echo "Processed version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Environment variable set to: $VERSION"
- name: Get Version
id: get_version
shell: bash
run: |
echo "Reading version from file:"
cat res/ATCS_latest
echo ""
VERSION=$(tr -d '[:space:]' < "res/ATCS_latest")
echo "Processed version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Environment variable set to: $VERSION"
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
- name: Build JAR
shell: bash
run: |
cd packaging
chmod +x package.sh
echo "Building JAR and ZIP for version: ${{ env.VERSION }}"
./package.sh
echo "Created artifacts:"
ls -la common/ATCS.jar
ls -la ATCS_${{ env.VERSION }}.zip
- name: Build JAR
shell: bash
run: |
cd packaging
chmod +x package.sh
echo "Building JAR and ZIP for version: ${{ env.VERSION }}"
./package.sh -windows
echo "Created artifacts:"
ls -la common/ATCS.jar
ls -la ATCS_${{ env.VERSION }}.zip
- name: 'Install makensis (apt)'
run: sudo apt update && sudo apt install -y nsis nsis-pluginapi
continue-on-error: true
- name: Install NSIS
uses: joncloud/makensis-action@v4
with:
script-file: packaging/Windows/ATCS_Installer.nsi
arguments: /DVERSION="${{ env.VERSION }}"
- name: Create Windows-Installer with NSIS
uses: joncloud/makensis-action@v4
with:
script-file: packaging/Windows/ATCS_Installer.nsi
arguments: -DVERSION="${{ env.VERSION }}"
continue-on-error: true
- name: Determine Upload Files
id: check_files_to_upload
shell: bash
run: |
FILES="./packaging/ATCS_${VERSION}.zip"
if [ -f "./packaging/ATCS_${VERSION}_Setup.exe" ]; then
FILES="$FILES ./packaging/ATCS_${VERSION}_Setup.exe"
else
echo "::error::exe-installer created by NSIS was not found; only ZIP will be uploaded."
fi
echo "files=$FILES" >> $GITHUB_OUTPUT
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ steps.check_files_to_upload.outputs.files }}
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
./packaging/ATCS_${{ env.VERSION }}.zip
./packaging/ATCS_${{ env.VERSION }}_Setup.exe

View File

@@ -1 +1 @@
v0.6.23
v0.6.24

View File

@@ -38,6 +38,7 @@ public class NPC extends JSONElement {
public Integer attack_damage_min = null;
public String spawngroup_id = null;
public String faction_id = null;
public Integer spriteFlipChance = null;
public String dialogue_id = null;
public String droplist_id = null;
public Integer attack_cost = null;
@@ -155,6 +156,7 @@ public class NPC extends JSONElement {
}
this.spawngroup_id = (String) npcJson.get("spawnGroup");
this.faction_id = (String) npcJson.get("faction");
this.spriteFlipChance = JSONElement.getInteger((Number) npcJson.get("spriteFlipChance"));
this.dialogue_id = (String) npcJson.get("phraseID");
this.droplist_id = (String) npcJson.get("droplistID");
this.attack_cost = JSONElement.getInteger((Number) npcJson.get("attackCost"));
@@ -244,6 +246,7 @@ public class NPC extends JSONElement {
}
clone.droplist_id = this.droplist_id;
clone.faction_id = this.faction_id;
clone.spriteFlipChance = this.spriteFlipChance;
if (this.hit_effect != null) {
clone.hit_effect = new HitEffect();
copyHitEffectValues(clone.hit_effect, this.hit_effect, clone);
@@ -302,6 +305,7 @@ public class NPC extends JSONElement {
writeMinMaxToMap(npcJson, "attackDamage", this.attack_damage_min, attack_damage_max, 0);
if (this.spawngroup_id != null) npcJson.put("spawnGroup", this.spawngroup_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) {
npcJson.put("phraseID", this.dialogue.id);
} else if (this.dialogue_id != null) {

View File

@@ -37,6 +37,7 @@ public class NPCEditor extends JSONElementEditor {
private JTextField nameField;
private JTextField spawnGroupField;
private JTextField factionField;
private JSpinner spriteFlipChanceField;
private JSpinner experienceField;
private MyComboBox dialogueBox;
private MyComboBox droplistBox;
@@ -128,6 +129,7 @@ public class NPCEditor extends JSONElementEditor {
nameField = addTranslatableTextField(pane, "Display name: ", npc.name, 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);
spriteFlipChanceField = addIntegerField(pane, "Icon Flip Chance: ", npc.spriteFlipChance, false, npc.writable, listener);
experienceField = addIntegerField(pane, "Experience reward: ", npc.getMonsterExperience(), false, false, 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);
@@ -205,6 +207,8 @@ public class NPCEditor extends JSONElementEditor {
npc.spawngroup_id = (String) value;
} else if (source == factionField) {
npc.faction_id = (String) value;
} else if (source == spriteFlipChanceField) {
npc.spriteFlipChance = (Integer) value;
} else if (source == dialogueBox) {
if (npc.dialogue != null) {
npc.dialogue.removeBacklink(npc);