Skip to content

Commit 28cb677

Browse files
authored
Merge branch 'WaspScripts:main' into main
2 parents 1323d73 + 07d09cd commit 28cb677

File tree

8 files changed

+61
-60
lines changed

8 files changed

+61
-60
lines changed

.github/workflows/hash-files.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
Remove-Item -Path $outputFile -Force
3232
3333
- name: Checkout repository
34-
uses: actions/checkout@v4.2.2
34+
uses: actions/checkout@v5
3535
with:
3636
path: ./wasp-data
3737
fetch-depth: 2
@@ -63,18 +63,14 @@ jobs:
6363
shell: bash
6464
run: |
6565
cd ./wasp-data
66-
find . -type f \
67-
! -path "*/.git/*" \
68-
! -path "./.git/*" \
69-
! -path "./.github/*" \
70-
! -name ".gitignore" \
71-
! -name ".gitattributes" \
72-
! -name "LICENSE" \
73-
! -name "README.md" \
74-
! -name "*.simba" \
75-
! -name "preferences.dat" \
76-
! -name "preferences2.dat" \
77-
| while read file; do
66+
while IFS= read -r file; do
67+
# Skip empty lines
68+
[ -z "$file" ] && continue
69+
# Make sure the file exists
70+
if [ ! -f "$file" ]; then
71+
echo "File not found: $file"
72+
continue
73+
fi
7874
remote_path="${file#./}"
7975
mime_type=$(file --mime-type -b "$file")
8076
echo "→ Uploading $remote_path ($mime_type)"
@@ -83,7 +79,7 @@ jobs:
8379
-H "Content-Type: $mime_type" \
8480
--data-binary @"$file"
8581
echo ""
86-
done
82+
done < ./tools/whitelist.txt
8783
8884
notification:
8985
if: ${{ github.repository_owner == 'WaspScripts' && github.ref == 'refs/heads/main' }}

data/items.zip

-14.4 MB
Binary file not shown.

finders/items/items-imgs.zip

782 KB
Binary file not shown.

hashes.json

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,26 @@
11
{
2-
"data\\items.zip" : "E8AAA65A",
3-
"data\\monsters.txt" : "81455CA5",
4-
"data\\monsters.zip" : "83299037",
5-
"finders\\house_layout.zip" : "D6FF199D",
6-
"finders\\items\\data\\hash.txt" : "565AC9F0",
7-
"finders\\items\\data\\id.txt" : "6F6873B9",
8-
"finders\\items\\data\\item.txt" : "FD7CC2CD",
9-
"finders\\items\\items-imgs.zip" : "C8FCA1E6",
10-
"finders\\items\\items.bin" : "E297819A",
11-
"finders\\items\\items.zip" : "68B9D040",
12-
"finders\\overheads.zip" : "1F4D08DA",
13-
"finders\\prayer.zip" : "0ADB50ED",
14-
"finders\\spells.zip" : "1D959BB3",
15-
"fonts\\fonts.zip" : "AF078AAF",
16-
"images\\equipment.png" : "862F4199",
17-
"images\\gametab.png" : "01E8D551",
18-
"images\\mm_fixed_mask.png" : "A3215DDA",
19-
"images\\mm_resizable_mask.png" : "34785F87",
20-
"jsons\\consumables.json" : "5F2994A1",
21-
"jsons\\gear.json" : "82CE8D4A",
22-
"jsons\\item-definitions.zip" : "F53A2FEB",
23-
"jsons\\monsters" : "E4AC5B2E",
24-
"jsons\\monsters.zip" : "83299037",
25-
"jsons\\weapons.json" : "670C3284",
26-
"map\\collision.zip" : "2A5B3BF7",
27-
"map\\heightmap.zip" : "6E49A0AC",
28-
"map\\map.zip" : "52E4A07B",
29-
"map\\npcs.zip" : "6C6B1FE2",
30-
"map\\npcs_helper.zip" : "B2D4F5EE",
31-
"map\\objects.zip" : "85FEE5AA",
32-
"tools\\preferences\\preferences.dat" : "E848042E",
33-
"tools\\preferences\\preferences2.dat" : "329C0448"
2+
"finders/house_layout.zip" : "D6FF199D",
3+
"finders/items/data/hash.txt" : "565AC9F0",
4+
"finders/items/data/id.txt" : "6F6873B9",
5+
"finders/items/data/item.txt" : "FD7CC2CD",
6+
"finders/items/items.zip" : "68B9D040",
7+
"finders/overheads.zip" : "1F4D08DA",
8+
"finders/prayer.zip" : "0ADB50ED",
9+
"finders/spells.zip" : "1D959BB3",
10+
"fonts/fonts.zip" : "AF078AAF",
11+
"images/equipment.png" : "862F4199",
12+
"images/gametab.png" : "01E8D551",
13+
"images/mm_fixed_mask.png" : "A3215DDA",
14+
"images/mm_resizable_mask.png" : "34785F87",
15+
"jsons/consumables.json" : "5F2994A1",
16+
"jsons/gear.json" : "82CE8D4A",
17+
"jsons/item-definitions.zip" : "F53A2FEB",
18+
"jsons/monsters" : "E4AC5B2E",
19+
"jsons/monsters.zip" : "83299037",
20+
"jsons/weapons.json" : "670C3284",
21+
"map/collision.zip" : "2A5B3BF7",
22+
"map/heightmap.zip" : "6E49A0AC",
23+
"map/map.zip" : "52E4A07B",
24+
"map/npcs.zip" : "6C6B1FE2",
25+
"map/objects.zip" : "85FEE5AA"
3426
}
File renamed without changes.
File renamed without changes.

