efd-trading-card-base/deploy.sh
Cal Corum d05ba64700 Implement Phase 2: Core card framework with clone + reflection
- Add ItemExtensions.cs with reflection helpers for private field access
- Add TagHelper.cs for game tag operations and custom TradingCard tag
- Rewrite ModBehaviour.cs with complete item creation pipeline:
  - Clone base game item (ID 135) as template
  - Set properties via reflection (typeID, weight, value, quality)
  - Load PNG sprites from CardSets/*/images/
  - Register items with ItemAssetsCollection
  - Proper cleanup on mod unload
- Add F9 debug key to spawn cards for testing
- Add deploy.sh and remove.sh scripts for quick mod installation
- Add placeholder card images for ExampleSet
- Add Unity module references (ImageConversion, InputLegacy)

Cards now appear in-game with custom icons and can be spawned to inventory.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 16:56:04 -06:00

62 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# Deploy Trading Card Mod to Escape from Duckov
# Usage: ./deploy.sh [--release]
set -e
# Configuration
GAME_PATH="/mnt/NV2/SteamLibrary/steamapps/common/Escape from Duckov"
MOD_NAME="TradingCardMod"
MOD_DIR="$GAME_PATH/Duckov_Data/Mods/$MOD_NAME"
# Build configuration
BUILD_CONFIG="Debug"
if [[ "$1" == "--release" ]]; then
BUILD_CONFIG="Release"
fi
echo "=== Trading Card Mod Deployment ==="
echo "Build config: $BUILD_CONFIG"
echo "Target: $MOD_DIR"
echo ""
# Build the project
echo "[1/4] Building project..."
dotnet build TradingCardMod.csproj -c "$BUILD_CONFIG" --verbosity quiet
if [[ $? -ne 0 ]]; then
echo "ERROR: Build failed!"
exit 1
fi
echo " Build successful"
# Create mod directory if it doesn't exist
echo "[2/4] Creating mod directory..."
mkdir -p "$MOD_DIR"
mkdir -p "$MOD_DIR/CardSets"
# Copy mod files
echo "[3/4] Copying mod files..."
cp "bin/$BUILD_CONFIG/netstandard2.1/$MOD_NAME.dll" "$MOD_DIR/"
cp "info.ini" "$MOD_DIR/"
# Copy preview if it exists
if [[ -f "preview.png" ]]; then
cp "preview.png" "$MOD_DIR/"
fi
# Copy card sets
echo "[4/4] Copying card sets..."
if [[ -d "CardSets" ]]; then
cp -r CardSets/* "$MOD_DIR/CardSets/" 2>/dev/null || true
fi
echo ""
echo "=== Deployment Complete ==="
echo "Mod installed to: $MOD_DIR"
echo ""
echo "Contents:"
ls -la "$MOD_DIR/"
echo ""
echo "Card sets:"
ls -la "$MOD_DIR/CardSets/" 2>/dev/null || echo " (none)"