Skip to content

Commit

Permalink
Merge branch 'add-players' of https://github.com/PieterVdc/Unearth in…
Browse files Browse the repository at this point in the history
…to add-players
  • Loading branch information
PieterVdc committed Apr 26, 2024
2 parents 3dcfb8a + fcc5ecc commit fcbd311
Show file tree
Hide file tree
Showing 110 changed files with 2,848 additions and 2,085 deletions.
49 changes: 28 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- '*'
workflow_dispatch:

jobs:
build_application:
Expand All @@ -27,11 +28,9 @@ jobs:
FULL_VERSION="$MAJOR_MINOR.$PATCH"
echo "FULL_VERSION=$FULL_VERSION" >> $GITHUB_OUTPUT
echo "PATCH=$PATCH" >> $GITHUB_ENV
- name: Update Version in Godot Script
run: |
sed -i "s/var patch = .*/var patch = \"$PATCH\"/" Autoload/Version.gd
- name: Setup Godot and Export Templates
run: |
wget -q https://downloads.tuxfamily.org/godotengine/3.5.3/Godot_v3.5.3-stable_linux_headless.64.zip
Expand All @@ -41,12 +40,10 @@ jobs:
mkdir -p ~/.local/share/godot/templates/3.5.3.stable/
mv templates/* ~/.local/share/godot/templates/3.5.3.stable/
chmod +x Godot_v3.5.3-stable_linux_headless.64
- name: Prepare Directories
run: |
rm -rf ./bin
mkdir -p ./bin/ExportLinux/Unearth ./bin/ExportWindows/Unearth
- name: Export Godot Game (Linux)
run: ./Godot_v3.5.3-stable_linux_headless.64 --export "Linux/X11" ./bin/ExportLinux/Unearth/Unearth.x86_64

Expand All @@ -57,43 +54,54 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y wine64
- name: Download rcedit
run: |
wget https://github.com/electron/rcedit/releases/download/v2.0.0/rcedit-x64.exe -O rcedit.exe
- name: Replace Icon in Windows Export with rcedit
run: |
wine64 rcedit.exe ./bin/ExportWindows/Unearth/Unearth.exe --set-icon Art/UnearthIcon.ico
- name: Upload Linux Artifacts
uses: actions/upload-artifact@v3
with:
name: unearth-${{ steps.version_info.outputs.FULL_VERSION }}-linux
path: ./bin/ExportLinux/
path: ./bin/ExportLinux/Unearth/

- name: Upload Windows Artifacts
uses: actions/upload-artifact@v3
with:
name: unearth-${{ steps.version_info.outputs.FULL_VERSION }}-windows
path: ./bin/ExportWindows/
path: ./bin/ExportWindows/Unearth/

############# Release with workflow_dispatch #############
- name: Install Butler
if: startsWith(github.ref, 'refs/tags/')
run: |
curl -L -o butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default
unzip -o butler.zip
chmod +x butler
./butler -V
- name: Zip Linux Build for Release
if: github.event_name == 'workflow_dispatch'
if: startsWith(github.ref, 'refs/tags/')
run: |
cd ./bin/ExportLinux/
zip -r ../Unearth-${{ steps.version_info.outputs.FULL_VERSION }}-linux.zip ./
zip -r ../unearth-${{ steps.version_info.outputs.FULL_VERSION }}-linux.zip Unearth/
- name: Zip Windows Build for Release
if: github.event_name == 'workflow_dispatch'
if: startsWith(github.ref, 'refs/tags/')
run: |
cd ./bin/ExportWindows/
zip -r ../Unearth-${{ steps.version_info.outputs.FULL_VERSION }}-windows.zip ./
zip -r ../unearth-${{ steps.version_info.outputs.FULL_VERSION }}-windows.zip Unearth/
- name: Upload to itch.io
if: startsWith(github.ref, 'refs/tags/')
env:
BUTLER_API_KEY: ${{ secrets.ITCHIO_API_KEY }}
run: |
./butler push ./bin/unearth-${{ steps.version_info.outputs.FULL_VERSION }}-linux.zip rainlizard/unearth:linux --userversion ${{ steps.version_info.outputs.FULL_VERSION }}
./butler push ./bin/unearth-${{ steps.version_info.outputs.FULL_VERSION }}-windows.zip rainlizard/unearth:windows --userversion ${{ steps.version_info.outputs.FULL_VERSION }}
- name: Create Release
if: github.event_name == 'workflow_dispatch'
if: startsWith(github.ref, 'refs/tags/')
id: create_release
uses: actions/create-release@v1
env:
Expand All @@ -105,24 +113,23 @@ jobs:
prerelease: false

- name: Upload Zipped Linux Artifact to Release
if: github.event_name == 'workflow_dispatch'
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/Unearth-${{ steps.version_info.outputs.FULL_VERSION }}-linux.zip
asset_path: ./bin/unearth-${{ steps.version_info.outputs.FULL_VERSION }}-linux.zip
asset_name: unearth-${{ steps.version_info.outputs.FULL_VERSION }}-linux.zip
asset_content_type: application/zip

- name: Upload Zipped Windows Artifact to Release
if: github.event_name == 'workflow_dispatch'
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/Unearth-${{ steps.version_info.outputs.FULL_VERSION }}-windows.zip
asset_path: ./bin/unearth-${{ steps.version_info.outputs.FULL_VERSION }}-windows.zip
asset_name: unearth-${{ steps.version_info.outputs.FULL_VERSION }}-windows.zip
asset_content_type: application/zip

3 changes: 2 additions & 1 deletion Autoload/Columnset.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
extends 'res://Class/ClmClass.gd'
onready var oGame = Nodelist.list["oGame"]
onready var oBuffers = Nodelist.list["oBuffers"]

var utilized = []
var orientation = []
Expand Down Expand Up @@ -39,7 +40,7 @@ func load_default_columnset():

func load_default_original_columnset():
var filePath = oGame.get_precise_filepath(oGame.DK_DATA_DIRECTORY, "SLABS.CLM")
var buffer = Filetypes.file_path_to_buffer(filePath)
var buffer = oBuffers.file_path_to_buffer(filePath)

buffer.seek(0)
var numberOfClmEntries = buffer.get_u16()
Expand Down
2 changes: 1 addition & 1 deletion Autoload/Cube.gd
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func _notification(what: int):
read_cubes_cfg()
# Refresh the display of anything that handles cubes

oOverheadGraphics.update_map_overhead_2d_textures()
oOverheadGraphics.update_full_overhead_map(oOverheadGraphics.SINGLE_THREADED)
oPickSlabWindow.add_slabs()
oColumnEditor._on_ColumnEditor_visibility_changed()
oSlabsetWindow._on_SlabsetWindow_visibility_changed()
Expand Down
121 changes: 0 additions & 121 deletions Autoload/Filetypes.gd

This file was deleted.

10 changes: 5 additions & 5 deletions Autoload/Settings.gd
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ var listOfSettings = [
"smooth_pan_enabled",
"smoothing_rate",
"graphics_ownership_alpha",
"symmetry_guidelines",
"display_fps",
"mouse_sensitivity",
"fov",
Expand All @@ -54,7 +55,6 @@ var listOfSettings = [
"details_viewer_window_position",
"slab_style_window_size",
"slab_style_window_position",
"hide_unknown_data",
"ownable_natural_terrain",
"editable_borders",
"bridges_only_on_liquid",
Expand Down Expand Up @@ -215,6 +215,10 @@ func game_setting(doWhat,string,value):
var oOverheadOwnership = $'../Main/Game2D/OverheadOwnership'
if doWhat == SET: oOverheadOwnership.OWNERSHIP_ALPHA = value
if doWhat == GET: return oOverheadOwnership.OWNERSHIP_ALPHA
"symmetry_guidelines":
var oGuidelines = $'../Main/Game2D/Guidelines'
if doWhat == SET: oGuidelines.LINE_ALPHA = value
if doWhat == GET: return oGuidelines.LINE_ALPHA
"display_fps":
var oFPScounter = $'../Main/Ui/UiMessages/FPScounter'
if doWhat == SET: oFPScounter.visible = value
Expand Down Expand Up @@ -308,10 +312,6 @@ func game_setting(doWhat,string,value):
# var oPropertiesWindow = $'../Main/Ui/UiTools/PropertiesWindow'
# if doWhat == SET: oPropertiesWindow.display_details = value
# if doWhat == GET: return oPropertiesWindow.display_details
"hide_unknown_data":
var oThingDetails = $'../Main/Ui/UiTools/PropertiesWindow/VBoxContainer/PropertiesTabs/ThingDetails'
if doWhat == SET: oThingDetails.HIDE_UNKNOWN_DATA = value
if doWhat == GET: return oThingDetails.HIDE_UNKNOWN_DATA
"ownable_natural_terrain":
var oOwnableNaturalTerrain = $'../Main/Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer/VBoxContainer/OwnableNaturalTerrain'
if doWhat == SET: oOwnableNaturalTerrain.pressed = value
Expand Down
5 changes: 3 additions & 2 deletions Autoload/Slabset.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
extends Node
onready var oGame = Nodelist.list["oGame"]
onready var oMessage = Nodelist.list["oMessage"]
onready var oBuffers = Nodelist.list["oBuffers"]

var tng = []
var dat = []
Expand Down Expand Up @@ -57,8 +58,8 @@ func load_default_slabset():

func load_default_original_slabset():

var dat_buffer = Filetypes.file_path_to_buffer(oGame.get_precise_filepath(oGame.DK_DATA_DIRECTORY, "SLABS.DAT"))
var tng_buffer = Filetypes.file_path_to_buffer(oGame.get_precise_filepath(oGame.DK_DATA_DIRECTORY, "SLABS.TNG"))
var dat_buffer = oBuffers.file_path_to_buffer(oGame.get_precise_filepath(oGame.DK_DATA_DIRECTORY, "SLABS.DAT"))
var tng_buffer = oBuffers.file_path_to_buffer(oGame.get_precise_filepath(oGame.DK_DATA_DIRECTORY, "SLABS.TNG"))

var object_info = create_object_list(tng_buffer)
if object_info.size() == 0:
Expand Down
21 changes: 13 additions & 8 deletions Autoload/Things.gd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ enum TYPE {
EXTRA = 696969
}


var data_structure_name = {
TYPE.NONE: "Empty",
TYPE.OBJECT: "Object",
Expand All @@ -41,6 +40,7 @@ var data_structure_name = {
TYPE.CAVEIN: "CaveIn",
TYPE.EXTRA: "Extra"
}

var reverse_data_structure_name = {
"Empty": TYPE.NONE,
"Object":TYPE.OBJECT,
Expand All @@ -59,8 +59,6 @@ var reverse_data_structure_name = {
"Extra":TYPE.EXTRA,
}



enum {
NAME = 0
KEEPERFX_NAME = 1
Expand Down Expand Up @@ -249,11 +247,11 @@ var DATA_OBJECT = {
049 : ["Hero Gate", null,null, preload("res://dk_images/crucials/anim0780/AnimHeroGate.tres"), null, TAB_ACTION],
050 : ["Spinning Key 2", null,null, preload("res://dk_images/traps_doors/anim0811/AnimSpinningKey.tres"), null, TAB_MISC],
051 : ["Armour Effect", null,null, null, null, TAB_MISC],
052 : ["Treasury Gold 1 (800)", null,null, preload("res://dk_images/valuables/gold_hoard2_tp/AnimGoldHoard2.tres"), null, TAB_GOLD],
053 : ["Treasury Gold 2 (1200)", null,null, preload("res://dk_images/valuables/gold_hoard3_tp/AnimGoldHoard3.tres"), null, TAB_GOLD],
054 : ["Treasury Gold 3 (1600)", null,null, preload("res://dk_images/valuables/gold_hoard4_tp/AnimGoldHoard4.tres"), null, TAB_GOLD],
055 : ["Treasury Gold 4 (2000)", null,null, preload("res://dk_images/valuables/gold_hoard5_tp/AnimGoldHoard5.tres"), null, TAB_GOLD],
056 : ["Treasury Gold 5 (2400)", null,null, preload("res://dk_images/valuables/gold_hoard5_tp/AnimGoldHoard5.tres"), null, TAB_GOLD],
052 : ["Treasury Hoard 1 (400)", null,null, preload("res://dk_images/valuables/gold_hoard1_tp/AnimGoldHoard1.tres"), null, TAB_GOLD],
053 : ["Treasury Hoard 2 (800)", null,null, preload("res://dk_images/valuables/gold_hoard2_tp/AnimGoldHoard2.tres"), null, TAB_GOLD],
054 : ["Treasury Hoard 3 (1200)", null,null, preload("res://dk_images/valuables/gold_hoard3_tp/AnimGoldHoard3.tres"), null, TAB_GOLD],
055 : ["Treasury Hoard 4 (1600)", null,null, preload("res://dk_images/valuables/gold_hoard4_tp/AnimGoldHoard4.tres"), null, TAB_GOLD],
056 : ["Treasury Hoard 5 (2000)", null,null, preload("res://dk_images/valuables/gold_hoard5_tp/AnimGoldHoard5.tres"), null, TAB_GOLD],
057 : ["Lair: Wizard", null,null, preload("res://edited_images/lair/creature_generic/anim0126/AnimLairGeneric.tres"), null, TAB_LAIR],
058 : ["Lair: Barbarian", null,null, preload("res://edited_images/lair/creature_generic/anim0126/AnimLairGeneric.tres"), null, TAB_LAIR],
059 : ["Lair: Archer", null,null, preload("res://edited_images/lair/creature_generic/anim0126/AnimLairGeneric.tres"), null, TAB_LAIR],
Expand Down Expand Up @@ -400,6 +398,13 @@ enum SPELLBOOK {
DESTROY_WALLS = 47
}

var collectible_belonging = {
TAB_GOLD : Slabs.TREASURE_ROOM,
TAB_SPELL : Slabs.LIBRARY,
TAB_SPECIAL : Slabs.LIBRARY,
TAB_BOX : Slabs.WORKSHOP,
}

#OBJECT = 1
#CREATURE = 5
#EFFECT = 7
Expand Down
Loading

0 comments on commit fcbd311

Please sign in to comment.