Briefing as location (#64)
* Added briefing location as primary location coords * added pin briefing and briefing duration chagnes * updated command menu logic, sorting and naming --------- Co-authored-by: dutchie032 <dutchie032>
This commit is contained in:
committed by
GitHub
co-authored by
dutchie032 <dutchie032>
parent
7c5701532b
commit
f0aee49de2
@@ -1,46 +1,53 @@
|
|||||||
# Spearhead
|
# Spearhead
|
||||||
|
|
||||||
|
|
||||||
## Contributing.
|
## Contributing.
|
||||||
|
|
||||||
I'm always happy to see contributions! <br/>
|
I'm always happy to see contributions! <br/>
|
||||||
Especially if you've found an issue, annoyance or feature that you know how to solve, fix or create! <br/>
|
Especially if you've found an issue, annoyance or feature that you know how to solve, fix or create! <br/>
|
||||||
|
|
||||||
### Keep it small.
|
### Keep it small.
|
||||||
|
|
||||||
Keeping your contributions small and to the point helps both me and yourself. <br/>
|
Keeping your contributions small and to the point helps both me and yourself. <br/>
|
||||||
It'll help the PR review and the speed of improvements. <br/>
|
It'll help the PR review and the speed of improvements. <br/>
|
||||||
If you have a big feature in mind? Go for it! <br/>
|
If you have a big feature in mind? Go for it! <br/>
|
||||||
Does it require an entire refactor of parts or all of the program? Maybe make sure to do step 0 first.
|
Does it require an entire refactor of parts or all of the program? Maybe make sure to do step 0 first.
|
||||||
|
|
||||||
### Steps (for first timers)
|
### Steps (for first timers)
|
||||||
0. Reach out (Optional)
|
0. Reach out (Optional)
|
||||||
|
|
||||||
If you want to let me know you want to do something to contribute, please do! <br/>
|
If you want to let me know you want to do something to contribute, please do! <br/>
|
||||||
Maybe I'm already working on the thing you wanted to build, or someone else is. <br/>
|
Maybe I'm already working on the thing you wanted to build, or someone else is. <br/>
|
||||||
Creating an issue is even better! <br/>
|
Creating an issue is even better! <br/>
|
||||||
|
|
||||||
|
|
||||||
1. Fork the repository
|
1. Fork the repository
|
||||||
|
|
||||||
By forking you can create your own working set of code. <br/>
|
By forking you can create your own working set of code. <br/>
|
||||||
Whether you keep that fork public or private is up to you! <br/>
|
Whether you keep that fork public or private is up to you! <br/>
|
||||||
|
|
||||||
Keep in mind, forking is alright, but it's best with the intent to contribute back. <br/>
|
Keep in mind, forking is alright, but it's best with the intent to contribute back. <br/>
|
||||||
After all, instead of having 5 slightly different versions and products, it might be nicer to have 1 much better version. <br/>
|
After all, instead of having 5 slightly different versions and products, it might be nicer to have 1 much better version. <br/>
|
||||||
|
|
||||||
2. Create a Draft PR as soon as possible!
|
2. Create a Draft PR as soon as possible!
|
||||||
|
|
||||||
As soon as you've found some times to create an initial version, please create a draft PR. <br/>
|
As soon as you've found some times to create an initial version, please create a draft PR. <br/>
|
||||||
That way you can let me and everyone know it's being worked on and people can see what conflicts might arise with their own changes. <br/>
|
That way you can let me and everyone know it's being worked on and people can see what conflicts might arise with their own changes. <br/>
|
||||||
|
|
||||||
3. Test, test, test
|
3. Test, test, test
|
||||||
|
|
||||||
With DCS and Lua there's a bunch of edge cases that are really hard to get to. <br/>
|
With DCS and Lua there's a bunch of edge cases that are really hard to get to. <br/>
|
||||||
However, you kinda need to make sure most if not all cases are caught and tested. <br/>
|
However, you kinda need to make sure most if not all cases are caught and tested. <br/>
|
||||||
Since automated testing for now doesn't seem feasible, please make sure to verify and test functionality after touching stuff. <br/>
|
Since automated testing for now doesn't seem feasible, please make sure to verify and test functionality after touching stuff. <br/>
|
||||||
|
|
||||||
4. Finalise and publish the PR.
|
4. Finalise and publish the PR.
|
||||||
|
|
||||||
Finalise the PR and let the maintainers know! <br/>
|
Finalise the PR and let the maintainers know! <br/>
|
||||||
We can all have a look and discuss the changes. <br/>
|
We can all have a look and discuss the changes. <br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# TODO:
|
||||||
|
|
||||||
|
- Would it be possible to generate optional markers on mission briefing locations for Tomcat / Phantom navigation? Then Jester can type it in for the pilots automatically.
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
local briefingMessageTime = nil
|
||||||
|
|
||||||
|
---@class GlobalConfig
|
||||||
|
---@field private _briefingTime number ;
|
||||||
|
local GlobalConfig = {}
|
||||||
|
GlobalConfig.__index = GlobalConfig;
|
||||||
|
|
||||||
|
---@return GlobalConfig
|
||||||
|
function GlobalConfig.New()
|
||||||
|
|
||||||
|
local self = setmetatable({}, GlobalConfig)
|
||||||
|
|
||||||
|
self._briefingTime = 30
|
||||||
|
|
||||||
|
if SpearheadConfig then
|
||||||
|
if SpearheadConfig.briefingMessageDuration then
|
||||||
|
self._briefingTime = SpearheadConfig.briefingMessageDuration
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
function GlobalConfig:getBriefingTime()
|
||||||
|
return self._briefingTime or 30
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if Spearhead == nil then Spearhead = {} end
|
||||||
|
Spearhead.GlobalConfig = GlobalConfig.New()
|
||||||
|
|
||||||
+1359
-1359
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -119,7 +119,7 @@ function BuildableMission:ShowBriefing(groupID)
|
|||||||
"\n\n" ..
|
"\n\n" ..
|
||||||
"NOTE: Do not land in the orange construction zone!"
|
"NOTE: Do not land in the orange construction zone!"
|
||||||
|
|
||||||
trigger.action.outTextForGroup(groupID, briefing, 30)
|
trigger.action.outTextForGroup(groupID, briefing, Spearhead.GlobalConfig:getBriefingTime())
|
||||||
end
|
end
|
||||||
|
|
||||||
function BuildableMission:MarkMissionAreaToGroup(groupID)
|
function BuildableMission:MarkMissionAreaToGroup(groupID)
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ function Mission:ShowBriefing(groupId)
|
|||||||
|
|
||||||
local text = "Mission [" ..
|
local text = "Mission [" ..
|
||||||
self.code .. "] " .. self.name .. "\n \n" .. briefing .. " \n \n" .. stateString
|
self.code .. "] " .. self.name .. "\n \n" .. briefing .. " \n \n" .. stateString
|
||||||
trigger.action.outTextForGroup(groupId, text, 30);
|
trigger.action.outTextForGroup(groupId, text, Spearhead.GlobalConfig:getBriefingTime());
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -143,9 +143,6 @@ if not Spearhead.classes.stageClasses.missions then Spearhead.classes.stageClass
|
|||||||
if not Spearhead.classes.stageClasses.missions.baseMissions then Spearhead.classes.stageClasses.missions.baseMissions = {} end
|
if not Spearhead.classes.stageClasses.missions.baseMissions then Spearhead.classes.stageClasses.missions.baseMissions = {} end
|
||||||
Spearhead.classes.stageClasses.missions.baseMissions.Mission = Mission
|
Spearhead.classes.stageClasses.missions.baseMissions.Mission = Mission
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
do --aliases
|
do --aliases
|
||||||
|
|
||||||
--- @alias MissionPriority
|
--- @alias MissionPriority
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ SpearheadConfig = {
|
|||||||
---DEBUG LOGGING
|
---DEBUG LOGGING
|
||||||
debugEnabled = false, -- default false
|
debugEnabled = false, -- default false
|
||||||
|
|
||||||
|
--- The time briefings should be displayed by default.
|
||||||
|
--- Players can always "Clear Messages" through the F10 menu, so setting it to a high value can be
|
||||||
|
briefingMessageDuration = 30, --default 30
|
||||||
|
|
||||||
CapConfig = {
|
CapConfig = {
|
||||||
--quickly enable of disable the entire CAP Logic
|
--quickly enable of disable the entire CAP Logic
|
||||||
--(you can also just rename all units to not be named "CAP_")
|
--(you can also just rename all units to not be named "CAP_")
|
||||||
|
|||||||
Reference in New Issue
Block a user