Initial Repo Setup
All checks were successful
Build / Build (push) Successful in 1m31s

This commit is contained in:
Jacob Schmidt 2024-11-17 07:54:41 -06:00
commit 149e1f762a
62 changed files with 4522 additions and 0 deletions

32
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,32 @@
---
name: Bug report
about: Report a bug related to the framework.
title: "[addon name] - [short description]"
labels: bug
assignees: JSchmidt92
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Mission file**
The mission where the issue occured.
**Log file**
The log file generated by the game.
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: Request - [short description]
labels: ''
assignees: JSchmidt92
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

4
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,4 @@
**When merged this pull request will:**
- Describe what this pull request will do
- Each change in a separate line
- Follow title standard `Module - Add|Fix|Improve|Change|Remove things`

33
.github/release_drafter.yml vendored Normal file
View File

@ -0,0 +1,33 @@
branches:
- master
name-template: "a3f_factions_v$NEXT_PATCH_VERSION"
tag-template: "$NEXT_PATCH_VERSION"
categories:
- title: "**ADDED:**"
labels:
- "feature"
- title: "**FIXED:**"
labels:
- "bug fix"
- title: "**IMPROVED:**"
labels:
- "enhancement"
- title: "**CHANGED:**"
labels:
- "cleanup"
exclude-labels:
- "ignore changelog"
change-template: "- $TITLE (#$NUMBER)"
template: |
## Change Log Summary
$CHANGES
replacers:
# Category titles
- search: '/\#\# (\*\*(ADDED|FIXED|IMPROVED|CHANGED):\*\*)/g'
replace: "$1"

50
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,50 @@
name: Build
on:
push:
branches: [master]
paths-ignore:
- ".github/**"
- "addons/main/script_version.hpp"
- "docs/**"
- "tools/**"
- "LICENSE"
- "README.md"
- "*.json"
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Bump Version
id: bump-version
run: python3 tools/version_bumper.py increment_build push_commit
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: hemtt release
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Initialize or Update Go module
run: |
if [ ! -f go.mod ]; then
go mod init gitea.innovativedevsolutions.org/IDSolutions/factions
fi
go get code.gitea.io/sdk/gitea
- name: Run Release Action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.bump-version.outputs.VERSION }}
run: go run main.go

410
.gitignore vendored Normal file
View File

@ -0,0 +1,410 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
# Hemtt
*.pbo
.hemttout
hemtt
hemtt.exe
*.biprivatekey
# Added by cargo
/target

21
.hemtt/project.toml Normal file
View File

@ -0,0 +1,21 @@
name = "FORGE Factions"
author = "IDSolutions"
prefix = "a3f_factions"
mainprefix = "z"
[files]
include = [
"*.dll",
"*.so",
"*.json",
"mod.cpp",
"README.md",
"LICENSE",
"icon_64_ca.paa",
"icon_128_ca.paa",
"icon_128_highlight_ca.paa",
"title_co.paa"
]
[version]
git_hash = 0

112
LICENSE Normal file
View File

@ -0,0 +1,112 @@
Copyright (c) 2024 IDSolutions
Brief summary of this Licence
PLEASE, NOTE THAT THIS SUMMARY HAS NO LEGAL EFFECT AND IS ONLY OF AN INFORMATORY NATURE DESIGNED FOR YOU TO GET THE BASIC INFORMATION ABOUT THE CONTENT OF THIS LICENCE. THE ONLY LEGALLY BINDING PROVISIONS ARE THOSE IN THE ORIGINAL AND FULL TEXT OF THIS LICENCE.
With this licence you are free to adapt (i.e. modify, rework or update) and share (i.e. copy, distribute or transmit) the material under the following conditions:
Attribution - You must attribute the material in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the material).
Noncommercial - You may not use this material for any commercial purposes.
Arma Only - You may not convert or adapt this material to be used in other games than Arma.
No Derivatives - If you remix, transform, or build upon the material, you may not distribute the modified material.
Full version of licence
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Arma Public License No Derivatives ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
Section 1 Definitions
Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
ArmaOnly means primarily intended for or directed towards the use in any of existing and future Arma games, including but not limited to Arma: Cold War Assault, Arma, Arma 2 and Arma 3 and its official sequels and expansion packs.
Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
Licensor means the individual(s) or entity(ies) granting rights under this Public License.
NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
Section 2 Scope
License grant
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
reproduce and Share the Licensed Material, in whole or in part, for NonCommercial and ArmaOnly purposes only; and
produce and reproduce for NonCommercial and ArmaOnly purposes only, but not Share Adapted Material.
Exceptions and Limitations For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
Term. The term of this Public License is specified in Section 6(a).
Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
Downstream recipients.
Offer from the Licensor Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(a)(i).
Other rights
Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
Patent and trademark rights are not licensed under this Public License.
To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial and ArmaOnly purposes.
Section 3 License Conditions
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
Attribution
If You Share the Licensed Material, You must:
retain the following if it is supplied by the Licensor with the Licensed Material:
identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
a copyright notice;
a notice that refers to this Public License;
a notice that refers to the disclaimer of warranties;
a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
For the avoidance of doubt, You do not have permission under this Public License to Share Adapted Material.
You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(a) to the extent reasonably practicable.
Section 4 Sui Generis Database Rights
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial and ArmaOnly purposes only, provided You do not Share Adapted Material;
if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
Section 5 Disclaimer of Warranties and Limitation of Liability
Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
Section 6 Term and Termination
This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
Section 7 Other Terms and Conditions
The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
Section 8 Interpretation
For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
Bohemia Interactive Notices
Bohemia Interactive a.s. is not a party to this License, and makes no warranty whatsoever in connection with the Licensed Material. Bohemia Interactive a.s. will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, Bohemia Interactive a.s. may elect to apply the Public License to material it publishes and in those instances it becomes the "Licensor".
Except for the limited purpose of indicating to the public that the Licensed Material is shared under this Public License, Bohemia Interactive a.s. does not authorize the use by either party of the trademarks "Arma", "Bohemia Interactive" or any related trademark or logo of Arma or Bohemia Interactive without the prior written consent of Bohemia Interactive a.s.

1
addons/main/$PBOPREFIX$ Normal file
View File

@ -0,0 +1 @@
z\a3f_factions\addons\main

View File

@ -0,0 +1,5 @@
class CfgEditorCategories {
class CLASS(Loki) {
displayName = "Loki PMC";
};
};

View File

@ -0,0 +1 @@
class CfgEditorSubcategories {};

View File

@ -0,0 +1,20 @@
class CfgFactionClasses {
class CLASS(I_Contractors) {
scope = 2;
curatorScope = 2;
displayName = "FORGE Contractors";
flag = QPATHTOF(ui\forge_ca.paa);
icon = QPATHTOF(ui\forge_ca.paa);
side = 2;
priority = 2;
};
class CLASS(I_Logistics) {
scope = 2;
curatorScope = 2;
displayName = "FORGE Logistics";
flag = QPATHTOF(ui\forge_ca.paa);
icon = QPATHTOF(ui\forge_ca.paa);
side = 2;
priority = 2;
};
};

14
addons/main/CfgMods.hpp Normal file
View File

@ -0,0 +1,14 @@
class CfgMods {
class PREFIX {
dir = "@a3f_factions";
name = "FORGE Factions";
author = "IDSolutions";
picture = "A3\Ui_f\data\Logos\arma3_expansion_alpha_ca";
hideName = "false";
hidePicture = "false";
action = "https://innovativedevsolutions.org";
actionName = "Website";
description = "Innovative Dev Solutions";
dlcColor[] = {0.45, 0.47, 0.41, 1};
};
};

4
addons/main/README.md Normal file
View File

@ -0,0 +1,4 @@
a3f_factions_main
========
Backbone of other components, defining most of the commonly used macros.

19
addons/main/config.cpp Normal file
View File

@ -0,0 +1,19 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"cba_main", "ace_main"};
authors[] = {"J. Schmidt", "Creedcoder"};
author = "IDSolutions";
VERSION_CONFIG;
};
};
#include "CfgEditorCategories.hpp"
#include "CfgEditorSubcategories.hpp"
#include "CfgFactionClasses.hpp"
#include "CfgMods.hpp"

View File

@ -0,0 +1,16 @@
#define COMPONENT main
#define COMPONENT_BEAUTIFIED Main
#include "script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
#ifdef DEBUG_ENABLED_MAIN
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_MAIN
#define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN
#endif
#include "script_macros.hpp"

View File

