Compare commits
26 Commits
3d0b16e862
...
v0.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 3db3075ca9 | |||
| a299f081d5 | |||
| e69a617a96 | |||
| d4b079bc75 | |||
| de1bd7c1b8 | |||
| 683287bfbb | |||
| 9b7f720564 | |||
| 254c8bb67d | |||
| 122eff7b03 | |||
| 5eeefc0e32 | |||
| cf4aa32061 | |||
| 0e1f2e0bd7 | |||
| 6dffd6786b | |||
| cdf30c7f09 | |||
| 4a118a3883 | |||
| 4f57184e78 | |||
| 1ab2a5069c | |||
| 2ef39942cd | |||
| d08f5169f3 | |||
| 0b83656b9d | |||
| 062232a0bc | |||
| 7b0f443426 | |||
| 08202d097f | |||
| 93a71a75b8 | |||
| 0be1ae97ff | |||
| 79a7829a24 |
@@ -8,34 +8,103 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up JDK 21
|
- name: Setup JDK
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: '21'
|
java-version: '17'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
|
|
||||||
- name: Setup Android SDK
|
- name: Setup Android SDK
|
||||||
run: |
|
uses: android-actions/setup-android@v2
|
||||||
mkdir -p $ANDROID_HOME/cmdline-tools
|
|
||||||
cd $ANDROID_HOME/cmdline-tools
|
|
||||||
wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O cmdline-tools.zip
|
|
||||||
unzip -q cmdline-tools.zip
|
|
||||||
mv cmdline-tools latest
|
|
||||||
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null 2>&1
|
|
||||||
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0"
|
|
||||||
|
|
||||||
- name: Build APK
|
- name: Setup Keystore
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.ANDROIDKEYSTOREBASE64 }}" | base64 -d > app/helldivers.keystore
|
||||||
|
env:
|
||||||
|
ANDROIDKEYSTOREPATH: app/helldivers.keystore
|
||||||
|
ANDROIDKEYSTOREPASS: ${{ secrets.ANDROIDKEYSTOREPASS }}
|
||||||
|
ANDROIDKEYALIAS: ${{ secrets.ANDROIDKEYALIAS }}
|
||||||
|
ANDROIDKEYPASS: ${{ secrets.ANDROIDKEYPASS }}
|
||||||
|
|
||||||
|
- name: Build with Gradle
|
||||||
run: |
|
run: |
|
||||||
chmod +x ./gradlew
|
chmod +x ./gradlew
|
||||||
./gradlew assembleRelease --no-daemon -Dorg.gradle.java.home=$JAVA_HOME
|
./gradlew assembleRelease --no-daemon
|
||||||
|
|
||||||
- name: Upload APK
|
- name: Upload APK
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: apk
|
name: apk
|
||||||
path: app/build/outputs/apk/release/*.apk
|
path: app/build/outputs/apk/release/*.apk
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
run: |
|
||||||
|
# Fetch the specific tag from remote
|
||||||
|
git fetch origin tag v0.2.0 --force
|
||||||
|
|
||||||
|
# Get tag name from git
|
||||||
|
TAG_NAME=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
|
||||||
|
|
||||||
|
if [ -z "$TAG_NAME" ]; then
|
||||||
|
TAG_NAME="${GITHUB_REF#refs/tags/}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Quitar la v del tag si existe
|
||||||
|
TAG_NAME_CLEAN="${TAG_NAME#v}"
|
||||||
|
|
||||||
|
APK_FILE=$(ls app/build/outputs/apk/release/*.apk | head -1)
|
||||||
|
|
||||||
|
# Rename APK with version
|
||||||
|
NEW_NAME="Helldivers-app-${TAG_NAME}.apk"
|
||||||
|
cp "$APK_FILE" "$NEW_NAME"
|
||||||
|
|
||||||
|
echo "=== Creating release for tag: $TAG_NAME ==="
|
||||||
|
echo "APK file: $APK_FILE"
|
||||||
|
|
||||||
|
# Use the token from secrets
|
||||||
|
if [ -z "${{ secrets.GITEATOKEN }}" ]; then
|
||||||
|
echo "ERROR: No GITEATOKEN found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create release using Gitea API - Create from existing tag
|
||||||
|
echo "Creating release..."
|
||||||
|
RELEASE_RESP=$(curl -s -X POST "https://git-dangilcal.duckdns.org/api/v1/repos/dangilcal/Helldivers-app-movil/releases" \
|
||||||
|
-H "accept: application/json" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: token ${{ secrets.GITEATOKEN }}" \
|
||||||
|
-d "{
|
||||||
|
\"tag_name\": \"${TAG_NAME}\",
|
||||||
|
\"name\": \"Release ${TAG_NAME_CLEAN}\",
|
||||||
|
\"body\": \"Built from tag ${TAG_NAME}\",
|
||||||
|
\"draft\": false,
|
||||||
|
\"prerelease\": false
|
||||||
|
}")
|
||||||
|
|
||||||
|
echo "Release response: $RELEASE_RESP"
|
||||||
|
|
||||||
|
# Extract release ID
|
||||||
|
RELEASE_ID=$(echo "$RELEASE_RESP" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
|
||||||
|
|
||||||
|
if [ -z "$RELEASE_ID" ]; then
|
||||||
|
echo "ERROR: Could not get release ID"
|
||||||
|
echo "$RELEASE_RESP"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Release ID: $RELEASE_ID"
|
||||||
|
|
||||||
|
# Upload the APK as an asset
|
||||||
|
echo "Uploading APK..."
|
||||||
|
UPLOAD_RESP=$(curl -s -X POST "https://git-dangilcal.duckdns.org/api/v1/repos/dangilcal/Helldivers-app-movil/releases/${RELEASE_ID}/assets" \
|
||||||
|
-H "accept: application/json" \
|
||||||
|
-H "Content-Type: multipart/form-data" \
|
||||||
|
-H "Authorization: token ${{ secrets.GITEATOKEN }}" \
|
||||||
|
-F "attachment=@${NEW_NAME}")
|
||||||
|
|
||||||
|
echo "Upload response: $UPLOAD_RESP"
|
||||||
|
echo "=== Release created successfully ==="
|
||||||
|
|||||||
@@ -9,14 +9,24 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.helldivers.app"
|
applicationId "com.helldivers.app"
|
||||||
minSdk 18
|
minSdk 18
|
||||||
targetSdk 21
|
targetSdk 34
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0.0-LIBERTY"
|
versionName "1.0.0-LIBERTY"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
release {
|
||||||
|
storeFile file(System.getenv("ANDROIDKEYSTOREPATH") ?: "helldivers.keystore")
|
||||||
|
storePassword System.getenv("ANDROIDKEYSTOREPASS") ?: "HelldiversPorLaSuPerTierraYKevinTambien"
|
||||||
|
keyAlias System.getenv("ANDROIDKEYALIAS") ?: "helldivers"
|
||||||
|
keyPassword System.getenv("ANDROIDKEYPASS") ?: "HelldiversPorLaSuPerTierraYKevinTambien"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
signingConfig signingConfigs.release
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
@@ -27,14 +37,14 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_21
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
targetCompatibility JavaVersion.VERSION_21
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
coreLibraryDesugaringEnabled true
|
coreLibraryDesugaringEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
toolchain {
|
toolchain {
|
||||||
languageVersion = JavaLanguageVersion.of(21)
|
languageVersion = JavaLanguageVersion.of(17)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import android.widget.FrameLayout;
|
|||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
@@ -17,153 +18,169 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
|
|
||||||
private static final int UP = 0, DOWN = 1, LEFT = 2, RIGHT = 3;
|
private static final int UP = 0, DOWN = 1, LEFT = 2, RIGHT = 3;
|
||||||
|
|
||||||
private static final int[][] STRATAGEMS = {
|
private static final int[][] STRATAGEMS = {
|
||||||
// Support Weapons (0-30)
|
// SUPPORT WEAPONS (12 items) - from wiki
|
||||||
new int[]{DOWN, LEFT, DOWN, UP, RIGHT},
|
new int[]{DOWN, LEFT, DOWN, UP, RIGHT}, // MG-43 Machine Gun
|
||||||
new int[]{DOWN, DOWN, LEFT, UP, RIGHT},
|
new int[]{DOWN, DOWN, LEFT, UP, RIGHT}, // EAT-17 Expendable Anti-Tank
|
||||||
new int[]{DOWN, LEFT, DOWN, UP, UP, LEFT},
|
new int[]{DOWN, LEFT, DOWN, UP, UP, LEFT}, // M-105 Stalwart
|
||||||
new int[]{DOWN, LEFT, DOWN, UP, LEFT},
|
new int[]{DOWN, LEFT, DOWN, UP, LEFT}, // LAS-98 Laser Cannon
|
||||||
new int[]{DOWN, LEFT, RIGHT, UP, DOWN},
|
new int[]{DOWN, LEFT, RIGHT, UP, DOWN}, // APW-1 Anti-Materiel Rifle
|
||||||
new int[]{DOWN, LEFT, RIGHT, RIGHT, LEFT},
|
new int[]{DOWN, LEFT, RIGHT, RIGHT, LEFT}, // GR-8 Recoilless Rifle
|
||||||
new int[]{DOWN, LEFT, UP, LEFT, DOWN},
|
new int[]{DOWN, LEFT, UP, LEFT, DOWN}, // GL-21 Grenade Launcher
|
||||||
new int[]{DOWN, LEFT, UP, DOWN, UP},
|
new int[]{DOWN, LEFT, UP, DOWN, UP}, // FLAM-40 Flamethrower
|
||||||
new int[]{DOWN, LEFT, UP, DOWN, DOWN},
|
new int[]{DOWN, LEFT, DOWN, UP, UP, RIGHT}, // AC-8 Autocannon
|
||||||
new int[]{DOWN, LEFT, DOWN, UP, UP, RIGHT},
|
new int[]{DOWN, RIGHT, DOWN, UP, LEFT, LEFT}, // ARC-3 Arc Thrower
|
||||||
new int[]{DOWN, RIGHT, DOWN, UP, LEFT, LEFT},
|
new int[]{DOWN, RIGHT, DOWN, UP, LEFT, RIGHT},// RS-422 Railgun
|
||||||
new int[]{DOWN, DOWN, UP, LEFT, RIGHT},
|
new int[]{DOWN, DOWN, UP, DOWN, DOWN}, // FAF-14 Spear
|
||||||
new int[]{UP, UP, LEFT, RIGHT},
|
|
||||||
new int[]{DOWN, LEFT, UP, DOWN, RIGHT},
|
// ORBITAL (11 items)
|
||||||
new int[]{DOWN, DOWN, UP, DOWN, DOWN},
|
new int[]{RIGHT, RIGHT, UP}, // Orbital Precision Strike
|
||||||
new int[]{RIGHT, DOWN, UP, LEFT, RIGHT},
|
new int[]{RIGHT, DOWN, LEFT, UP, UP}, // Orbital Gatling Barrage
|
||||||
new int[]{DOWN, DOWN, UP, DOWN, RIGHT},
|
new int[]{RIGHT, RIGHT, RIGHT}, // Orbital Airburst Strike
|
||||||
new int[]{DOWN, LEFT, RIGHT, LEFT, UP},
|
new int[]{RIGHT, RIGHT, DOWN, LEFT, RIGHT, DOWN}, // Orbital 120MM HE Barrage
|
||||||
new int[]{DOWN, LEFT, UP, LEFT, RIGHT},
|
new int[]{RIGHT, RIGHT, DOWN, UP}, // Orbital Smoke Strike
|
||||||
new int[]{RIGHT, DOWN, LEFT, UP, RIGHT},
|
new int[]{RIGHT, RIGHT, LEFT, DOWN}, // Orbital EMS Strike
|
||||||
new int[]{DOWN, DOWN, LEFT, UP, LEFT},
|
new int[]{RIGHT, DOWN, UP, UP, LEFT, DOWN, DOWN}, // Orbital 380MM HE Barrage
|
||||||
new int[]{DOWN, DOWN, LEFT, UP, DOWN},
|
new int[]{RIGHT, DOWN, RIGHT, DOWN, RIGHT, DOWN}, // Orbital Walking Barrage
|
||||||
new int[]{RIGHT, UP, LEFT, RIGHT},
|
new int[]{RIGHT, DOWN, UP, RIGHT, DOWN}, // Orbital Laser
|
||||||
new int[]{DOWN, LEFT, RIGHT, RIGHT, DOWN},
|
new int[]{RIGHT, UP, DOWN, DOWN, RIGHT}, // Orbital Railcannon Strike
|
||||||
new int[]{DOWN, LEFT, UP, DOWN, LEFT},
|
new int[]{RIGHT, RIGHT, DOWN, RIGHT}, // Orbital Gas Strike
|
||||||
new int[]{DOWN, LEFT, UP, LEFT, UP, UP},
|
|
||||||
new int[]{UP, RIGHT, DOWN, LEFT, DOWN},
|
// EAGLE (7 items)
|
||||||
new int[]{DOWN, DOWN, LEFT, UP, UP, LEFT},
|
new int[]{UP, RIGHT, RIGHT}, // Eagle Strafing Run
|
||||||
new int[]{DOWN, LEFT, RIGHT, LEFT, UP, UP},
|
new int[]{UP, RIGHT, DOWN, RIGHT}, // Eagle Airstrike
|
||||||
new int[]{UP, DOWN, DOWN, UP, UP, DOWN},
|
new int[]{UP, RIGHT, DOWN, DOWN, RIGHT}, // Eagle Cluster Bomb
|
||||||
// Orbital Strikes (31-42)
|
new int[]{UP, RIGHT, UP, DOWN}, // Eagle Smoke Strike
|
||||||
new int[]{RIGHT, RIGHT, UP},
|
new int[]{UP, RIGHT, DOWN, UP}, // Eagle Napalm Airstrike
|
||||||
new int[]{RIGHT, DOWN, LEFT, UP, UP},
|
new int[]{UP, RIGHT, UP, LEFT}, // Eagle 110MM Rocket Pods
|
||||||
new int[]{RIGHT, RIGHT, DOWN, RIGHT},
|
new int[]{UP, RIGHT, DOWN, DOWN, DOWN}, // Eagle 500kg Bomb
|
||||||
new int[]{RIGHT, RIGHT, DOWN, LEFT, RIGHT, DOWN},
|
|
||||||
new int[]{RIGHT, RIGHT, RIGHT},
|
// BACKPACKS (4 items)
|
||||||
new int[]{RIGHT, RIGHT, DOWN, UP},
|
new int[]{DOWN, LEFT, DOWN, UP, UP, DOWN}, // B-1 Supply Pack
|
||||||
new int[]{RIGHT, RIGHT, LEFT, DOWN},
|
new int[]{DOWN, UP, UP, DOWN, UP}, // LIFT-850 Jump Pack
|
||||||
new int[]{RIGHT, DOWN, UP, UP, LEFT, DOWN, DOWN},
|
new int[]{DOWN, LEFT, DOWN, DOWN, UP, LEFT}, // SH-20 Ballistic Shield Backpack
|
||||||
new int[]{RIGHT, DOWN, RIGHT, DOWN, RIGHT, DOWN},
|
new int[]{DOWN, UP, LEFT, RIGHT, LEFT, RIGHT},// SH-32 Shield Generator Pack
|
||||||
new int[]{RIGHT, DOWN, UP, RIGHT, DOWN},
|
|
||||||
new int[]{RIGHT, RIGHT, DOWN, LEFT, RIGHT, UP},
|
// MINES (2 items)
|
||||||
new int[]{UP, DOWN, DOWN, UP, RIGHT},
|
new int[]{DOWN, LEFT, UP, RIGHT}, // MD-6 Anti-Personnel Minefield
|
||||||
// Eagle Strikes (43-49)
|
new int[]{DOWN, LEFT, LEFT, DOWN}, // MD-I4 Incendiary Mines
|
||||||
new int[]{UP, RIGHT, RIGHT},
|
|
||||||
new int[]{UP, RIGHT, DOWN, RIGHT},
|
// EMPLACEMENTS (3 items)
|
||||||
new int[]{UP, RIGHT, DOWN, DOWN, RIGHT},
|
new int[]{DOWN, DOWN, LEFT, RIGHT,LEFT, RIGHT}, // FX-12 Shield Generator Relay
|
||||||
new int[]{UP, RIGHT, UP, DOWN},
|
new int[]{DOWN, UP, LEFT, RIGHT, RIGHT, LEFT}, // EMG-101 HMG Emplacement
|
||||||
new int[]{UP, RIGHT, DOWN, UP},
|
new int[]{DOWN, UP, RIGHT, UP, LEFT, RIGHT}, // AARC-3 Tesla Tower
|
||||||
new int[]{UP, RIGHT, UP, LEFT},
|
|
||||||
new int[]{UP, RIGHT, DOWN, DOWN, DOWN},
|
// SENTRIES (6 items)
|
||||||
// Emplacements (50-57)
|
new int[]{DOWN, UP, RIGHT, LEFT}, // AG-16 Gatling Sentry
|
||||||
new int[]{DOWN, LEFT, UP, RIGHT},
|
new int[]{DOWN, UP, RIGHT, RIGHT, UP}, // AMG-43 Machine Gun Sentry
|
||||||
new int[]{DOWN, LEFT, LEFT, DOWN},
|
new int[]{DOWN, UP, RIGHT, UP, LEFT, UP}, // AAC-8 Autocannon Sentry
|
||||||
new int[]{DOWN, LEFT, UP, UP},
|
new int[]{DOWN, UP, RIGHT, DOWN, UP, UP}, // AMLS-4X Rocket Sentry
|
||||||
new int[]{DOWN, DOWN, LEFT, RIGHT, LEFT, RIGHT},
|
new int[]{DOWN, UP, RIGHT, RIGHT, DOWN}, // AM-12 Mortar Sentry
|
||||||
new int[]{UP, LEFT, RIGHT, RIGHT, LEFT},
|
new int[]{DOWN, UP, RIGHT, DOWN, RIGHT}, // AM-23 EMS Mortar Sentry
|
||||||
new int[]{RIGHT, DOWN, LEFT, RIGHT},
|
|
||||||
new int[]{DOWN, LEFT, LEFT, RIGHT},
|
// MISSION (12 items)
|
||||||
new int[]{UP, LEFT, RIGHT, RIGHT, RIGHT},
|
new int[]{UP, DOWN, RIGHT, LEFT, UP}, // Reinforce
|
||||||
// Sentries (58-67)
|
new int[]{DOWN, DOWN, UP, RIGHT}, // Resupply
|
||||||
new int[]{UP, RIGHT, RIGHT, UP},
|
new int[]{UP, DOWN, RIGHT, UP}, // SOS Beacon
|
||||||
new int[]{UP, RIGHT, LEFT},
|
new int[]{DOWN, UP, LEFT, DOWN, UP, RIGHT, DOWN, UP}, // NUX-223 Hellbomb
|
||||||
new int[]{UP, RIGHT, LEFT, UP, LEFT},
|
new int[]{DOWN, DOWN, DOWN, UP, UP}, // SSSD Delivery
|
||||||
new int[]{UP, RIGHT, RIGHT, LEFT},
|
new int[]{UP, UP, LEFT, RIGHT, DOWN, DOWN}, // Seismic Probe
|
||||||
new int[]{UP, RIGHT, RIGHT, LEFT, RIGHT},
|
new int[]{UP, UP, LEFT, UP, RIGHT}, // Eagle Rearm
|
||||||
new int[]{UP, RIGHT, UP, LEFT, RIGHT},
|
new int[]{DOWN, UP, DOWN, UP}, // Super Earth Flag
|
||||||
new int[]{UP, RIGHT, UP, LEFT, DOWN},
|
new int[]{LEFT, RIGHT, UP, UP, UP}, // Upload Data
|
||||||
new int[]{UP, RIGHT, UP, UP, LEFT},
|
new int[]{RIGHT, UP, UP, DOWN},// SEAF Artillery
|
||||||
new int[]{UP, RIGHT, UP, DOWN},
|
new int[]{LEFT, UP, DOWN, RIGHT, DOWN, DOWN} // Hive Breaker Drill
|
||||||
new int[]{UP, RIGHT, UP, DOWN, LEFT},
|
|
||||||
// Backpacks (68-80)
|
|
||||||
new int[]{DOWN, LEFT, DOWN, UP, UP, LEFT},
|
|
||||||
new int[]{UP, DOWN, UP, LEFT},
|
|
||||||
new int[]{DOWN, LEFT, DOWN, DOWN, RIGHT},
|
|
||||||
new int[]{LEFT, RIGHT, LEFT, RIGHT},
|
|
||||||
new int[]{LEFT, RIGHT, UP, DOWN},
|
|
||||||
new int[]{LEFT, RIGHT, RIGHT, LEFT},
|
|
||||||
new int[]{LEFT, RIGHT, UP, DOWN, LEFT},
|
|
||||||
new int[]{LEFT, RIGHT, UP, RIGHT, RIGHT},
|
|
||||||
new int[]{RIGHT, DOWN, UP, UP, UP},
|
|
||||||
new int[]{LEFT, RIGHT, UP, DOWN, UP},
|
|
||||||
new int[]{LEFT, UP, LEFT, RIGHT},
|
|
||||||
new int[]{LEFT, RIGHT, LEFT, UP},
|
|
||||||
new int[]{LEFT, RIGHT, LEFT, RIGHT, LEFT},
|
|
||||||
// Vehicles (81-84)
|
|
||||||
new int[]{LEFT, DOWN, RIGHT, UP, LEFT, LEFT, UP},
|
|
||||||
new int[]{LEFT, DOWN, RIGHT, UP, LEFT, LEFT, DOWN},
|
|
||||||
new int[]{LEFT, DOWN, RIGHT, DOWN, LEFT, LEFT, DOWN},
|
|
||||||
new int[]{LEFT, DOWN, RIGHT, DOWN, LEFT, DOWN, UP, DOWN},
|
|
||||||
// Mission (85-103)
|
|
||||||
new int[]{UP, DOWN, LEFT, UP, UP, LEFT, LEFT},
|
|
||||||
new int[]{DOWN, DOWN, UP, LEFT, RIGHT},
|
|
||||||
new int[]{UP, DOWN, LEFT, UP},
|
|
||||||
new int[]{DOWN, LEFT, DOWN, UP, RIGHT, RIGHT},
|
|
||||||
new int[]{RIGHT, RIGHT, RIGHT, RIGHT, UP, UP, LEFT, LEFT},
|
|
||||||
new int[]{DOWN, UP, LEFT, DOWN, UP, RIGHT, DOWN, LEFT},
|
|
||||||
new int[]{LEFT, RIGHT, UP, DOWN, UP},
|
|
||||||
new int[]{DOWN, RIGHT, DOWN, RIGHT, DOWN},
|
|
||||||
new int[]{RIGHT, UP, UP, LEFT, UP},
|
|
||||||
new int[]{UP, UP, LEFT, RIGHT, LEFT},
|
|
||||||
new int[]{DOWN, DOWN, LEFT, RIGHT, LEFT},
|
|
||||||
new int[]{LEFT, RIGHT, UP, DOWN, LEFT, LEFT, UP},
|
|
||||||
new int[]{LEFT, DOWN, UP, DOWN},
|
|
||||||
// Other
|
|
||||||
new int[]{RIGHT, RIGHT, DOWN, DOWN, UP}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final String[] NAMES = {
|
private static final String[] NAMES = {
|
||||||
"Machine Gun", "EAT", "Stalwart", "Laser Cannon", "Anti-Materiel Rifle", "Recoilless Rifle",
|
// SUPPORT WEAPONS (0-11)
|
||||||
"Grenade Launcher", "Flamethrower", "Heavy Machine Gun", "Autocannon", "Arc Thrower",
|
"MG-43 Machine Gun", "EAT-17", "M-105 Stalwart", "LAS-98 Laser Cannon", "APW-1 Anti-Materiel Rifle",
|
||||||
"Quasar Cannon", "Airburst Rocket", "Commando", "Spear", "Railgun", "W.A.S.P.",
|
"GR-8 Recoilless Rifle", "GL-21 Grenade Launcher", "FLAM-40 Flamethrower", "AC-8 Autocannon",
|
||||||
"Breaching Hammer", "Epoch", "Speargun", "Expendable Napalm", "Leveller", "De-Escalator",
|
"ARC-3 Arc Thrower", "RS-422 Railgun", "FAF-14 Spear",
|
||||||
"Defoliation", "Sterilizer", "Belt-Fed GL", "Solo Silo", "Cremator", "Maxigun",
|
// ORBITAL (12-22)
|
||||||
"C4 Pack", "One True Flag",
|
"Orbital Precision", "Orbital Gatling", "Orbital Airburst", "Orbital 120mm", "Orbital Smoke",
|
||||||
"Orbital Precision", "Orbital Gatling", "Orbital Gas", "Orbital 120mm", "Orbital Airburst",
|
"Orbital EMS", "Orbital 380mm", "Orbital Walking", "Orbital Laser", "Orbital Railcannon", "Orbital Gas",
|
||||||
"Orbital Smoke", "Orbital EMS", "Orbital 380mm", "Orbital Walking", "Orbital Laser",
|
// EAGLE (23-29)
|
||||||
"Orbital Napalm", "Orbital Railcannon",
|
|
||||||
"Eagle Strafing", "Eagle Airstrike", "Eagle Cluster", "Eagle Smoke", "Eagle Napalm",
|
"Eagle Strafing", "Eagle Airstrike", "Eagle Cluster", "Eagle Smoke", "Eagle Napalm",
|
||||||
"Eagle Rocket", "Eagle 500kg",
|
"Eagle Rocket Pods", "Eagle 500kg",
|
||||||
"Anti-Personnel Mines", "Incendiary Mines", "Anti-Tank Mines", "Shield Relay", "HMG Emplacement",
|
// BACKPACKS (30-33)
|
||||||
"Grenadier", "Gas Mines", "Anti-Tank Emplacement",
|
"Supply Pack", "Jump Pack", "Ballistic Shield", "Shield Generator",
|
||||||
"MG Sentry", "Gatling Sentry", "Autocannon Sentry", "Mortar Sentry", "Rocket Sentry",
|
// MINES (34-35)
|
||||||
"Tesla Tower", "EMS Mortar", "Laser Sentry", "Flame Sentry", "Gas Mortar",
|
"Anti-Personnel Mines", "Incendiary Mines",
|
||||||
"Supply Pack", "Jump Pack", "Ballistic Shield", "Guard Dog", "Rover", "Shield Generator",
|
// EMPLACEMENTS (36-38)
|
||||||
"Directional Shield", "Hot Dog", "Hellbomb", "K-9", "Hover Pack", "Dog Breath", "Warp Pack",
|
"Shield Relay", "HMG Emplacement", "Tesla Tower",
|
||||||
"Patriot Exosuit", "Emancipator", "Fast Recon", "Bastion",
|
// SENTRIES (39-44)
|
||||||
"Reinforce", "Resupply", "SOS Beacon", "Eagle Rearm", "Super Destroyer",
|
"Gatling Sentry", "MG Sentry", "Autocannon Sentry", "Rocket Sentry", "Mortar Sentry", "EMS Mortar Sentry",
|
||||||
"Hellbomb", "Upload Data", "SSSD", "Super Earth Flag", "Seismic Probe", "Prospecting Drill",
|
// MISSION (45-56)
|
||||||
"Dark Fluid", "Tectonic Drill", "Hive Breaker", "Cargo Container", "Reinforcement", "SEAF Artillery",
|
"Reinforce", "Resupply", "SOS Beacon", "Hellbomb", "SSSD", "Seismic Probe", "Eagle Rearm",
|
||||||
"Illumination Flare"
|
"Super Earth Flag", "Upload Data", "SEAF Artillery", "Hive Breaker"
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final int[] ICONS = new int[]{
|
private static final int[] ICONS = new int[]{
|
||||||
R.drawable.support_1, R.drawable.support_2, R.drawable.support_3, R.drawable.support_4, R.drawable.support_5,
|
// SUPPORT WEAPONS (0-11)
|
||||||
R.drawable.support_6, R.drawable.support_7, R.drawable.support_8, R.drawable.support_9, R.drawable.support_10,
|
R.drawable.mg_43_machine_gun,
|
||||||
R.drawable.class_1, R.drawable.class_2, R.drawable.class_3, R.drawable.class_4, R.drawable.class_5,
|
R.drawable.eat_17_expendable_anti_tank,
|
||||||
R.drawable.offensive_1, R.drawable.offensive_2, R.drawable.offensive_3, R.drawable.offensive_4, R.drawable.offensive_5,
|
R.drawable.m_105_stalwart,
|
||||||
R.drawable.offensive_6, R.drawable.offensive_7, R.drawable.offensive_8, R.drawable.offensive_9, R.drawable.offensive_10,
|
R.drawable.las_98_laser_cannon,
|
||||||
R.drawable.supply_1, R.drawable.supply_2, R.drawable.supply_3, R.drawable.supply_4, R.drawable.supply_5,
|
R.drawable.apw_1_anti_materiel_rifle,
|
||||||
R.drawable.supply_6, R.drawable.supply_7, R.drawable.supply_8, R.drawable.supply_9, R.drawable.supply_10,
|
R.drawable.gr_8_recoilless_rifle,
|
||||||
R.drawable.supply_11, R.drawable.supply_12, R.drawable.supply_13, R.drawable.supply_14, R.drawable.supply_15,
|
R.drawable.gl_21_grenade_launcher,
|
||||||
R.drawable.defensive_1, R.drawable.defensive_2, R.drawable.defensive_3, R.drawable.defensive_4, R.drawable.defensive_5,
|
R.drawable.flam_40_flamethrower,
|
||||||
R.drawable.defensive_6, R.drawable.defensive_7, R.drawable.defensive_8, R.drawable.defensive_9, R.drawable.defensive_10,
|
R.drawable.ac_8_autocannon,
|
||||||
R.drawable.defensive_11
|
R.drawable.arc_3_arc_thrower,
|
||||||
|
R.drawable.rs_422_railgun,
|
||||||
|
R.drawable.faf_14_spear_launcher,
|
||||||
|
// ORBITAL (12-22)
|
||||||
|
R.drawable.orbital_precision_strike,
|
||||||
|
R.drawable.orbital_gatling_barrage,
|
||||||
|
R.drawable.orbital_airburst_strike,
|
||||||
|
R.drawable.orbital_120mm_he_barrage,
|
||||||
|
R.drawable.orbital_smoke_strike,
|
||||||
|
R.drawable.orbital_ems_strike,
|
||||||
|
R.drawable.orbital_380mm_he_barrage,
|
||||||
|
R.drawable.orbital_walking_barrage,
|
||||||
|
R.drawable.orbital_laser,
|
||||||
|
R.drawable.orbital_railcannon_strike,
|
||||||
|
R.drawable.orbital_gas_strike,
|
||||||
|
// EAGLE (23-29)
|
||||||
|
R.drawable.eagle_strafing_run,
|
||||||
|
R.drawable.eagle_airstrike,
|
||||||
|
R.drawable.eagle_cluster_bomb,
|
||||||
|
R.drawable.eagle_smoke_strike,
|
||||||
|
R.drawable.eagle_napalm_airstrike,
|
||||||
|
R.drawable.eagle_110mm_rocket_pods,
|
||||||
|
R.drawable.eagle_500kg_bomb,
|
||||||
|
// BACKPACKS (30-33)
|
||||||
|
R.drawable.b_1_supply_pack,
|
||||||
|
R.drawable.lift_850_jump_pack,
|
||||||
|
R.drawable.sh_20_ballistic_shield_backpack,
|
||||||
|
R.drawable.sh_32_shield_generator_pack,
|
||||||
|
// MINES (34-35)
|
||||||
|
R.drawable.md_6_anti_personnel,
|
||||||
|
R.drawable.md_i4_incendiary_mines,
|
||||||
|
// EMPLACEMENTS (36-38)
|
||||||
|
R.drawable.fx_12_shield_generator_relay,
|
||||||
|
R.drawable.emg_101_hmg_emplacem_nt,
|
||||||
|
R.drawable.aarc_3_tesla_tower,
|
||||||
|
// SENTRIES (39-44)
|
||||||
|
R.drawable.ag_16_gatling_sentry,
|
||||||
|
R.drawable.amg_43_machine_gun_sentry,
|
||||||
|
R.drawable.aac_8_autocannon_sentry,
|
||||||
|
R.drawable.amls_4x_rocket_sentry,
|
||||||
|
R.drawable.am_12_mortar_sentry,
|
||||||
|
R.drawable.am_23_ems_mortar_sentry,
|
||||||
|
// MISSION (45-56)
|
||||||
|
R.drawable.reinforce,
|
||||||
|
R.drawable.resupply,
|
||||||
|
R.drawable.sos_beacon,
|
||||||
|
R.drawable.nux_223_hellbomb,
|
||||||
|
R.drawable.sssd_delivery,
|
||||||
|
R.drawable.seismic_probe,
|
||||||
|
R.drawable.eagle_rearm,
|
||||||
|
R.drawable.super_earth_flag,
|
||||||
|
R.drawable.nux_223_hellbomb,
|
||||||
|
R.drawable.sssd_delivery,
|
||||||
|
R.drawable.hive_breaker_drill
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final int[] ARROW_ICONS = new int[]{
|
private static final int[] ARROW_ICONS = new int[]{
|
||||||
@@ -178,6 +195,8 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
private LinearLayout sequenceContainer;
|
private LinearLayout sequenceContainer;
|
||||||
private ImageButton btnUp, btnDown, btnLeft, btnRight;
|
private ImageButton btnUp, btnDown, btnLeft, btnRight;
|
||||||
private android.widget.Button btnVolver;
|
private android.widget.Button btnVolver;
|
||||||
|
private ProgressBar progressBar;
|
||||||
|
private ImageView ivFailure;
|
||||||
|
|
||||||
private int[] sequence;
|
private int[] sequence;
|
||||||
private int playerIndex = 0;
|
private int playerIndex = 0;
|
||||||
@@ -185,6 +204,7 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
private boolean esperando = false;
|
private boolean esperando = false;
|
||||||
private boolean juegoActivo = true;
|
private boolean juegoActivo = true;
|
||||||
private int currentStratagemIndex = 0;
|
private int currentStratagemIndex = 0;
|
||||||
|
private boolean bloqueado = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -202,6 +222,8 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
btnLeft = findViewById(R.id.btn_left);
|
btnLeft = findViewById(R.id.btn_left);
|
||||||
btnRight = findViewById(R.id.btn_right);
|
btnRight = findViewById(R.id.btn_right);
|
||||||
btnVolver = findViewById(R.id.btn_volver);
|
btnVolver = findViewById(R.id.btn_volver);
|
||||||
|
progressBar = findViewById(R.id.progress_bar);
|
||||||
|
ivFailure = findViewById(R.id.iv_failure);
|
||||||
|
|
||||||
btnVolver.setOnClickListener(v -> finish());
|
btnVolver.setOnClickListener(v -> finish());
|
||||||
|
|
||||||
@@ -229,6 +251,10 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
currentStratagemIndex = idx;
|
currentStratagemIndex = idx;
|
||||||
playerIndex = 0;
|
playerIndex = 0;
|
||||||
juegoActivo = true;
|
juegoActivo = true;
|
||||||
|
bloqueado = false;
|
||||||
|
|
||||||
|
if (progressBar != null) progressBar.setVisibility(View.GONE);
|
||||||
|
if (ivFailure != null) ivFailure.setVisibility(View.GONE);
|
||||||
|
|
||||||
if (ivStratagemIcon != null) {
|
if (ivStratagemIcon != null) {
|
||||||
try {
|
try {
|
||||||
@@ -242,7 +268,7 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
secuenciaMostrar();
|
secuenciaMostrar();
|
||||||
|
|
||||||
handler.removeCallbacksAndMessages(null);
|
handler.removeCallbacksAndMessages(null);
|
||||||
handler.postDelayed(() -> { esperando = true; }, 1200);
|
esperando = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String ARROW_CHARS = "\u2191\u2193\u2190\u2192";
|
private static final String ARROW_CHARS = "\u2191\u2193\u2190\u2192";
|
||||||
@@ -277,7 +303,8 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onInput(int dir) {
|
private void onInput(int dir) {
|
||||||
if (!juegoActivo || !esperando) return;
|
if (!juegoActivo || !esperando || bloqueado) return;
|
||||||
|
bloqueado = true;
|
||||||
|
|
||||||
if (dir == sequence[playerIndex]) {
|
if (dir == sequence[playerIndex]) {
|
||||||
playerIndex++;
|
playerIndex++;
|
||||||
@@ -297,13 +324,22 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
completadas++;
|
completadas++;
|
||||||
if (tvCounter != null) tvCounter.setText(String.valueOf(completadas));
|
if (tvCounter != null) tvCounter.setText(String.valueOf(completadas));
|
||||||
esperando = false;
|
esperando = false;
|
||||||
handler.postDelayed(this::nuevaRonda, 1200);
|
if (progressBar != null) {
|
||||||
|
progressBar.setVisibility(View.VISIBLE);
|
||||||
|
handler.postDelayed(() -> {
|
||||||
|
if (progressBar != null) progressBar.setVisibility(View.GONE);
|
||||||
|
}, 300);
|
||||||
|
}
|
||||||
|
handler.postDelayed(this::nuevaRonda, 300);
|
||||||
|
} else {
|
||||||
|
bloqueado = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (soundManager != null) {
|
if (soundManager != null) {
|
||||||
try { soundManager.playFailure(); } catch (Exception e) {}
|
try { soundManager.playFailure(); } catch (Exception e) {}
|
||||||
}
|
}
|
||||||
juegoActivo = false;
|
juegoActivo = false;
|
||||||
|
if (ivFailure != null) ivFailure.setVisibility(View.VISIBLE);
|
||||||
handler.postDelayed(this::nuevaRonda, 1500);
|
handler.postDelayed(this::nuevaRonda, 1500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.6 KiB |
20
app/src/main/res/drawable/ic_failure.xml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="150dp"
|
||||||
|
android:height="150dp"
|
||||||
|
android:viewportWidth="150"
|
||||||
|
android:viewportHeight="150">
|
||||||
|
<!-- Red circle background -->
|
||||||
|
<path
|
||||||
|
android:fillColor="#CC0000"
|
||||||
|
android:pathData="M75,75m-60,0a60,60 0,1 1,120 0a60,60 0,1 1,-120 0"/>
|
||||||
|
<!-- X mark -->
|
||||||
|
<path
|
||||||
|
android:strokeWidth="10"
|
||||||
|
android:strokeColor="#FFFFFF"
|
||||||
|
android:pathData="M45,45L105,105"/>
|
||||||
|
<path
|
||||||
|
android:strokeWidth="10"
|
||||||
|
android:strokeColor="#FFFFFF"
|
||||||
|
android:pathData="M105,45L45,105"/>
|
||||||
|
</vector>
|
||||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -205,4 +205,22 @@
|
|||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@drawable/stratagemas_icon" />
|
android:src="@drawable/stratagemas_icon" />
|
||||||
|
|
||||||
|
<!-- Loading Spinner -->
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progress_bar"
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:indeterminateTint="#FFD700"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<!-- Failure Indicator (X) -->
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_failure"
|
||||||
|
android:layout_width="150dp"
|
||||||
|
android:layout_height="150dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:src="@drawable/ic_failure"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
47
docker-compose.yml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
gitea:
|
||||||
|
image: gitea/gitea:latest
|
||||||
|
container_name: gitea
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- USER_UID=1000
|
||||||
|
- USER_GID=1000
|
||||||
|
volumes:
|
||||||
|
- /srv/data/gitea:/data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.gitea.rule=Host(`git-dangilcal.duckdns.org`)"
|
||||||
|
- "traefik.http.routers.gitea.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.gitea.tls.certresolver=le"
|
||||||
|
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
|
||||||
|
- "traefik.http.routers.gitea-http.rule=Host(`git-dangilcal.duckdns.org`)"
|
||||||
|
- "traefik.http.routers.gitea-http.entrypoints=web"
|
||||||
|
- "traefik.http.routers.gitea-http.middlewares=redirect-to-https"
|
||||||
|
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
|
||||||
|
- "traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true"
|
||||||
|
|
||||||
|
gitea-runner:
|
||||||
|
image: gitea/act_runner:latest
|
||||||
|
container_name: gitea-runner
|
||||||
|
restart: always
|
||||||
|
depends_on:
|
||||||
|
- gitea
|
||||||
|
environment:
|
||||||
|
- GITEA_INSTANCE_URL=https://git-dangilcal.duckdns.org
|
||||||
|
- GITEA_RUNNER_REGISTRATION_TOKEN=TU_TOKEN_AQUI
|
||||||
|
- GITEA_RUNNER_NAME=runner-docker
|
||||||
|
volumes:
|
||||||
|
- /srv/data/gitea-runner:/data
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||