Skip to content

Commit

Permalink
Merge branch 'main' into jumpGetoutAndEscapeSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBrostrom authored Sep 7, 2024
2 parents f9817fb + c057a73 commit 0295a7c
Show file tree
Hide file tree
Showing 52 changed files with 1,023 additions and 318 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/arma.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
name: Arma

name: Testing
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, ready_for_review]
push:
branches: main

jobs:
validate:
name: Validation
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Validate SQF
if: always()
run: python3 tools/sqf_validator.py
- name: Validate Config
if: always()
run: python3 tools/config_style_checker.py
- name: Validate Stringtables
if: always()
run: python3 tools/stringtable_validator.py
continue-on-error: true
- name: Check Strings
if: always()
run: python3 tools/check_strings.py
# - name: Check for BOM
# uses: arma-actions/bom-check@master

lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
Expand All @@ -34,6 +39,7 @@ jobs:
continue-on-error: true # No failure due to many false-positives

hemtt:
name: HEMTT Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
51 changes: 35 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
name: Build
name: Build and upload artifacts

on:
release:
types: [ published ]
push:
branches:
- main
pull_request_target:

jobs:
build:
runs-on: ubuntu-latest
name: Build
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: ./tools/deploy.sh ${{ github.ref_name }}
- name: Upload release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
file: release/7CavAddon_${{ github.ref_name }}-hemtt.zip
overwrite: true
- name: Checkout the source code
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Checkout pull request
uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request_target' }}
with:
path: pullrequest
ref: 'refs/pull/${{ github.event.number }}/merge'
- name: Replace addons with pull request addons
if: ${{ github.event_name == 'pull_request_target' }}
run: |
rm -r addons\
rm -r include\
xcopy /e /h /q pullrequest\addons addons\
xcopy /e /h /q pullrequest\include include\
- name: Run HEMTT build
run: hemtt build
- name: Rename build folder
run: mv .hemttout/build .hemttout/@cav
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: cav-${{ github.sha }}
path: .hemttout/@*
25 changes: 25 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy Release
on:
release:
types: [published]

jobs:
release:
runs-on: windows-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT release
run: |
.\tools\deploy-setVersion.ps1
hemtt release
Rename-Item release\cav-latest.zip 7CavAddon-${{github.ref_name}}.zip
- name: Upload release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
asset_name: 7CavAddon-${{github.ref_name}}.zip
file: release/7CavAddon-${{github.ref_name}}.zip
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Publish
run-name: Publishing ${{github.ref_name}} to ${{ inputs.environment }}

on:
workflow_dispatch:
inputs:
environment:
description: "Selected deploy environment"
required: true
default: "dev"
type: choice
options:
- dev
- live
jobs:
publish:
name: Publish to steam workshop
runs-on: windows-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Setup steamcmd
uses: CyberAndrii/setup-steamcmd@v1

- name: Obtaining release
if: ${{ inputs.environment == 'live' }}
run: |
.\tools\deploy-getRelease.ps1 ${{github.ref_name}}
Get-ChildItem -Path . -ErrorAction SilentlyContinue
- name: Deploy release build to workshop
if: ${{ inputs.environment == 'live' }}
run: |
Write-Host "Yey i did it!"
env:
ENVIRONMENT: ${{ inputs.environment }}

- name: Run HEMTT build
if: ${{ inputs.environment == 'dev' }}
run: |
hemtt build
env:
ENVIRONMENT: ${{ inputs.environment }}
- name: Deploy dev build to workshop
if: ${{ inputs.environment == 'dev' }}
run: |
steamcmd.exe +login $env:STEAM_USERNAME $env:STEAM_PASSWORD +workshop_build_item D:\a\7CavAddon\7CavAddon\resources\dev-payload.vdf +quit
env:
ENVIRONMENT: ${{ inputs.environment }}

2 changes: 1 addition & 1 deletion .hemtt/project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "7th Cavalry Community Addon"
prefix = "cav"
author = "7th Cavalry S3 Mod Team"
prefix = "cav"
mainprefix = "z"