@ -0,0 +1,50 @@
// Internal
#define DOUBLES(var1,var2) ##var1##_##var2
#define TRIPLES(var1,var2,var3) ##var1##_##var2##_##var3
#define ADDON DOUBLES(PREFIX,COMPONENT)
#define GVAR(var1) DOUBLES(ADDON,var1)
// External
#define AFUNC(var1,var2) TRIPLES(DOUBLES(ace,var1),fnc,var2)
#define BFUNC(var1) TRIPLES(BIS,fnc,var1)
#define CFUNC(var1) TRIPLES(CBA,fnc,var1)
#define TFUNC(var1) TRIPLES(TFAR,fnc,var1)
// Main
#define QUOTE(var1) #var1
#define VERSION_CONFIG version = MAJOR.MINOR; versionStr = QUOTE(MAJOR.MINOR.PATCH.BUILD); versionAr[] = {MAJOR,MINOR,PATCH,BUILD}
// Path
#define PATHTOF_SYS(var1,var2,var3) \MAINPREFIX\var1\SUBPREFIX\var2\var3
#define PATHTOF(var1) PATHTOF_SYS(PREFIX,COMPONENT,var1)
#define PATHTOEF(var1,var2) PATHTOF_SYS(PREFIX,var1,var2)
#define QPATHTOF(var1) QUOTE(PATHTOF(var1))
#define QPATHTOEF(var1,var2) QUOTE(PATHTOEF(var1,var2))
#define PATHTOR_SYS(var1,var2,var3) MAINPREFIX\var1\SUBPREFIX\var2\var3
#define PATHTOR(var1) PATHTOR_SYS(PREFIX,COMPONENT,var1)
#define PATHTOER(var1,var2) PATHTOR_SYS(PREFIX,var1,var2)
#define QPATHTOR(var1) QUOTE(PATHTOR(var1))
#define QPATHTOER(var1,var2) QUOTE(PATHTOER(var1,var2))
// Class
#define CLASS(var1) DOUBLES(PREFIX,var1)
#define QCLASS(var1) QUOTE(DOUBLES(PREFIX,var1))
// Stringtable
#define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1))
#define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2))
// Inventory
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
}
#ifdef DISABLE_COMPILE_CACHE
#undef PREP
#define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QPATHTOF(functions\DOUBLES(fnc,fncName).sqf)
#else
#undef PREP
#define PREP(fncName) [QPATHTOF(functions\DOUBLES(fnc,fncName).sqf), QFUNC(fncName)] call CBA_fnc_compileFunction
#endif

View File

@ -0,0 +1,15 @@
#define MAINPREFIX z
#define PREFIX a3f_factions
#include "script_version.hpp"
#define VERSION MAJOR.MINOR
#define VERSION_AR MAJOR,MINOR,PATCH,BUILD
#define REQUIRED_VERSION 2.12
#ifdef COMPONENT_BEAUTIFIED
#define COMPONENT_NAME QUOTE(IDS Factions - COMPONENT_BEAUTIFIED)
#else
#define COMPONENT_NAME QUOTE(IDS Factions - COMPONENT)
#endif

View File

@ -0,0 +1,4 @@
#define MAJOR 1
#define MINOR 0
#define PATCH 0
#define BUILD 0

BIN
addons/main/ui/forge_ca.paa Normal file

Binary file not shown.

1
addons/pmc/$PBOPREFIX$ Normal file
View File

@ -0,0 +1 @@
z\a3f_factions\addons\pmc

167
addons/pmc/CfgOrbat.hpp Normal file
View File

@ -0,0 +1,167 @@
class CfgOrbat {
class FORGE {
class A3F_Base {
side = "West";
color[] = {0,0,0,1};
};
class A3F_Departments_Base: A3F_Base {
type = "HQ";
text = "FORGE PMC Departments";
textShort = "Departments";
assets[] = {};
description = "FORGE PMC Departments.";
};
class A3F_Loki_Base: A3F_Base {
type = "Recon";
size = "FireTeam";
description = "FORGE Element: LOKI";
text = "Task Force Loki";
textShort = "LOKI";
};
class A3F_CompanyHome {
side = "West";
type = "HQ";
text = "FORGE Private Military Company";
textShort = "FORGE PMC";
assets[] = {"B_A3F_suburban_PMC_01", "B_A3F_tahoe_UNM_PMC_01"};
color[] = {0,0,0,1};
description = "FORGE PMC Orbat Groups.";
subordinates[] = {"A3F_ShareHolders", "A3F_ExecutiveMembers", "A3F_Departments"};
};
class A3F_ShareHolders {
side = "West";
type = "HQ";
text = "FORGE PMC Shareholders";
textShort = "Shareholders";
assets[] = {};
color[] = {0,0,0,1};
description = "FORGE PMC Shareholders.";
};
class A3F_ExecutiveMembers {
side = "West";
type = "HQ";
text = "FORGE PMC Executive Members";
textShort = "Executive Members";
assets[] = {};
color[] = {0,0,0,1};
description = "FORGE PMC Executive Members.";
};
class A3F_Departments {
side = "West";
type = "HQ";
text = "FORGE PMC Departments";
textShort = "Departments";
assets[] = {};
color[] = {0,0,0,1};
description = "FORGE PMC Departments.";
subordinates[] = {"A3F_DepartmentsOperations", "A3F_DepartmentsPersonnel", "A3F_DepartmentsTech", "A3F_DepartmentsMedia"};
};
class A3F_DepartmentsOperations: A3F_Departments_Base {
text = "Operations Department";
textShort = "Operations Dept.";
subordinates[] = {"A3F_Command", "A3F_DepartmentsOperationsContracts"};
};
class A3F_DepartmentsOperationsContracts: A3F_Departments_Base {
text = "Contract Acquisition";
textShort = "Contract Acquisition";
type = "Unknown";
};
class A3F_DepartmentsPersonnel: A3F_Departments_Base {
text = "Personnel Department";
textShort = "Personnel Dept.";
subordinates[] = {"A3F_DepartmentsPersonnelTraining", "A3F_DepartmentsPersonnelEmployeeCare", "A3F_DepartmentsPersonnelPayroll"};
};
class A3F_DepartmentsPersonnelTraining: A3F_Departments_Base {
text = "Training";
textShort = "Training";
type = "Unknown";
};
class A3F_DepartmentsPersonnelEmployeeCare: A3F_Departments_Base {
text = "Employee Care";
textShort = "Employee Care";
type = "Unknown";
};
class A3F_DepartmentsPersonnelPayroll: A3F_Departments_Base {
text = "Payroll";
textShort = "Payroll";
type = "Unknown";
};
class A3F_DepartmentsTech: A3F_Departments_Base {
text = "Tech Department";
textShort = "Tech Dept.";
subordinates[] = {"A3F_DepartmentsTechWeaponMaintenance", "A3F_DepartmentsTechResearchDevelopment"};
};
class A3F_DepartmentsTechWeaponMaintenance: A3F_Departments_Base {
text = "Weapon Maintenance";
textShort = "Weapon Maint.";
type = "Unknown";
};
class A3F_DepartmentsTechResearchDevelopment: A3F_Departments_Base {
text = "Research and Development";
textShort = "R&D";
type = "Unknown";
};
class A3F_DepartmentsMedia: A3F_Departments_Base {
text = "Media Department";
textShort = "Media Dept.";
subordinates[] = {"A3F_DepartmentsMediaCompanyRelations", "A3F_DepartmentsMediaNationalOutreach"};
};
class A3F_DepartmentsMediaCompanyRelations: A3F_Departments_Base {
text = "Company Relations";
textShort = "Company Relations";
type = "Unknown";
};
class A3F_DepartmentsMediaNationalOutreach: A3F_Departments_Base {
text = "National Outreach";
textShort = "National Outreach";
type = "Unknown";
};
class A3F_Command: A3F_Base {
side = "West";
type = "HQ";
size = "Company";
text = "FORGE Command Group";
textShort = "FORGE Command";
color[] = {0,0,0,1};
description = "FORGE Command Group";
subordinates[] = {"A3F_Loki_Command"};
};
class A3F_Loki_Command: A3F_Loki_Base {
size = "Brigade";
// insignia = "\z\a3f_factions\addons\pmc\data\a3f_armpatch.paa";
// texture = "";
subordinates[] = {"A3F_Loki_Team1", "A3F_Loki_Team2", "A3F_Loki_Team3"};
};
class A3F_Loki_Team1: A3F_Loki_Base {
text = "Field Operatives";
TextShort = "Field Operatives";
size = "Squad";
type = "Unknown";
commander = "J. Schmidt";
commanderRank = "Captain";
};
class A3F_Loki_Team2: A3F_Loki_Base {
text = "Intelligence Analysts";
TextShort = "Intelligence Analysts";
size = "Squad";
type = "Unknown";
};
class A3F_Loki_Team3: A3F_Loki_Base {
text = "Strike Team Echo";
TextShort = "Strike Team Echo";
size = "Squad";
};
};
};

124
addons/pmc/CfgVehicles.hpp Normal file
View File

