This commit is contained in:
2026-07-30 14:29:51 +02:00
49 changed files with 302 additions and 60 deletions
+3
View File
@@ -0,0 +1,3 @@
FROM nginx:latest
COPY ./web /usr/share/nginx/html

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 146 KiB

Before

Width:  |  Height:  |  Size: 193 KiB

After

Width:  |  Height:  |  Size: 193 KiB

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Before

Width:  |  Height:  |  Size: 296 KiB

After

Width:  |  Height:  |  Size: 296 KiB

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 2.9 MiB

Before

Width:  |  Height:  |  Size: 332 KiB

After

Width:  |  Height:  |  Size: 332 KiB

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 163 KiB

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

Before

Width:  |  Height:  |  Size: 3.2 MiB

After

Width:  |  Height:  |  Size: 3.2 MiB

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Before

Width:  |  Height:  |  Size: 260 KiB

After

Width:  |  Height:  |  Size: 260 KiB

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

+13 -18
View File
@@ -32,28 +32,23 @@
<div class="content-wrapper">
<h1 id="welcome">Welcome to Spearhead!</h1>
<p>Welcome to the story teller friendly mission framework in DCS (at least, that's what we hope to create).</p>
<p>Together with mission editors we've tried to build a framework that makes creating multiplayer missions as easy as possible.
With the help of naming conventions, trigger zones, pre-configured logic and custom configuration items, it gives a huge amount of versatility.
we're trying to strike a balance between no-code and low-code with the possibility to hook into it for the hard core scripters (like ourselves).
<note-box type="info">
<b>For the scripters</b>: If you yourself are a scripter, and you're missing interfaces, please reach out to us! We want to make sure that the framework is as easy to use for scripters as it is for non-scripters, and we can't do that without your help!
</note-box>
</p>
<p>
Whether this is your first mission or your hundredth, we hope Spearhead will make your life easier.
</p>
<download-spearhead></download-spearhead>
<h1 id="welcome">Welcome to Spearhead!</h1>
<p>Welcome to the story teller friendly mission framework in DCS (at least, that's what we hope to create).</p>
<p>Together with mission editors we've tried to build a framework that
makes creating multiplayer missions as easy as possible.
With the help of naming conventions, trigger zones, pre-configured
logic and custom configuration items, it gives a huge amount of versatility.
we're trying to strike a balance between no-code and low-code with the possibility to hook into it for
the hard core scripters.
</p>
<p>
Whether this is your first mission or your hundredth, we hope Spearhead will make your life easier.
</p>
<download-spearhead></download-spearhead>
</div>
</div>
</main>
<footer>
@@ -38,7 +38,7 @@ class DownloadScript extends HTMLElement {
}
try {
const response = await fetch('https://api.github.com/repos/dutchie031/Spearhead/releases/latest');
const response = await fetch('https://git.dutchie031.com/api/v1/repos/Spearhead/spearhead/releases/latest');
const data = await response.json();
// Cache the data
@@ -66,7 +66,7 @@ class DownloadScript extends HTMLElement {
var version = "?";
var timestamp = "?";
var size = "?";
var href = "https://github.com/dutchie031/Spearhead/releases"
var href = "https://git.dutchie031.com/Spearhead/spearhead/releases"
const latestRelease = await this.fetchLatestRelease();
if (latestRelease) {
@@ -105,7 +105,7 @@ class DownloadScript extends HTMLElement {
<p>
<span class="version-text">${version}</span> (${timestamp}) <br>
<a style="text-decoration: underline;" target="_blank" href="${href}">Download</a> (${size}) <br>
<a style="text-decoration: underline;" target="_blank" href="https://github.com/dutchie031/Spearhead/releases">See All Versions here</a>
<a style="text-decoration: underline;" target="_blank" href="https://git.dutchie031.com/Spearhead/spearhead/releases">See All Versions here</a>
</p>
</div>
@@ -37,9 +37,11 @@
Even though, at the time of writing this, I've written every single line of code myself, I could not have done it without the help of these members.<br>
Therefore it's something WE created.
Our goal was very simple, make it possible to make big dynamic missions, without having to either give away all control or having to get knee deep into scripting. <br>
Our goal was very simple, make it possible to make big dynamic missions, without having to either give away all controll or having to get knee deep into scripting. <br>
We struck a balance.
</p>
<h2>Hope you enjoy it!</h2>
@@ -90,13 +90,13 @@
Missions are also defined by trigger zones. <br>
They'll be picked up by Spearhead when named according to the naming convention: <br>
<code-inline>MISSION_[Type]_[FreeForm]</code-inline> <br>
Where <code-inline>[Type]</code-inline> is the type of mission. <a href="./reference.html#mission-zones">See all</a><br>
Where <code-inline>[Type]</code-inline> is the type of mission. <br>
</p>
<h3 id="mission-cas">CAS</h3>
<p>
Personally CAS is one of my favorite mission types. <br>
Personally CAS is one of our favorite mission types. <br>
Mostly because it's easy to set up and creates a truly immersive experience. <br>
</p>
@@ -80,22 +80,11 @@
<strong>Example:</strong> <code-inline>MISSION_DEAD_BYRON</code-inline>
</p>
<p>
Missions are completable objectives with specific types. <br />
Missions are completable objectives with specific types, such as DEAD, BAI, STRIKE, or SAM. <br />
Randomized missions can be defined using the format: <span
class="inline-lua"><span class="lua-variable">RANDOMMISSION_[Type]_[Name]_[Index]</span></span>.
</p>
<p>
Valid Types:
<ul>
<li>SAM</li>
<li>DEAD</li>
<li>BAI</li>
<li>CAS</li>
<li>STRIKE</li>
</ul>
</p>
<h3 id="cap-routes">CAP Routes</h3>
<p>
<strong>Format:</strong> <code-inline>CAPROUTE_[routeID]_[Name]</code-inline> <br />
+5 -9
View File
@@ -2,16 +2,12 @@
name: Deploy static content to Pages
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
release:
types: [published]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
push:
branches:
- main
paths:
- '_docs/**'
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
+128
View File
@@ -0,0 +1,128 @@
name: Update Docs
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '.docs/**'
env:
DOCKER_REGISTRY: registry.dutchie031.net
DOCKER_IMAGE: spearhead-docs
DOCKER_TAG: latest
jobs:
## Run replacements and cleanups on the docs
prepare-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
## --break-system-packages is used to avoid conflicts with system-installed packages on Ubuntu runners.
- name: Install Python Pygments
run: |
python3 -m pip install --upgrade pip --break-system-packages --no-cache-dir --ignore-installed
pip install pygments --break-system-packages
- name: Highlight API code and update HTML
run: |
pygmentize -f html -l lua -O noclasses,style=monokai src/classes/api/SpearheadApiDoc.lua > .docs/web/pages/temp_api_code.html
# Insert the highlighted code into the placeholder in spearheadapi.html
sed -i '/@@API_CODE@@/r .docs/web/pages/temp_api_code.html' .docs/web/pages/spearheadapi.html
sed -i '/@@API_CODE@@/d' .docs/web/pages/spearheadapi.html
rm .docs/web/pages/temp_api_code.html
- name: Highlight API code and update HTML
run: |
pygmentize -f html -l lua -O noclasses,style=monokai ./config.lua > .docs/web/pages/temp_config_code.html
# Insert the highlighted code into the placeholder in spearheadapi.html
sed -i '/@@CONFIG_CODE@@/r .docs/web/pages/temp_config_code.html' .docs/web/pages/reference.html
sed -i '/@@CONFIG_CODE@@/d' .docs/web/pages/reference.html
rm .docs/web/pages/temp_config_code.html
- name: List files in .docs directory
run: |
echo "Listing files in .docs directory:"
ls -R .docs
- name: Upload spearhead.lua artifact
uses: actions/upload-artifact@v3
with:
name: spearhead-docs
path: |
./.docs/Dockerfile
./.docs/web/**/*
retention-days: 1
build-image:
runs-on: ubuntu-latest
needs: prepare-docs
steps:
# Download prepared pages from the previous job
- name: Download spearhead-docs artifact
uses: actions/download-artifact@v3
with:
name: spearhead-docs
path: ./spearhead-docs
- name: DEBUG ls
run: |
ls -R ./spearhead-docs
- name: Build Docker image for docs
run: |
docker build -t ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE }}:${{ env.DOCKER_TAG }} ./spearhead-docs
- name: Push Docker image
run: |
docker push ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE }}:${{ env.DOCKER_TAG }}
deploy-container:
runs-on: ubuntu-latest
needs: build-image
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Helm
uses: azure/setup-helm@v5
with:
version: 'latest'
id: install
- name: Set up Kubeconfig
run: |
mkdir -p $HOME/.kube
echo "${{ secrets.KUBECONFIG_CONTENT }}" > $HOME/.kube/config
chmod 600 $HOME/.kube/config
cat $HOME/.kube/config
- name: Run Helm upgrade/install
run: |
helm upgrade --install spearhead-docs .helm \
--namespace spearhead-docs \
--create-namespace \
--set image.repository=${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE }} \
--set image.tag=${{ env.DOCKER_TAG }} \
--wait
# - name: 'Deploy'
# uses: deliverybot/helm@v1
# with:
# release: spearhead-docs
# namespace: spearhead-docs
# chart: '.helm'
# value-files: >-
# [
# ".helm/values.yaml"
# ]
# env:
# KUBECONFIG_FILE: ${{ secrets.KUBECONFIG_CONTENT }}
+16
View File
@@ -0,0 +1,16 @@
apiVersion: v1
name: spearhead-docs
description: Helm chart for deploying Spearhead documentation
type: application
version: 1.0.0
appVersion: "1.0"
keywords:
- spearhead
- documentation
- dcs
home: https://git.dutchie031.com/Spearhead/spearhead
sources:
- https://git.dutchie031.com/Spearhead/Spearhead
maintainers:
- name: Spearhead Team
+44
View File
@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.app }}
labels:
app: {{ .Values.app }}
namespace: spearhead-docs
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Values.app }}
template:
metadata:
labels:
app: {{ .Values.app }}
spec:
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
containers:
- name: {{ .Values.app }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
ports:
- containerPort: {{ .Values.ports.containerPort }}
volumeMounts:
- name: cache
mountPath: /var/cache/nginx
- name: run
mountPath: /var/run
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
volumes:
- name: cache
emptyDir: {}
- name: run
emptyDir: {}
+49
View File
@@ -0,0 +1,49 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.app }}
namespace: spearhead-docs
spec:
selector:
app: {{ .Values.app }}
ports:
- protocol: TCP
port: {{ .Values.ports.servicePort }}
targetPort: {{ .Values.ports.containerPort }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Values.app }}-ingress
namespace: spearhead-docs
annotations:
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
ingressClassName: nginx
rules:
- host: spearhead.dutchie031.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Values.app }}
port:
number: {{ .Values.ports.servicePort }}
- host: spearhead.rocks
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Values.app }}
port:
number: {{ .Values.ports.servicePort }}
tls:
- hosts:
- spearhead.dutchie031.com
- spearhead.rocks
secretName: spearhead-docs-tls
+10
View File
@@ -0,0 +1,10 @@
app: spearhead-docs
image:
repository: registry.dutchie031.net/spearhead-docs
tag: latest
ports:
servicePort: 80
containerPort: 80
+12 -1
View File
@@ -1,5 +1,5 @@
### [Unreleased]
## [Unreleased]
### Breaking Changes
@@ -7,6 +7,17 @@
### Bug Fixes
## [0.12.1] 2026-07
### Breaking Changes
### New Features
### Bug Fixes
- Fixed stage drawing to only be checked when a stage completed. Now done on stage number changed.
## [0.12.0] 2026-06
Migration to Gitea. <br>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 330 KiB

