Author SHA1 Message Date
dutchie031 95fe7e1058 updated releasenotes 2026-09-07 19:22:52 +02:00
dutchie031 b8fe242c43 merged develop 2026-09-07 19:13:11 +02:00
dutchie031 772397250f Feature/lanes (#40)
Update Docs / prepare-docs (push) Successful in 37s
Publish Release / build (push) Successful in 39s
Update Docs / build-image (push) Successful in 30s
Update Docs / deploy-container (push) Successful in 20s
this fixes #35

does not close but starts work partly on #41

Reviewed-on: #40
Co-authored-by: dutchie031 <timrorije@gmail.com>
2026-09-07 17:08:26 +00:00
dutchie031 61ba4de338 buildable mission updates 2026-08-30 20:24:20 +02:00
dutchie031 674160abbf Update doc slightly 2026-08-30 19:17:35 +02:00
dutchie031 8ff25ffeb0 Merge remote-tracking branch 'origin/develop' into feature/customBriefingSupplyMissions 2026-08-30 19:13:26 +02:00
dutchie031 0a7e8ea977 also added the beta block on home screen
Update Docs / prepare-docs (push) Successful in 21s
Update Docs / build-image (push) Successful in 12s
Update Docs / deploy-container (push) Successful in 12s
2026-08-30 18:25:03 +02:00
dutchie031 96507f1d34 updated the sidebar when it's a beta version
Update Docs / prepare-docs (push) Successful in 22s
Update Docs / build-image (push) Successful in 20s
Update Docs / deploy-container (push) Successful in 16s
2026-08-30 18:17:55 +02:00
dutchie031 96ada242a4 updated to change the release name so two releases can co-exist (#46)
Reviewed-on: #46
Co-authored-by: dutchie031 <timrorije@gmail.com>
2026-08-30 12:16:19 +00:00
dutchie031 2bce1985e2 beta.spearhead.rocks now for the beta branch (#45)
Reviewed-on: #45
Co-authored-by: dutchie031 <timrorije@gmail.com>
2026-08-30 11:49:52 +00:00
dutchie031 428fe75a12 wip 2026-08-29 16:12:43 +02:00
dutchie031 2e5a31faef Custom briefings for BlueSam and FARPS 2026-08-29 15:57:29 +02:00
17 changed files with 163 additions and 44 deletions
+10
View File
@@ -21,6 +21,9 @@
<main>
<div class="reference-container">
<div class="side-nav">
<div id="beta-box-div"></div>
<h4>Quick Links</h4>
<ul>
<li><a href="/pages/tutorials.html" class="side-nav-h2">Tutorials</a></li>
@@ -59,6 +62,13 @@
<footer>
<p>&copy; 2025 Spearhead Project</p>
</footer>
<script>
if (true || window.location.hostname.toLowerCase() == 'beta.spearhead.rocks') {
betaHtml = '<note-box type="warning" title="Beta Version">You are looking at docs that are released with the beta version.</note-box>';
}
document.getElementById('beta-box-div').innerHTML = betaHtml || '';
</script>
</body>
</html>
+6
View File
@@ -168,8 +168,14 @@ class Sidebar extends HTMLElement {
}
render() {
var betaHtml = '';
if (window.location.hostname.toLowerCase() == 'beta.spearhead.rocks') {
betaHtml = '<note-box type="warning" title="Beta Version">You are looking at docs that are released with the beta version.</note-box>';
}
this.innerHTML = `
<div class="side-nav">
${betaHtml}
<h4 class="side-nav-title"></h4>
<ul>
<!-- Navigation items will be populated automatically -->
+7
View File
@@ -253,6 +253,13 @@
To make an airbase buildable add a text box inside of the trigger zone and name it: <code-inline>buildable_[freeform]</code-inline> <br/>
Then in the text box type amount of kilo's you want to be transfered before the logistisc mission is complete. <br/>
<br>
To add a custom briefing for a buildable zone, include a text box inside the trigger zone and name it: <code-inline>supplybriefing_[freeform]</code-inline>.
<code-inline>{{coords}}</code-inline> is highly recommended so the players can easily find their landing zone.<br>
Additionally, the amount of kilos required and delivered are always shown on the bottom, as well as a note to not land in the construction zone.
<br/>
<br>
The base or zone will slowly build up with each crate giving both a nice view of it happening AND it's good for performance as there's not a big addition of objects at once. <br/>
Right now a crate takes 15 seconds to unpack per 500kg. Meaning 2 crates of 1000kg will be faster than 1 crate of 2000kg. <br/>
+19 -3
View File
@@ -4,13 +4,14 @@ on:
push:
branches:
- main
- develop
paths:
- '.docs/**'
env:
DOCKER_REGISTRY: registry.dutchie031.net
DOCKER_IMAGE: spearhead-docs
DOCKER_TAG: latest
DOCKER_TAG: ${{ github.ref_name == 'main' && 'latest' || 'beta' }}
jobs:
## Run replacements and cleanups on the docs
@@ -36,7 +37,7 @@ jobs:
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
- name: Highlight Config 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
@@ -105,15 +106,30 @@ jobs:
chmod 600 $HOME/.kube/config
cat $HOME/.kube/config
- name: Run Helm upgrade/install
- name: Run Helm upgrade/install spearhead-docs (main)
if: github.ref_name == 'main'
run: |
helm upgrade --install spearhead-docs .helm \
--namespace spearhead-docs \
--create-namespace \
-f .helm/values.yaml \
--set image.repository=${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE }} \
--set image.tag=${{ env.DOCKER_TAG }} \
--wait
- name: Run Helm upgrade/install spearhead-docs (develop)
if: github.ref_name == 'develop'
run: |
helm upgrade --install spearhead-docs-beta .helm \
--namespace spearhead-docs \
--create-namespace \
-f .helm/values.yaml \
-f .helm/values.beta.yaml \
--set image.repository=${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE }} \
--set image.tag=${{ env.DOCKER_TAG }} \
--wait
# - name: 'Deploy'
# uses: deliverybot/helm@v1
# with:
+1
View File
@@ -13,4 +13,5 @@ sources:
- https://git.dutchie031.com/Spearhead/Spearhead
maintainers:
- name: Spearhead Team
+1 -1
View File
@@ -25,7 +25,7 @@ spec:
type: RuntimeDefault
containers:
- name: {{ .Values.app }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: Always
ports:
- containerPort: {{ .Values.ports.containerPort }}
+10 -17
View File
@@ -14,7 +14,7 @@ spec:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Values.app }}-ingress
name: "{{ .Values.app }}-ingress"
namespace: spearhead-docs
annotations:
kubernetes.io/tls-acme: "true"
@@ -22,28 +22,21 @@ metadata:
spec:
ingressClassName: nginx
rules:
- host: spearhead.dutchie031.com
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Values.app }}
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 }}
number: {{ $.Values.ports.servicePort }}
{{- end }}
tls:
- hosts:
- spearhead.dutchie031.com
- spearhead.rocks
secretName: spearhead-docs-tls
{{- range .Values.ingress.hosts }}
- {{ . }}
{{- end }}
secretName: "{{ .Values.app }}-docs-tls"
+9
View File
@@ -0,0 +1,9 @@
app: spearhead-docs-beta
image:
tag: "beta"
ingress:
hosts:
- beta.spearhead.rocks
+15 -10
View File
@@ -1,10 +1,15 @@
app: spearhead-docs
image:
repository: registry.dutchie031.net/spearhead-docs
tag: latest
ports:
servicePort: 80
containerPort: 80
app: spearhead-docs
image:
repository: registry.dutchie031.net/spearhead-docs
tag: latest
ports:
servicePort: 80
containerPort: 80
ingress:
hosts:
- spearhead.dutchie031.com
- spearhead.rocks
+4
View File
@@ -15,6 +15,10 @@
These lanes can be used to create different stage progression flows and create different "side-stories".
#40
- Issue: #37
Now enabled the mission editor to add a custom briefing to the "Buildable" missions.
#44
### Bug Fixes
## [0.13.0] 2026-08
+47
View File
@@ -58,6 +58,7 @@ local StageDrawing = require("classes.stageClasses.drawings.StageDrawing")
---@class BlueSamData
---@field groups Array<string>
---@field buildingKilos number?
---@field briefing string?
---@class MissionZoneData
---@field ZoneName string
@@ -74,6 +75,7 @@ local StageDrawing = require("classes.stageClasses.drawings.StageDrawing")
---@field padNames Array<string>
---@field buildingKilos number?
---@field supplyHubNames Array<string>
---@field briefing string?
---@class Database
---@field private _tables DatabaseTables
@@ -616,6 +618,27 @@ function Database:loadBlueSamUnits()
local number = tonumber(kvPair.value)
if number and number > 0 then
samData.buildingKilos = number
if env.mission.drawings and env.mission.drawings.layers then
for i, layer in pairs(env.mission.drawings.layers) do
if string.lower(layer.name) == "author" then
for key, layer_object in pairs(layer.objects) do
local vec2 = { x = layer_object.mapX, y = layer_object.mapY }
if triggerZone and Util.is2dPointInZone(vec2, triggerZone) then
if layer_object.name and Util.startswith(layer_object.name, "supplybriefing_", true) then
local description = layer_object.text
if description and description ~= "" then
samData.briefing = description
end
end
end
end
end
end
end
else
MissionEditorWarnings.Add("Buildable number for " .. blueSamZone .. " is invalid")
end
end
end
@@ -750,7 +773,31 @@ function Database:loadFarpData()
local number = tonumber(kvPair.value)
if number and number > 0 then
farpzoneData.buildingKilos = number
-- check briefings
if env.mission.drawings and env.mission.drawings.layers then
for i, layer in pairs(env.mission.drawings.layers) do
if string.lower(layer.name) == "author" then
for key, layer_object in pairs(layer.objects) do
local vec2 = { x = layer_object.mapX, y = layer_object.mapY }
if triggerZone and Util.is2dPointInZone(vec2, triggerZone) then
if layer_object.name and Util.startswith(layer_object.name, "supplybriefing_", true) then
local description = layer_object.text
if description and description ~= "" then
farpzoneData.briefing = description
end
end
end
end
end
end
end
else
MissionEditorWarnings.Add("Buildable number for " .. farpZone .. " is invalid.")
end
end
end
end
@@ -89,7 +89,7 @@ function BlueSam.New(database, logger, zoneName, spawnManager)
local zone = DcsUtil.getZoneByName(zoneName)
if zone then
BuildableZone.New(self, zone, self._buildableCrateKilos or 0, "SAM_CRATE", self._blueGroups, logger, database)
BuildableZone.New(self, zone, self._buildableCrateKilos or 0, "SAM_CRATE", self._blueGroups, logger, database, blueSamData.briefing)
end
return self
@@ -64,7 +64,7 @@ function FarpZone.New(database, logger, zoneName, spawnManager)
local zone = DcsUtil.getZoneByName(zoneName)
if zone then
self._logger:debug("Creating Buildable zone: " .. zoneName .. " with " .. (farpData.buildingKilos or "nil") .. " kilos")
BuildableZone.New(self, zone, farpData.buildingKilos or 0, "FARP_CRATE", self._groups, logger, database)
BuildableZone.New(self, zone, farpData.buildingKilos or 0, "FARP_CRATE", self._groups, logger, database, farpData.briefing)
end
end
self:Deactivate()
@@ -20,7 +20,8 @@ BuildableZone.__index = BuildableZone
---@param database Database
---@param crateType SupplyType
---@param logger Logger
function BuildableZone:New(targetZone, kilosRequired, crateType, buildableGroups, logger, database)
---@param briefing string?
function BuildableZone:New(targetZone, kilosRequired, crateType, buildableGroups, logger, database, briefing)
self._targetZone = targetZone
self._requiredKilos = kilosRequired or 0
self._buildableGroups = buildableGroups or {}
@@ -69,7 +70,7 @@ function BuildableZone:New(targetZone, kilosRequired, crateType, buildableGroup
local noLandingZone = self:GetNoLandingZone()
if kilosRequired and kilosRequired > 0 then
self._buildableMission = BuildableMission.new(database, logger, targetZone, noLandingZone, kilosRequired, crateType)
self._buildableMission = BuildableMission.new(database, logger, targetZone, noLandingZone, kilosRequired, crateType, briefing)
self._buildableMission:AddOnCrateDroppedOfListener(self)
else
self._buildableMission = nil
@@ -15,7 +15,6 @@ local logger = Logger.new("DrawingHelper", level)
local DrawingHelper = {}
DrawingHelper.__index = DrawingHelper
---@param object DrawingObject
---@return Array<integer> id
function DrawingHelper.Draw(object)
@@ -21,9 +21,18 @@ local DrawingHelper = require("classes.stageClasses.drawings.helper.DrawingHelpe
---@field private _dropOffZone SpearheadTriggerZone?
---@field private _noLandingZoneDrawing CustomDrawing?
---@field private _dropOffZoneDrawing CustomDrawing?
---@field private _briefing string?
local BuildableMission = {}
BuildableMission.__index = BuildableMission
local function getDefaultBriefing(siteType, coords)
return "We've dispatched forward units to find a proper spot for a new " .. siteType .. "." ..
"\nYou will need to drop off supplies so they can start building." ..
"\nThe coords are: " .. coords ..
"\n\n"
end
---@class OnCrateDroppedListener
---@field OnCrateDroppedOff fun(self:OnCrateDroppedListener, mission:BuildableMission, kilos:number)
@@ -33,7 +42,8 @@ BuildableMission.__index = BuildableMission
---@param requiredCrateType SupplyType
---@param noLandingZone SpearheadTriggerZone?
---@param logger Logger
function BuildableMission.new(database, logger, targetZone, noLandingZone, requiredKilos, requiredCrateType)
---@param briefing string?
function BuildableMission.new(database, logger, targetZone, noLandingZone, requiredKilos, requiredCrateType, briefing)
setmetatable(BuildableMission, Mission)
@@ -43,6 +53,7 @@ function BuildableMission.new(database, logger, targetZone, noLandingZone, requi
self._database = database
self._requiredKilos = requiredKilos
self._droppedKilos = 0
self._briefing = briefing
self._noLandingZone = noLandingZone
@@ -64,7 +75,13 @@ function BuildableMission.new(database, logger, targetZone, noLandingZone, requi
end
self.code = tostring(database:GetNewMissionCode())
self.name = "Resupply"
local splitTargetZoneName = Util.split_string(targetZone.name, "_")
if splitTargetZoneName and splitTargetZoneName[3] and splitTargetZoneName[3] ~= "" then
self.name = splitTargetZoneName[3]
else
self.name = "Resupply"
end
local type = "site"
if requiredCrateType == "SAM_CRATE" then
@@ -81,7 +98,6 @@ function BuildableMission.new(database, logger, targetZone, noLandingZone, requi
self._supplyUnitsTracker = SupplyUnitsTracker.getOrCreate()
self._state = "NEW"
self.location = targetZone.location
self.missionType = "LOGISTICS"
@@ -116,11 +132,16 @@ function BuildableMission:ShowBriefing(groupID)
siteType = "airbase"
end
local briefingPart = self._briefing
if briefingPart then
briefingPart = Util.replaceString(briefingPart, "{{coords}}", coords)
else
briefingPart = getDefaultBriefing(siteType, coords)
end
local briefing = "Mission [" .. self.code .. "] " .. self.name ..
"\n \n" ..
"We've dispatched forward units to find a proper spot for a new " .. siteType .. "." ..
"\nYou will need to drop off supplies so they can start building." ..
"\nThe coords are: " .. coords ..
briefingPart ..
"\n\n" ..
"\nKilos still required: " .. self._requiredKilos - self._droppedKilos ..
"\n\n" ..
+2 -2
View File
@@ -644,7 +644,7 @@ do -- INIT DCS_UTIL
---@param location Vec3
---@return number markID
function DCS_UTIL.AddMarkToGroup(groupID, text, location)
drawID = drawID + 1
local drawID = DCS_UTIL.GetNextDrawID()
trigger.action.markToGroup(drawID, text, location, groupID, true, nil)
return drawID
end
@@ -654,7 +654,7 @@ do -- INIT DCS_UTIL
---@param location Vec3
---@return integer
function DCS_UTIL.AddMarkToAll(text, location)
drawID = drawID + 1
local drawID = DCS_UTIL.GetNextDrawID()
trigger.action.markToAll(drawID, text, location, true, nil)
return drawID
end