@ -0,0 +1,124 @@
#define MACRO_BASE_CLASS_COMMON \
author = "IDSolutions"; \
scope = 0; \
side = 2; \
identityTypes[] = {"LanguageENG_F","Head_NATO","G_NATO_default"}; \
faction = QCLASS(IND); \
backpack = ""; \
weapons[] = {"Throw", "Put"}; \
respawnWeapons[] = {"Throw", "Put"}; \
magazines[] = {}; \
respawnMagazines[] = {}; \
items[] = {}; \
respawnItems[] = {}; \
linkedItems[] = {}; \
respawnLinkedItems[] = {}; \
DLC = QUOTE(PREFIX); \
tLightInfluence = 0.015; \
class Eventhandlers;
class CfgVehicles {
class Man;
class CAManBase: Man {
class Eventhandlers;
class ACE_Actions;
class ACE_SelfActions;
};
class Item_Base_F;
class B_CTRG_Soldier_base_F;
class CLASS(Unit_Combat_LS_Base): B_CTRG_Soldier_base_F {
MACRO_BASE_CLASS_COMMON
hiddenSelections[] = {"camo", "insignia"};
};
class CLASS(Unit_Combat_LS_PMC_RGR): CLASS(Unit_Combat_LS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_LS_PMC_RGR);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_rgr_co.paa"};
};
class CLASS(Unit_Combat_LS_PMC_TN): CLASS(Unit_Combat_LS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_LS_PMC_TN);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_tn_co.paa"};
};
class CLASS(Unit_Combat_LS_PMC_BLK_TN): CLASS(Unit_Combat_LS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_LS_PMC_BLK_TN);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_blk_tn_co.paa"};
};
class CLASS(Unit_Combat_LS_PMC_RGR_TN): CLASS(Unit_Combat_LS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_LS_PMC_RGR_TN);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_rgr_tn_co.paa"};
};
class CLASS(Unit_Combat_LS_PMC_BLK): CLASS(Unit_Combat_LS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_LS_PMC_BLK);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_blk_co.paa"};
};
class B_CTRG_Soldier_2_F;
class CLASS(Unit_Combat_TS_Base): B_CTRG_Soldier_2_F {
MACRO_BASE_CLASS_COMMON
hiddenSelections[] = {"camo", "camo2"};
};
class CLASS(Unit_Combat_TS_PMC_RGR): CLASS(Unit_Combat_TS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_TS_PMC_RGR);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_rgr_co.paa","\A3\Characters_F\Common\Data\basicbody_black_co.paa"};
};
class CLASS(Unit_Combat_TS_PMC_TN): CLASS(Unit_Combat_TS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_TS_PMC_TN);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_tn_co.paa","\A3\Characters_F\Common\Data\basicbody_black_co.paa"};
};
class CLASS(Unit_Combat_TS_PMC_BLK_TN): CLASS(Unit_Combat_TS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_TS_PMC_BLK_TN);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_blk_tn_co.paa","\A3\Characters_F\Common\Data\basicbody_black_co.paa"};
};
class CLASS(Unit_Combat_TS_PMC_RGR_TN): CLASS(Unit_Combat_TS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_TS_PMC_RGR_TN);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_rgr_tn_co.paa","\A3\Characters_F\Common\Data\basicbody_black_co.paa"};
};
class CLASS(Unit_Combat_TS_PMC_BLK): CLASS(Unit_Combat_TS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_TS_PMC_BLK);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_blk_co.paa","\A3\Characters_F\Common\Data\basicbody_black_co.paa"};
};
class B_CTRG_Soldier_3_F;
class CLASS(Unit_Combat_RS_Base): B_CTRG_Soldier_3_F {
MACRO_BASE_CLASS_COMMON
hiddenSelections[] = {"camo", "insignia"};
};
class CLASS(Unit_Combat_RS_PMC_RGR): CLASS(Unit_Combat_RS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_RS_PMC_RGR);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_rgr_co.paa"};
};
class CLASS(Unit_Combat_RS_PMC_TN): CLASS(Unit_Combat_RS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_RS_PMC_TN);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_tn_co.paa"};
};
class CLASS(Unit_Combat_RS_PMC_BLK_TN): CLASS(Unit_Combat_RS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_RS_PMC_BLK_TN);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_blk_tn_co.paa"};
};
class CLASS(Unit_Combat_RS_PMC_RGR_TN): CLASS(Unit_Combat_RS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_RS_PMC_RGR_TN);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_rgr_tn_co.paa"};
};
class CLASS(Unit_Combat_RS_PMC_BLK): CLASS(Unit_Combat_RS_Base) {
scope = 1;
uniformClass = QCLASS(Uniform_Combat_RS_PMC_BLK);
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_blk_co.paa"};
};
#include "CfgVehicles_GroundItems.hpp"
#include "CfgVehicles_PublicUnits.hpp"
};

View File

@ -0,0 +1,153 @@
#define MACRO_ITEM_COMMON \
dlc = QUOTE(PREFIX); \
scope = 2; \
scopeCurator = 2; \
editorCategory = "EdCat_Equipment"; \
editorSubcategory = "EdSubcat_Uniforms"; \
vehicleClass = "ItemsUniforms"; \
model = "\A3\Weapons_F\DummySuitpack.p3d";
// Combat Uniform Ranger Green
class CLASS(Item_Uniform_Combat_LS_PMC_RGR): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform Long (PMC, Ranger Green)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_LS_PMC_RGR),1);
};
};
class CLASS(Item_Uniform_Combat_TS_PMC_RGR): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform TShirt (PMC, Ranger Green)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_TS_PMC_RGR),1);
};
};
class CLASS(Item_Uniform_Combat_RS_PMC_RGR): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform Rolled (PMC, Ranger Green)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_RS_PMC_RGR),1);
};
};
// Combat Uniform Tan
class CLASS(Item_Uniform_Combat_LS_PMC_TN): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform Long (PMC, Tan)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_LS_PMC_TN),1);
};
};
class CLASS(Item_Uniform_Combat_TS_PMC_TN): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform TShirt (PMC, Tan)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_TS_PMC_TN),1);
};
};
class CLASS(Item_Uniform_Combat_RS_PMC_TN): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform Rolled (PMC, Tan)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_RS_PMC_TN),1);
};
};
// Combat Uniform Black, Tan
class CLASS(Item_Uniform_Combat_LS_PMC_BLK_TN): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform Long (PMC, Black, Tan)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_LS_PMC_BLK_TN),1);
};
};
class CLASS(Item_Uniform_Combat_TS_PMC_BLK_TN): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform TShirt (PMC, Black, Tan)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_TS_PMC_BLK_TN),1);
};
};
class CLASS(Item_Uniform_Combat_RS_PMC_BLK_TN): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform Rolled (PMC, Black, Tan)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_RS_PMC_BLK_TN),1);
};
};
// Combat Uniform Ranger Green, Tan
class CLASS(Item_Uniform_Combat_LS_PMC_RGR_TN): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform Long (PMC, Ranger Green, Tan)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_LS_PMC_RGR_TN),1);
};
};
class CLASS(Item_Uniform_Combat_TS_PMC_RGR_TN): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform TShirt (PMC, Ranger Green, Tan)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_TS_PMC_RGR_TN),1);
};
};
class CLASS(Item_Uniform_Combat_RS_PMC_RGR_TN): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform Rolled (PMC, Ranger Green, Tan)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_RS_PMC_RGR_TN),1);
};
};
// Combat Uniform Black
class CLASS(Item_Uniform_Combat_LS_PMC_BLK): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform Long (PMC, Black)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_LS_PMC_BLK),1);
};
};
class CLASS(Item_Uniform_Combat_TS_PMC_BLK): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform TShirt (PMC, Black)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_TS_PMC_BLK),1);
};
};
class CLASS(Item_Uniform_Combat_RS_PMC_BLK): Item_Base_F {
MACRO_ITEM_COMMON
displayName = "Combat Uniform Rolled (PMC, Black)";
author = "IDSolutions";
class TransportItems {
MACRO_ADDITEM(CLASS(Uniform_Combat_RS_PMC_BLK),1);
};
};

View File

@ -0,0 +1,44 @@
class CLASS(Unit_I_Contractor_RGR): CLASS(Unit_Combat_RS_PMC_RGR) {
scope = 2;
scopeCurator = 2;
faction = QCLASS(I_Contractors);
editorCategory = QCLASS(Loki);
editorSubcategory = QUOTE(EdSubcat_Personnel);
displayName = "Contractor (Ranger Green, No Equipment)";
};
class CLASS(Unit_I_Contractor_TN): CLASS(Unit_Combat_RS_PMC_TN) {
scope = 2;
scopeCurator = 2;
faction = QCLASS(I_Contractors);
editorCategory = QCLASS(Loki);
editorSubcategory = QUOTE(EdSubcat_Personnel);
displayName = "Contractor (Tan, No Equipment)";
};
class CLASS(Unit_I_Contractor_BLK_TN): CLASS(Unit_Combat_RS_PMC_BLK_TN) {
scope = 2;
scopeCurator = 2;
faction = QCLASS(I_Contractors);
editorCategory = QCLASS(Loki);
editorSubcategory = QUOTE(EdSubcat_Personnel);
displayName = "Contractor (Black, Tan, No Equipment)";
};
class CLASS(Unit_I_Contractor_RGR_TN): CLASS(Unit_Combat_RS_PMC_RGR_TN) {
scope = 2;
scopeCurator = 2;
faction = QCLASS(I_Contractors);
editorCategory = QCLASS(Loki);
editorSubcategory = QUOTE(EdSubcat_Personnel);
displayName = "Contractor (Ranger Green, Tan, No Equipment)";
};
class CLASS(Unit_I_Contractor_BLK): CLASS(Unit_Combat_RS_PMC_BLK) {
scope = 2;
scopeCurator = 2;
faction = QCLASS(I_Contractors);
editorCategory = QCLASS(Loki);
editorSubcategory = QUOTE(EdSubcat_Personnel);
displayName = "Contractor (Black, No Equipment)";
};

191
addons/pmc/CfgWeapons.hpp Normal file
View File

