Merge branch 'skyline69:main' into main
This commit is contained in:
113
.github/workflows/check-mod.yml
vendored
113
.github/workflows/check-mod.yml
vendored
@@ -11,44 +11,81 @@ jobs:
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # Get full history for comparing changes
|
||||
|
||||
- name: Install ImageMagick
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y imagemagick
|
||||
|
||||
- name: Check Required Files
|
||||
- name: Identify Changed Mods
|
||||
id: find-changed-mods
|
||||
run: |
|
||||
for dir in mods/*/; do
|
||||
if [ -d "$dir" ]; then
|
||||
MOD_DIR="$(basename "$dir")"
|
||||
# Fetch the base branch of the PR
|
||||
git fetch origin ${{ github.event.pull_request.base.ref }}
|
||||
|
||||
# Find all added or modified files in mods directory
|
||||
git diff --name-only --diff-filter=AM origin/${{ github.event.pull_request.base.ref }}..HEAD | grep -E '^mods/[^/]+/' | cut -d'/' -f1-2 | sort | uniq > changed_mods.txt
|
||||
|
||||
if [ ! -s changed_mods.txt ]; then
|
||||
echo "No mods were added or modified in this PR."
|
||||
echo "changed_mods_found=false" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Changed mods found:"
|
||||
cat changed_mods.txt
|
||||
echo "changed_mods_found=true" >> $GITHUB_OUTPUT
|
||||
|
||||
# Create a comma-separated list for JSON schema validation
|
||||
META_JSON_FILES=""
|
||||
while read -r mod_path; do
|
||||
if [ -f "$mod_path/meta.json" ]; then
|
||||
if [ -z "$META_JSON_FILES" ]; then
|
||||
META_JSON_FILES="$mod_path/meta.json"
|
||||
else
|
||||
META_JSON_FILES="$META_JSON_FILES,$mod_path/meta.json"
|
||||
fi
|
||||
fi
|
||||
done < changed_mods.txt
|
||||
|
||||
echo "meta_json_files=$META_JSON_FILES" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check Required Files
|
||||
if: steps.find-changed-mods.outputs.changed_mods_found == 'true'
|
||||
run: |
|
||||
while read -r mod_path; do
|
||||
if [ -d "$mod_path" ]; then
|
||||
MOD_DIR="$(basename "$mod_path")"
|
||||
|
||||
# Ensure description.md and meta.json exist
|
||||
if [ ! -f "$dir/description.md" ]; then
|
||||
if [ ! -f "$mod_path/description.md" ]; then
|
||||
echo "Error: Missing description.md in $MOD_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$dir/meta.json" ]; then
|
||||
|
||||
if [ ! -f "$mod_path/meta.json" ]; then
|
||||
echo "Error: Missing meta.json in $MOD_DIR"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done < changed_mods.txt
|
||||
|
||||
- name: Check Thumbnail Dimensions
|
||||
if: steps.find-changed-mods.outputs.changed_mods_found == 'true'
|
||||
run: |
|
||||
for dir in mods/*/; do
|
||||
if [ -d "$dir" ]; then
|
||||
MOD_DIR="$(basename "$dir")"
|
||||
THUMBNAIL="$dir/thumbnail.jpg"
|
||||
|
||||
while read -r mod_path; do
|
||||
if [ -d "$mod_path" ]; then
|
||||
MOD_DIR="$(basename "$mod_path")"
|
||||
THUMBNAIL="$mod_path/thumbnail.jpg"
|
||||
|
||||
if [ -f "$THUMBNAIL" ]; then
|
||||
# Extract width and height using ImageMagick
|
||||
DIMENSIONS=$(identify -format "%wx%h" "$THUMBNAIL")
|
||||
WIDTH=$(echo "$DIMENSIONS" | cut -dx -f1)
|
||||
HEIGHT=$(echo "$DIMENSIONS" | cut -dx -f2)
|
||||
|
||||
|
||||
# Check if dimensions exceed 1920x1080
|
||||
if [ "$WIDTH" -gt 1920 ] || [ "$HEIGHT" -gt 1080 ]; then
|
||||
echo "Error: Thumbnail in $MOD_DIR exceeds the recommended size of 1920×1080."
|
||||
@@ -56,27 +93,35 @@ jobs:
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done < changed_mods.txt
|
||||
|
||||
- name: Validate JSON Format
|
||||
uses: github/super-linter@v4
|
||||
env:
|
||||
VALIDATE_JSON: true
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
if: steps.find-changed-mods.outputs.changed_mods_found == 'true'
|
||||
run: |
|
||||
# Use jq to validate each JSON file
|
||||
while read -r mod_path; do
|
||||
if [ -f "$mod_path/meta.json" ]; then
|
||||
if ! jq empty "$mod_path/meta.json" 2>/dev/null; then
|
||||
echo "Error: Invalid JSON format in $mod_path/meta.json"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done < changed_mods.txt
|
||||
|
||||
- name: Validate meta.json Against Schema
|
||||
if: steps.find-changed-mods.outputs.changed_mods_found == 'true'
|
||||
uses: dsanders11/json-schema-validate-action@v1.2.0
|
||||
with:
|
||||
schema: "./schema/meta.schema.json"
|
||||
files: |
|
||||
mods/*/meta.json
|
||||
files: ${{ steps.find-changed-mods.outputs.meta_json_files }}
|
||||
|
||||
- name: Validate Download URLs
|
||||
if: steps.find-changed-mods.outputs.changed_mods_found == 'true'
|
||||
run: |
|
||||
for dir in mods/*/; do
|
||||
if [ -d "$dir" ]; then
|
||||
MOD_DIR="$(basename "$dir")"
|
||||
META_JSON="$dir/meta.json"
|
||||
while read -r mod_path; do
|
||||
if [ -d "$mod_path" ]; then
|
||||
MOD_DIR="$(basename "$mod_path")"
|
||||
META_JSON="$mod_path/meta.json"
|
||||
|
||||
# Check if downloadURL exists and is not empty
|
||||
DOWNLOAD_URL=$(jq -r '.downloadURL // empty' "$META_JSON")
|
||||
@@ -91,14 +136,14 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
done < changed_mods.txt
|
||||
|
||||
review-and-approve:
|
||||
needs: validate # This job will only run after 'validate' completes successfully.
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: mod-review # This is the environment you created earlier.
|
||||
steps:
|
||||
- name: Await Approval from Maintainers
|
||||
run: echo "Waiting for manual approval by maintainers..."
|
||||
needs: validate # This job will only run after 'validate' completes successfully.
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: mod-review # This is the environment you created earlier.
|
||||
steps:
|
||||
- name: Await Approval from Maintainers
|
||||
run: echo "Waiting for manual approval by maintainers..."
|
||||
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
"categories": ["Technical"],
|
||||
"author": "ItsFlowwey",
|
||||
"repo":"https://github.com/GauntletGames-2086/Flower-Pot",
|
||||
"downloadURL": "https://github.com/GauntletGames-2086/Flower-Pot/archive/refs/heads/master.zip"
|
||||
"downloadURL": "https://github.com/GauntletGames-2086/Flower-Pot/archive/refs/heads/master.zip",
|
||||
"folderName": "Flower-Pot"
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
# CardSleeves
|
||||
A Steamodded+lovely Balatro Mod that adds Sleeves.
|
||||
A Balatro Mod that adds Sleeves using Steamodded + lovely.
|
||||
|
||||
Sleeves are run modifiers similar to decks. Any deck and sleeve can be combined.
|
||||
|
||||
CardSleeves adds 15 Sleeves based on the 15 vanilla decks by default, some of which have an unique and different effect when paired with their corresponding deck.
|
||||
CardSleeves adds 15 Sleeves based on the 15 vanilla decks by default, all of which have an unique and different effect when paired with their corresponding deck.
|
||||
|
||||
## Cross-mod content
|
||||
Other mods have the ability to add their own Sleeves!
|
||||
Some of these mods include
|
||||
[Cryptid](https://github.com/MathIsFun0/Cryptid),
|
||||
[Familiar](https://github.com/RattlingSnow353/Familiar),
|
||||
[MoreFluff](https://github.com/notmario/MoreFluff),
|
||||
[SDM_0's Stuff](https://github.com/SDM0/SDM_0-s-Stuff),
|
||||
[Balatro Drafting](https://github.com/spire-winder/Balatro-Draft),
|
||||
and [Pokermon](https://github.com/InertSteak/Pokermon).
|
||||
|
||||
CardSleeves also has support for [Galdur](https://github.com/Eremel/Galdur)'s improved new run menu.
|
||||
@@ -18,23 +18,23 @@ CardSleeves also has support for [Galdur](https://github.com/Eremel/Galdur)'s im
|
||||
## Exact descriptions
|
||||
| Sleeve | Base effect | Unique effect |
|
||||
|------------------|--------------------------------------------------------|------------------------------------------------------------------------|
|
||||
| Red Sleeve | +1 discards | none |
|
||||
| Blue Sleeve | +1 hands | none |
|
||||
| Yellow Sleeve | +$10 | none |
|
||||
| Green Sleeve | +$1 per remaining hand/discard | none |
|
||||
| Black Sleeve | +1 joker slots, -1 hands | +1 joker slots, -1 discards |
|
||||
| Red Sleeve | +1 discard | +1 discard, -1 hand |
|
||||
| Blue Sleeve | +1 hand | +1 hand, -1 discard |
|
||||
| Yellow Sleeve | +$10 | Seed Money Voucher |
|
||||
| Green Sleeve | +$1 per remaining hand/discard | Can go up to -$2 in debt for every hand and discard |
|
||||
| Black Sleeve | +1 joker slot, -1 hand | +1 joker slot, -1 discard |
|
||||
| Magic Sleeve | Crystal Ball Voucher, 2 Fools | Omen Globe Voucher |
|
||||
| Nebula Sleeve | Telescope Voucher, -1 consumable slot | Observatory Voucher |
|
||||
| Ghost Sleeve | Spectral cards appear in shop, Hex card | Spectrals appear more often in shop, Spectral pack size increases by 2 |
|
||||
| Abandoned Sleeve | No Face Cards in starting deck | Face Cards never appear |
|
||||
| Checkered Sleeve | 26 Spades and 26 Hearts in starting deck | Only Spades and Hearts appear |
|
||||
| Zodiac Sleeve | Tarot Merchant, Planet Merchant and Overstock Vouchers | Arcana/Celestial pack size increases by 2 |
|
||||
| Painted Sleeve | +2 hand size, -1 joker slots | none |
|
||||
| Painted Sleeve | +2 hand size, -1 joker slot | +1 card selection limit, -1 joker slot |
|
||||
| Anaglyph Sleeve | Double Tag after each Boss Blind | Double Tag after each Small/Big Blind |
|
||||
| Plasma Sleeve | Balance chips/mult, X2 base Blind size | Balance prices in shop |
|
||||
| Erratic Sleeve | All ranks/suits in starting deck are randomized | Starting Hands/Discards/Dollars/Joker slots are randomized between 3-6 |
|
||||
|
||||
## Credits
|
||||
Big thanks to Sable for the idea and all the art, and the balatro modding community for helping out with the lua code.
|
||||
# Credits
|
||||
Big thanks to Sable for the original idea and the original art, all the cool people who helped translate, and the amazing balatro modding community for helping out with the lua code.
|
||||
|
||||
Any suggestions, improvements or bugs are welcome and can be submitted through Github's Issues, or on the Balatro Discord [Thread](https://discord.com/channels/1116389027176787968/1279246553931976714).
|
||||
|
||||
Reference in New Issue
Block a user