[files]
Expand Down
Binary file modified addons/insignia/data/Bravo_2.paa
Binary file not shown.
Binary file modified addons/insignia/data/Bravo_2_1.paa
Binary file not shown.
1 change: 1 addition & 0 deletions addons/leaflets/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
z\cav\addons\leaflets
8 changes: 8 additions & 0 deletions addons/leaflets/CfgLeaflets.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class CfgLeaflets {
scriptCav_Enlist = QPATHTOF(scripts\Cav_Enlist.sqf);
class Cav_Enlist {
text = "7TH CAVALRY GAMING<br /><br />WANTS YOU!<br />Enlist today<br />7cav.us<br /><br />More then just a clan, it's a way of life";
author = ECSTRING(main,cavmodteam);
texture = QPATHTOEF(textures,data\posters\cav_enlist_today_ca.paa);
};
};
13 changes: 13 additions & 0 deletions addons/leaflets/CfgMagazines.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class CfgMagazines {
class 1Rnd_Leaflets_West_F;
class Cav_1Rnd_Leaflets_Enlist_F: 1Rnd_Leaflets_West_F {
author = ECSTRING(main,cavmodteam);
leafletClass = "Cav_Enlist";
};

class Pylon_1Rnd_Leaflets_West_F;
class Cav_Pylon_1Rnd_Leaflets_Enlist_F: Pylon_1Rnd_Leaflets_West_F {
displayName = CSTRING(Cav_Pylon_1Rnd_Leaflets_Enlist_F);
leafletClass = "Cav_Enlist";
};
};
7 changes: 7 additions & 0 deletions addons/leaflets/CfgWeapons.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

class CfgWeapons {
class Bomb_04_Plane_CAS_01_F;
class Bomb_Leaflets: Bomb_04_Plane_CAS_01_F {
magazines[] += {"cav_1Rnd_Leaflets_Enlist_F", "cav_Pylon_1Rnd_Leaflets_Enlist_F"};
};
};
23 changes: 23 additions & 0 deletions addons/leaflets/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include "script_component.hpp"

class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"cav_main",
"cav_common",
"cav_textures"
};
author = ECSTRING(Main,ModTeam);
authors[] = {"Brostrom.A (Evul)"};
url = ECSTRING(Main,Url);
VERSION_CONFIG;
};
};

#include "CfgLeaflets.hpp"
#include "CfgMagazines.hpp"
#include "CfgWeapons.hpp"
6 changes: 6 additions & 0 deletions addons/leaflets/script_component.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#define COMPONENT leaflets
#define COMPONENT_BEAUTIFIED Leaflets