@ -0,0 +1,191 @@
class CfgWeapons {
class UniformItem;
class Uniform_Base;
class CLASS(Uniform_Base): Uniform_Base {
DLC = QUOTE(PREFIX);
scope = 0;
picture = "\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_ca.paa";
model ="\A3\Characters_F\Common\Suitpacks\suitpack_original_F.p3d";
class ItemInfo: UniformItem {
uniformModel = "-";
containerClass = "Supply60";
mass = 20;
};
};
// Combat Uniform Ranger Green
class CLASS(Uniform_Combat_LS_PMC_RGR): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform Long (PMC, Ranger Green)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_rgr_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_LS_PMC_RGR);
};
};
class CLASS(Uniform_Combat_TS_PMC_RGR): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform TShirt (PMC, Ranger Green)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_rgr_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_TS_PMC_RGR);
};
};
class CLASS(Uniform_Combat_RS_PMC_RGR): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform Rolled (PMC, Ranger Green)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_rgr_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_RS_PMC_RGR);
};
};
// Combat Uniform Tan
class CLASS(Uniform_Combat_LS_PMC_TN): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform Long (PMC, Tan)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_tn_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_LS_PMC_TN);
};
};
class CLASS(Uniform_Combat_TS_PMC_TN): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform TShirt (PMC, Tan)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_tn_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_TS_PMC_TN);
};
};
class CLASS(Uniform_Combat_RS_PMC_TN): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform Rolled (PMC, Tan)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_tn_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_RS_PMC_TN);
};
};
// Combat Uniform Black, Tan
class CLASS(Uniform_Combat_LS_PMC_BLK_TN): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform Long (PMC, Black, Tan)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_blk_tn_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_LS_PMC_BLK_TN);
};
};
class CLASS(Uniform_Combat_TS_PMC_BLK_TN): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform TShirt (PMC, Black, Tan)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_blk_tn_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_TS_PMC_BLK_TN);
};
};
class CLASS(Uniform_Combat_RS_PMC_BLK_TN): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform Rolled (PMC, Black, Tan)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_blk_tn_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_RS_PMC_BLK_TN);
};
};
// Combat Uniform Ranger Green, Tan
class CLASS(Uniform_Combat_LS_PMC_RGR_TN): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform Long (PMC, Ranger Green, Tan)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_rgr_tn_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_LS_PMC_RGR_TN);
};
};
class CLASS(Uniform_Combat_TS_PMC_RGR_TN): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform TShirt (PMC, Ranger Green, Tan)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_rgr_tn_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_TS_PMC_RGR_TN);
};
};
class CLASS(Uniform_Combat_RS_PMC_RGR_TN): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform Rolled (PMC, Ranger Green, Tan)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_rgr_tn_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_RS_PMC_RGR_TN);
};
};
// Combat Uniform Black
class CLASS(Uniform_Combat_LS_PMC_BLK): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform Long (PMC, Black)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_blk_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_LS_PMC_BLK);
};
};
class CLASS(Uniform_Combat_TS_PMC_BLK): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform TShirt (PMC, Black)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_blk_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_TS_PMC_BLK);
};
};
class CLASS(Uniform_Combat_RS_PMC_BLK): CLASS(Uniform_Base) {
author = "IDSolutions";
scope = 2;
displayName = "Combat Uniform Rolled (PMC, Black)";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\z\a3f_factions\addons\pmc\data\uniform_combat_pmc_blk_co.paa"};
class ItemInfo: ItemInfo {
uniformClass = QCLASS(Unit_Combat_RS_PMC_BLK);
};
};
};

63
addons/pmc/config.cpp Normal file
View File

@ -0,0 +1,63 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {
// Uniforms
QCLASS(Item_Uniform_Combat_LS_PMC_RGR),
QCLASS(Item_Uniform_Combat_LS_PMC_TN),
QCLASS(Item_Uniform_Combat_LS_PMC_BLK_TN),
QCLASS(Item_Uniform_Combat_LS_PMC_RGR_TN),
QCLASS(Item_Uniform_Combat_LS_PMC_BLK),
QCLASS(Item_Uniform_Combat_TS_PMC_RGR),
QCLASS(Item_Uniform_Combat_TS_PMC_TN),
QCLASS(Item_Uniform_Combat_TS_PMC_BLK_TN),
QCLASS(Item_Uniform_Combat_TS_PMC_RGR_TN),
QCLASS(Item_Uniform_Combat_TS_PMC_BLK),
QCLASS(Item_Uniform_Combat_RS_PMC_RGR),
QCLASS(Item_Uniform_Combat_RS_PMC_TN),
QCLASS(Item_Uniform_Combat_RS_PMC_BLK_TN),
QCLASS(Item_Uniform_Combat_RS_PMC_RGR_TN),
QCLASS(Item_Uniform_Combat_RS_PMC_BLK),
// Public Units
QCLASS(Unit_I_Contractor_RGR),
QCLASS(Unit_I_Contractor_TN),
QCLASS(Unit_I_Contractor_BLK_TN),
QCLASS(Unit_I_Contractor_RGR_TN),
QCLASS(Unit_I_Contractor_BLK)
};
weapons[] = {
// Long Sleeves
QCLASS(Uniform_Combat_LS_PMC_RGR),
QCLASS(Uniform_Combat_LS_PMC_TN),
QCLASS(Uniform_Combat_LS_PMC_BLK_TN),
QCLASS(Uniform_Combat_LS_PMC_RGR_TN),
QCLASS(Uniform_Combat_LS_PMC_BLK),
// TShirts
QCLASS(Uniform_Combat_TS_PMC_RGR),
QCLASS(Uniform_Combat_TS_PMC_TN),
QCLASS(Uniform_Combat_TS_PMC_BLK_TN),
QCLASS(Uniform_Combat_TS_PMC_RGR_TN),
QCLASS(Uniform_Combat_TS_PMC_BLK),
// Rolled Sleeves
QCLASS(Uniform_Combat_RS_PMC_RGR),
QCLASS(Uniform_Combat_RS_PMC_TN),
QCLASS(Uniform_Combat_RS_PMC_BLK_TN),
QCLASS(Uniform_Combat_RS_PMC_RGR_TN),
QCLASS(Uniform_Combat_RS_PMC_BLK)
};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"a3f_factions_main"};
authors[] = {"J. Schmidt", "Creedcoder"};
author = "IDSolutions";
VERSION_CONFIG;
};
};
#include "CfgOrbat.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,16 @@
#define COMPONENT pmc
#define COMPONENT_BEAUTIFIED PMC
#include "\z\a3f_factions\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
#ifdef DEBUG_ENABLED_PMC
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_PMC
#define DEBUG_SETTINGS DEBUG_SETTINGS_PMC
#endif
#include "\z\a3f_factions\addons\main\script_macros.hpp"

View File

@ -0,0 +1,3 @@
{
"version": "1.0.0"
}

BIN
icon_128_ca.paa Normal file

Binary file not shown.

BIN
icon_128_highlight_ca.paa Normal file

Binary file not shown.

BIN
icon_64_ca.paa Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
x\cba\addons\main

View File

@ -0,0 +1,12 @@
#define COMPONENT main
#include "script_mod.hpp"
#ifdef DEBUG_ENABLED_MAIN
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_MAIN
#define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN
#endif
#include "script_macros.hpp"

View File

@ -0,0 +1 @@
#include "script_macros_common.hpp"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
#define false 0
#define true 1
#define private 0
#define public 2

View File

@ -0,0 +1,85 @@
#include "\x\cba\addons\main\script_macros_common.hpp"
/*
Header: script_macros_mission.hpp
Description:
Modifies script_common_macros.hpp for compatiblity with missions.
Some addon specific functionality might be lost.
Authors:
Muzzleflash
Changes from script_macros_mission.hpp:
Follows Standard:
Object variables: PREFIX_COMPONENT
Main-object variables: PREFIX_main
Paths: PREFIX\COMPONENT\SCRIPTNAME.sqf
Or if CUSTOM_FOLDER is defined:
CUSTOM_FOLDER\SCRIPTNAME.sqf
eg. six\sys_menu\fDate.sqf
Usage:
Define PREFIX and COMPONENT, then include this file:
#include "\x\cba\addons\main\script_macros_mission.hpp"
*/
/*
CUSTOM_FOLDER
Custom folder to search for files in. Will not change variable names.
Default is PREFIX\COMPONENT
Example:
(begin example)
#define CUSTOM_FOLDER MyPackage\ScriptA
(end)
(begin example)
#define CUSTOM_FOLDER COMPONENT\functions
(end)
*/
#undef PATHTO_SYS
#undef PATHTOF_SYS
#undef PATHTOF2_SYS
#ifdef CUSTOM_FOLDER
#define PATHTO_SYS(var1,var2,var3) ##CUSTOM_FOLDER\##var3.sqf
#define PATHTOF_SYS(var1,var2,var3) ##CUSTOM_FOLDER\##var3
#define PATHTOF2_SYS(var1,var2,var3) ##CUSTOM_FOLDER\##var3
#else
#define PATHTO_SYS(var1,var2,var3) ##var1\##var2\##var3.sqf
#define PATHTOF_SYS(var1,var2,var3) ##var1\##var2\##var3
#define PATHTOF2_SYS(var1,var2,var3) ##var1\##var2\##var3
#endif
/************************** REMOVAL OF MACROS ***********************/
#undef MAINPREFIX
#undef SUBPREFIX
#undef VERSION_AR
#undef VERSION_CONFIG
#undef VERSIONING_SYS
#undef VERSIONING
#undef PRELOAD_ADDONS
#undef BWC_CONFIG
#undef XEH_DISABLED
#undef XEH_PRE_INIT
#undef XEH_PRE_CINIT
#undef XEH_PRE_SINIT
#undef XEH_POST_INIT
#undef XEH_POST_CINIT
#undef XEH_POST_SINIT
#undef PATHTO_FNC
#define PATHTO_FNC(func) class func {\
file = QUOTE(DOUBLES(fnc,func).sqf);\
RECOMPILE;\
}

View File

@ -0,0 +1 @@
x\cba\addons\xeh

View File

