mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into medical-rewrite
This commit is contained in:
commit
bb2d1e4e9e
@ -10,3 +10,6 @@ trim_trailing_whitespace = true
|
|||||||
|
|
||||||
[*.md]
|
[*.md]
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[Makefile]
|
||||||
|
indent_style = tab
|
||||||
|
56
.gibot.yml
56
.gibot.yml
@ -1,56 +0,0 @@
|
|||||||
stages:
|
|
||||||
mark_for_closing:
|
|
||||||
days: 30
|
|
||||||
labels:
|
|
||||||
- status/need more info
|
|
||||||
- status/invalid
|
|
||||||
- status/can't reproduce
|
|
||||||
- status/wontfix
|
|
||||||
exclude:
|
|
||||||
- status/marked for cleanup
|
|
||||||
- status/accepting-pr
|
|
||||||
comment:
|
|
||||||
- 'Hello @{author}! There has been no activity on this ticket for over a period of {days} days. I am automatically replying to let you know we will close this ticket within 1 week due to inactivity and consider this resolved.'
|
|
||||||
- 'If you believe this is in error, please reply with the requested information.'
|
|
||||||
- 'Thank you. :robot:'
|
|
||||||
action:
|
|
||||||
close: false
|
|
||||||
comment: true
|
|
||||||
assign_label:
|
|
||||||
- status/marked for cleanup
|
|
||||||
clean_up:
|
|
||||||
days: 7
|
|
||||||
labels:
|
|
||||||
- status/marked for cleanup
|
|
||||||
comment:
|
|
||||||
- 'Hello @{author}! We have detected no activity for {days} days on this ticket. We therefore assume that the original reporter has lost interest or the issue has been resolved.'
|
|
||||||
- 'Since we have marked this ticket for deletion, we will be closing it.'
|
|
||||||
- 'If this has been closed in error, please create a comment below and we can reopen this issue. Note that you may need to provide additional information that was requested.'
|
|
||||||
- 'Thank you. :robot:'
|
|
||||||
action:
|
|
||||||
close: true
|
|
||||||
comment: true
|
|
||||||
assign_label:
|
|
||||||
- status/closed by bot
|
|
||||||
remove_label:
|
|
||||||
- status/marked for cleanup
|
|
||||||
remind_about_old_ticket:
|
|
||||||
days: 365
|
|
||||||
labels:
|
|
||||||
- kind/bug
|
|
||||||
- kind/critical bug
|
|
||||||
exclude:
|
|
||||||
- status/need more info
|
|
||||||
- status/invalid
|
|
||||||
- status/can't reproduce
|
|
||||||
- status/wontfix
|
|
||||||
- status/marked for cleanup
|
|
||||||
- status/inactive
|
|
||||||
- status/stale
|
|
||||||
- status/accepting-pr
|
|
||||||
comment:
|
|
||||||
- 'Hello @acemod/maintainers. This ticket has been open for over {days} days without any activity.'
|
|
||||||
action:
|
|
||||||
comment: true
|
|
||||||
assign_label:
|
|
||||||
- status/inactive
|
|
21
.github/CONTRIBUTING.md
vendored
21
.github/CONTRIBUTING.md
vendored
@ -27,3 +27,24 @@ Please refrain from making requests for any planned or existing features from ei
|
|||||||
In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for [ACE3 Feature requests](https://github.com/acemod/ACE3/issues/3594). Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier.
|
In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for [ACE3 Feature requests](https://github.com/acemod/ACE3/issues/3594). Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier.
|
||||||
|
|
||||||
Following their approval, feature requests may be moved by moderators to a separate issue for further discussion.
|
Following their approval, feature requests may be moved by moderators to a separate issue for further discussion.
|
||||||
|
|
||||||
|
# Contributing to the project
|
||||||
|
|
||||||
|
We welcome anyone to contribute to this repository. Issues that we are actively seeking help with, are marked as [`help wanted`](https://github.com/acemod/ACE3/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). Feel free to pick up any of those issues.
|
||||||
|
|
||||||
|
## Pull Request process
|
||||||
|
|
||||||
|
When contributing to this repository, please first discuss the change you wish to make via issue or [Slack](https://slackin.ace3mod.com/) with the [ACE3 project maintainers](https://ace3mod.com/team.html) before making a change. This may not be necessary if you are contributing for something which has an existing issue in our repository already.
|
||||||
|
|
||||||
|
1. Please make a pull request (PR) as early as possible. This lets use help you in the proces of developing it. When opening a work in progress pull request, mark your PR with a `WIP:` prefix.
|
||||||
|
2. Describe what this pull request will do and how it solves this in the description of your PR. A clear intent and description of the way the issue is resolved will help us to review the PR more efficiently.
|
||||||
|
3. Please follow our [Development Guidelines](https://ace3mod.com/wiki/development/).
|
||||||
|
|
||||||
|
|
||||||
|
### Notes
|
||||||
|
|
||||||
|
Please note that all contributors to this project are volunteers and do this in their own time. This means that issues and/or PRs may be open for a long time before being picked up and reviewed. We try to keep this time as short as possible, but some times things may fall short. If you feel that an issue or PR has not received attention, please comment asking for a review using the mention `@acemod/maintainers`.
|
||||||
|
|
||||||
|
## Assistance with contributing
|
||||||
|
|
||||||
|
If you require assistance with contributing, check out the #dev channel on our [Slack](https://slackin.ace3mod.com/). Additional documentation can be found on our [Development wiki](https://ace3mod.com/wiki/development/).
|
||||||
|
4
.github/ISSUE_TEMPLATE.md
vendored
4
.github/ISSUE_TEMPLATE.md
vendored
@ -17,8 +17,8 @@
|
|||||||
**Where did the issue occur?**
|
**Where did the issue occur?**
|
||||||
- Dedicated / Self-Hosted Multiplayer / Singleplayer / Editor (Singleplayer) / Editor (Multiplayer) / Virtual Arsenal
|
- Dedicated / Self-Hosted Multiplayer / Singleplayer / Editor (Singleplayer) / Editor (Multiplayer) / Virtual Arsenal
|
||||||
|
|
||||||
**Placed Modules:**
|
**Additional information:**
|
||||||
- Add the list of modules you have placed on the map. Use 'None' if the error occurs without any modules.
|
- Provide any additional information that will help us solve this issue.
|
||||||
|
|
||||||
**RPT log file:**
|
**RPT log file:**
|
||||||
- Add a link ([gist](https://gist.github.com) or [pastebin](http://pastebin.com)) to the client and/or server RPT file. An instruction to find your RPT files can be found [here](https://community.bistudio.com/wiki/Crash_Files#Arma_3).
|
- Add a link ([gist](https://gist.github.com) or [pastebin](http://pastebin.com)) to the client and/or server RPT file. An instruction to find your RPT files can be found [here](https://community.bistudio.com/wiki/Crash_Files#Arma_3).
|
||||||
|
47
.github/stale.yml
vendored
Normal file
47
.github/stale.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# Number of days of inactivity before an issue becomes stale
|
||||||
|
daysUntilStale: 180
|
||||||
|
|
||||||
|
# Number of days of inactivity before a stale issue is closed
|
||||||
|
daysUntilClose: 14
|
||||||
|
|
||||||
|
# Issues with these labels will never be considered stale
|
||||||
|
exemptLabels:
|
||||||
|
- impact/large
|
||||||
|
- kind/critical bug
|
||||||
|
- kind/bug
|
||||||
|
- kind/Focus Feature
|
||||||
|
- status/accepting-pr
|
||||||
|
- status/cherrypick
|
||||||
|
- status/merge on release
|
||||||
|
- sticky
|
||||||
|
|
||||||
|
# Label to use when marking an issue as stale
|
||||||
|
staleLabel: status/stale
|
||||||
|
|
||||||
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
|
markComment: >
|
||||||
|
This issue has been automatically marked as stale because it has not had
|
||||||
|
recent activity. It will be closed if no further activity occurs. Thank you
|
||||||
|
for your contributions.
|
||||||
|
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||||
|
closeComment: >
|
||||||
|
This issue has been automatically closed due to inactivity.
|
||||||
|
|
||||||
|
If this is still an issue, please feel free to re-open this. If necessary, provide any additional details to help us solve this issue.
|
||||||
|
|
||||||
|
If you wish to assist us resolving this issue,
|
||||||
|
please re-open or create a new issue stating you wish to help us out.
|
||||||
|
|
||||||
|
Thank you for your contributions.
|
||||||
|
|
||||||
|
# Limit the number of actions per hour, from 1-30. Default is 30
|
||||||
|
limitPerRun: 30
|
||||||
|
|
||||||
|
# Limit to only `issues` or `pulls`
|
||||||
|
only: issues
|
||||||
|
|
||||||
|
# Set to true to ignore issues in a project (defaults to false)
|
||||||
|
exemptProjects: true
|
||||||
|
|
||||||
|
# Set to true to ignore issues in a milestone (defaults to false)
|
||||||
|
exemptMilestones: true
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,5 +1,8 @@
|
|||||||
|
@*
|
||||||
|
*.zip
|
||||||
release/*
|
release/*
|
||||||
tools/temp
|
tools/temp
|
||||||
|
tools/armake.exe
|
||||||
*.cache
|
*.cache
|
||||||
*.pbo
|
*.pbo
|
||||||
texHeaders.bin
|
texHeaders.bin
|
||||||
|
@ -62,10 +62,13 @@ Coren <coren4@gmail.com>
|
|||||||
Crusty
|
Crusty
|
||||||
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
|
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
|
||||||
Dimaslg <dimaslg@telecable.es>
|
Dimaslg <dimaslg@telecable.es>
|
||||||
|
diwako
|
||||||
dixon13 <dixonbegay@gmail.com>
|
dixon13 <dixonbegay@gmail.com>
|
||||||
Drill <drill87@gmail.com>
|
Drill <drill87@gmail.com>
|
||||||
Dudakov aka [OMCB]Kaban <dudakov.s@gmail.com>
|
Dudakov aka [OMCB]Kaban <dudakov.s@gmail.com>
|
||||||
|
Drofseh <drofseh@gmail.com>
|
||||||
Dslyecxi <dslyecxi@gmail.com>
|
Dslyecxi <dslyecxi@gmail.com>
|
||||||
|
Eclipser <jms@modeemi.fi>
|
||||||
ElTyranos
|
ElTyranos
|
||||||
eRazeri
|
eRazeri
|
||||||
evromalarkey <evromalarkey@gmail.com>
|
evromalarkey <evromalarkey@gmail.com>
|
||||||
@ -115,6 +118,7 @@ OnkelDisMaster <onkeldismaster@gmail.com>
|
|||||||
Orbis2358 <mgkid3310@naver.com>
|
Orbis2358 <mgkid3310@naver.com>
|
||||||
oscarmolinadev
|
oscarmolinadev
|
||||||
PaxJaromeMalues <seemax1991@gmail.com>
|
PaxJaromeMalues <seemax1991@gmail.com>
|
||||||
|
PiZZADOX <509thParachuteInfantry@gmail.com>
|
||||||
Phyma <sethramstrom@gmail.com>
|
Phyma <sethramstrom@gmail.com>
|
||||||
pokertour
|
pokertour
|
||||||
Professor <lukas.trneny@wo.cz>
|
Professor <lukas.trneny@wo.cz>
|
||||||
@ -132,6 +136,7 @@ System98
|
|||||||
SzwedzikPL <szwedzikpl@gmail.com>
|
SzwedzikPL <szwedzikpl@gmail.com>
|
||||||
Tachi <zaveruha007@gmail.com>
|
Tachi <zaveruha007@gmail.com>
|
||||||
Tessa Elieff <Fastroping Sound - CreativeCommons Attributions 3.0>
|
Tessa Elieff <Fastroping Sound - CreativeCommons Attributions 3.0>
|
||||||
|
Timi007 <timi007@gmx.net>
|
||||||
Toaster <jonathan.pereira@gmail.com>
|
Toaster <jonathan.pereira@gmail.com>
|
||||||
Tonic
|
Tonic
|
||||||
Tourorist <tourorist@gmail.com>
|
Tourorist <tourorist@gmail.com>
|
||||||
|
91
Makefile
Normal file
91
Makefile
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
VERSION = $(shell cat "VERSION")
|
||||||
|
PREFIX = ace
|
||||||
|
BIN = @ace
|
||||||
|
ZIP = ace3
|
||||||
|
FLAGS = -i include -w unquoted-string -w redefinition-wo-undef
|
||||||
|
VERSION_FILES = README.md docs/README_DE.md docs/README_PL.md mod.cpp
|
||||||
|
|
||||||
|
MAJOR = $(word 1, $(subst ., ,$(VERSION)))
|
||||||
|
MINOR = $(word 2, $(subst ., ,$(VERSION)))
|
||||||
|
PATCH = $(word 3, $(subst ., ,$(VERSION)))
|
||||||
|
BUILD = $(word 4, $(subst ., ,$(VERSION)))
|
||||||
|
VERSION_S = $(MAJOR).$(MINOR).$(PATCH)
|
||||||
|
GIT_HASH = $(shell git log -1 --pretty=format:"%H" | head -c 8)
|
||||||
|
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
ARMAKE = ./tools/armake.exe # Downloaded via make.ps (rename armake_wXY.exe otherwise)
|
||||||
|
else
|
||||||
|
ARMAKE = armake
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(BIN)/addons/$(PREFIX)_%.pbo: addons/%
|
||||||
|
@mkdir -p $(BIN)/addons
|
||||||
|
@echo " PBO $@"
|
||||||
|
@${ARMAKE} build ${FLAGS} -f -e "version=$(GIT_HASH)" $< $@
|
||||||
|
|
||||||
|
$(BIN)/optionals/$(PREFIX)_%.pbo: optionals/%
|
||||||
|
@mkdir -p $(BIN)/optionals
|
||||||
|
@echo " PBO $@"
|
||||||
|
@${ARMAKE} build ${FLAGS} -f -e "version=$(GIT_HASH)" $< $@
|
||||||
|
|
||||||
|
# Shortcut for building single addons (eg. "make <component>.pbo")
|
||||||
|
%.pbo:
|
||||||
|
"$(MAKE)" $(MAKEFLAGS) $(patsubst %, $(BIN)/addons/$(PREFIX)_%, $@)
|
||||||
|
|
||||||
|
all: $(patsubst addons/%, $(BIN)/addons/$(PREFIX)_%.pbo, $(wildcard addons/*)) \
|
||||||
|
$(patsubst optionals/%, $(BIN)/optionals/$(PREFIX)_%.pbo, $(wildcard optionals/*))
|
||||||
|
|
||||||
|
filepatching:
|
||||||
|
"$(MAKE)" $(MAKEFLAGS) FLAGS="-w unquoted-string -p"
|
||||||
|
|
||||||
|
$(BIN)/keys/%.biprivatekey:
|
||||||
|
@mkdir -p $(BIN)/keys
|
||||||
|
@echo " KEY $@"
|
||||||
|
@${ARMAKE} keygen -f $(patsubst $(BIN)/keys/%.biprivatekey, $(BIN)/keys/%, $@)
|
||||||
|
|
||||||
|
$(BIN)/addons/$(PREFIX)_%.pbo.$(PREFIX)_$(VERSION)-$(GIT_HASH).bisign: $(BIN)/addons/$(PREFIX)_%.pbo $(BIN)/keys/$(PREFIX)_$(VERSION).biprivatekey
|
||||||
|
@echo " SIG $@"
|
||||||
|
@${ARMAKE} sign -f -s $@ $(BIN)/keys/$(PREFIX)_$(VERSION).biprivatekey $<
|
||||||
|
|
||||||
|
$(BIN)/optionals/$(PREFIX)_%.pbo.$(PREFIX)_$(VERSION)-$(GIT_HASH).bisign: $(BIN)/optionals/$(PREFIX)_%.pbo $(BIN)/keys/$(PREFIX)_$(VERSION).biprivatekey
|
||||||
|
@echo " SIG $@"
|
||||||
|
@${ARMAKE} sign -f -s $@ $(BIN)/keys/$(PREFIX)_$(VERSION).biprivatekey $<
|
||||||
|
|
||||||
|
signatures: $(patsubst addons/%, $(BIN)/addons/$(PREFIX)_%.pbo.$(PREFIX)_$(VERSION)-$(GIT_HASH).bisign, $(wildcard addons/*)) \
|
||||||
|
$(patsubst optionals/%, $(BIN)/optionals/$(PREFIX)_%.pbo.$(PREFIX)_$(VERSION)-$(GIT_HASH).bisign, $(wildcard optionals/*))
|
||||||
|
|
||||||
|
extensions: $(wildcard extensions/*/*)
|
||||||
|
cd extensions/build && cmake .. && make
|
||||||
|
find ./extensions/build/ \( -name "*.so" -o -name "*.dll" \) -exec cp {} ./ \;
|
||||||
|
|
||||||
|
extensions-win64: $(wildcard extensions/*/*)
|
||||||
|
cd extensions/build && CXX=$(eval $(which g++-w64-mingw-i686)) cmake .. && make
|
||||||
|
|
||||||
|
version:
|
||||||
|
@echo " VER $(VERSION)"
|
||||||
|
$(shell sed -i -r -s 's/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/$(VERSION)/g' $(VERSION_FILES))
|
||||||
|
$(shell sed -i -r -s 's/[0-9]+\.[0-9]+\.[0-9]+/$(VERSION_S)/g' $(VERSION_FILES))
|
||||||
|
@echo -e "#define MAJOR $(MAJOR)\n#define MINOR $(MINOR)\n#define PATCHLVL $(PATCH)\n#define BUILD $(BUILD)" > "addons/main/script_version.hpp"
|
||||||
|
$(shell sed -i -r -s 's/ACE_VERSION_MAJOR [0-9]+/ACE_VERSION_MAJOR $(MAJOR)/g' extensions/CMakeLists.txt)
|
||||||
|
$(shell sed -i -r -s 's/ACE_VERSION_MINOR [0-9]+/ACE_VERSION_MINOR $(MINOR)/g' extensions/CMakeLists.txt)
|
||||||
|
$(shell sed -i -r -s 's/ACE_VERSION_REVISION [0-9]+/ACE_VERSION_REVISION $(PATCH)/g' extensions/CMakeLists.txt)
|
||||||
|
|
||||||
|
commit:
|
||||||
|
@echo " GIT commit release preparation"
|
||||||
|
@git add -A
|
||||||
|
@git diff-index --quiet HEAD || git commit -am "Prepare release $(VERSION_S)" -q
|
||||||
|
|
||||||
|
push: commit
|
||||||
|
@echo " GIT push release preparation"
|
||||||
|
@git push -q
|
||||||
|
|
||||||
|
release: clean version commit
|
||||||
|
@"$(MAKE)" $(MAKEFLAGS) signatures
|
||||||
|
@echo " ZIP $(ZIP)_$(VERSION_S).zip"
|
||||||
|
@cp *.dll mod.cpp README.md docs/README_DE.md docs/README_PL.md AUTHORS.txt LICENSE logo_ace3_ca.paa meta.cpp $(BIN)
|
||||||
|
@zip -qr $(ZIP)_$(VERSION_S).zip $(BIN)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(BIN) $(ZIP)_*.zip
|
||||||
|
|
||||||
|
.PHONY: all filepatching signatures extensions extensions-win64 version commit push release clean
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/acemod/ACE3/releases/latest">
|
<a href="https://github.com/acemod/ACE3/releases/latest">
|
||||||
<img src="https://img.shields.io/badge/Version-3.12.2-blue.svg?style=flat-square" alt="ACE3 Version">
|
<img src="https://img.shields.io/badge/Version-3.12.6-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/acemod/ACE3/issues">
|
<a href="https://github.com/acemod/ACE3/issues">
|
||||||
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
|
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
|
||||||
@ -21,8 +21,8 @@
|
|||||||
<a href="https://slackin.ace3mod.com/">
|
<a href="https://slackin.ace3mod.com/">
|
||||||
<img src="https://slackin.ace3mod.com/badge.svg?style=flat-square&label=Slack" alt="ACE3 Slack">
|
<img src="https://slackin.ace3mod.com/badge.svg?style=flat-square&label=Slack" alt="ACE3 Slack">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://travis-ci.org/acemod/ACE3">
|
<a href="https://circleci.com/gh/acemod/ACE3">
|
||||||
<img src="https://img.shields.io/travis/acemod/ACE3.svg?style=flat-square&label=Build" alt="ACE3 Build Status">
|
<img src="https://circleci.com/gh/acemod/ACE3.svg?style=svg" alt="ACE3 Build Status">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Ruthberg
|
* Author: Ruthberg
|
||||||
*
|
*
|
||||||
@ -11,11 +12,10 @@
|
|||||||
* muzzle velocity shift - m/s <NUMBER>
|
* muzzle velocity shift - m/s <NUMBER>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [[], 5] call ace_advanced_ballistics_fnc_calcilateAmmoTemperatureVelocityShift
|
* [[], 5] call ace_advanced_ballistics_fnc_calculateAmmoTemperatureVelocityShift
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_muzzleVelocityShiftTable", "_temperature"];
|
params ["_muzzleVelocityShiftTable", "_temperature"];
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Ruthberg
|
* Author: Ruthberg
|
||||||
*
|
*
|
||||||
@ -18,7 +19,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_ballisticCoefficient", "_temperature"/*in C*/, "_pressure"/*in hPa*/, "_relativeHumidity"/*as ratio 0-1*/, "_atmosphereModel"/*"ICAO" or "ASM"*/];
|
params ["_ballisticCoefficient", "_temperature"/*in C*/, "_pressure"/*in hPa*/, "_relativeHumidity"/*as ratio 0-1*/, "_atmosphereModel"/*"ICAO" or "ASM"*/];
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Ruthberg, MikeMatrix, joko // Jonas
|
* Author: Ruthberg, MikeMatrix, joko // Jonas
|
||||||
*
|
*
|
||||||
@ -17,7 +18,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_barrelLength", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocity"];
|
params ["_barrelLength", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocity"];
|
||||||
TRACE_4("params",_barrelLength,_muzzleVelocityTable,_barrelLengthTable,_muzzleVelocity);
|
TRACE_4("params",_barrelLength,_muzzleVelocityTable,_barrelLengthTable,_muzzleVelocity);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Ruthberg
|
* Author: Ruthberg
|
||||||
*
|
*
|
||||||
@ -16,7 +17,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
// Source: GNU Exterior Ballistics
|
// Source: GNU Exterior Ballistics
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Ruthberg
|
* Author: Ruthberg
|
||||||
*
|
*
|
||||||
@ -20,7 +21,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_caliber", "_bulletLength", "_bulletMass", "_barrelTwist", "_muzzleVelocity", "_temperature", "_barometricPressure"];
|
params ["_caliber", "_bulletLength", "_bulletMass", "_barrelTwist", "_muzzleVelocity", "_temperature", "_barometricPressure"];
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#define DEBUG_MODE_FULL
|
||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: esteldunedain
|
* Author: esteldunedain
|
||||||
*
|
*
|
||||||
@ -15,8 +17,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#define DEBUG_MODE_FULL
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
private _diagnoseStartTime = diag_tickTime;
|
private _diagnoseStartTime = diag_tickTime;
|
||||||
#ifdef DEBUG_INIT_SPEEDS
|
#ifdef DEBUG_INIT_SPEEDS
|
||||||
@ -33,9 +33,7 @@ for "_i" from 0 to (count _cfgWeapons)-1 do {
|
|||||||
if (isClass _weaponConfig) then {
|
if (isClass _weaponConfig) then {
|
||||||
private _weapon = configName _weaponConfig;
|
private _weapon = configName _weaponConfig;
|
||||||
private _weaponType = getNumber (_weaponConfig >> "Type");
|
private _weaponType = getNumber (_weaponConfig >> "Type");
|
||||||
if (_weaponType in [1, 2]) then {
|
if (_weaponType in [TYPE_WEAPON_PRIMARY, TYPE_WEAPON_HANDGUN]) then {
|
||||||
// The weapon is a primary weapon or a handgun weapon
|
|
||||||
|
|
||||||
private _weaponInitSpeed = getNumber (_weaponConfig >> "initSpeed");
|
private _weaponInitSpeed = getNumber (_weaponConfig >> "initSpeed");
|
||||||
private _magazines = getArray (_weaponConfig >> "magazines");
|
private _magazines = getArray (_weaponConfig >> "magazines");
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Ruthberg
|
* Author: Ruthberg
|
||||||
*
|
*
|
||||||
@ -14,7 +15,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
#define __dsp (uiNamespace getVariable "RscProtractor")
|
#define __dsp (uiNamespace getVariable "RscProtractor")
|
||||||
#define __ctrl1 (__dsp displayCtrl 132950)
|
#define __ctrl1 (__dsp displayCtrl 132950)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Glowbal, Ruthberg, joko // Jonas
|
* Author: Glowbal, Ruthberg, joko // Jonas
|
||||||
* Handle the PFH for Bullets
|
* Handle the PFH for Bullets
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
{
|
{
|
||||||
_x params ["_bullet","_caliber","_bulletTraceVisible","_index"];
|
_x params ["_bullet","_caliber","_bulletTraceVisible","_index"];
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Glowbal, Ruthberg
|
* Author: Glowbal, Ruthberg
|
||||||
*
|
*
|
||||||
@ -14,7 +15,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
|
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
|
||||||
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
|
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Glowbal, Ruthberg
|
* Author: Glowbal, Ruthberg
|
||||||
* Module for adjusting the advanced ballistics settings
|
* Module for adjusting the advanced ballistics settings
|
||||||
@ -15,7 +16,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_logic","_units", "_activated"];
|
params ["_logic","_units", "_activated"];
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Ruthberg
|
* Author: Ruthberg
|
||||||
* Initializes the advanced ballistics dll extension with terrain data
|
* Initializes the advanced ballistics dll extension with terrain data
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
if (!GVAR(enabled)) exitWith {};
|
if (!GVAR(enabled)) exitWith {};
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Ruthberg
|
* Author: Ruthberg
|
||||||
*
|
*
|
||||||
@ -25,7 +26,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
TRACE_1("Reading Ammo Config",_this);
|
TRACE_1("Reading Ammo Config",_this);
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Ruthberg
|
* Author: Ruthberg
|
||||||
*
|
*
|
||||||
@ -16,7 +17,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
private _weaponConfig = (configFile >> "CfgWeapons" >> _this);
|
private _weaponConfig = (configFile >> "CfgWeapons" >> _this);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="Advanced_Ballistics">
|
<Package name="Advanced_Ballistics">
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_WindInfoKey">
|
<Key ID="STR_ACE_Advanced_Ballistics_WindInfoKey">
|
||||||
@ -90,6 +90,7 @@
|
|||||||
<Chinese>啟用槍口初速變化</Chinese>
|
<Chinese>啟用槍口初速變化</Chinese>
|
||||||
<Chinesesimp>启用枪口初速变化</Chinesesimp>
|
<Chinesesimp>启用枪口初速变化</Chinesesimp>
|
||||||
<French>Activer les variations de la vitesse initiale</French>
|
<French>Activer les variations de la vitesse initiale</French>
|
||||||
|
<Polish>Aktywuj wariację prędkości wylotowej</Polish>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_muzzleVelocityVariationEnabled_Description">
|
<Key ID="STR_ACE_Advanced_Ballistics_muzzleVelocityVariationEnabled_Description">
|
||||||
<English>Simulates slight variations in muzzle velocity between each shot</English>
|
<English>Simulates slight variations in muzzle velocity between each shot</English>
|
||||||
@ -100,6 +101,7 @@
|
|||||||
<Chinese>模擬每發子彈的槍口初速都略有不同</Chinese>
|
<Chinese>模擬每發子彈的槍口初速都略有不同</Chinese>
|
||||||
<Chinesesimp>模拟每发子弹的枪口初速都略有不同</Chinesesimp>
|
<Chinesesimp>模拟每发子弹的枪口初速都略有不同</Chinesesimp>
|
||||||
<French>Simule les légères variations</French>
|
<French>Simule les légères variations</French>
|
||||||
|
<Polish>Symuluje lekkie zmiany w prędkości wylotowej między każdym strzałem</Polish>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_DisplayName">
|
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_DisplayName">
|
||||||
<English>Enable Ammo Temperature Simulation</English>
|
<English>Enable Ammo Temperature Simulation</English>
|
||||||
|
@ -65,13 +65,3 @@ if (!hasInterface) exitWith {};
|
|||||||
// - Add main loop at 1 second interval -------------------------------------------------------------
|
// - Add main loop at 1 second interval -------------------------------------------------------------
|
||||||
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;
|
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["ace_settingChanged", {
|
|
||||||
params ["_name", "_value"];
|
|
||||||
|
|
||||||
if (_name == QGVAR(enableStaminaBar) && {!_value}) then {
|
|
||||||
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
|
|
||||||
_staminaBarContainer ctrlSetFade 1;
|
|
||||||
_staminaBarContainer ctrlCommit 0;
|
|
||||||
};
|
|
||||||
}] call CBA_fnc_addEventHandler;
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: BaerMitUmlaut
|
* Author: BaerMitUmlaut
|
||||||
* Adds a duty factor.
|
* Adds a duty factor.
|
||||||
@ -14,7 +15,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
params [["_id", "", [""]], ["_factor", 1, [0, {}]]];
|
params [["_id", "", [""]], ["_factor", 1, [0, {}]]];
|
||||||
if (_id == "" || {_factor isEqualTo 1}) exitWith {};
|
if (_id == "" || {_factor isEqualTo 1}) exitWith {};
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: BaerMitUmlaut
|
* Author: BaerMitUmlaut
|
||||||
* Creates the stamina bar.
|
* Creates the stamina bar.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
params ["_display"];
|
params ["_display"];
|
||||||
|
|
||||||
private _staminaBar = _display ctrlCreate [QGVAR(StaminaBarContainer), -1];
|
private _staminaBar = _display ctrlCreate [QGVAR(StaminaBarContainer), -1];
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: BaerMitUmlaut
|
* Author: BaerMitUmlaut
|
||||||
* Calculates the duty of the current animation.
|
* Calculates the duty of the current animation.
|
||||||
@ -14,7 +15,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
params ["_unit", "_animName"];
|
params ["_unit", "_animName"];
|
||||||
|
|
||||||
private _duty = 1;
|
private _duty = 1;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: BaerMitUmlaut
|
* Author: BaerMitUmlaut
|
||||||
* Calculates the current metabolic costs for a unit.
|
* Calculates the current metabolic costs for a unit.
|
||||||
@ -15,7 +16,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
params ["_unit", "_velocity"];
|
params ["_unit", "_velocity"];
|
||||||
|
|
||||||
private _gearMass = ((_unit getVariable [QEGVAR(movement,totalLoad), loadAbs _unit]) / 22.046) * GVAR(loadFactor);
|
private _gearMass = ((_unit getVariable [QEGVAR(movement,totalLoad), loadAbs _unit]) / 22.046) * GVAR(loadFactor);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: BaerMitUmlaut
|
* Author: BaerMitUmlaut
|
||||||
* Handles any audible, visual and physical effects of fatigue.
|
* Handles any audible, visual and physical effects of fatigue.
|
||||||
@ -16,7 +17,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
params ["_unit", "_fatigue", "_speed", "_overexhausted"];
|
params ["_unit", "_fatigue", "_speed", "_overexhausted"];
|
||||||
|
|
||||||
#ifdef DEBUG_MODE_FULL
|
#ifdef DEBUG_MODE_FULL
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: BaerMitUmlaut
|
* Author: BaerMitUmlaut
|
||||||
* Handles switching units (once on init and afterwards via Zeus).
|
* Handles switching units (once on init and afterwards via Zeus).
|
||||||
@ -14,7 +15,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
params ["_newUnit", "_oldUnit"];
|
params ["_newUnit", "_oldUnit"];
|
||||||
TRACE_2("unit changed",_newUnit,_oldUnit);
|
TRACE_2("unit changed",_newUnit,_oldUnit);
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: BaerMitUmlaut
|
* Author: BaerMitUmlaut
|
||||||
* Handles visual changes of the stamina bar.
|
* Handles visual changes of the stamina bar.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
params ["_stamina"];
|
params ["_stamina"];
|
||||||
|
|
||||||
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
|
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: BaerMitUmlaut
|
* Author: BaerMitUmlaut
|
||||||
* Main looping function that updates fatigue values.
|
* Main looping function that updates fatigue values.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
if (!alive ACE_player) exitWith { // Dead people don't breath, Will also handle null (Map intros)
|
if (!alive ACE_player) exitWith { // Dead people don't breath, Will also handle null (Map intros)
|
||||||
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;
|
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;
|
||||||
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
|
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: BaerMitUmlaut
|
* Author: BaerMitUmlaut
|
||||||
* Initializes the module settings.
|
* Initializes the module settings.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
params ["_logic"];
|
params ["_logic"];
|
||||||
|
|
||||||
[_logic, QGVAR(enabled), "Enabled"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(enabled), "Enabled"] call EFUNC(common,readSettingFromModule);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: BaerMitUmlaut
|
* Author: BaerMitUmlaut
|
||||||
* Removes a duty factor.
|
* Removes a duty factor.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
params [["_id", "", [""]]];
|
params [["_id", "", [""]]];
|
||||||
|
|
||||||
GVAR(dutyList) params ["_idList", "_factorList"];
|
GVAR(dutyList) params ["_idList", "_factorList"];
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
[LSTRING(Enabled), LSTRING(Enabled_Description)],
|
[LSTRING(Enabled), LSTRING(Enabled_Description)],
|
||||||
LSTRING(DisplayName),
|
LSTRING(DisplayName),
|
||||||
true,
|
true,
|
||||||
true
|
true,
|
||||||
|
{[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)},
|
||||||
|
true // Needs mission restart
|
||||||
] call CBA_Settings_fnc_init;
|
] call CBA_Settings_fnc_init;
|
||||||
|
|
||||||
[
|
[
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="Advanced_Fatigue">
|
<Package name="Advanced_Fatigue">
|
||||||
<Key ID="STR_ACE_Advanced_Fatigue_DisplayName">
|
<Key ID="STR_ACE_Advanced_Fatigue_DisplayName">
|
||||||
@ -9,6 +9,8 @@
|
|||||||
<Japanese>ACE アドバンスド ファティーグ</Japanese>
|
<Japanese>ACE アドバンスド ファティーグ</Japanese>
|
||||||
<Italian>ACE Fatica Avanzata</Italian>
|
<Italian>ACE Fatica Avanzata</Italian>
|
||||||
<Korean>ACE 고급 피로도</Korean>
|
<Korean>ACE 고급 피로도</Korean>
|
||||||
|
<French>ACE Fatigue Avancée</French>
|
||||||
|
<Polish>ACE Zaawansowane Zmęczenie</Polish>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor">
|
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor">
|
||||||
<English>Performance Factor</English>
|
<English>Performance Factor</English>
|
||||||
@ -114,12 +116,18 @@
|
|||||||
<Japanese>手ぶれ因数</Japanese>
|
<Japanese>手ぶれ因数</Japanese>
|
||||||
<Chinesesimp>抖动因数</Chinesesimp>
|
<Chinesesimp>抖动因数</Chinesesimp>
|
||||||
<Chinese>抖動因素</Chinese>
|
<Chinese>抖動因素</Chinese>
|
||||||
|
<French>Facteur de stabilisation</French>
|
||||||
|
<Italian>Fattore di oscillazione</Italian>
|
||||||
|
<Polish>Czynnik kołysania</Polish>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Fatigue_SwayFactor_Description">
|
<Key ID="STR_ACE_Advanced_Fatigue_SwayFactor_Description">
|
||||||
<English>Influences the amount of weapon sway. Higher means more sway.</English>
|
<English>Influences the amount of weapon sway. Higher means more sway.</English>
|
||||||
<Japanese>武器を持つ手のぶれ度合いを設定します。 値が高ければ高いほど、手ぶれが強くなります。</Japanese>
|
<Japanese>武器を持つ手のぶれ度合いを設定します。 値が高ければ高いほど、手ぶれが強くなります。</Japanese>
|
||||||
<Chinesesimp>影响手持武器的晃动程度,数值越高,抖动的越厉害.</Chinesesimp>
|
<Chinesesimp>影响手持武器的晃动程度,数值越高,抖动的越厉害.</Chinesesimp>
|
||||||
<Chinese>影響手持武器晃動程度,數值越高抖動越厲害</Chinese>
|
<Chinese>影響手持武器晃動程度,數值越高抖動越厲害</Chinese>
|
||||||
|
<French>Influence les mouvements de l'arme, une valeur plus élevée signifie plus de mouvements</French>
|
||||||
|
<Italian>Influenza l'ammontare di oscillazione dell'arma. Maggiore significa più oscillazione.</Italian>
|
||||||
|
<Polish>Wpływa na poziom kołysania broni. Większa ilość znaczy większe kołysanie.</Polish>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Fatigue_Enabled">
|
<Key ID="STR_ACE_Advanced_Fatigue_Enabled">
|
||||||
<English>Enabled</English>
|
<English>Enabled</English>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Jonpas
|
* Author: Jonpas
|
||||||
* Checks if a throwable can be prepared.
|
* Checks if a throwable can be prepared.
|
||||||
@ -14,7 +15,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_unit", ["_ignoreLastThrownTime", false]];
|
params ["_unit", ["_ignoreLastThrownTime", false]];
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ GVAR(enabled) &&
|
|||||||
{_unit getVariable [QGVAR(lastThrownTime), CBA_missionTime - 3] < CBA_missionTime - 2} && // Prevent throwing in quick succession
|
{_unit getVariable [QGVAR(lastThrownTime), CBA_missionTime - 3] < CBA_missionTime - 2} && // Prevent throwing in quick succession
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{!(call EFUNC(common,isFeatureCameraActive))} &&
|
{(call CBA_fnc_getActiveFeatureCamera) isEqualTo ""} &&
|
||||||
{[_unit, objNull, ["isNotInside", "isNotSwimming", "isNotSitting"/*, "isNotOnLadder"*/]] call EFUNC(common,canInteractWith)} && // Ladder needs positioning fixes on throw
|
{[_unit, objNull, ["isNotInside", "isNotSwimming", "isNotSitting"/*, "isNotOnLadder"*/]] call EFUNC(common,canInteractWith)} && // Ladder needs positioning fixes on throw
|
||||||
{_unit call CBA_fnc_canUseWeapon} && // Disable in non-FFV seats due to surface detection issues
|
{_unit call CBA_fnc_canUseWeapon} && // Disable in non-FFV seats due to surface detection issues
|
||||||
{"" == currentWeapon _unit || {currentWeapon _unit != secondaryWeapon _unit}} &&
|
{"" == currentWeapon _unit || {currentWeapon _unit != secondaryWeapon _unit}} &&
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Jonpas
|
* Author: Jonpas
|
||||||
* Checks if a throwable can be thrown.
|
* Checks if a throwable can be thrown.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Zapat, Dslyecxi, Jonpas
|
* Author: Zapat, Dslyecxi, Jonpas
|
||||||
* Draws throw arc.
|
* Draws throw arc.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
// Disable drawing when intersecting with the vehicle
|
// Disable drawing when intersecting with the vehicle
|
||||||
if !([ACE_player] call FUNC(canThrow)) exitWith {
|
if !([ACE_player] call FUNC(canThrow)) exitWith {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Dslyecxi, Jonpas, SilentSpike
|
* Author: Dslyecxi, Jonpas, SilentSpike
|
||||||
* Handles drawing the currently selected or cooked throwable.
|
* Handles drawing the currently selected or cooked throwable.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
if (dialog || {!(ACE_player getVariable [QGVAR(inHand), false])} || {!([ACE_player, true] call FUNC(canPrepare))}) exitWith {
|
if (dialog || {!(ACE_player getVariable [QGVAR(inHand), false])} || {!([ACE_player, true] call FUNC(canPrepare))}) exitWith {
|
||||||
[ACE_player, "In dialog or no throwable in hand or cannot prepare throwable"] call FUNC(exitThrowMode);
|
[ACE_player, "In dialog or no throwable in hand or cannot prepare throwable"] call FUNC(exitThrowMode);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Dslyecxi, Jonpas
|
* Author: Dslyecxi, Jonpas
|
||||||
* Exits throw mode.
|
* Exits throw mode.
|
||||||
@ -14,7 +15,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_unit", "_reason"];
|
params ["_unit", "_reason"];
|
||||||
TRACE_2("params",_unit,_reason);
|
TRACE_2("params",_unit,_reason);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* Author: PabstMirror
|
||||||
* Retrieve muzzle name from config.
|
* Retrieve muzzle name from config.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_magazineClassname"];
|
params ["_magazineClassname"];
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Jonpas
|
* Author: Jonpas
|
||||||
* Initializes the Advanced Throwing module.
|
* Initializes the Advanced Throwing module.
|
||||||
@ -15,7 +16,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_logic", "_units", "_activated"];
|
params ["_logic", "_units", "_activated"];
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Dslyecxi, Jonpas
|
* Author: Dslyecxi, Jonpas
|
||||||
* Key down event.
|
* Key down event.
|
||||||
@ -17,7 +18,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {false};
|
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {false};
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Dslyecxi, Jonpas
|
* Author: Dslyecxi, Jonpas
|
||||||
* Mouse button down event.
|
* Mouse button down event.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {};
|
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {};
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Dslyecxi, Jonpas
|
* Author: Dslyecxi, Jonpas
|
||||||
* Mouse scroll wheel changed event.
|
* Mouse scroll wheel changed event.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {};
|
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {};
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Jonpas
|
* Author: Jonpas
|
||||||
* Picks up a throwable from the ground.
|
* Picks up a throwable from the ground.
|
||||||
@ -14,7 +15,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_helper", "_unit"];
|
params ["_helper", "_unit"];
|
||||||
TRACE_2("params",_helper,_unit);
|
TRACE_2("params",_helper,_unit);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Dslyecxi, Jonpas
|
* Author: Dslyecxi, Jonpas
|
||||||
* Prepares throwable or selects the next.
|
* Prepares throwable or selects the next.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
TRACE_1("params",_unit);
|
TRACE_1("params",_unit);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Dslyecxi, Jonpas
|
* Author: Dslyecxi, Jonpas
|
||||||
* Primes the throwable, creates global throwable vehicle and throws Fired XEH.
|
* Primes the throwable, creates global throwable vehicle and throws Fired XEH.
|
||||||
@ -14,7 +15,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_unit", ["_showHint", false]];
|
params ["_unit", ["_showHint", false]];
|
||||||
TRACE_2("params",_unit,_showHint);
|
TRACE_2("params",_unit,_showHint);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: PabstMirror, Jonpas
|
* Author: PabstMirror, Jonpas
|
||||||
* When interact_menu starts rendering (from "interact_keyDown" event).
|
* When interact_menu starts rendering (from "interact_keyDown" event).
|
||||||
@ -14,7 +15,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
[{
|
[{
|
||||||
params ["_args", "_idPFH"];
|
params ["_args", "_idPFH"];
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Dslyecxi, Jonpas
|
* Author: Dslyecxi, Jonpas
|
||||||
* Throw selected throwable.
|
* Throw selected throwable.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
TRACE_1("params",_unit);
|
TRACE_1("params",_unit);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: CBA Team
|
* Author: CBA Team
|
||||||
* Throws Fired XEH.
|
* Throws Fired XEH.
|
||||||
@ -19,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
TRACE_1("Fired",_this);
|
TRACE_1("Fired",_this);
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Jonpas
|
* Author: Jonpas
|
||||||
* Updates controls hints based on current state.
|
* Updates controls hints based on current state.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
if (!GVAR(showMouseControls)) exitWith {};
|
if (!GVAR(showMouseControls)) exitWith {};
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="Advanced_Throwing">
|
<Package name="Advanced_Throwing">
|
||||||
<Key ID="STR_ACE_Advanced_Throwing_Category">
|
<Key ID="STR_ACE_Advanced_Throwing_Category">
|
||||||
|
@ -16,3 +16,9 @@ class Extended_PostInit_EventHandlers {
|
|||||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Extended_DisplayLoad_EventHandlers {
|
||||||
|
class RscDisplayCurator {
|
||||||
|
ADDON = QUOTE(call FUNC(drawCuratorGarrisonPathing));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
PREP(drawCuratorGarrisonPathing);
|
||||||
PREP(garrison);
|
PREP(garrison);
|
||||||
PREP(unGarrison);
|
PREP(unGarrison);
|
||||||
PREP(garrisonMove);
|
PREP(garrisonMove);
|
||||||
|
@ -68,42 +68,3 @@
|
|||||||
params ["_unit", "_mode"];
|
params ["_unit", "_mode"];
|
||||||
_unit enableGunLights _mode;
|
_unit enableGunLights _mode;
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
#ifdef DEBUG_MODE_FULL
|
|
||||||
addMissionEventHandler ["Draw3D", {
|
|
||||||
private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
|
||||||
{
|
|
||||||
_x params ["_unit", "_pos"];
|
|
||||||
|
|
||||||
switch (true) do {
|
|
||||||
case (surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : {
|
|
||||||
for "_i" from 0 to 3 do {
|
|
||||||
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLtoASL _pos), [1,0,0,1]];
|
|
||||||
};
|
|
||||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75];
|
|
||||||
};
|
|
||||||
|
|
||||||
case (!surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : {
|
|
||||||
for "_i" from 0 to 3 do {
|
|
||||||
drawLine3D [_unit modelToWorldVisual [0,0,1], _pos, [1,0,0,1]];
|
|
||||||
};
|
|
||||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75];
|
|
||||||
};
|
|
||||||
|
|
||||||
case (!surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : {
|
|
||||||
for "_i" from 0 to 3 do {
|
|
||||||
drawLine3D [_unit modelToWorldVisual [0,0,1], (AGLToASL _pos), [1,0,0,1]];
|
|
||||||
};
|
|
||||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75];
|
|
||||||
};
|
|
||||||
|
|
||||||
case (surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : {
|
|
||||||
for "_i" from 0 to 3 do {
|
|
||||||
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], _pos, [1,0,0,1]];
|
|
||||||
};
|
|
||||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
} forEach _unitMoveList;
|
|
||||||
}];
|
|
||||||
#endif
|
|
||||||
|
54
addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf
Normal file
54
addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
/*
|
||||||
|
* Author: alganthe
|
||||||
|
* Add draw3D eh to the curator interface.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
addMissionEventHandler ["Draw3D", {
|
||||||
|
if (findDisplay 312 isEqualTo displayNull) exitWith {
|
||||||
|
removeMissionEventHandler ["Draw3D", _thisEventHandler];
|
||||||
|
};
|
||||||
|
|
||||||
|
private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||||
|
{
|
||||||
|
_x params ["_unit", "_pos"];
|
||||||
|
|
||||||
|
switch (true) do {
|
||||||
|
case (surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : {
|
||||||
|
for "_i" from 0 to 3 do {
|
||||||
|
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLtoASL _pos), [1,0,0,1]];
|
||||||
|
};
|
||||||
|
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75];
|
||||||
|
};
|
||||||
|
|
||||||
|
case (!surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : {
|
||||||
|
for "_i" from 0 to 3 do {
|
||||||
|
drawLine3D [_unit modelToWorldVisual [0,0,1], _pos, [1,0,0,1]];
|
||||||
|
};
|
||||||
|
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75];
|
||||||
|
};
|
||||||
|
|
||||||
|
case (!surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : {
|
||||||
|
for "_i" from 0 to 3 do {
|
||||||
|
drawLine3D [_unit modelToWorldVisual [0,0,1], (AGLToASL _pos), [1,0,0,1]];
|
||||||
|
};
|
||||||
|
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75];
|
||||||
|
};
|
||||||
|
|
||||||
|
case (surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : {
|
||||||
|
for "_i" from 0 to 3 do {
|
||||||
|
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], _pos, [1,0,0,1]];
|
||||||
|
};
|
||||||
|
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach _unitMoveList;
|
||||||
|
}];
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: alganthe
|
* Author: alganthe
|
||||||
* Garrison function used to garrison AI inside buildings.
|
* Garrison function used to garrison AI inside buildings.
|
||||||
@ -19,13 +20,13 @@
|
|||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params [["_startingPos",[0,0,0], [[]], 3], ["_buildingTypes", ["Building"], [[]]], ["_unitsArray", [], [[]]], ["_fillingRadius", 50, [0]], ["_fillingType", 0, [0]], ["_topDownFilling", false, [true]], ["_teleport", false, [true]]];
|
params [["_startingPos",[0,0,0], [[]], 3], ["_buildingTypes", ["Building"], [[]]], ["_unitsArray", [], [[]]], ["_fillingRadius", 50, [0]], ["_fillingType", 0, [0]], ["_topDownFilling", false, [true]], ["_teleport", false, [true]]];
|
||||||
|
|
||||||
TRACE_6("fnc_garrison: Start",_startingPos,_buldingTypes,count _unitsArray,_fillingRadius,_fillingTYpe,_topDownFilling);
|
TRACE_6("fnc_garrison: Start",_startingPos,_buldingTypes,count _unitsArray,_fillingRadius,_fillingTYpe,_topDownFilling);
|
||||||
|
|
||||||
_unitsArray = _unitsArray select {alive _x && {!isPlayer _x}};
|
_unitsArray = _unitsArray select {alive _x && {!isPlayer _x}};
|
||||||
|
private _currentUnitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||||
|
|
||||||
if (_startingPos isEqualTo [0,0,0]) exitWith {
|
if (_startingPos isEqualTo [0,0,0]) exitWith {
|
||||||
TRACE_1("fnc_garrison: StartingPos error",_startingPos);
|
TRACE_1("fnc_garrison: StartingPos error",_startingPos);
|
||||||
@ -79,11 +80,9 @@ if (_topDownFilling) then {
|
|||||||
|
|
||||||
//Remove positions units are already pathing to
|
//Remove positions units are already pathing to
|
||||||
_buildingsIndex = _buildingsIndex apply {
|
_buildingsIndex = _buildingsIndex apply {
|
||||||
private _testedBuilding = _x;
|
_x select {
|
||||||
|
|
||||||
_testedBuilding select {
|
|
||||||
private _testedPos = _x;
|
private _testedPos = _x;
|
||||||
(({(_x select 1) isEqualTo _testedPos} count (missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []])) == 0)
|
({(_x select 1) isEqualTo _testedPos} count (missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []])) == 0
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -147,6 +146,8 @@ switch (_fillingType) do {
|
|||||||
_unit setPosATL _pos;
|
_unit setPosATL _pos;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_currentUnitMoveList deleteAt (_currentUnitMoveList findIf {_x select 0 == _unit});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)];
|
_unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)];
|
||||||
};
|
};
|
||||||
@ -194,6 +195,8 @@ switch (_fillingType) do {
|
|||||||
_unit setPosATL _pos;
|
_unit setPosATL _pos;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_currentUnitMoveList deleteAt (_currentUnitMoveList findIf {_x select 0 == _unit});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)];
|
_unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)];
|
||||||
};
|
};
|
||||||
@ -239,6 +242,8 @@ switch (_fillingType) do {
|
|||||||
_unit setPosATL _pos;
|
_unit setPosATL _pos;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_currentUnitMoveList deleteAt (_currentUnitMoveList findIf {_x select 0 == _unit});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)];
|
_unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)];
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: alganthe
|
* Author: alganthe
|
||||||
* Internal function used by ace_ai_fnc_garrison to make the units move to the positions it picked.
|
* Internal function used by ace_ai_fnc_garrison to make the units move to the positions it picked.
|
||||||
@ -15,7 +16,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params [ ["_unitMoveList", nil, [[]]] ];
|
params [ ["_unitMoveList", nil, [[]]] ];
|
||||||
|
|
||||||
@ -53,22 +53,22 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then {
|
|||||||
{
|
{
|
||||||
_x params ["_unit", "_pos"];
|
_x params ["_unit", "_pos"];
|
||||||
|
|
||||||
// Check if unit is alive or even existing
|
private _fnc_attemptFailed = {
|
||||||
if (!alive _unit) then {
|
if (_failSafeRemainingAttemps == 0 ) then {
|
||||||
|
_unit setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
||||||
|
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
||||||
|
[QGVAR(unGarrison), [[_unit]], _unit] call CBA_fnc_targetEvent;
|
||||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
_unitMoveList deleteAt (_unitMoveList find _x);
|
||||||
LOG(format [ARR_2("garrisonMove PFH: unit dead or deleted | %1 units left", count _unitMoveList)]);
|
LOG("garrisonMove PFH: all moving commands failed | restoring AI capabilities");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
private _unitPos = getPos _unit;
|
_unit setVariable [QGVAR(garrisonMove_failSafe), [_failSafeTimer + 15, _failSafeRemainingAttemps - 1]];
|
||||||
if (surfaceisWater _unitPos) then {
|
[QGVAR(doMove), [[[_unit, _pos]]], _unit] call CBA_fnc_targetEvent;
|
||||||
_unitPos = getPosASL _unit;
|
LOG("garrisonMove PFH unitReady: unit not close enough | Sending another doMove command");
|
||||||
} else {
|
};
|
||||||
_unitPos = getPosATL _unit;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (unitReady _unit) then {
|
private _fnc_attemptSuccessful = {
|
||||||
// Check for distance, doMove and AI are moody and may stop for no reason, within 6 meters and ready should be fine
|
|
||||||
if (_unitPos distance _pos < 3) then {
|
|
||||||
_unit setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
_unit setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
||||||
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
||||||
_unit setVariable [QGVAR(garrisonned), true, true];
|
_unit setVariable [QGVAR(garrisonned), true, true];
|
||||||
@ -82,24 +82,32 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
LOG(format [ARR_2("garrisonMove PFH: unit in position | %1 units left", count _unitMoveList)]);
|
LOG(format [ARR_2("garrisonMove PFH: unit in position | %1 units left", count _unitMoveList)]);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Check if unit is alive or even existing
|
||||||
|
if (!alive _unit || {_unit getVariable [QGVAR(garrisoned), false]}) then {
|
||||||
|
_unitMoveList deleteAt (_unitMoveList find _x);
|
||||||
|
LOG(format [ARR_2("garrisonMove PFH: unit dead, deleted or garrisoned via TP | %1 units left", count _unitMoveList)]);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
private _unitPos = getPos _unit;
|
||||||
|
if (surfaceisWater _unitPos) then {
|
||||||
|
_unitPos = getPosASL _unit;
|
||||||
|
} else {
|
||||||
|
_unitPos = getPosATL _unit;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (unitReady _unit) then {
|
||||||
|
// Check for distance, doMove and AI are moody and may stop for no reason, within 6 meters and ready should be fine
|
||||||
|
if (_unitPos distance _pos < 1.5) then {
|
||||||
|
call _fnc_attemptSuccessful;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Tell the unit to move if an order wasn't given within 30s, avoid doMove spam
|
// Tell the unit to move if an order wasn't given within 30s, avoid doMove spam
|
||||||
(_unit getVariable [QGVAR(garrisonMove_failSafe), [CBA_missionTime, 5]]) params ["_failSafeTimer", "_failSafeRemainingAttemps"];
|
(_unit getVariable [QGVAR(garrisonMove_failSafe), [CBA_missionTime, 5]]) params ["_failSafeTimer", "_failSafeRemainingAttemps"];
|
||||||
|
|
||||||
if (_failSafeTimer <= CBA_missionTime) then {
|
if (_failSafeTimer <= CBA_missionTime) then {
|
||||||
if (_failSafeRemainingAttemps == 0 ) then {
|
call _fnc_attemptFailed;
|
||||||
_unit setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
|
||||||
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
|
||||||
[QGVAR(unGarrison), [[_unit]], _unit] call CBA_fnc_targetEvent;
|
|
||||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
|
||||||
LOG("garrisonMove PFH unitReady: all moving commands failed | restoring AI capabilities");
|
|
||||||
|
|
||||||
} else {
|
|
||||||
_unit setVariable [QGVAR(garrisonMove_failSafe), [_failSafeTimer + 15, _failSafeRemainingAttemps - 1]];
|
|
||||||
[QGVAR(doMove), [[[_unit, _pos]]], _unit] call CBA_fnc_targetEvent;
|
|
||||||
LOG("garrisonMove PFH unitReady: unit not close enough | Sending another doMove command");
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
@ -107,30 +115,12 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then {
|
|||||||
|
|
||||||
// AI may sometimes not be able to report unitReady, this is to avoid the PFH running forever
|
// AI may sometimes not be able to report unitReady, this is to avoid the PFH running forever
|
||||||
switch true do {
|
switch true do {
|
||||||
case ((_unitPosTimer + 15) < CBA_missionTime && {(_unitPos distance _pos) < 3}) : {
|
case ((_unitPos distance _pos) < 1.5) : {
|
||||||
TRACE_1("case 1",_unit);
|
call _fnc_attemptSuccessful;
|
||||||
_unit setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
|
||||||
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
|
||||||
_unit setVariable [QGVAR(garrisonned), true, true];
|
|
||||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
|
||||||
|
|
||||||
[QGVAR(AISection), [[_unit], ["PATH"], false], _unit] call CBA_fnc_targetEvent;
|
|
||||||
[QGVAR(AISection), [[_unit], ["FSM"], true], _unit] call CBA_fnc_targetEvent;
|
|
||||||
|
|
||||||
if ({(_x select 0) in units _unit && {!isPlayer (_x select 0)}} count _unitMoveList == 0) then {
|
|
||||||
[QGVAR(enableAttack), [[_unit], true], _unit] call CBA_fnc_targetEvent;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
LOG(format [ARR_2("garrisonMove PFH unitNotReady: unit in position | %1 units left", count _unitMoveList)]);
|
case ((_unitPosTimer + 5) < CBA_missionTime && {_unitOldPos distance _unitPos < 0.5}) : {
|
||||||
};
|
call _fnc_attemptFailed;
|
||||||
|
|
||||||
case ((_unitPosTimer + 15) < CBA_missionTime && {_unitOldPos distance _unitPos < 0.5}) : {
|
|
||||||
TRACE_3("case 2",_unit, ((_unitPosTimer + 15) < CBA_missionTime), (_unitOldPos distance _unitPos < 0.5));
|
|
||||||
_unit setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
|
||||||
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
|
||||||
[QGVAR(unGarrison), [[_unit]], _unit] call CBA_fnc_targetEvent;
|
|
||||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
|
||||||
LOG("garrisonMove PFH unitNotReady: all moving commands failed | restoring AI capabilities");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
case (_unitOldPos distance _unitPos < 0.5) : {};
|
case (_unitOldPos distance _unitPos < 0.5) : {};
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: alganthe
|
* Author: alganthe
|
||||||
* Used to un-garrison units.
|
* Used to un-garrison units.
|
||||||
@ -14,44 +15,37 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params [["_units", [], [[]]]];
|
params [["_units", [], [[]]]];
|
||||||
|
|
||||||
_units = _units select {local _x};
|
_units = _units select {local _x};
|
||||||
|
|
||||||
{
|
{
|
||||||
if (!isPlayer _x && {local _x}) then {
|
private _unit = _x;
|
||||||
_x enableAI "PATH";
|
if (!isPlayer _unit && {local _unit}) then {
|
||||||
_x enableAI "FSM";
|
_unit enableAI "PATH";
|
||||||
|
_unit enableAI "FSM";
|
||||||
|
|
||||||
private _leader = leader _x;
|
private _leader = leader _unit;
|
||||||
|
|
||||||
TRACE_3("fnc_ungarrison: unit and leader",_x , _leader, (_leader == _x));
|
TRACE_3("fnc_ungarrison: unit and leader",_unit , _leader, (_leader == _unit));
|
||||||
|
|
||||||
_x setVariable [QGVAR(garrisonned), false, true];
|
_unit setVariable [QGVAR(garrisonned), false, true];
|
||||||
|
|
||||||
if (_leader != _x) then {
|
private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||||
doStop _x;
|
_unitMoveList deleteAt (_unitMoveList findIf {_x select 0 == _unit});
|
||||||
_x doFollow _leader;
|
|
||||||
|
if (_leader != _unit) then {
|
||||||
|
doStop _unit;
|
||||||
|
_unit doFollow _leader;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_x doMove ((nearestBuilding (getPos _x)) buildingExit 0);
|
_unit doMove ((nearestBuilding (getPos _unit)) buildingExit 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
private _fnc_countGarrisonnedUnits = {
|
if ((units _unit) findif {(_x getVariable [QGVAR(garrisonned), false]) && !isPlayer _x} == -1) then {
|
||||||
params ["_unit", "_bool"];
|
|
||||||
if (_bool) then {
|
|
||||||
({(_x getVariable [QGVAR(garrisonned), false]) && {!isPlayer _x}} count units _unit)
|
|
||||||
} else {
|
|
||||||
({!(_x getVariable [QGVAR(garrisonned), false]) && {!isPlayer _x}} count units _unit)
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
if ([_x, true] call _fnc_countGarrisonnedUnits == ({!isPlayer _x} count (units _x)) - 1 || {[_x, false] call _fnc_countGarrisonnedUnits == {!isPlayer _x} count (units _x)}) then {
|
|
||||||
LOG("fnc_ungarrison: enableAttack true");
|
LOG("fnc_ungarrison: enableAttack true");
|
||||||
(group _x) enableAttack true;
|
(group _unit) enableAttack true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} foreach _units;
|
} foreach _units;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="ai">
|
<Package name="ai">
|
||||||
<Key ID="STR_ACE_ai_GarrisonInvalidPosition">
|
<Key ID="STR_ACE_ai_GarrisonInvalidPosition">
|
||||||
@ -9,6 +9,7 @@
|
|||||||
<Chinese>提供的位置無效</Chinese>
|
<Chinese>提供的位置無效</Chinese>
|
||||||
<Chinesesimp>提供的位置无效。</Chinesesimp>
|
<Chinesesimp>提供的位置无效。</Chinesesimp>
|
||||||
<Korean>위치가 잘못되었습니다.</Korean>
|
<Korean>위치가 잘못되었습니다.</Korean>
|
||||||
|
<Polish>Podano błędną pozycję.</Polish>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_ai_GarrisonNoUnits">
|
<Key ID="STR_ACE_ai_GarrisonNoUnits">
|
||||||
<English>No units provided.</English>
|
<English>No units provided.</English>
|
||||||
@ -18,6 +19,7 @@
|
|||||||
<Chinese>找不到可用的單位</Chinese>
|
<Chinese>找不到可用的單位</Chinese>
|
||||||
<Chinesesimp>找不到可用的单位。</Chinesesimp>
|
<Chinesesimp>找不到可用的单位。</Chinesesimp>
|
||||||
<Korean>병력이 없습니다.</Korean>
|
<Korean>병력이 없습니다.</Korean>
|
||||||
|
<Polish>Nie podano żadnych jednostek.</Polish>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_ai_GarrisonNotEnoughPos">
|
<Key ID="STR_ACE_ai_GarrisonNotEnoughPos">
|
||||||
<English>There aren't enough positions to place all units.</English>
|
<English>There aren't enough positions to place all units.</English>
|
||||||
@ -27,6 +29,7 @@
|
|||||||
<Chinese>沒有足夠的位置能擺放所有單位</Chinese>
|
<Chinese>沒有足夠的位置能擺放所有單位</Chinese>
|
||||||
<Chinesesimp>没有足够的位置能摆放所有单位。</Chinesesimp>
|
<Chinesesimp>没有足够的位置能摆放所有单位。</Chinesesimp>
|
||||||
<Korean>모든 병력을 배치 할 공간이 없습니다.</Korean>
|
<Korean>모든 병력을 배치 할 공간이 없습니다.</Korean>
|
||||||
|
<Polish>Nie ma wystarczającej ilości pozycji, aby umieścić wszystkie jednostki.</Polish>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_ai_GarrisonNoBuilding">
|
<Key ID="STR_ACE_ai_GarrisonNoBuilding">
|
||||||
<English>No building found.</English>
|
<English>No building found.</English>
|
||||||
@ -36,6 +39,7 @@
|
|||||||
<Chinese>沒找到建築物</Chinese>
|
<Chinese>沒找到建築物</Chinese>
|
||||||
<Chinesesimp>没找到建筑物。</Chinesesimp>
|
<Chinesesimp>没找到建筑物。</Chinesesimp>
|
||||||
<Korean>건물이 없습니다.</Korean>
|
<Korean>건물이 없습니다.</Korean>
|
||||||
|
<Polish>Nie znaleziono budynku.</Polish>
|
||||||
</Key>
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Dystopian
|
* Author: Dystopian
|
||||||
* Check if Eject action can be shown.
|
* Check if Eject action can be shown.
|
||||||
@ -14,7 +15,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
#define FULLCREW_UNIT 0
|
#define FULLCREW_UNIT 0
|
||||||
#define FULLCREW_ROLE 1
|
#define FULLCREW_ROLE 1
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Dystopian
|
* Author: Dystopian
|
||||||
* Add Eject action to vehicle if needed.
|
* Add Eject action to vehicle if needed.
|
||||||
@ -13,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_vehicle"];
|
params ["_vehicle"];
|
||||||
|
|
||||||
|
@ -17,4 +17,12 @@ class CfgModels {
|
|||||||
sections[] = {"camo"};
|
sections[] = {"camo"};
|
||||||
skeletonName = "";
|
skeletonName = "";
|
||||||
};
|
};
|
||||||
|
class ace_entrchtool: Default {};
|
||||||
|
class ace_envelope_big: Default {};
|
||||||
|
class ace_envelope_big4: Default {};
|
||||||
|
class ace_envelope_big4_nogeo: Default {};
|
||||||
|
class ace_envelope_small: Default {};
|
||||||
|
class ace_envelope_small4: Default {};
|
||||||
|
class ace_envelope_small4_nogeo: Default {};
|
||||||
|
class LWTS_optic: Default {};
|
||||||
};
|
};
|
@ -74,6 +74,14 @@ class GVAR(stats) {
|
|||||||
textStatement = QUOTE(call FUNC(statTextStatement_scopeMag));
|
textStatement = QUOTE(call FUNC(statTextStatement_scopeMag));
|
||||||
tabs[] = {{}, {0}};
|
tabs[] = {{}, {0}};
|
||||||
};
|
};
|
||||||
|
class ACE_scopeVisionMode: statBase {
|
||||||
|
scope = 2;
|
||||||
|
priority = 1;
|
||||||
|
displayName = CSTRING(statVisionMode);
|
||||||
|
showText = 1;
|
||||||
|
textStatement = QUOTE(call FUNC(statTextStatement_scopeVisionMode));
|
||||||
|
tabs[] = {{}, {0}};
|
||||||
|
};
|
||||||
class ACE_ballisticProtection: statBase {
|
class ACE_ballisticProtection: statBase {
|
||||||
scope = 2;
|
scope = 2;
|
||||||
priority = 5;
|
priority = 5;
|
||||||
@ -101,4 +109,14 @@ class GVAR(stats) {
|
|||||||
barStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_3([ARR_2(0, 500)], [ARR_2(0.01, 1)], false)])] call FUNC(statBarStatement_default));
|
barStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_3([ARR_2(0, 500)], [ARR_2(0.01, 1)], false)])] call FUNC(statBarStatement_default));
|
||||||
tabs[] = {{3,4,5}, {}};
|
tabs[] = {{3,4,5}, {}};
|
||||||
};
|
};
|
||||||
|
class ACE_smokeChemTTL: statBase {
|
||||||
|
scope = 2;
|
||||||
|
priority = 3;
|
||||||
|
stats[] = {"ammo"};
|
||||||
|
displayName = CSTRING(statTTL);
|
||||||
|
showText = 1;
|
||||||
|
textStatement= QUOTE(call FUNC(statTextStatement_smokeChemTTL));
|
||||||
|
condition = QUOTE((configName (_this select 1)) isKindOf [ARR_2('smokeShell', configFile >> 'CfgMagazines')]);
|
||||||
|
tabs[] = {{}, {5}};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
225
addons/arsenal/Cfg3DEN.hpp
Normal file
225
addons/arsenal/Cfg3DEN.hpp
Normal file
@ -0,0 +1,225 @@
|
|||||||
|
class Cfg3DEN {
|
||||||
|
class Mission {
|
||||||
|
class GVAR(DummyCategory) {
|
||||||
|
displayName = "Dummy attribute, should never show up";
|
||||||
|
class AttributeCategories {
|
||||||
|
class ACE3_Arsenal {
|
||||||
|
class Attributes {
|
||||||
|
class GVAR(DefaultLoadoutsListAttribute) {
|
||||||
|
property = QGVAR(DefaultLoadoutsListAttribute);
|
||||||
|
value = 0;
|
||||||
|
expression = QUOTE(if (!is3DEN) then {GVAR(defaultLoadoutsList) = _value});
|
||||||
|
defaultValue = "[]";
|
||||||
|
validate = "none";
|
||||||
|
wikiType = "[[Array]]";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Attributes {
|
||||||
|
class GVAR(attribute): ctrlControlsGroupNoScrollbars {
|
||||||
|
idc = -1;
|
||||||
|
// onLoad fixes attributeLoad not happening on multiple selection with different attribute
|
||||||
|
onLoad = QUOTE(private _objects = get3DENSelected 'object'; if (count _objects > 1) then {[ARR_2(_this select 0,((_objects select 0) get3DENAttribute QQGVAR(attribute)) select 0)] call FUNC(attributeLoad)});
|
||||||
|
x = QUOTE(0);
|
||||||
|
y = QUOTE(0);
|
||||||
|
w = QUOTE(130 * ATTRIBUTE_W);
|
||||||
|
h = QUOTE(106.83 * ATTRIBUTE_H);
|
||||||
|
attributeLoad = QUOTE([ARR_2(_this,+_value)] call FUNC(attributeLoad));
|
||||||
|
attributeSave = QUOTE(uiNamespace getVariable [ARR_2(QQGVAR(attributeValue),[ARR_2([], 0)])]);
|
||||||
|
class controls {
|
||||||
|
class ModeTitle: ctrlStatic {
|
||||||
|
idc = -1;
|
||||||
|
text = CSTRING(Mode);
|
||||||
|
x = QUOTE(5 * ATTRIBUTE_W);
|
||||||
|
y = QUOTE(0);
|
||||||
|
w = QUOTE(125 * ATTRIBUTE_W);
|
||||||
|
h = QUOTE(5 * ATTRIBUTE_H);
|
||||||
|
};
|
||||||
|
class Mode: ctrlToolbox {
|
||||||
|
idc = IDC_ATTRIBUTE_MODE;
|
||||||
|
onToolBoxSelChanged = QUOTE([ARR_2(ctrlParentControlsGroup (_this select 0), _this select 1)] call FUNC(attributeMode));
|
||||||
|
x = QUOTE(5 * ATTRIBUTE_W);
|
||||||
|
y = QUOTE(5 * ATTRIBUTE_H);
|
||||||
|
w = QUOTE(125 * ATTRIBUTE_W);
|
||||||
|
h = QUOTE(5 * ATTRIBUTE_H);
|
||||||
|
rows = 1;
|
||||||
|
columns = 2;
|
||||||
|
strings[] = {CSTRING(Whitelist), CSTRING(Blacklist)};
|
||||||
|
};
|
||||||
|
class ItemsTitle: ModeTitle {
|
||||||
|
text = CSTRING(Items);
|
||||||
|
y = QUOTE(10 * ATTRIBUTE_H);
|
||||||
|
};
|
||||||
|
class Category: ctrlToolboxPictureKeepAspect {
|
||||||
|
idc = IDC_ATTRIBUTE_CATEGORY;
|
||||||
|
onToolBoxSelChanged = QUOTE([ARR_2(ctrlParentControlsGroup (_this select 0), _this select 1)] call FUNC(attributeCategory));
|
||||||
|
x = QUOTE(5 * ATTRIBUTE_W);
|
||||||
|
y = QUOTE(15 * ATTRIBUTE_H);
|
||||||
|
w = QUOTE(125 * ATTRIBUTE_W);
|
||||||
|
h = QUOTE(20.83 * ATTRIBUTE_H);
|
||||||
|
rows = 2;
|
||||||
|
columns = 12;
|
||||||
|
strings[] = {
|
||||||
|
"\a3\Ui_F_Curator\Data\RscCommon\RscAttributeInventory\filter_0_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\PrimaryWeapon_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\SecondaryWeapon_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Handgun_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemOptic_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemAcc_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemMuzzle_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemBipod_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMagAll_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Headgear_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Uniform_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Vest_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Backpack_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Goggles_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\NVGs_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Binoculars_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Map_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Compass_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Radio_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Watch_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\GPS_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoThrow_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoPut_ca.paa",
|
||||||
|
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMisc_ca.paa"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class ListBackground: ctrlStatic {
|
||||||
|
idc = -1;
|
||||||
|
x = QUOTE(5 * ATTRIBUTE_W);
|
||||||
|
y = QUOTE(35.83 * ATTRIBUTE_H);
|
||||||
|
w = QUOTE(125 * ATTRIBUTE_W);
|
||||||
|
h = QUOTE(65 * ATTRIBUTE_H);
|
||||||
|
colorBackground[] = {1, 1, 1, 0.1};
|
||||||
|
};
|
||||||
|
class List: ctrlListNBox {
|
||||||
|
idc = IDC_ATTRIBUTE_LIST;
|
||||||
|
idcLeft = IDC_ATTRIBUTE_LIST_LEFT;
|
||||||
|
idcRight = IDC_ATTRIBUTE_LIST_RIGHT;
|
||||||
|
onLBDblClick = QUOTE(_this call FUNC(attributeDblClick));
|
||||||
|
onSetFocus = QUOTE(SETUVAR(QGVAR(attributeFocus),ctrlParentControlsGroup (_this select 0)));
|
||||||
|
onKillFocus = QUOTE(SETUVAR(QGVAR(attributeFocus),nil));
|
||||||
|
x = QUOTE(5 * ATTRIBUTE_W);
|
||||||
|
y = QUOTE(35.83 * ATTRIBUTE_H);
|
||||||
|
w = QUOTE(125 * ATTRIBUTE_W);
|
||||||
|
h = QUOTE(65 * ATTRIBUTE_H);
|
||||||
|
drawSideArrows = 1;
|
||||||
|
disableOverflow = 1;
|
||||||
|
columns[] = {0.05, 0.15, 0.85};
|
||||||
|
};
|
||||||
|
class ArrowLeft: ctrlButton {
|
||||||
|
idc = IDC_ATTRIBUTE_LIST_LEFT;
|
||||||
|
onButtonClick = QUOTE([ARR_2(ctrlParentControlsGroup (_this select 0),false)] call FUNC(attributeSelect));
|
||||||
|
text = SYMBOL_ITEM_NONE;
|
||||||
|
font = "RobotoCondensedBold";
|
||||||
|
x = QUOTE(-1);
|
||||||
|
y = QUOTE(-1);
|
||||||
|
w = QUOTE(5 * ATTRIBUTE_W);
|
||||||
|
H = QUOTE(5 * ATTRIBUTE_H);
|
||||||
|
};
|
||||||
|
class ArrowRight: ArrowLeft {
|
||||||
|
idc = IDC_ATTRIBUTE_LIST_RIGHT;
|
||||||
|
onButtonClick = QUOTE([ARR_2(ctrlParentControlsGroup (_this select 0),true)] call FUNC(attributeSelect));
|
||||||
|
text = SYMBOL_ITEM_VIRTUAL;
|
||||||
|
};
|
||||||
|
class SearchButton: ctrlButtonPicture {
|
||||||
|
idc = IDC_ATTRIBUTE_SEARCH_BUTTON;
|
||||||
|
onButtonClick = QUOTE( \
|
||||||
|
params ['_searchButton']; \
|
||||||
|
private _controlsGroup = ctrlParentControlsGroup _searchButton; \
|
||||||
|
private _searchBar = _controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_SEARCHBAR; \
|
||||||
|
_searchBar ctrlSetText ''; \
|
||||||
|
ctrlSetFocus _searchBar; \
|
||||||
|
[_controlsGroup] call FUNC(attributeAddItems); \
|
||||||
|
);
|
||||||
|
text = "\a3\Ui_f\data\GUI\RscCommon\RscButtonSearch\search_start_ca.paa";
|
||||||
|
x = QUOTE(5 * ATTRIBUTE_W);
|
||||||
|
y = QUOTE(101.83 * ATTRIBUTE_H);
|
||||||
|
w = QUOTE(5 * ATTRIBUTE_W);
|
||||||
|
h = QUOTE(5 * ATTRIBUTE_H);
|
||||||
|
colorBackground[] = {0, 0, 0, 0.5};
|
||||||
|
};
|
||||||
|
class SearchBar: ctrlEdit {
|
||||||
|
idc = IDC_ATTRIBUTE_SEARCHBAR;
|
||||||
|
onKeyUp = QUOTE([ctrlParentControlsGroup (_this select 0)] call FUNC(attributeAddItems));
|
||||||
|
onMouseButtonClick = QUOTE( \
|
||||||
|
params [ARR_2('_searchBar','_button')]; \
|
||||||
|
if (_button != 1) exitWith {}; \
|
||||||
|
_searchBar ctrlSetText ''; \
|
||||||
|
ctrlSetFocus _searchBar; \
|
||||||
|
[ctrlParentControlsGroup _searchBar] call FUNC(attributeAddItems); \
|
||||||
|
);
|
||||||
|
x = QUOTE(11 * ATTRIBUTE_W);
|
||||||
|
y = QUOTE(101.83 * ATTRIBUTE_H);
|
||||||
|
w = QUOTE(40 * ATTRIBUTE_W);
|
||||||
|
h = QUOTE(5 * ATTRIBUTE_H);
|
||||||
|
};
|
||||||
|
class ClearButton: ctrlButton {
|
||||||
|
idc = IDC_ATTRIBUTE_CLEAR_BUTTON;
|
||||||
|
onButtonClick = QUOTE([ctrlParentControlsGroup (_this select 0)] call FUNC(attributeClear));
|
||||||
|
text = "$STR_disp_arcmap_clear";
|
||||||
|
x = QUOTE(105 * ATTRIBUTE_W);
|
||||||
|
y = QUOTE(101.83 * ATTRIBUTE_H);
|
||||||
|
w = QUOTE(25 * ATTRIBUTE_W);
|
||||||
|
h = QUOTE(5 * ATTRIBUTE_H);
|
||||||
|
colorBackground[] = {0, 0, 0, 0.6};
|
||||||
|
};
|
||||||
|
class ExportButton: ClearButton {
|
||||||
|
idc = IDC_ATTRIBUTE_EXPORT_BUTTON;
|
||||||
|
onButtonClick = QUOTE(copyToClipboard str ((uiNamespace getVariable [ARR_2(QQGVAR(attributeValue),[ARR_2([],0)])]) select 0));
|
||||||
|
text = CSTRING(buttonExportText);
|
||||||
|
tooltip = CSTRING(AttributeExport_Tooltip);
|
||||||
|
x = QUOTE(79 * ATTRIBUTE_W);
|
||||||
|
};
|
||||||
|
class ImportButton: ClearButton {
|
||||||
|
idc = IDC_ATTRIBUTE_IMPORT_BUTTON;
|
||||||
|
onButtonClick = QUOTE([ctrlParentControlsGroup (_this select 0)] call FUNC(attributeImport));
|
||||||
|
text = CSTRING(buttonImportText);
|
||||||
|
tooltip = CSTRING(AttributeImport_Tooltip);
|
||||||
|
x = QUOTE(53 * ATTRIBUTE_W);
|
||||||
|
};
|
||||||
|
class AddCompatible: ctrlButton {
|
||||||
|
idc = IDC_ATTRIBUTE_ADD_COMPATIBLE;
|
||||||
|
style = ST_CENTER;
|
||||||
|
onButtonClick = QUOTE([ctrlParentControlsGroup (_this select 0)] call FUNC(attributeAddCompatible));
|
||||||
|
text = CSTRING(AttributeAddCompatible_DisplayName);
|
||||||
|
tooltip = CSTRING(AttributeAddCompatible_Tooltip);
|
||||||
|
font = "RobotoCondensedLight";
|
||||||
|
x = QUOTE(98.75 * ATTRIBUTE_W);
|
||||||
|
y = QUOTE(10.5 * ATTRIBUTE_H);
|
||||||
|
w = QUOTE(31.25 * ATTRIBUTE_W);
|
||||||
|
h = QUOTE(4 * ATTRIBUTE_H);
|
||||||
|
sizeEx = QUOTE(4 * ATTRIBUTE_H);
|
||||||
|
colorBackground[] = {0, 0, 0, 0.5};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Object {
|
||||||
|
class AttributeCategories {
|
||||||
|
class ADDON {
|
||||||
|
displayName = CSTRING(Mission);
|
||||||
|
collapsed = 1;
|
||||||
|
class Attributes {
|
||||||
|
class ADDON {
|
||||||
|
property = QGVAR(attribute);
|
||||||
|
control = QGVAR(attribute);
|
||||||
|
displayName = CSTRING(Mission);
|
||||||
|
tooltip = "";
|
||||||
|
expression = QUOTE(if (!is3DEN) then {[ARR_2(_this,+_value)] call FUNC(attributeInit)});
|
||||||
|
defaultValue = "[[], 0]";
|
||||||
|
condition = "1 - objectControllable";
|
||||||
|
wikiType = "[[Array]]";
|
||||||
|
validate = "none";
|
||||||
|
value = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
34
addons/arsenal/Display3DEN.hpp
Normal file
34
addons/arsenal/Display3DEN.hpp
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
class Display3DEN {
|
||||||
|
class ContextMenu: ctrlMenu {
|
||||||
|
class Items {
|
||||||
|
class Arsenal {
|
||||||
|
items[]= {"aceArsenal", "virtualArsenal"};
|
||||||
|
};
|
||||||
|
class virtualArsenal {
|
||||||
|
text = "BI Virtual Arsenal";
|
||||||
|
action = QUOTE(['arsenal'] call bis_fnc_3DENEntityMenu);
|
||||||
|
value = 0;
|
||||||
|
data = "Arsenal";
|
||||||
|
opensNewWindow = 1;
|
||||||
|
};
|
||||||
|
class aceArsenal: virtualArsenal {
|
||||||
|
text = "ACE Arsenal";
|
||||||
|
action = QUOTE(call FUNC(open3DEN));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Controls {
|
||||||
|
class MenuStrip: ctrlMenuStrip {
|
||||||
|
class Items {
|
||||||
|
class Tools {
|
||||||
|
items[] += {"ACE_arsenal_portVALoadouts"};
|
||||||
|
};
|
||||||
|
class ACE_arsenal_portVALoadouts {
|
||||||
|
text = CSTRING(portLoadoutsText);
|
||||||
|
picture = QPATHTOEF(common,data\logo_ace3_ca.paa);
|
||||||
|
action = "call ace_arsenal_fnc_portVALoadouts;";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
@ -1,6 +1,18 @@
|
|||||||
|
PREP(addDefaultLoadout);
|
||||||
PREP(addListBoxItem);
|
PREP(addListBoxItem);
|
||||||
PREP(addStat);
|
PREP(addStat);
|
||||||
PREP(addVirtualItems);
|
PREP(addVirtualItems);
|
||||||
|
PREP(attributeAddCompatible);
|
||||||
|
PREP(attributeAddItems);
|
||||||
|
PREP(attributeCategory);
|
||||||
|
PREP(attributeClear);
|
||||||
|
PREP(attributeDblClick);
|
||||||
|
PREP(attributeImport);
|
||||||
|
PREP(attributeInit);
|
||||||
|
PREP(attributeKeyDown);
|
||||||
|
PREP(attributeLoad);
|
||||||
|
PREP(attributeMode);
|
||||||
|
PREP(attributeSelect);
|
||||||
PREP(buttonCargo);
|
PREP(buttonCargo);
|
||||||
PREP(buttonClearAll);
|
PREP(buttonClearAll);
|
||||||
PREP(buttonExport);
|
PREP(buttonExport);
|
||||||
@ -55,6 +67,8 @@ PREP(statTextStatement_accuracy);
|
|||||||
PREP(statTextStatement_mass);
|
PREP(statTextStatement_mass);
|
||||||
PREP(statTextStatement_rateOfFire);
|
PREP(statTextStatement_rateOfFire);
|
||||||
PREP(statTextStatement_scopeMag);
|
PREP(statTextStatement_scopeMag);
|
||||||
|
PREP(statTextStatement_scopeVisionMode);
|
||||||
|
PREP(statTextStatement_smokeChemTTL);
|
||||||
PREP(updateCamPos);
|
PREP(updateCamPos);
|
||||||
PREP(updateRightPanel);
|
PREP(updateRightPanel);
|
||||||
PREP(updateUniqueItemsList);
|
PREP(updateUniqueItemsList);
|
||||||
|
@ -8,35 +8,15 @@ class CfgPatches {
|
|||||||
requiredVersion = REQUIRED_VERSION;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
requiredAddons[] = {"ace_common"};
|
requiredAddons[] = {"ace_common"};
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
authors[] = {"alganthe"};
|
authors[] = {"alganthe", "mharis001"};
|
||||||
url = ECSTRING(main,URL);
|
url = ECSTRING(main,URL);
|
||||||
VERSION_CONFIG;
|
VERSION_CONFIG;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Cfg3DEN {
|
|
||||||
class Mission {
|
|
||||||
class GVAR(DummyCategory) {
|
|
||||||
displayName="Dummy attribute, should never show up";
|
|
||||||
class AttributeCategories {
|
|
||||||
class ACE3_Arsenal {
|
|
||||||
class Attributes {
|
|
||||||
class GVAR(DefaultLoadoutsListAttribute) {
|
|
||||||
property = QGVAR(DefaultLoadoutsListAttribute);
|
|
||||||
value=0;
|
|
||||||
expression="if !(is3DEN) then {ace_arsenal_defaultLoadoutsList = _value};";
|
|
||||||
defaultValue="[]";
|
|
||||||
validate="none";
|
|
||||||
wikiType="[[Array]]";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#include "ui\RscAttributes.hpp"
|
#include "ui\RscAttributes.hpp"
|
||||||
|
#include "Display3DEN.hpp"
|
||||||
|
#include "Cfg3DEN.hpp"
|
||||||
#include "CfgEventHandlers.hpp"
|
#include "CfgEventHandlers.hpp"
|
||||||
#include "RscDisplayMain.hpp"
|
#include "RscDisplayMain.hpp"
|
||||||
#include "ACE_Arsenal_Stats.hpp"
|
#include "ACE_Arsenal_Stats.hpp"
|
||||||
|
@ -149,6 +149,26 @@
|
|||||||
#define IDC_buttonSharedLoadoutsBackground 405
|
#define IDC_buttonSharedLoadoutsBackground 405
|
||||||
#define IDC_buttonSharedLoadouts 406
|
#define IDC_buttonSharedLoadouts 406
|
||||||
|
|
||||||
|
// 3DEN Attribute
|
||||||
|
#define ATTRIBUTE_W (pixelW * pixelGrid * 0.5)
|
||||||
|
#define ATTRIBUTE_H (pixelH * pixelGrid * 0.5)
|
||||||
|
|
||||||
|
#define IDC_ATTRIBUTE_MODE 8100
|
||||||
|
#define IDC_ATTRIBUTE_CATEGORY 8101
|
||||||
|
#define IDC_ATTRIBUTE_LIST 8102
|
||||||
|
#define IDC_ATTRIBUTE_LIST_LEFT 8103
|
||||||
|
#define IDC_ATTRIBUTE_LIST_RIGHT 8104
|
||||||
|
#define IDC_ATTRIBUTE_SEARCH_BUTTON 8105
|
||||||
|
#define IDC_ATTRIBUTE_SEARCHBAR 8106
|
||||||
|
#define IDC_ATTRIBUTE_CLEAR_BUTTON 8107
|
||||||
|
#define IDC_ATTRIBUTE_EXPORT_BUTTON 8108
|
||||||
|
#define IDC_ATTRIBUTE_IMPORT_BUTTON 8109
|
||||||
|
#define IDC_ATTRIBUTE_ADD_COMPATIBLE 8110
|
||||||
|
|
||||||
|
#define SYMBOL_ITEM_NONE "−"
|
||||||
|
#define SYMBOL_ITEM_REMOVE "×"
|
||||||
|
#define SYMBOL_ITEM_VIRTUAL "∞"
|
||||||
|
|
||||||
#define FADE_DELAY 0.15
|
#define FADE_DELAY 0.15
|
||||||
#define CAM_DIS_MAX 5
|
#define CAM_DIS_MAX 5
|
||||||
|
|
||||||
@ -344,6 +364,7 @@ _buttonCurrentMag2Ctrl ctrlCommit FADE_DELAY;\
|
|||||||
{(_accsArray select 2) findIf {_x == _item} > -1} ||\
|
{(_accsArray select 2) findIf {_x == _item} > -1} ||\
|
||||||
{(_accsArray select 3) findIf {_x == _item} > -1}
|
{(_accsArray select 3) findIf {_x == _item} > -1}
|
||||||
|
|
||||||
|
// PboProject 2.45 has problems with these macros for some reason, adding a single space before the \ fixes
|
||||||
#define CHECK_ASSIGNED_ITEMS \
|
#define CHECK_ASSIGNED_ITEMS \
|
||||||
(GVAR(virtualItems) select 10) findIf {_x == _item} > -1 ||\
|
(GVAR(virtualItems) select 10) findIf {_x == _item} > -1 ||\
|
||||||
{(GVAR(virtualItems) select 11) findIf {_x == _item} > -1} ||\
|
{(GVAR(virtualItems) select 11) findIf {_x == _item} > -1} ||\
|
||||||
|
31
addons/arsenal/functions/fnc_addDefaultLoadout.sqf
Normal file
31
addons/arsenal/functions/fnc_addDefaultLoadout.sqf
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
/*
|
||||||
|
* Author: 654wak654
|
||||||
|
* Adds a loadout to the "Default Loadouts" list.
|
||||||
|
* If a loadout with the same name exists, it is overwritten.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Name of loadout <STRING>
|
||||||
|
* 1: getUnitLoadout array <ARRAY>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* ["Squad Leader", getUnitLoadout sql1] call ace_arsenal_fnc_addDefaultLoadout
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
|
*/
|
||||||
|
|
||||||
|
params [["_name", "", [""]], ["_loadout", [], [[]], 10]];
|
||||||
|
|
||||||
|
if (isNil QGVAR(defaultLoadoutsList)) then {
|
||||||
|
GVAR(defaultLoadoutsList) = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
private _loadoutIndex = (+(GVAR(defaultLoadoutsList))) findIf {(_x select 0) == _name};
|
||||||
|
if (_loadoutIndex == -1) then {
|
||||||
|
GVAR(defaultLoadoutsList) pushBack [_name, _loadout];
|
||||||
|
} else {
|
||||||
|
GVAR(defaultLoadoutsList) set [_loadoutIndex, [_name, _loadout]];
|
||||||
|
};
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Dedmen
|
* Author: Dedmen
|
||||||
* Add a listbox row.
|
* Add a listbox row.
|
||||||
@ -13,8 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
|
||||||
params ["_configCategory", "_className", "_ctrlPanel", ["_pictureEntryName", "picture", [""]]];
|
params ["_configCategory", "_className", "_ctrlPanel", ["_pictureEntryName", "picture", [""]]];
|
||||||
|
|
||||||
private _cacheNamespace = _ctrlPanel; //For better readability.
|
private _cacheNamespace = _ctrlPanel; //For better readability.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe
|
* Author: Alganthe
|
||||||
* Add a stat to ACE Arsenal.
|
* Add a stat to ACE Arsenal.
|
||||||
@ -29,7 +30,6 @@
|
|||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
params [
|
params [
|
||||||
["_tabs", [[], []], [[]], 2],
|
["_tabs", [[], []], [[]], 2],
|
||||||
["_class", "", [""]],
|
["_class", "", [""]],
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe, Dedmen
|
* Author: Alganthe, Dedmen
|
||||||
* Add virtual items to the provided target.
|
* Add virtual items to the provided target.
|
||||||
@ -16,8 +18,6 @@
|
|||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
#include "..\defines.hpp"
|
|
||||||
|
|
||||||
params [["_object", objNull, [objNull]], ["_items", [], [true, []]], ["_global", false, [false]]];
|
params [["_object", objNull, [objNull]], ["_items", [], [true, []]], ["_global", false, [false]]];
|
||||||
|
|
||||||
@ -81,37 +81,37 @@ if (_items isEqualType true) then {
|
|||||||
/* Weapon acc */
|
/* Weapon acc */
|
||||||
case (
|
case (
|
||||||
isClass (_configItemInfo) &&
|
isClass (_configItemInfo) &&
|
||||||
{(getNumber (_configItemInfo >> "type")) in [101, 201, 301, 302]} &&
|
{(getNumber (_configItemInfo >> "type")) in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD]} &&
|
||||||
{!(_x isKindOf ["CBA_MiscItem", (_configCfgWeapons)])}
|
{!(_x isKindOf ["CBA_MiscItem", (_configCfgWeapons)])}
|
||||||
): {
|
): {
|
||||||
switch (getNumber (_configItemInfo >> "type")) do {
|
switch (getNumber (_configItemInfo >> "type")) do {
|
||||||
case 201: {
|
case TYPE_OPTICS: {
|
||||||
(_cargo select 1) select 0 pushBackUnique _x;
|
(_cargo select 1) select 0 pushBackUnique _x;
|
||||||
};
|
};
|
||||||
case 301: {
|
case TYPE_FLASHLIGHT: {
|
||||||
(_cargo select 1) select 1 pushBackUnique _x;
|
(_cargo select 1) select 1 pushBackUnique _x;
|
||||||
};
|
};
|
||||||
case 101: {
|
case TYPE_MUZZLE: {
|
||||||
(_cargo select 1) select 2 pushBackUnique _x;
|
(_cargo select 1) select 2 pushBackUnique _x;
|
||||||
};
|
};
|
||||||
case 302: {
|
case TYPE_BIPOD: {
|
||||||
(_cargo select 1) select 3 pushBackUnique _x;
|
(_cargo select 1) select 3 pushBackUnique _x;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/* Headgear */
|
/* Headgear */
|
||||||
case (isClass (_configItemInfo) &&
|
case (isClass (_configItemInfo) &&
|
||||||
{getNumber (_configItemInfo >> "type") == 605}): {
|
{getNumber (_configItemInfo >> "type") == TYPE_HEADGEAR}): {
|
||||||
(_cargo select 3) pushBackUnique _x;
|
(_cargo select 3) pushBackUnique _x;
|
||||||
};
|
};
|
||||||
/* Uniform */
|
/* Uniform */
|
||||||
case (isClass (_configItemInfo) &&
|
case (isClass (_configItemInfo) &&
|
||||||
{getNumber (_configItemInfo >> "type") == 801}): {
|
{getNumber (_configItemInfo >> "type") == TYPE_UNIFORM}): {
|
||||||
(_cargo select 4) pushBackUnique _x;
|
(_cargo select 4) pushBackUnique _x;
|
||||||
};
|
};
|
||||||
/* Vest */
|
/* Vest */
|
||||||
case (isClass (_configItemInfo) &&
|
case (isClass (_configItemInfo) &&
|
||||||
{getNumber (_configItemInfo >> "type") == 701}): {
|
{getNumber (_configItemInfo >> "type") == TYPE_VEST}): {
|
||||||
(_cargo select 5) pushBackUnique _x;
|
(_cargo select 5) pushBackUnique _x;
|
||||||
};
|
};
|
||||||
/* NVgs */
|
/* NVgs */
|
||||||
@ -120,7 +120,7 @@ if (_items isEqualType true) then {
|
|||||||
};
|
};
|
||||||
/* Binos */
|
/* Binos */
|
||||||
case (_simulationType == "Binocular" ||
|
case (_simulationType == "Binocular" ||
|
||||||
{(_simulationType == 'Weapon') && {(getNumber (_configCfgWeapons >> _x >> 'type') == 4096)}}): {
|
{(_simulationType == 'Weapon') && {(getNumber (_configCfgWeapons >> _x >> 'type') == TYPE_BINOCULAR_AND_NVG)}}): {
|
||||||
(_cargo select 9) pushBackUnique _x;
|
(_cargo select 9) pushBackUnique _x;
|
||||||
};
|
};
|
||||||
/* Map */
|
/* Map */
|
||||||
@ -145,20 +145,20 @@ if (_items isEqualType true) then {
|
|||||||
};
|
};
|
||||||
/* UAV terminals */
|
/* UAV terminals */
|
||||||
case (isClass (_configItemInfo) &&
|
case (isClass (_configItemInfo) &&
|
||||||
{getNumber (_configItemInfo >> "type") == 621}): {
|
{getNumber (_configItemInfo >> "type") == TYPE_UAV_TERMINAL}): {
|
||||||
(_cargo select 14) pushBackUnique _x;
|
(_cargo select 14) pushBackUnique _x;
|
||||||
};
|
};
|
||||||
/* Weapon, at the bottom to avoid adding binos */
|
/* Weapon, at the bottom to avoid adding binos */
|
||||||
case (isClass (_configCfgWeapons >> _x >> "WeaponSlotsInfo") &&
|
case (isClass (_configCfgWeapons >> _x >> "WeaponSlotsInfo") &&
|
||||||
{getNumber (_configCfgWeapons >> _x >> 'type') != 4096}): {
|
{getNumber (_configCfgWeapons >> _x >> 'type') != TYPE_BINOCULAR_AND_NVG}): {
|
||||||
switch (getNumber (_configCfgWeapons >> _x >> "type")) do {
|
switch (getNumber (_configCfgWeapons >> _x >> "type")) do {
|
||||||
case 1: {
|
case TYPE_WEAPON_PRIMARY: {
|
||||||
(_cargo select 0) select 0 pushBackUnique ([_x] call bis_fnc_baseWeapon);
|
(_cargo select 0) select 0 pushBackUnique ([_x] call bis_fnc_baseWeapon);
|
||||||
};
|
};
|
||||||
case 2: {
|
case TYPE_WEAPON_HANDGUN: {
|
||||||
(_cargo select 0) select 2 pushBackUnique ([_x] call bis_fnc_baseWeapon);
|
(_cargo select 0) select 2 pushBackUnique ([_x] call bis_fnc_baseWeapon);
|
||||||
};
|
};
|
||||||
case 4: {
|
case TYPE_WEAPON_SECONDARY: {
|
||||||
(_cargo select 0) select 1 pushBackUnique ([_x] call bis_fnc_baseWeapon);
|
(_cargo select 0) select 1 pushBackUnique ([_x] call bis_fnc_baseWeapon);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -166,9 +166,9 @@ if (_items isEqualType true) then {
|
|||||||
/* Misc items */
|
/* Misc items */
|
||||||
case (
|
case (
|
||||||
isClass (_configItemInfo) &&
|
isClass (_configItemInfo) &&
|
||||||
((getNumber (_configItemInfo >> "type")) in [101, 201, 301, 302] &&
|
((getNumber (_configItemInfo >> "type")) in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD] &&
|
||||||
{(_x isKindOf ["CBA_MiscItem", (_configCfgWeapons)])}) ||
|
{(_x isKindOf ["CBA_MiscItem", (_configCfgWeapons)])}) ||
|
||||||
{(getNumber (_configItemInfo >> "type")) in [401, 619, 620]} ||
|
{(getNumber (_configItemInfo >> "type")) in [TYPE_FIRST_AID_KIT, TYPE_MEDIKIT, TYPE_TOOLKIT]} ||
|
||||||
{(getText (_configCfgWeapons >> _x >> "simulation")) == "ItemMineDetector"}
|
{(getText (_configCfgWeapons >> _x >> "simulation")) == "ItemMineDetector"}
|
||||||
): {
|
): {
|
||||||
(_cargo select 17) pushBackUnique _x;
|
(_cargo select 17) pushBackUnique _x;
|
||||||
@ -193,7 +193,8 @@ if (_items isEqualType true) then {
|
|||||||
switch true do {
|
switch true do {
|
||||||
// Rifle, handgun, secondary weapons mags
|
// Rifle, handgun, secondary weapons mags
|
||||||
case (
|
case (
|
||||||
(getNumber (configFile >> "CfgMagazines" >> _x >> "type") in [256,512,1536,16]) &&
|
((getNumber (configFile >> "CfgMagazines" >> _x >> "type") in [TYPE_MAGAZINE_PRIMARY_AND_THROW,TYPE_MAGAZINE_SECONDARY_AND_PUT,1536,TYPE_MAGAZINE_HANDGUN_AND_GL]) ||
|
||||||
|
{(getNumber (configFile >> "CfgMagazines" >> _x >> QGVAR(hide))) == -1}) &&
|
||||||
{!(_x in _grenadeList)} &&
|
{!(_x in _grenadeList)} &&
|
||||||
{!(_x in _putList)}
|
{!(_x in _putList)}
|
||||||
): {
|
): {
|
||||||
|
75
addons/arsenal/functions/fnc_attributeAddCompatible.sqf
Normal file
75
addons/arsenal/functions/fnc_attributeAddCompatible.sqf
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
|
/*
|
||||||
|
* Author: mharis001
|
||||||
|
* Adds compatible attachments or magazines for all weapons in 3DEN attribute.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Attribute controls group <CONTROL>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [CONTROL] call ace_arsenal_fnc_attributeAddCompatible
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
params ["_controlsGroup"];
|
||||||
|
|
||||||
|
private _category = lbCurSel (_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_CATEGORY);
|
||||||
|
|
||||||
|
// Exit if selected category is not attachments or magazines
|
||||||
|
if !(_category in [4, 5, 6, 7, 8]) exitWith {};
|
||||||
|
|
||||||
|
private _configItems = +(uiNamespace getVariable [QGVAR(configItems), []]);
|
||||||
|
private _attributeValue = uiNamespace getVariable [QGVAR(attributeValue), [[], 0]];
|
||||||
|
_attributeValue params ["_attributeItems"];
|
||||||
|
|
||||||
|
// Get list of all weapons in attribute items
|
||||||
|
(_configItems select 0) params ["_primaryWeapons", "_secondaryWeapons", "_handgunWeapons"];
|
||||||
|
private _attributeWeapons = _attributeItems select {_x in _primaryWeapons || {_x in _secondaryWeapons} || {_x in _handgunWeapons}};
|
||||||
|
|
||||||
|
// Add compatible attachments or magazines to attribute
|
||||||
|
private _cfgWeapons = configFile >> "CfgWeapons";
|
||||||
|
private _itemsToAdd = [];
|
||||||
|
|
||||||
|
if (_category == 8) then {
|
||||||
|
private _magazineGroups = uiNamespace getVariable QGVAR(magazineGroups);
|
||||||
|
private _cfgMagazines = configFile >> "CfgMagazines";
|
||||||
|
|
||||||
|
{
|
||||||
|
private _weaponConfig = _cfgWeapons >> _x;
|
||||||
|
|
||||||
|
{
|
||||||
|
private _muzzleConfig = if (_x == "this") then {_weaponConfig} else {_weaponConfig >> _x};
|
||||||
|
|
||||||
|
// Only add existent magazines and ensure correct classname case
|
||||||
|
private _magazines = getArray (_muzzleConfig >> "magazines") select {isClass (_cfgMagazines >> _x)};
|
||||||
|
_magazines = _magazines apply {configName (_cfgMagazines >> _x)};
|
||||||
|
_itemsToAdd append _magazines;
|
||||||
|
|
||||||
|
{
|
||||||
|
_itemsToAdd append ([_magazineGroups, toLower _x] call CBA_fnc_hashGet);
|
||||||
|
} forEach getArray (_muzzleConfig >> "magazineWell");
|
||||||
|
} forEach getArray (_weaponConfig >> "muzzles");
|
||||||
|
} forEach _attributeWeapons;
|
||||||
|
} else {
|
||||||
|
private _attachmentCategory = _category - 4;
|
||||||
|
private _filter = ["optic", "pointer", "muzzle", "bipod"] select _attachmentCategory;
|
||||||
|
|
||||||
|
{
|
||||||
|
_itemsToAdd append ([_x, _filter] call CBA_fnc_compatibleItems);
|
||||||
|
} forEach _attributeWeapons;
|
||||||
|
|
||||||
|
// Only add items with scope of 2 and ensure correct classname case
|
||||||
|
_itemsToAdd = _itemsToAdd select {getNumber (_cfgWeapons >> _x >> "scope") == 2};
|
||||||
|
_itemsToAdd = _itemsToAdd apply {configName (_cfgWeapons >> _x)};
|
||||||
|
};
|
||||||
|
|
||||||
|
_attributeItems append _itemsToAdd;
|
||||||
|
_attributeValue set [0, _attributeItems arrayIntersect _attributeItems];
|
||||||
|
|
||||||
|
// Refresh the list for new items
|
||||||
|
[_controlsGroup] call FUNC(attributeAddItems);
|
122
addons/arsenal/functions/fnc_attributeAddItems.sqf
Normal file
122
addons/arsenal/functions/fnc_attributeAddItems.sqf
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
|
/*
|
||||||
|
* Author: mharis001
|
||||||
|
* Populates 3DEN attribute listbox with items of given category.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Attribute controls group <CONTROL>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [CONTROL] call ace_arsenal_fnc_attributeAddItems
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
params ["_controlsGroup"];
|
||||||
|
|
||||||
|
private _category = lbCurSel (_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_CATEGORY) - 1;
|
||||||
|
private _filter = toLower ctrlText (_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_SEARCHBAR);
|
||||||
|
private _configItems = +(uiNamespace getVariable [QGVAR(configItems), []]);
|
||||||
|
private _attributeValue = uiNamespace getVariable [QGVAR(attributeValue), [[], 0]];
|
||||||
|
TRACE_3("Populating list",_category,_filter,_attributeValue);
|
||||||
|
|
||||||
|
_attributeValue params ["_attributeItems", "_attributeMode"];
|
||||||
|
private _modeSymbol = [SYMBOL_ITEM_VIRTUAL, SYMBOL_ITEM_REMOVE] select _attributeMode;
|
||||||
|
|
||||||
|
// Clear listbox
|
||||||
|
private _listbox = _controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_LIST;
|
||||||
|
lnbClear _listbox;
|
||||||
|
|
||||||
|
// Exit with current items (no specific category)
|
||||||
|
if (_category == -1) exitWith {
|
||||||
|
{
|
||||||
|
// Get appropriate config for each item (different since items can be from any category)
|
||||||
|
private _config = switch (true) do {
|
||||||
|
case (_x in (_configItems select 2));
|
||||||
|
case (_x in (_configItems select 15));
|
||||||
|
case (_x in (_configItems select 16)): {
|
||||||
|
configFile >> "CfgMagazines" >> _x;
|
||||||
|
};
|
||||||
|
case (_x in (_configItems select 6)): {
|
||||||
|
configFile >> "CfgVehicles" >> _x;
|
||||||
|
};
|
||||||
|
case (_x in (_configItems select 7)): {
|
||||||
|
configFile >> "CfgGlasses" >> _x;
|
||||||
|
};
|
||||||
|
default {
|
||||||
|
configFile >> "CfgWeapons" >> _x;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// Add item if not filtered
|
||||||
|
private _displayName = getText (_config >> "displayName");
|
||||||
|
if (toLower _displayName find _filter > -1) then {
|
||||||
|
private _picture = getText (_config >> "picture");
|
||||||
|
private _index = _listbox lnbAddRow ["", _displayName, _modeSymbol];
|
||||||
|
_listbox lnbSetData [[_index, 1], _x];
|
||||||
|
_listbox lnbSetPicture [[_index, 0], _picture];
|
||||||
|
_listbox lbSetTooltip [_index * (count lnbGetColumnsPosition _listbox), _x];
|
||||||
|
};
|
||||||
|
} forEach _attributeItems;
|
||||||
|
|
||||||
|
_listbox lnbSort [1];
|
||||||
|
};
|
||||||
|
|
||||||
|
// Get list of category items
|
||||||
|
private _categoryItems = switch (true) do {
|
||||||
|
case (_category < 3): {
|
||||||
|
_configItems select 0 select _category;
|
||||||
|
};
|
||||||
|
case (_category < 7): {
|
||||||
|
_configItems select 1 select (_category - 3);
|
||||||
|
};
|
||||||
|
default {
|
||||||
|
_configItems select (_category - 5);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// Get config for current category
|
||||||
|
private _config = switch (true) do {
|
||||||
|
case (_category in [7, 20, 21]): {
|
||||||
|
configFile >> "CfgMagazines";
|
||||||
|
};
|
||||||
|
case (_category == 11): {
|
||||||
|
configFile >> "CfgVehicles";
|
||||||
|
};
|
||||||
|
case (_category == 12): {
|
||||||
|
configFile >> "CfgGlasses";
|
||||||
|
};
|
||||||
|
default {
|
||||||
|
configFile >> "CfgWeapons";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// Populate listbox with category items
|
||||||
|
{
|
||||||
|
// Add item if not filtered
|
||||||
|
private _displayName = getText (_config >> _x >> "displayName");
|
||||||
|
if (toLower _displayName find _filter > -1) then {
|
||||||
|
private _picture = getText (_config >> _x >> "picture");
|
||||||
|
private _symbol = SYMBOL_ITEM_NONE;
|
||||||
|
private _alpha = 0.5;
|
||||||
|
|
||||||
|
// Change symbol and alpha if item already selected
|
||||||
|
if (_x in _attributeItems) then {
|
||||||
|
_symbol = _modeSymbol;
|
||||||
|
_alpha = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
private _index = _listbox lnbAddRow ["", _displayName, _symbol];
|
||||||
|
_listbox lnbSetData [[_index, 1], _x];
|
||||||
|
_listbox lnbSetPicture [[_index, 0], _picture];
|
||||||
|
_listbox lbSetTooltip [_index * (count lnbGetColumnsPosition _listbox), _x];
|
||||||
|
_listbox lnbSetColor [[_index, 1], [1, 1, 1, _alpha]];
|
||||||
|
_listbox lnbSetColor [[_index, 2], [1, 1, 1, _alpha]];
|
||||||
|
};
|
||||||
|
} forEach _categoryItems;
|
||||||
|
|
||||||
|
_listbox lnbSort [1];
|
32
addons/arsenal/functions/fnc_attributeCategory.sqf
Normal file
32
addons/arsenal/functions/fnc_attributeCategory.sqf
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
|
/*
|
||||||
|
* Author: mharis001
|
||||||
|
* Handles changing the category in 3DEN attribute.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Attribute controls group <CONTROL>
|
||||||
|
* 1: Category <NUMBER>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [CONTROL, 0] call ace_arsenal_fnc_attributeCategory
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
params ["_controlsGroup", "_category"];
|
||||||
|
|
||||||
|
// Store selected category
|
||||||
|
uiNamespace setVariable [QGVAR(attributeCategory), _category];
|
||||||
|
|
||||||
|
// Show add compatible items button when category is attachments or magazines
|
||||||
|
private _compatibleButton = _controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_ADD_COMPATIBLE;
|
||||||
|
private _enable = _category in [4, 5, 6, 7, 8];
|
||||||
|
_compatibleButton ctrlEnable _enable;
|
||||||
|
_compatibleButton ctrlShow _enable;
|
||||||
|
|
||||||
|
// Refresh the list for selected category
|
||||||
|
[_controlsGroup] call FUNC(attributeAddItems);
|
46
addons/arsenal/functions/fnc_attributeClear.sqf
Normal file
46
addons/arsenal/functions/fnc_attributeClear.sqf
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
|
/*
|
||||||
|
* Author: mharis001
|
||||||
|
* Clears all items from current category in 3DEN attribute.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Attribute controls group <CONTROL>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [CONTROL] call ace_arsenal_fnc_attributeClear
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
params ["_controlsGroup"];
|
||||||
|
|
||||||
|
private _category = lbCurSel (_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_CATEGORY) - 1;
|
||||||
|
private _attributeValue = uiNamespace getVariable [QGVAR(attributeValue), [[], 0]];
|
||||||
|
TRACE_1("Handling clear button",_category);
|
||||||
|
|
||||||
|
// Remove all if no specific category
|
||||||
|
if (_category == -1) then {
|
||||||
|
_attributeValue set [0, []];
|
||||||
|
} else {
|
||||||
|
// Find category items and remove from list
|
||||||
|
private _configItems = +(uiNamespace getVariable [QGVAR(configItems), []]);
|
||||||
|
private _categoryItems = switch (true) do {
|
||||||
|
case (_category < 3): {
|
||||||
|
_configItems select 0 select _category;
|
||||||
|
};
|
||||||
|
case (_category < 7): {
|
||||||
|
_configItems select 1 select (_category - 3);
|
||||||
|
};
|
||||||
|
default {
|
||||||
|
_configItems select (_category - 5);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_attributeValue set [0, (_attributeValue select 0) - _categoryItems];
|
||||||
|
};
|
||||||
|
|
||||||
|
// Refresh the list after clear
|
||||||
|
[_controlsGroup] call FUNC(attributeAddItems);
|
26
addons/arsenal/functions/fnc_attributeDblClick.sqf
Normal file
26
addons/arsenal/functions/fnc_attributeDblClick.sqf
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
/*
|
||||||
|
* Author: mharis001
|
||||||
|
* Handles double clicking a row in 3DEN attribute listbox.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Listbox <CONTROL>
|
||||||
|
* 1: Row index <NUMBER>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [CONTROL, 0] call ace_arsenal_fnc_attributeDblClick
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
params ["_listbox", "_currentRow"];
|
||||||
|
TRACE_1("Double click toggle",_currentRow);
|
||||||
|
|
||||||
|
// Get toggle mode (add or remove item)
|
||||||
|
private _itemClassname = _listbox lnbData [_currentRow, 1];
|
||||||
|
private _addItem = !(_itemClassname in ((uiNamespace getVariable [QGVAR(attributeValue), [[], 0]]) select 0));
|
||||||
|
|
||||||
|
[ctrlParentControlsGroup _listbox, _addItem] call FUNC(attributeSelect);
|
49
addons/arsenal/functions/fnc_attributeImport.sqf
Normal file
49
addons/arsenal/functions/fnc_attributeImport.sqf
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
/*
|
||||||
|
* Author: mharis001
|
||||||
|
* Handles importing items list from clipboard into 3DEN attribute.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Attribute controls group <CONTROL>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [CONTROL] call ace_arsenal_fnc_attributeImport
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
params ["_controlsGroup"];
|
||||||
|
|
||||||
|
private _importList = call compile copyFromClipboard;
|
||||||
|
|
||||||
|
// Verify import list is in correct format
|
||||||
|
if (isNil "_importList" || {!(_importList isEqualType [])} || {!(_importList isEqualTypeAll "")}) exitWith {
|
||||||
|
playSound ["3DEN_notificationWarning", true];
|
||||||
|
};
|
||||||
|
|
||||||
|
// Ensure imported items are in scanned config array and classname case is correct
|
||||||
|
private _configItems = +(uiNamespace getVariable [QGVAR(configItems), []]);
|
||||||
|
private _configItemsFlat = _configItems select [2, 16];
|
||||||
|
_configItemsFlat append (_configItems select 0);
|
||||||
|
_configItemsFlat append (_configItems select 1);
|
||||||
|
|
||||||
|
private _filteredList = [];
|
||||||
|
|
||||||
|
{
|
||||||
|
private _item = _x;
|
||||||
|
{
|
||||||
|
private _index = _x findIf {_x == _item};
|
||||||
|
if (_index > -1) then {
|
||||||
|
_filteredList pushBackUnique (_x select _index);
|
||||||
|
};
|
||||||
|
} forEach _configItemsFlat;
|
||||||
|
} forEach _importList;
|
||||||
|
|
||||||
|
private _attributeValue = uiNamespace getVariable [QGVAR(attributeValue), [[], 0]];
|
||||||
|
_attributeValue set [0, _filteredList];
|
||||||
|
|
||||||
|
// Refresh the list for new items
|
||||||
|
[_controlsGroup] call FUNC(attributeAddItems);
|
40
addons/arsenal/functions/fnc_attributeInit.sqf
Normal file
40
addons/arsenal/functions/fnc_attributeInit.sqf
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
/*
|
||||||
|
* Author: mharis001
|
||||||
|
* Initializes the objects 3DEN attribute at scenario start.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Attribute target <OBJECT>
|
||||||
|
* 1: Attribute value <ARRAY>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [box, [[], 1]] call ace_arsenal_fnc_attributeInit
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
params ["_object", "_value"];
|
||||||
|
_value params ["_items", "_mode"];
|
||||||
|
TRACE_2("Initializing object with attribute",_object,_value);
|
||||||
|
|
||||||
|
if (_mode > 0) then {
|
||||||
|
// Blacklist: add full arsenal and take items away
|
||||||
|
[_object, true, true] call FUNC(initBox);
|
||||||
|
|
||||||
|
// Need to delay removal by 2 frames
|
||||||
|
[{
|
||||||
|
[{
|
||||||
|
params ["_object", "_items"];
|
||||||
|
[_object, _items, true] call FUNC(removeVirtualItems);
|
||||||
|
}, _this] call CBA_fnc_execNextFrame;
|
||||||
|
}, [_object, _items]] call CBA_fnc_execNextFrame;
|
||||||
|
} else {
|
||||||
|
// Exit on whitelist mode with no items
|
||||||
|
if (_items isEqualTo []) exitWith {};
|
||||||
|
|
||||||
|
// Whitelist: add only selected items
|
||||||
|
[_object, _items, true] call FUNC(initBox);
|
||||||
|
};
|
39
addons/arsenal/functions/fnc_attributeKeyDown.sqf
Normal file
39
addons/arsenal/functions/fnc_attributeKeyDown.sqf
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
|
||||||
|
/*
|
||||||
|
* Author: mharis001
|
||||||
|
* Handles keyboard input for the 3DEN attribute.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Display <DISPLAY>
|
||||||
|
* 1: Key code <NUMBER>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Handled <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [DISPLAY, 0] call ace_arsenal_fnc_attributeKeyDown
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
params ["_display", "_keyCode"];
|
||||||
|
TRACE_2("Attribute key down",_display,_keyCode);
|
||||||
|
|
||||||
|
// Exit if attribute is not in focus
|
||||||
|
private _controlsGroup = uiNamespace getVariable QGVAR(attributeFocus);
|
||||||
|
if (isNil "_controlsGroup") exitWith {false};
|
||||||
|
|
||||||
|
switch (_keyCode) do {
|
||||||
|
case DIK_LEFT;
|
||||||
|
case DIK_NUMPADMINUS: {
|
||||||
|
[_controlsGroup, false] call FUNC(attributeSelect);
|
||||||
|
true
|
||||||
|
};
|
||||||
|
case DIK_RIGHT;
|
||||||
|
case DIK_NUMPADPLUS: {
|
||||||
|
[_controlsGroup, true] call FUNC(attributeSelect);
|
||||||
|
true
|
||||||
|
};
|
||||||
|
default {false};
|
||||||
|
};
|
41
addons/arsenal/functions/fnc_attributeLoad.sqf
Normal file
41
addons/arsenal/functions/fnc_attributeLoad.sqf
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
|
/*
|
||||||
|
* Author: mharis001
|
||||||
|
* Initializes the 3DEN attribute.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Attribute controls group <CONTROL>
|
||||||
|
* 1: Attribute value <ARRAY>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [CONTROL, [[], 0]] call ace_arsenal_fnc_attributeLoad
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
params ["_controlsGroup", "_value"];
|
||||||
|
TRACE_1("Initializing 3DEN attribute",_value);
|
||||||
|
|
||||||
|
// Store working attribute value
|
||||||
|
uiNamespace setVariable [QGVAR(attributeValue), _value];
|
||||||
|
|
||||||
|
// Add keyDown EH to display
|
||||||
|
// Does not work properly when added to controls group
|
||||||
|
private _display = ctrlParent _controlsGroup;
|
||||||
|
_display displayAddEventHandler ["KeyDown", {call FUNC(attributeKeyDown)}];
|
||||||
|
|
||||||
|
// Handle selected mode
|
||||||
|
if (_value select 1 > 0) then {
|
||||||
|
(_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_MODE) lbSetCurSel 1;
|
||||||
|
(_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_LIST_RIGHT) ctrlSetText SYMBOL_ITEM_REMOVE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Trigger category selection for last selected category to populate list
|
||||||
|
private _category = uiNamespace getVariable [QGVAR(attributeCategory), 0];
|
||||||
|
(_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_CATEGORY) lbSetCurSel _category;
|
||||||
|
|
||||||
|
[_controlsGroup, _category] call FUNC(attributeCategory);
|
29
addons/arsenal/functions/fnc_attributeMode.sqf
Normal file
29
addons/arsenal/functions/fnc_attributeMode.sqf
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
|
/*
|
||||||
|
* Author: mharis001
|
||||||
|
* Handles changing the mode in 3DEN attribute.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Attribute controls group <CONTROL>
|
||||||
|
* 1: Mode <NUMBER>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [CONTROL, 0] call ace_arsenal_fnc_attributeMode
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
params ["_controlsGroup", "_mode"];
|
||||||
|
TRACE_1("Changing attribute mode",_mode);
|
||||||
|
|
||||||
|
// Store mode change
|
||||||
|
private _attributeValue = uiNamespace getVariable [QGVAR(attributeValue), [[], 0]];
|
||||||
|
_attributeValue set [1, _mode];
|
||||||
|
|
||||||
|
// Change right list button and refresh list items with new mode
|
||||||
|
(_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_LIST_RIGHT) ctrlSetText ([SYMBOL_ITEM_VIRTUAL, SYMBOL_ITEM_REMOVE] select _mode);
|
||||||
|
[_controlsGroup] call FUNC(attributeAddItems);
|
49
addons/arsenal/functions/fnc_attributeSelect.sqf
Normal file
49
addons/arsenal/functions/fnc_attributeSelect.sqf
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
|
/*
|
||||||
|
* Author: mharis001
|
||||||
|
* Handles adding/removing an item from 3DEN attribute list.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Attribute controls group <CONTROL>
|
||||||
|
* 1: Add (true) or remove (false) item <BOOL>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [CONTROL, true] call ace_arsenal_fnc_attributeSelect
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
params ["_controlsGroup", "_addItem"];
|
||||||
|
|
||||||
|
// Get item class from listbox
|
||||||
|
private _listbox = _controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_LIST;
|
||||||
|
private _currentRow = lnbCurSelRow _listbox;
|
||||||
|
private _itemClassname = _listbox lnbData [_currentRow, 1];
|
||||||
|
TRACE_2("Handling item selection",_itemClassname,_addItem);
|
||||||
|
|
||||||
|
private _attributeValue = uiNamespace getVariable [QGVAR(attributeValue), [[], 0]];
|
||||||
|
_attributeValue params ["_attributeItems", "_attributeMode"];
|
||||||
|
|
||||||
|
private _findItem = _attributeItems find _itemClassname;
|
||||||
|
|
||||||
|
// Add item if not already in list
|
||||||
|
if (_addItem && {_findItem < 0}) exitWith {
|
||||||
|
_attributeItems pushBack _itemClassname;
|
||||||
|
// Change symbol and increase alpha
|
||||||
|
_listbox lnbSetText [[_currentRow, 2], [SYMBOL_ITEM_VIRTUAL, SYMBOL_ITEM_REMOVE] select _attributeMode];
|
||||||
|
_listbox lnbSetColor [[_currentRow, 1], [1, 1, 1, 1]];
|
||||||
|
_listbox lnbSetColor [[_currentRow, 2], [1, 1, 1, 1]];
|
||||||
|
};
|
||||||
|
|
||||||
|
// Remove item if in list
|
||||||
|
if (!_addItem && {_findItem > -1}) exitWith {
|
||||||
|
_attributeItems deleteAt _findItem;
|
||||||
|
// Change symbol and reduce alpha
|
||||||
|
_listbox lnbSetText [[_currentRow, 2], SYMBOL_ITEM_NONE];
|
||||||
|
_listbox lnbSetColor [[_currentRow, 1], [1, 1, 1, 0.5]];
|
||||||
|
_listbox lnbSetColor [[_currentRow, 2], [1, 1, 1, 0.5]];
|
||||||
|
};
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe
|
* Author: Alganthe
|
||||||
* Add or remove item(s) when the + or - button is pressed in the right panel.
|
* Add or remove item(s) when the + or - button is pressed in the right panel.
|
||||||
@ -11,8 +13,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
#include "..\defines.hpp"
|
|
||||||
|
|
||||||
params ["_display", "_addOrRemove"];
|
params ["_display", "_addOrRemove"];
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe
|
* Author: Alganthe
|
||||||
* Clear the current container.
|
* Clear the current container.
|
||||||
@ -10,8 +12,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
#include "..\defines.hpp"
|
|
||||||
|
|
||||||
params ["_display"];
|
params ["_display"];
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe
|
* Author: Alganthe
|
||||||
* Export current loadout / default loadouts list to clipboard.
|
* Export current loadout / default loadouts list to clipboard.
|
||||||
@ -10,7 +11,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_display"];
|
params ["_display"];
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe
|
* Author: Alganthe
|
||||||
* Hide / show arsenal interface.
|
* Hide / show arsenal interface.
|
||||||
@ -10,8 +12,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
#include "..\defines.hpp"
|
|
||||||
|
|
||||||
params ["_display"];
|
params ["_display"];
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe
|
* Author: Alganthe
|
||||||
* Import loadout / default loadouts list from clipboard.
|
* Import loadout / default loadouts list from clipboard.
|
||||||
@ -10,8 +12,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
#include "..\defines.hpp"
|
|
||||||
|
|
||||||
params ["_display"];
|
params ["_display"];
|
||||||
|
|
||||||
@ -31,16 +31,7 @@ if (GVAR(shiftState) && {is3DEN}) then {
|
|||||||
{_x select 1 isEqualType []} &&
|
{_x select 1 isEqualType []} &&
|
||||||
{count (_x select 1) == 10}
|
{count (_x select 1) == 10}
|
||||||
) then {
|
) then {
|
||||||
|
_x call FUNC(addDefaultLoadout);
|
||||||
_x params ["_loadoutName", "_loadout"];
|
|
||||||
|
|
||||||
private _sameNameLoadoutsList = GVAR(defaultLoadoutsList) select {_x select 0 == _loadoutName};
|
|
||||||
|
|
||||||
if (count _sameNameLoadoutsList == 0) then {
|
|
||||||
GVAR(defaultLoadoutsList) pushBack [_loadoutName, _loadout];
|
|
||||||
} else {
|
|
||||||
GVAR(defaultLoadoutsList) set [GVAR(defaultLoadoutsList) find (_sameNameLoadoutsList select 0), _loadoutName, _loadout];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
} foreach _data;
|
} foreach _data;
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe
|
* Author: Alganthe
|
||||||
* Delete / unshare loadout currently selected.
|
* Delete / unshare loadout currently selected.
|
||||||
@ -11,8 +13,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
#include "..\defines.hpp"
|
|
||||||
|
|
||||||
params ["_display", "_control"];
|
params ["_display", "_control"];
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe
|
* Author: Alganthe
|
||||||
* Load selected loadout.
|
* Load selected loadout.
|
||||||
@ -11,8 +13,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
#include "..\defines.hpp"
|
|
||||||
|
|
||||||
params ["_display", "_control"];
|
params ["_display", "_control"];
|
||||||
|
|
||||||
@ -76,10 +76,17 @@ for "_index" from 0 to 15 do {
|
|||||||
};
|
};
|
||||||
{
|
{
|
||||||
private _simulationType = getText (configFile >> "CfgWeapons" >> _x >> "simulation");
|
private _simulationType = getText (configFile >> "CfgWeapons" >> _x >> "simulation");
|
||||||
private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch", "itemgps"] find (tolower _simulationType));
|
|
||||||
|
|
||||||
|
if (_simulationType != "NVGoggles") then {
|
||||||
|
if (_simulationType == "ItemGps" || _simulationType == "Weapon") then {
|
||||||
|
GVAR(currentItems) set [14, _x];
|
||||||
|
} else {
|
||||||
|
|
||||||
|
private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch"] find (tolower _simulationType));
|
||||||
GVAR(currentItems) set [_index, _x];
|
GVAR(currentItems) set [_index, _x];
|
||||||
} foreach (assignedItems GVAR(center));
|
};
|
||||||
|
};
|
||||||
|
} forEach (assignedItems GVAR(center));
|
||||||
|
|
||||||
call FUNC(updateUniqueItemsList);
|
call FUNC(updateUniqueItemsList);
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe
|
* Author: Alganthe
|
||||||
* Rename selected loadout.
|
* Rename selected loadout.
|
||||||
@ -11,8 +13,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
#include "..\defines.hpp"
|
|
||||||
|
|
||||||
params ["_display", "_control"];
|
params ["_display", "_control"];
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe
|
* Author: Alganthe
|
||||||
* Save selected loadout.
|
* Save selected loadout.
|
||||||
@ -11,8 +13,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
#include "..\defines.hpp"
|
|
||||||
|
|
||||||
params ["_display", "_control"];
|
params ["_display", "_control"];
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ private _loadoutName = _contentPanelCtrl lnbText [_cursSelRow, 1];
|
|||||||
private _curSelLoadout = (_contentPanelCtrl getVariable (_loadoutName + str GVAR(currentLoadoutsTab))) select 0;
|
private _curSelLoadout = (_contentPanelCtrl getVariable (_loadoutName + str GVAR(currentLoadoutsTab))) select 0;
|
||||||
private _loadout = getUnitLoadout GVAR(center);
|
private _loadout = getUnitLoadout GVAR(center);
|
||||||
|
|
||||||
private _sameNameLoadoutsList = _data select {_x select 0 == _editBoxContent};
|
private _loadoutIndex = _data findIf {(_x select 0) == _editBoxContent};
|
||||||
private _sharedLoadoutsVars = GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars);
|
private _sharedLoadoutsVars = GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars);
|
||||||
|
|
||||||
// Make sure the loadout isn't yours (public tab) or being shared (my loadouts tab)
|
// Make sure the loadout isn't yours (public tab) or being shared (my loadouts tab)
|
||||||
@ -124,10 +124,20 @@ switch (GVAR(currentLoadoutsTab)) do {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (count _sameNameLoadoutsList == 0) then {
|
if (GVAR(shiftState) && {is3DEN} && {!(_loadoutName isEqualTo "")} && {_cursSelRow != -1} && {!(_loadoutIndex isEqualto -1)}) exitwith {
|
||||||
|
private _defaultLoadoutsSearch = GVAR(defaultLoadoutsList) findIf {(_x select 0) == _loadoutName};
|
||||||
|
if (_defaultLoadoutsSearch isEqualto -1) then {
|
||||||
|
GVAR(defaultLoadoutsList) pushBack [_loadoutName, _curSelLoadout];
|
||||||
|
} else {
|
||||||
|
GVAR(defaultLoadoutsList) set [_defaultLoadoutsSearch , [ _loadoutName, _curSelLoadout]];
|
||||||
|
};
|
||||||
|
set3DENMissionAttributes [[QGVAR(DummyCategory), QGVAR(DefaultLoadoutsListAttribute), GVAR(defaultLoadoutsList)]];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_loadoutIndex isEqualto -1) then {
|
||||||
_data pushBack [_editBoxContent, _loadout];
|
_data pushBack [_editBoxContent, _loadout];
|
||||||
} else {
|
} else {
|
||||||
_data set [_data find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]];
|
_data set [_loadoutIndex, [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]];
|
||||||
};
|
};
|
||||||
|
|
||||||
// Delete "old" loadout row
|
// Delete "old" loadout row
|
||||||
@ -155,7 +165,7 @@ switch (GVAR(currentLoadoutsTab)) do {
|
|||||||
|
|
||||||
if (is3DEN) then {
|
if (is3DEN) then {
|
||||||
|
|
||||||
private _sameNameLoadoutsList = _data select {_x select 0 == _editBoxContent};
|
private _loadoutIndex = _data findIf {(_x select 0) == _editBoxContent};
|
||||||
|
|
||||||
for "_dataIndex" from 0 to 10 do {
|
for "_dataIndex" from 0 to 10 do {
|
||||||
switch (_dataIndex) do {
|
switch (_dataIndex) do {
|
||||||
@ -232,10 +242,10 @@ switch (GVAR(currentLoadoutsTab)) do {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (count _sameNameLoadoutsList == 0) then {
|
if (_loadoutIndex == -1) then {
|
||||||
GVAR(defaultLoadoutsList) pushBack [_editBoxContent, _loadout];
|
GVAR(defaultLoadoutsList) pushBack [_editBoxContent, _loadout];
|
||||||
} else {
|
} else {
|
||||||
GVAR(defaultLoadoutsList) set [GVAR(defaultLoadoutsList) find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]];
|
GVAR(defaultLoadoutsList) set [_loadoutIndex, [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]];
|
||||||
};
|
};
|
||||||
|
|
||||||
for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do {
|
for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do {
|
||||||
@ -258,10 +268,10 @@ switch (GVAR(currentLoadoutsTab)) do {
|
|||||||
set3DENMissionAttributes [[QGVAR(DummyCategory), QGVAR(DefaultLoadoutsListAttribute), GVAR(defaultLoadoutsList)]];
|
set3DENMissionAttributes [[QGVAR(DummyCategory), QGVAR(DefaultLoadoutsListAttribute), GVAR(defaultLoadoutsList)]];
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (count _sameNameLoadoutsList == 0) then {
|
if (_loadoutIndex == -1) then {
|
||||||
_data pushBack [_editBoxContent, _curSelLoadout];
|
_data pushBack [_editBoxContent, _curSelLoadout];
|
||||||
} else {
|
} else {
|
||||||
_data set [_data find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _curSelLoadout]];
|
_data set [_loadoutIndex, [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _curSelLoadout]];
|
||||||
_contentPanelCtrl setVariable [_editBoxContent + str IDC_buttonMyLoadouts, [_curSelLoadout] call FUNC(verifyLoadout)];
|
_contentPanelCtrl setVariable [_editBoxContent + str IDC_buttonMyLoadouts, [_curSelLoadout] call FUNC(verifyLoadout)];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -273,10 +283,10 @@ switch (GVAR(currentLoadoutsTab)) do {
|
|||||||
|
|
||||||
_loadout = (GVAR(sharedLoadoutsNamespace) getVariable ((_contentPanelCtrl lnbText [_cursSelRow, 0]) + (_contentPanelCtrl lnbText [_cursSelRow, 1]))) select 2;
|
_loadout = (GVAR(sharedLoadoutsNamespace) getVariable ((_contentPanelCtrl lnbText [_cursSelRow, 0]) + (_contentPanelCtrl lnbText [_cursSelRow, 1]))) select 2;
|
||||||
|
|
||||||
if (count _sameNameLoadoutsList == 0) then {
|
if (_loadoutIndex == -1) then {
|
||||||
_data pushBack [_editBoxContent, _loadout];
|
_data pushBack [_editBoxContent, _loadout];
|
||||||
} else {
|
} else {
|
||||||
_data set [_data find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]];
|
_data set [_loadoutIndex, [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]];
|
||||||
_contentPanelCtrl setVariable [_editBoxContent + str IDC_buttonMyLoadouts, [_loadout] call FUNC(verifyLoadout)];
|
_contentPanelCtrl setVariable [_editBoxContent + str IDC_buttonMyLoadouts, [_loadout] call FUNC(verifyLoadout)];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe
|
* Author: Alganthe
|
||||||
* Share selected loadout.
|
* Share selected loadout.
|
||||||
@ -11,8 +13,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
#include "..\defines.hpp"
|
|
||||||
|
|
||||||
params ["_display", "_control"];
|
params ["_display", "_control"];
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe
|
* Author: Alganthe
|
||||||
* Toggle the stats control group
|
* Toggle the stats control group
|
||||||
@ -11,8 +13,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
#include "..\defines.hpp"
|
|
||||||
|
|
||||||
params ["_display"];
|
params ["_display"];
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe
|
* Author: Alganthe
|
||||||
* Handles the previous / next page buttons for stats
|
* Handles the previous / next page buttons for stats
|
||||||
@ -11,8 +13,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
|
||||||
#include "..\defines.hpp"
|
|
||||||
|
|
||||||
params ["_display", "_control", "_nextPage"];
|
params ["_display", "_control", "_nextPage"];
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user