#include "\z\cav\addons\main\script_mod.hpp"
#include "\z\cav\addons\main\script_macros.hpp"
#include "script_macros.hpp"
Empty file.
3 changes: 3 additions & 0 deletions addons/leaflets/scripts/Cav_Leaflet_Enlist.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if ((_this select 2) < 1) then {
["init",[_this,"Cav_Enlist"]] remoteExec ["bis_fnc_initLeaflet"];
};
7 changes: 7 additions & 0 deletions addons/leaflets/stringtable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project name="Cav">
<Package name="Leaflets">
<Key ID="STR_Cav_Leaflets_Cav_Pylon_1Rnd_Leaflets_Enlist_F">
<English>Leaflets (Cav - Enlist Today)</English>
</Key>
</Package>
</Project>
2 changes: 1 addition & 1 deletion addons/main/CfgSettings.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CfgSettings {
class CBA {
class Versioning {
class CavMod {
class cav {
class dependencies {
//Mod will hard exit if this is missing
CBA[] = {"cba_main", REQUIRED_CBA_VERSION, "(true)"};
Expand Down
2 changes: 1 addition & 1 deletion addons/main/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ class CfgPatches {

class CfgMods {
class PREFIX {
dir = "@cavmod";
dir = "@7CavAddons";
name = CSTRING(Name);
picture = "A3\Ui_f\data\Logos\arma3_expansion_alpha_ca";
hidePicture = "true";
Expand Down
4 changes: 2 additions & 2 deletions addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD

// MINIMAL required version for the Mod. Components can specify others..
#define REQUIRED_VERSION 2.02
#define REQUIRED_CBA_VERSION {3,15,8}
#define REQUIRED_VERSION 2.16
#define REQUIRED_CBA_VERSION {3,16,0}

#ifdef COMPONENT_BEAUTIFIED
#define COMPONENT_NAME QUOTE(7th Cavalry Community Addon - COMPONENT_BEAUTIFIED)
Expand Down
1 change: 1 addition & 0 deletions addons/objects/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
z\cav\addons\objects
16 changes: 16 additions & 0 deletions addons/objects/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class CfgVehicles {
class Land_Leaflet_03_F;
class Cav_Poster_Small_Enlist_Today_F: Land_Leaflet_03_F {
displayName = CSTRING(Cav_Poster_Small_Enlist_Today_F);
author = ECSTRING(main,cavmodteam);
editorPreview = QPATHTOEF(textures,data\posters\cav_enlist_today_ca.paa);
hiddenSelectionsTextures[] = {QPATHTOF(data\cav_leaflets_item_enlist_today_ca.paa)};
};
class Land_Poster_05_F;
class Cav_Poster_Big_Enlist_Today_F: Land_Poster_05_F {
displayName = CSTRING(Cav_Poster_Big_Enlist_Today_F);
author = ECSTRING(main,cavmodteam);
editorPreview = QPATHTOEF(textures,data\posters\cav_enlist_today_ca.paa);
hiddenSelectionsTextures[] = {QPATHTOF(data\cav_poster_05_item_enlist_today_ca.paa)};
};
};
24 changes: 24 additions & 0 deletions addons/objects/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include "script_component.hpp"

class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {
"Cav_Poster_Small_Enlist_Today_F",
"Cav_Poster_Big_Enlist_Today_F"
};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"cav_main",
"cav_common",
"cav_textures"
};
author = ECSTRING(Main,ModTeam);
authors[] = {"Brostrom.A (Evul)"};
url = ECSTRING(Main,Url);
VERSION_CONFIG;
};
};

#include "CfgVehicles.hpp"
Binary file not shown.
Binary file not shown.
5 changes: 5 additions & 0 deletions addons/objects/script_component.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#define COMPONENT objects
#define COMPONENT_BEAUTIFIED Objects

#include "\z\cav\addons\main\script_mod.hpp"
#include "\z\cav\addons\main\script_macros.hpp"
10 changes: 10 additions & 0 deletions addons/objects/stringtable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project name="Cav">
<Package name="Objects">
<Key ID="STR_Cav_Objects_Cav_Poster_Small_Enlist_Today_F">
<English>Leaflet (Cav - Enlist Today)</English>
</Key>
<Key ID="STR_Cav_Objects_Cav_Poster_Big_Enlist_Today_F">
<English>Poster (Cav - Enlist Today)</English>
</Key>
</Package>
</Project>
2 changes: 1 addition & 1 deletion addons/pronelauncher/functions/fnc_onKeyDown.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: PiZZADOX, Jonpas
* Handles keyDown EH for overriding engine stance changes when in AT launcher stance.
Expand Down
1 change: 0 additions & 1 deletion addons/pronelauncher/functions/script_component.hpp

This file was deleted.

Binary file not shown.
4 changes: 4 additions & 0 deletions resources/dev-description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[h1]7th Cavalry Gaming Community Addon Development Build[/h1]
This is the development and experimental build of the 7th Cavalry Gaming Community Addon or 7CavAddon for short. This build contain experimental features and or items and is not recomended to be used unless you know what your doing.

To get the regular build go [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3298466460]here[/url].
10 changes: 10 additions & 0 deletions resources/dev-payload.vdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"workshopitem"
{
"appid" "107410"
"publishedfileid" "3298481411"
"contentfolder" "D:\\a\\7CavAddon\\7CavAddon\\.hemttout\\build"
"previewfile" "D:\\a\\7CavAddon\\7CavAddon\\resources\\steam_preview-dev.jpg"
"title" "7CavAddon DevBuild [7CAV]"
"description" ""
"changenote" ""
}
Binary file added resources/steam_preview-dev.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/steam_preview-dev.psd
Binary file not shown.
Loading

0 comments on commit 0295a7c

Please sign in to comment.