@ -0,0 +1,103 @@
#define COMPONENT xeh
#include "\x\cba\addons\main\script_mod.hpp"
//#define DEBUG_ENABLED_XEH
#ifdef DEBUG_ENABLED_XEH
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_XEH
#define DEBUG_SETTINGS DEBUG_SETTINGS_XEH
#endif
#define DEBUG_SYNCHRONOUS
#include "\x\cba\addons\main\script_macros.hpp"
#define XEH_LOG(msg) if (!SLX_XEH_DisableLogging) then { INFO_2("%1 %2",[ARR_3(diag_frameNo,diag_tickTime,time)],msg); }
#define SYS_EVENTHANDLERS(type,class) format [QGVAR(%1:%2), type, class]
#define EVENTHANDLERS(type,class) (missionNamespace getVariable [SYS_EVENTHANDLERS(type,class), []])
#define SETEVENTHANDLERS(type,class,events) (missionNamespace setVariable [SYS_EVENTHANDLERS(type,class), events])
// For any class that does not comply with XEH or has at least one incompatible descendant.
#define ISINCOMP(class) !isNil {GVAR(incompatible) getVariable class}
#define SETINCOMP(class) GVAR(incompatible) setVariable [class, true]
// Event handler variables set.
#define ISPROCESSED(obj) (obj getVariable [QGVAR(isProcessed), false])
#define SETPROCESSED(obj) obj setVariable [QGVAR(isProcessed), true]
// Init and InitPost events done.
#define ISINITIALIZED(obj) (obj getVariable [QGVAR(isInitialized), false])
#define SETINITIALIZED(obj) obj setVariable [QGVAR(isInitialized), true]
#define XEH_FORMAT_CONFIG_NAME(name) format ["Extended_%1_EventHandlers", name]
#define ISKINDOF(object,classname,allowInherit,excluded) ((allowInherit || {typeOf object == classname}) && {{object isKindOf _x} count (excluded) == 0})
#include "script_xeh.hpp"
#undef XEH_ENABLED
#define XEH_ENABLED class EventHandlers {class XEH_CLASS: XEH_CLASS_BASE {};}; SLX_XEH_DISABLED = 0
#define XEH_EVENTS \
"AnimChanged", \
"AnimDone", \
"AnimStateChanged", \
"CargoLoaded", \
"CargoUnloaded", \
"ContainerClosed", \
"ContainerOpened", \
"ControlsShifted", \
"Dammaged", \
"Deleted", \
"Disassembled", \
"Engine", \
"EpeContact", \
"EpeContactEnd", \
"EpeContactStart", \
"Explosion", \
"Fired", \
"FiredBis", \
"FiredMan", \
"FiredNear", \
"Fuel", \
"Gear", \
"GestureChanged", \
"GestureDone", \
"GetIn", \
"GetInMan", \
"GetOut", \
"GetOutMan", \
"Hit", \
"HitPart", \
"IncomingMissile", \
"Init", \
"InitPost", \
"InventoryClosed", \
"InventoryOpened", \
"Killed", \
"LandedTouchDown", \
"LandedStopped", \
"Local", \
"OpticsModeChanged", \
"OpticsSwitch", \
"Put", \
"Reloaded", \
"Respawn", \
"RopeAttach", \
"RopeBreak", \
"SeatSwitched", \
"SeatSwitchedMan", \
"SlotItemChanged", \
"SoundPlayed", \
"Suppressed", \
"Take", \
"TurnIn", \
"TurnOut", \
"VisionModeChanged", \
"WeaponAssembled", \
"WeaponDisassembled", \
"WeaponDeployed", \
"WeaponRested"

View File

@ -0,0 +1,2 @@
// deprecated - use x\CBA\addons\main\script_macros_common.hpp instead
#include "\x\cba\addons\main\script_macros_common.hpp"

View File

@ -0,0 +1,132 @@
/*
Header: script_xeh.hpp
Description:
Used internally.
*/
/////////////////////////////////////////////////////////////////////////////////
// MACRO: EXTENDED_EVENTHANDLERS
// Add all XEH event handlers
/////////////////////////////////////////////////////////////////////////////////
#define EXTENDED_EVENTHANDLERS init = "call cba_xeh_fnc_init"; \
fired = "call cba_xeh_fnc_fired"; \
animChanged = "call cba_xeh_fnc_animChanged"; \
animDone = "call cba_xeh_fnc_animDone"; \
animStateChanged = "call cba_xeh_fnc_animStateChanged"; \
cargoLoaded = "call cba_xeh_fnc_cargoLoaded"; \
cargoUnloaded = "call cba_xeh_fnc_cargoUnloaded"; \
containerClosed = "call cba_xeh_fnc_containerClosed"; \
containerOpened = "call cba_xeh_fnc_containerOpened"; \
controlsShifted = "call cba_xeh_fnc_controlsShifted"; \
dammaged = "call cba_xeh_fnc_dammaged"; \
deleted = "call cba_xeh_fnc_deleted"; \
disassembled = "call cba_xeh_fnc_disassembled"; \
engine = "call cba_xeh_fnc_engine"; \
epeContact = "call cba_xeh_fnc_epeContact"; \
epeContactEnd = "call cba_xeh_fnc_epeContactEnd"; \
epeContactStart = "call cba_xeh_fnc_epeContactStart"; \
explosion = "call cba_xeh_fnc_explosion"; \
firedMan = "call cba_xeh_fnc_firedMan"; \
firedNear = "call cba_xeh_fnc_firedNear"; \
fuel = "call cba_xeh_fnc_cba_xeh_fuel"; \
gear = "call cba_xeh_fnc_gear"; \
gestureChanged = "call cba_xeh_fnc_gestureChanged"; \
gestureDone = "call cba_xeh_fnc_gestureDone"; \
getIn = "call cba_xeh_fnc_getIn"; \
getInMan = "call cba_xeh_fnc_getInMan"; \
getOut = "call cba_xeh_fnc_getOut"; \
getOutMan = "call cba_xeh_fnc_getOutMan"; \
hit = "call cba_xeh_fnc_hit"; \
hitPart = "call cba_xeh_fnc_hitPart"; \
incomingMissile = "call cba_xeh_fnc_incomingMissile"; \
inventoryClosed = "call cba_xeh_fnc_inventoryClosed"; \
inventoryOpened = "call cba_xeh_fnc_inventoryOpened"; \
killed = "call cba_xeh_fnc_killed"; \
landedTouchDown = "call cba_xeh_fnc_landedTouchDown"; \
landedStopped = "call cba_xeh_fnc_landedStopped"; \
local = "call cba_xeh_fnc_local"; \
opticsModeChanged = "call cba_xeh_fnc_opticsModeChanged"; \
opticsSwitch = "call cba_xeh_fnc_opticsSwitch"; \
put = "call cba_xeh_fnc_put"; \
reloaded = "call cba_xeh_fnc_reloaded"; \
respawn = "call cba_xeh_fnc_respawn"; \
ropeAttach = "call cba_xeh_fnc_ropeAttach"; \
ropeBreak = "call cba_xeh_fnc_ropeBreak"; \
seatSwitched = "call cba_xeh_fnc_seatSwitched"; \
seatSwitchedMan = "call cba_xeh_fnc_seatSwitchedMan"; \
slotItemChanged = "call cba_xeh_fnc_slotItemChanged"; \
suppressed = "call cba_xeh_fnc_suppressed"; \
soundPlayed = "call cba_xeh_fnc_soundPlayed"; \
take = "call cba_xeh_fnc_take"; \
turnIn = "call cba_xeh_fnc_turnIn"; \
turnOut = "call cba_xeh_fnc_turnOut"; \
visionModeChanged = "call cba_xeh_fnc_visionModeChanged"; \
weaponAssembled = "call cba_xeh_fnc_weaponAssembled"; \
weaponDisassembled = "call cba_xeh_fnc_weaponDisassembled"; \
weaponDeployed = "call cba_xeh_fnc_weaponDeployed"; \
weaponRested = "call cba_xeh_fnc_weaponRested";
/*
MACRO: DELETE_EVENTHANDLERS
Removes all event handlers.
*/
#define DELETE_EVENTHANDLERS init = ""; \
fired = ""; \
animChanged = ""; \
animDone = ""; \
animStateChanged = ""; \
cargoLoaded = ""; \
cargoUnloaded = ""; \
containerClosed = ""; \
containerOpened = ""; \
controlsShifted = ""; \
dammaged = ""; \
deleted = ""; \
disassembled = ""; \
engine = ""; \
epeContact = ""; \
epeContactEnd = ""; \
epeContactStart = ""; \
explosion = ""; \
firedMan = ""; \
firedNear = ""; \
fuel = ""; \
gear = ""; \
gestureChanged = ""; \
gestureDone = "" \
getIn = ""; \
getInMan = ""; \
getOut = ""; \
getOutMan = ""; \
hit = ""; \
hitPart = ""; \
incomingMissile = ""; \
inventoryClosed = ""; \
inventoryOpened = ""; \
killed = ""; \
landedTouchDown = ""; \
landedStopped = ""; \
local = ""; \
opticsModeChanged = ""; \
opticsSwitch = ""; \
put = ""; \
reloaded = ""; \
respawn = ""; \
ropeAttach = ""; \
ropeBreak = ""; \
seatSwitched = ""; \
seatSwitchedMan = ""; \
soundPlayed = ""; \
suppressed = ""; \
take = ""; \
turnIn = ""; \
turnOut = ""; \
visionModeChanged = ""; \
weaponAssembled = ""; \
weaponDisassembled = ""; \
weaponDeployed = ""; \
weaponRested = "";

View File

@ -0,0 +1 @@
z\ace\addons\common

View File