tools/hash-files.simba

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
var
22
path: String = {$macro DIR} + '..' + PATH_SEP;
3-
skip: TStringArray;
43
files: TStringArray;
54
i: Integer;
65
hash: String;
@@ -9,27 +8,17 @@ begin
98
path := PathNormalize(path);
109
WriteLn path;
1110

12-
files := DirList(path, True);
13-
skip := [path + 'LICENSE', path + 'README.md', path + 'hashes.json'];
11+
files := FileReadLines(path + 'tools' + PATH_SEP + 'whitelist.txt');
1412

1513
FileDelete(path + 'hashes.json');
1614

1715
json := new TJSONParser();
1816

1917
for i := 0 to High(files) do
2018
begin
21-
if PathIsDirectory(files[i]) then
22-
Continue;
23-
if files[i].StartsWith(path + '.git') then
24-
Continue;
25-
if files[i].EndsWith('.simba') then
26-
Continue;
27-
if SKIP.Contains(files[i]) then
28-
Continue;
29-
30-
hash := HashFile(EHashAlgo.CRC32, files[i]);
19+
hash := HashFile(EHashAlgo.CRC32, path + files[i]);
3120
WriteLn('File: ', files[i], ' Hash: ', hash);
32-
json.AddString(files[i].After(path), hash);
21+
json.AddString(files[i], hash);
3322
end;
3423

3524
WriteLn json.Format();

tools/whitelist.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
finders/house_layout.zip
2+
finders/items/data/hash.txt
3+
finders/items/data/id.txt
4+
finders/items/data/item.txt
5+
finders/items/items.zip
6+
finders/overheads.zip
7+
finders/prayer.zip
8+
finders/spells.zip
9+
fonts/fonts.zip
10+
images/equipment.png
11+
images/gametab.png
12+
images/mm_fixed_mask.png
13+
images/mm_resizable_mask.png
14+
jsons/consumables.json
15+
jsons/gear.json
16+
jsons/item-definitions.zip
17+
jsons/monsters
18+
jsons/monsters.zip
19+
jsons/weapons.json
20+
map/collision.zip
21+
map/heightmap.zip
22+
map/map.zip
23+
map/npcs.zip
24+
map/objects.zip

0 commit comments

Comments
 (0)