+10 -11
View File
@@ -20,7 +20,7 @@ local WaitingStagesByIndex = {}
local currentStage = -99
---@class GlobalStageManager : StageCompleteListener
---@class GlobalStageManager : StageCompleteListener, OnStageChangedListener
---@field private database Database
---@field private logger Logger
---@field private stageConfig StageConfig
@@ -47,15 +47,7 @@ function GlobalStageManager.NewAndStart(database, stageConfig, logLevel, spawnMa
logger:warn("Spearhead will not automatically progress stages due to the given settings. If you manually have implemented this, please ignore this message")
end
---@type OnStageChangedListener
local OnStageNumberChangedListener = {
OnStageNumberChanged = function (self, number)
currentStage = number
end
}
Events.AddStageNumberChangedListener(OnStageNumberChangedListener)
Events.AddStageNumberChangedListener(self)
for _, stageName in pairs(database:getStagezoneNames()) do
logger:debug("Found stage zone with name: " .. stageName)
@@ -208,13 +200,20 @@ function GlobalStageManager:OnStageComplete(stage)
if anyWaiting == false then
local newStageNumber = currentStage + 1
self:UpdateDrawings(newStageNumber)
self.logger:debug("Setting next stage to: " .. tostring(newStageNumber))
Events.PublishStageNumberChanged(newStageNumber)
end
end
end
---@public
function GlobalStageManager:OnStageNumberChanged(stageNumber)
self.logger:debug("Stage number changed to: " .. tostring(stageNumber))
currentStage = stageNumber
self:UpdateDrawings(stageNumber)
end
---@private
function GlobalStageManager:UpdateDrawings(stageNumber)
local drawings = self.database:getCustomDrawings()
+1 -1
View File
@@ -1 +1 @@
0.12.0
0.12.1