@ -0,0 +1,32 @@
#define COMPONENT common
#define COMPONENT_BEAUTIFIED Common
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_COMMON
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_COMMON
#define DEBUG_SETTINGS DEBUG_SETTINGS_COMMON
#endif
#include "\z\ace\addons\main\script_macros.hpp"
// just kept for BWC, canDig now uses GVAR(canDigSurfaces)
#define DIG_SURFACE_BLACKLIST [ \
"concrete", "concrete_exp", "concrete_int", "int_concrete", "int_concrete_exp", \
"pavement_exp", "int_pavement_exp", \
"tiling", "tiles_int", "int_tiles", \
"roof_tin", "roof_tiles", "rooftiles_exp", \
"tarmac", "asphalt_exp", \
"stones_exp", "rock", "stony", \
"metal", "gridmetal_exp", "metalplate_exp", "int_metalplate_exp", "metal_int", "wavymetal", "wavymetal_exp", "int_metal", "steel_exp", \
"lino_exp", "int_lino_exp", "int_mat_exp", \
"wood", "wood_int", "int_wood", "softwood_exp", "int_softwood_exp", "int_solidwood_exp" \
]
#define DIG_SURFACE_WHITELIST ["grass", "grasstall_exp", "forest_exp", "snow"]

View File

@ -0,0 +1 @@
z\ace\addons\main

View File

@ -0,0 +1,17 @@
#define COMPONENT main
#define COMPONENT_BEAUTIFIED Main
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_MAIN
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_MAIN
#define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN
#endif
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -0,0 +1,58 @@
/**
Fast Recompiling via function
**/
// #define DISABLE_COMPILE_CACHE
// To Use: [] call ACE_PREP_RECOMPILE;
#ifdef DISABLE_COMPILE_CACHE
#define LINKFUNC(x) {_this call FUNC(x)}
#define PREP_RECOMPILE_START if (isNil "ACE_PREP_RECOMPILE") then {ACE_RECOMPILES = []; ACE_PREP_RECOMPILE = {{call _x} forEach ACE_RECOMPILES;}}; private _recomp = {
#define PREP_RECOMPILE_END }; call _recomp; ACE_RECOMPILES pushBack _recomp;
#else
#define LINKFUNC(x) FUNC(x)
#define PREP_RECOMPILE_START ; /* disabled */
#define PREP_RECOMPILE_END ; /* disabled */
#endif
/**
STACK TRACING
**/
//#define ENABLE_CALLSTACK
//#define ENABLE_PERFORMANCE_COUNTERS
//#define DEBUG_EVENTS
#ifdef ENABLE_CALLSTACK
#define CALLSTACK(function) {if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'ANON', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'ANON'; private _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
#define CALLSTACK_NAMED(function, functionName) {if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, functionName, _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = functionName; private _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
#define DUMPSTACK ([__FILE__, __LINE__] call ACE_DUMPSTACK_FNC)
#define FUNC(var1) {if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(ADDON,fnc,var1)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(ADDON,fnc,var1)'; private _ret = _this call TRIPLES(ADDON,fnc,var1); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
#define EFUNC(var1,var2) {if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)'; private _ret = _this call TRIPLES(DOUBLES(PREFIX,var1),fnc,var2); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
#else
#define CALLSTACK(function) function
#define CALLSTACK_NAMED(function, functionName) function
#define DUMPSTACK ; /* disabled */
#endif
/**
PERFORMANCE COUNTERS SECTION
**/
//#define ENABLE_PERFORMANCE_COUNTERS
// To Use: [] call ace_common_fnc_dumpPerformanceCounters;
#ifdef ENABLE_PERFORMANCE_COUNTERS
#define CBA_fnc_addPerFrameHandler { _ret = [(_this select 0), (_this select 1), (_this select 2), #function] call CBA_fnc_addPerFrameHandler; if(isNil "ACE_PFH_COUNTER" ) then { ACE_PFH_COUNTER=[]; }; ACE_PFH_COUNTER pushBack [[_ret, __FILE__, __LINE__], [(_this select 0), (_this select 1), (_this select 2)]]; _ret }
#define CREATE_COUNTER(x) if(isNil "ACE_COUNTERS" ) then { ACE_COUNTERS=[]; }; GVAR(DOUBLES(x,counter))=[]; GVAR(DOUBLES(x,counter)) set[0, QUOTE(GVAR(DOUBLES(x,counter)))]; GVAR(DOUBLES(x,counter)) set[1, diag_tickTime]; ACE_COUNTERS pushBack GVAR(DOUBLES(x,counter));
#define BEGIN_COUNTER(x) if(isNil QUOTE(GVAR(DOUBLES(x,counter)))) then { CREATE_COUNTER(x) }; GVAR(DOUBLES(x,counter)) set[2, diag_tickTime];
#define END_COUNTER(x) GVAR(DOUBLES(x,counter)) pushBack [(GVAR(DOUBLES(x,counter)) select 2), diag_tickTime];
#define DUMP_COUNTERS ([__FILE__, __LINE__] call ACE_DUMPCOUNTERS_FNC)
#else
#define CREATE_COUNTER(x) ; /* disabled */
#define BEGIN_COUNTER(x) ; /* disabled */
#define END_COUNTER(x) ; /* disabled */
#define DUMP_COUNTERS ; /* disabled */
#endif

View File

@ -0,0 +1,179 @@
#define DEBUG_SYNCHRONOUS
#include "\x\cba\addons\main\script_macros_common.hpp"
#include "\x\cba\addons\xeh\script_xeh.hpp"
// Default versioning level
#define DEFAULT_VERSIONING_LEVEL 2
#define DGVAR(varName) if(isNil "ACE_DEBUG_NAMESPACE") then { ACE_DEBUG_NAMESPACE = []; }; if(!(QUOTE(GVAR(varName)) in ACE_DEBUG_NAMESPACE)) then { PUSH(ACE_DEBUG_NAMESPACE, QUOTE(GVAR(varName))); }; GVAR(varName)
#define DVAR(varName) if(isNil "ACE_DEBUG_NAMESPACE") then { ACE_DEBUG_NAMESPACE = []; }; if(!(QUOTE(varName) in ACE_DEBUG_NAMESPACE)) then { PUSH(ACE_DEBUG_NAMESPACE, QUOTE(varName)); }; varName
#define DFUNC(var1) TRIPLES(ADDON,fnc,var1)
#define DEFUNC(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)
#undef QFUNC
#undef QEFUNC
#define QFUNC(var1) QUOTE(DFUNC(var1))
#define QEFUNC(var1,var2) QUOTE(DEFUNC(var1,var2))
#define GETVAR_SYS(var1,var2) getVariable [ARR_2(QUOTE(var1),var2)]
#define SETVAR_SYS(var1,var2) setVariable [ARR_2(QUOTE(var1),var2)]
#define SETPVAR_SYS(var1,var2) setVariable [ARR_3(QUOTE(var1),var2,true)]
#undef GETVAR
#define GETVAR(var1,var2,var3) (var1 GETVAR_SYS(var2,var3))
#define GETMVAR(var1,var2) (missionNamespace GETVAR_SYS(var1,var2))
#define GETUVAR(var1,var2) (uiNamespace GETVAR_SYS(var1,var2))
#define GETPRVAR(var1,var2) (profileNamespace GETVAR_SYS(var1,var2))
#define GETPAVAR(var1,var2) (parsingNamespace GETVAR_SYS(var1,var2))
#undef SETVAR
#define SETVAR(var1,var2,var3) var1 SETVAR_SYS(var2,var3)
#define SETPVAR(var1,var2,var3) var1 SETPVAR_SYS(var2,var3)
#define SETMVAR(var1,var2) missionNamespace SETVAR_SYS(var1,var2)
#define SETUVAR(var1,var2) uiNamespace SETVAR_SYS(var1,var2)
#define SETPRVAR(var1,var2) profileNamespace SETVAR_SYS(var1,var2)
#define SETPAVAR(var1,var2) parsingNamespace SETVAR_SYS(var1,var2)
#define GETGVAR(var1,var2) GETMVAR(GVAR(var1),var2)
#define GETEGVAR(var1,var2,var3) GETMVAR(EGVAR(var1,var2),var3)
#define ARR_SELECT(ARRAY,INDEX,DEFAULT) (if (count ARRAY > INDEX) then {ARRAY select INDEX} else {DEFAULT})
#define ANY_OF(ARRAY,CONDITION) (ARRAY findIf {CONDITION} != -1)
// ACEX Merge
#define ACEX_PREFIX acex
#define XADDON DOUBLES(ACEX_PREFIX,COMPONENT)
#define XGVAR(var) DOUBLES(XADDON,var)
#define EXGVAR(var1,var2) TRIPLES(ACEX_PREFIX,var1,var2)
#define QXGVAR(var) QUOTE(XGVAR(var))
#define QEXGVAR(var1,var2) QUOTE(EXGVAR(var1,var2))
#define QQXGVAR(var) QUOTE(QXGVAR(var))
#define QQEXGVAR(var1,var2) QUOTE(QEXGVAR(var1,var2))
#define ACEX_PREP(func) PREP(func); TRIPLES(XADDON,fnc,func) = DFUNC(func)
#define MACRO_ADDWEAPON(WEAPON,COUNT) class _xx_##WEAPON { \
weapon = #WEAPON; \
count = COUNT; \
}
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
}
#define MACRO_ADDMAGAZINE(MAGAZINE,COUNT) class _xx_##MAGAZINE { \
magazine = #MAGAZINE; \
count = COUNT; \
}
#define MACRO_ADDBACKPACK(BACKPACK,COUNT) class _xx_##BACKPACK { \
backpack = #BACKPACK; \
count = COUNT; \
}
// weapon types
#define TYPE_WEAPON_PRIMARY 1
#define TYPE_WEAPON_HANDGUN 2
#define TYPE_WEAPON_SECONDARY 4
// magazine types
#define TYPE_MAGAZINE_HANDGUN_AND_GL 16 // mainly
#define TYPE_MAGAZINE_PRIMARY_AND_THROW 256
#define TYPE_MAGAZINE_SECONDARY_AND_PUT 512 // mainly
#define TYPE_MAGAZINE_MISSILE 768
// more types
#define TYPE_BINOCULAR_AND_NVG 4096
#define TYPE_WEAPON_VEHICLE 65536
#define TYPE_ITEM 131072
// item types
#define TYPE_DEFAULT 0
#define TYPE_MUZZLE 101
#define TYPE_OPTICS 201
#define TYPE_FLASHLIGHT 301
#define TYPE_BIPOD 302
#define TYPE_FIRST_AID_KIT 401
#define TYPE_FINS 501 // not implemented
#define TYPE_BREATHING_BOMB 601 // not implemented
#define TYPE_NVG 602
#define TYPE_GOGGLE 603
#define TYPE_SCUBA 604 // not implemented
#define TYPE_HEADGEAR 605
#define TYPE_FACTOR 607
#define TYPE_MAP 608
#define TYPE_COMPASS 609
#define TYPE_WATCH 610
#define TYPE_RADIO 611
#define TYPE_GPS 612
#define TYPE_HMD 616
#define TYPE_BINOCULAR 617
#define TYPE_MEDIKIT 619
#define TYPE_TOOLKIT 620
#define TYPE_UAV_TERMINAL 621
#define TYPE_VEST 701
#define TYPE_UNIFORM 801
#define TYPE_BACKPACK 901
#ifdef DISABLE_COMPILE_CACHE
#undef PREP
#define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QPATHTOF(functions\DOUBLES(fnc,fncName).sqf)
#else
#undef PREP
#define PREP(fncName) [QPATHTOF(functions\DOUBLES(fnc,fncName).sqf), QFUNC(fncName)] call CBA_fnc_compileFunction
#endif
#define PREP_MODULE(folder) [] call compile preprocessFileLineNumbers QPATHTOF(folder\__PREP__.sqf)
#define ACE_isHC (!hasInterface && !isDedicated)
#define IDC_STAMINA_BAR 193
#define ACE_DEPRECATED(arg1,arg2,arg3) WARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3",arg1,arg2,arg3)
#define PFORMAT_10(MESSAGE,A,B,C,D,E,F,G,H,I,J) \
format ['%1: A=%2, B=%3, C=%4, D=%5, E=%6, F=%7, G=%8, H=%9, I=%10 J=%11', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D), RETNIL(E), RETNIL(F), RETNIL(G), RETNIL(H), RETNIL(I), RETNIL(J)]
#ifdef DEBUG_MODE_FULL
#define TRACE_10(MESSAGE,A,B,C,D,E,F,G,H,I,J) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_10(str diag_frameNo + ' ' + (MESSAGE),A,B,C,D,E,F,G,H,I,J))
#else
#define TRACE_10(MESSAGE,A,B,C,D,E,F,G,H,I,J) /* disabled */
#endif
#define GRAVITY 9.8066
#define SD_TO_MIN_MAX(d) ((d) * 3.371) // Standard deviation -> min / max of random [min, mid, max]
// Angular unit conversion
// Conversion factor: 54 / (5 * PI)
#define MRAD_TO_MOA(d) ((d) * 3.43774677)
// Conversion factor: (5 * PI) / 54
#define MOA_TO_MRAD(d) ((d) * 0.29088821)
// Conversion factor: 60
#define DEG_TO_MOA(d) ((d) * 60)
// Conversion factor: 1 / 60
#define MOA_TO_DEG(d) ((d) / 60)
// Conversion factor: (50 * PI) / 9
#define DEG_TO_MRAD(d) ((d) * 17.45329252)
// Conversion factor: 9 / (50 * PI)
#define MRAD_TO_DEG(d) ((d) / 17.45329252)
// Conversion factor: PI / 10800
#define MOA_TO_RAD(d) ((d) * 0.00029088)
#define ZEUS_ACTION_CONDITION ([_target, {QUOTE(QUOTE(ADDON)) in curatorAddons _this}, missionNamespace, QUOTE(QGVAR(zeusCheck)), 1E11, 'ace_interactMenuClosed'] call EFUNC(common,cachedCall))
#define SUBSKILLS ["aimingAccuracy", "aimingShake", "aimingSpeed", "spotDistance", "spotTime", "courage", "reloadSpeed", "commanding", "general"]
// macro add a dummy cfgPatch and notLoaded entry
#define ACE_PATCH_NOT_LOADED(NAME,CAUSE) \
class CfgPatches { \
class DOUBLES(NAME,notLoaded) { \
units[] = {}; \
weapons[] = {}; \
requiredVersion = REQUIRED_VERSION; \
requiredAddons[] = {"ace_main"}; \
VERSION_CONFIG; \
}; \
}; \
class ace_notLoaded { \
NAME = CAUSE; \
};
#include "script_debug.hpp"

View File

@ -0,0 +1,23 @@
// COMPONENT should be defined in the script_component.hpp and included BEFORE this hpp
#define MAINPREFIX z
#define PREFIX ace
#include "script_version.hpp"
#define VERSION MAJOR.MINOR
#define VERSION_STR MAJOR.MINOR.PATCHLVL.BUILD
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD
// MINIMAL required version for the Mod. Components can specify others..
#define REQUIRED_VERSION 2.18
#define REQUIRED_CBA_VERSION {3,18,0}
#ifndef COMPONENT_BEAUTIFIED
#define COMPONENT_BEAUTIFIED COMPONENT
#endif
#ifdef SUBCOMPONENT_BEAUTIFIED
#define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED - SUBCOMPONENT_BEAUTIFIED)
#else
#define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED)
#endif

View File

@ -0,0 +1,4 @@
#define MAJOR 3
#define MINOR 18
#define PATCHLVL 1
#define BUILD 91

92
main.go Normal file
View File

@ -0,0 +1,92 @@
package main
import (
"encoding/json"
"fmt"
"log"
"os"
"path/filepath"
"code.gitea.io/sdk/gitea"
)
type VersionInfo struct {
Version string `json:"version"`
}
func main() {
client, err := createGiteaClient()
if err != nil {
log.Fatalf("Error creating Gitea client: %v", err)
}
version := os.Getenv("VERSION")
if version == "" {
log.Fatalf("VERSION environment variable is not set")
}
if err := updateVersionFile(version); err != nil {
log.Fatalf("Error updating version file: %v", err)
}
repoOwner := "IDSolutions"
repoName := "factions"
release, err := createRelease(client, repoOwner, repoName, version)
if err != nil {
log.Fatalf("Error creating release: %v", err)
}
// Construct the filename using the version
artifactFilename := fmt.Sprintf("a3f_factions-%s.zip", version)
artifactPath := filepath.Join("releases", artifactFilename)
if err := uploadArtifact(client, repoOwner, repoName, release.ID, artifactPath); err != nil {
log.Fatalf("Error uploading release asset: %v", err)
}
fmt.Println("Release created, artifact uploaded, and version file updated successfully!")
}
func updateVersionFile(version string) error {
versionInfo := VersionInfo{Version: version}
jsonData, err := json.MarshalIndent(versionInfo, "", " ")
if err != nil {
return fmt.Errorf("error marshaling version info: %w", err)
}
err = os.WriteFile("a3f_factions_version.json", jsonData, 0644)
if err != nil {
return fmt.Errorf("error writing version file: %w", err)
}
return nil
}
func createGiteaClient() (*gitea.Client, error) {
token := os.Getenv("GITHUB_TOKEN")
if token == "" {
return nil, fmt.Errorf("GITHUB_TOKEN environment variable is not set")
}
return gitea.NewClient("https://gitea.innovativedevsolutions.org", gitea.SetToken(token))
}
func createRelease(client *gitea.Client, owner, repo, version string) (*gitea.Release, error) {
release, _, err := client.CreateRelease(owner, repo, gitea.CreateReleaseOption{
TagName: version,
Title: fmt.Sprintf("IDSolutions Factions v%s", version),
Note: fmt.Sprintf("Release notes for version %s", version),
})
return release, err
}
func uploadArtifact(client *gitea.Client, owner, repo string, releaseID int64, artifactPath string) error {
file, err := os.Open(artifactPath)
if err != nil {
return fmt.Errorf("error opening artifact file: %w", err)
}
defer file.Close()
_, _, err = client.CreateReleaseAttachment(owner, repo, releaseID, file, filepath.Base(artifactPath))
return err
}

12
mod.cpp Normal file
View File

@ -0,0 +1,12 @@
name = "FORGE Factions";
author = "IDSolutions";
picture = "title_co.paa";
logoSmall = "icon_64_ca.paa";
logo = "icon_128_ca.paa";
logoOver = "icon_128_highlight_ca.paa";
tooltip = "FORGE";
tooltipOwned = "IDS Owned";
overview = "FORGE Factions - Official Modification";
description = "FORGE Factions - Version 1.0.0";
action = "https://innovativedevsolutions.org";
actionName = "Website";

BIN
title_co.paa Normal file

Binary file not shown.

187
tools/sqf_validator.py Normal file
View File

@ -0,0 +1,187 @@
#!/usr/bin/env python3
import fnmatch
import os
import re
import sys
def valid_keyword_after_code(content, index):
for word in ["for", "do", "count", "each", "forEach", "else", "and", "not", "isEqualTo", "isNotEqualTo", "in", "call", "spawn", "execVM", "catch", "param", "select", "apply", "findIf", "remoteExec"]:
if content.find(word, index, index + len(word)) != -1:
return True
return False
def check_sqf(filepath):
errors = []
with open(filepath, "r", encoding = "utf-8", errors = "ignore") as file:
content = file.read()
# Store all brackets we find in this file, so we can validate everything on the end
brackets = []
# Used in case we are in a line comment (//)
ignore_till_eol = False
# To check if we are in a comment block
in_comment_block = False
check_if_comment = False
# Used in case we are in a comment block (/* */)
# This is true if we detect a * inside a comment block
# If the next character is a /, it means we end our comment block
check_if_closing = False
# We ignore everything inside a string
in_string = False
# Used to store the starting type of a string, so we can match that to the end of a string
string_type = ""
# Used to check for semicolon after code blocks
last_is_curly_brace = False
check_for_semicolon = False
# Extra information so we know what line we find errors at
line_number = 1
char_index = 0
for c in content:
if last_is_curly_brace:
last_is_curly_brace = False
# Test generates false positives with binary commands that take CODE as 2nd arg (e.g. findIf)
check_for_semicolon = not re.search("findIf", content, re.IGNORECASE)
# Keep track of current line number
if c == "\n":
line_number += 1
# While we are in a string, we can ignore everything else, except the end of the string
if in_string:
if c == string_type:
in_string = False
# Look for the end of this comment block
elif in_comment_block:
if c == "*":
check_if_closing = True
elif check_if_closing:
if c == "/":
in_comment_block = False
elif c != "*":
check_if_closing = False
# If we are not in a comment block, we will check if we are at the start of one or count the () {} and []
else:
# This means we have encountered a /, so we are now checking if this is an inline comment or a comment block
if check_if_comment:
check_if_comment = False
# If the next character after / is a *, we are at the start of a comment block
if c == "*":
in_comment_block = True
# Otherwise, check if we are in an line comment, / followed by another / (//)
elif c == "/":
ignore_till_eol = True
if not in_comment_block:
if ignore_till_eol:
# We are in a line comment, just continue going through the characters until we find an end of line
if c == "\n":
ignore_till_eol = False
else:
if c == '"' or c == "'":
in_string = True
string_type = c
elif c == "/":
check_if_comment = True
elif c == "\t":
errors.append(" ERROR: Found a tab on line {}.".format(line_number))
elif c in ["(", "[", "{"]:
brackets.append(c)
elif c == ")":
if not brackets or brackets[-1] in ["[", "{"]:
errors.append(" ERROR: Missing parenthesis '(' on line {}.".format(line_number))
brackets.append(c)
elif c == "]":
if not brackets or brackets[-1] in ["(", "{"]:
errors.append(" ERROR: Missing square bracket '[' on line {}.".format(line_number))
brackets.append(c)
elif c == "}":
last_is_curly_brace = True
if not brackets or brackets[-1] in ["(", "["]:
errors.append(" ERROR: Missing curly brace '{{' on line {}.".format(line_number))
brackets.append(c)
if check_for_semicolon:
# Keep reading until no white space or comments
if c not in [" ", "\t", "\n", "/"]:
check_for_semicolon = False
if c not in ["]", ")", "}", ";", ",", "&", "!", "|", "="] and not valid_keyword_after_code(content, char_index):
errors.append(" ERROR: Possible missing semicolon ';' on line {}.".format(line_number))
char_index += 1
# Compare opening and closing bracket counts
if brackets.count("(") != brackets.count(")"):
errors.append(" ERROR: Unequal number of parentheses, '(' = {}, ')' = {}.".format(brackets.count("("), brackets.count(")")))
if brackets.count("[") != brackets.count("]"):
errors.append(" ERROR: Unequal number of square brackets, '[' = {}, ']' = {}.".format(brackets.count("["), brackets.count("]")))
if brackets.count("{") != brackets.count("}"):
errors.append(" ERROR: Unequal number of curly braces, '{{' = {}, '}}' = {}.".format(brackets.count("{"), brackets.count("}")))
# Ensure includes are before block comments
if re.compile('\s*(/\*[\s\S]+?\*/)\s*#include').match(content):
errors.append(" ERROR: Found an #include after a block comment.")
return errors
def main():
print("Validating SQF")
print("--------------")
# Allow running from root directory and tools directory
root_dir = ".."
if os.path.exists("addons"):
root_dir = "."
# Check all SQF files in the project directory
sqf_files = []
for root, _, files in os.walk(root_dir):
for file in fnmatch.filter(files, "*.sqf"):
sqf_files.append(os.path.join(root, file))
sqf_files.sort()
bad_count = 0
for filepath in sqf_files:
errors = check_sqf(filepath)
if errors:
print("\nFound {} error(s) in {}:".format(len(errors), os.path.relpath(filepath, root_dir)))
for error in errors:
print(error)
bad_count += 1
print("\nChecked {} files, found errors in {}.".format(len(sqf_files), bad_count))
if bad_count == 0:
print("SQF Validation PASSED")
else:
print("SQF Validation FAILED")
return bad_count
if __name__ == "__main__":
sys.exit(main())

146
tools/version_bumper.py Normal file
View File

@ -0,0 +1,146 @@
# Based on Arma 3 make.py
# https://github.com/acemod/arma-project-template/blob/master/tools/make.py
__version__ = "0.1"
import re
import subprocess
import sys
import os
# Check Python version
if sys.version_info[0] != 3:
print("Python 3 is required.")
sys.exit(1)
# Globals
push_commit = False
framework_version = "0.0.0.0"
def bump_version(version_increments=[]):
if not version_increments:
print("No increment was given. Please provide one of the following:")
print("'increment_major', 'increment_minor', 'increment_patch', 'increment_build'")
sys.exit(1)
global framework_version
version_stamp = framework_version
try:
from pathlib import Path
script_path = Path(__file__).parents[1]
script_version_path = os.path.join(script_path, "addons/main/script_version.hpp")
if os.path.isfile(script_version_path):
file = open(script_version_path, "r")
hpp_text = file.read()
file.close()
if hpp_text:
major_text = re.search(r"#define MAJOR (.*\b)", hpp_text).group(1)
minor_text = re.search(r"#define MINOR (.*\b)", hpp_text).group(1)
patch_text = re.search(r"#define PATCH (.*\b)", hpp_text).group(1)
build_text = re.search(r"#define BUILD (.*\b)", hpp_text).group(1)
print("Current version: {}.{}.{}.{}".format(major_text, minor_text, patch_text, build_text))
if version_increments:
if "major" in version_increments:
major_text = int(major_text) + 1
minor_text = 0
patch_text = 0
elif "minor" in version_increments:
minor_text = int(minor_text) + 1
patch_text = 0
elif "patch" in version_increments:
patch_text = int(patch_text) + 1
# Always increment build
build_text = int(build_text) + 1
version_stamp = "{}.{}.{}.{}".format(major_text, minor_text, patch_text, build_text)
print("Incrementing version to {}".format(version_stamp))
with open(script_version_path, "w", newline="\n") as file:
file.writelines([
"#define MAJOR {}\n".format(major_text),
"#define MINOR {}\n".format(minor_text),
"#define PATCH {}\n".format(patch_text),
"#define BUILD {}\n".format(build_text)
])
else:
print("Version file is missing or cannot be accessed.")
sys.exit(1)
except Exception as e:
print("Error in get_version(): {}".format(e))
print("Check the integrity of the file: {}".format(script_version_path))
print("Resetting to the default version stamp: {}".format(version_stamp))
sys.exit(1)
framework_version = version_stamp
# Set environment variable
subprocess.call("echo '::set-output name=VERSION::{}'".format(framework_version), shell=True)
git_push()
def git_push():
if not push_commit:
print("Skipping pushing commit...")
return
print("Pushing to remote...")
# Set up credentials
subprocess.call(["git", "config", "--local", "user.name", "github-actions"])
subprocess.call(["git", "config", "--local", "user.email", "actions@no-reply.github.com"])
# Push commit
commit_msg = "v" + ".".join(framework_version.split(".")[0:3]) + " Build " + framework_version.split(".")[3]
subprocess.call(["git", "add", "-A"])
subprocess.call(["git", "commit", "-m", commit_msg])
subprocess.call(["git", "push", "origin", "master"])
print("Pushed commit to master: {}".format(commit_msg))
def main(argv):
print("This is version_bumper.py for MalFramework, based on the original make.py script by Ryan Schultz.")
global push_commit
global framework_version
# Which part of the version should be incremented
version_increments = []
if "increment_build" in argv:
argv.remove("increment_build")
version_increments.append("build")
if "increment_patch" in argv:
argv.remove("increment_patch")
version_increments.append("patch")
if "increment_minor" in argv:
argv.remove("increment_minor")
version_increments.append("minor")
if "increment_major" in argv:
argv.remove("increment_major")
version_increments.append("major")
# Should push a commit to master
if "push_commit" in argv:
argv.remove("push_commit")
push_commit = True
bump_version(version_increments)
if __name__ == "__main__":
main(sys.argv)
print("Building successful.")
sys.exit(0)