Commit Graph

138 Commits

Author SHA1 Message Date
johnb432
6a25e9365a
Safemode - Refactor (#10111)
* Refactor safemode

* Further improvements and fixes

* Update XEH_postInit.sqf

* Don't allow binoculars to be set to safe

* Add API for getting weapon safety status

* Update fnc_jamWeapon.sqf

* Added doc

* Update fnc_playChangeFiremodeSound.sqf

* Update addons/overheating/functions/fnc_jamWeapon.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Update addons/weaponselect/functions/fnc_selectWeaponMode.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

---------

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2024-08-02 13:59:18 +02:00
johnb432
dce7da60c9
General - Change count to isEqualTo where appropriate (#9921)
count -> isEqualTo
2024-04-06 11:57:08 -07:00
Drofseh
6ea0312770
Overheating - Increase cooling for open bolt guns and spare barrels (#9827)
* open bolt and spare barrel cooling boost

* change magic number to macro
2024-03-06 09:45:41 -08:00
PabstMirror
a3aef6a066
General - Cleanup spaces in macros (#9769)
Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
2024-02-05 14:04:24 -03:00
Drofseh
b58807088a
Overheating - Add stats to arsenal (#9719)
* Overheating - Add Bolt Type stat to arsenal

* Add stat for barrel swapping

* Update addons/overheating/ACE_Arsenal_Stats.hpp

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Update addons/overheating/functions/fnc_statTextStatement_allowSwapBarrel.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

---------

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2024-01-07 17:04:10 -06:00
jonpas
742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00
Drofseh
53c0348a15
Overheating - Add barrel mass config value (#8906) 2022-05-11 18:21:05 -05:00
GhostIsSpooky
9ff5d34ce7
Common - Add cache to fnc_isModLoaded (#8794)
* add isModLoaded cache

* add missing brackets

* missed one

* Update fnc_handlePunjiTrapDamage.sqf

* Update fnc_isModLoaded.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2022-01-30 11:56:20 -06:00
Drofseh
79c0510056
Overheating - Fix set temperature functions (#8770)
* Fix set temperature functions

* fix example
2022-01-12 12:41:50 -06:00
Drofseh
727ac12e6c
switch from params to select for single value returns when calling getWeaponData (#8672) 2021-11-08 13:08:43 -06:00
Drofseh
99c85e3c12
Overheating - Fix issues from release (#8617)
* move overheating cookoff into separate function

* move heatCoef and require mission restart for setting change

- move heatCoef to a more sensible place
- require mission restart for heatCoef setting change (it gets cached per ammo type)

* add exit to ammo temp loop if cookoffCoef is changed to 0 mid-mission

- add exit to ammo temp loop if cookoffCoef is changed to 0 mid-mission, this prevents an issue where all weapon cookoff regardless of temp, because required temp gets multiplied by cookoffCoef which has been set to 0.

* file end new line

* update header for ace_overheating_fnc_cookoffWeapon

* use ambientTemperature as floor for weapon and ammo temp

* add coolingCoef setting

* improve feature documentation

* add fnc_cookoffWeapon to XEH_PREP

* add type of jam to ace_weaponJammed local event

- add type of jam to ace_weaponJammed local event
- fix #8637

* fix misspelling

Co-authored-by: TyroneMF <TyroneMF@hotmail.com>

* clear all weapon heat on death

* Update addons/overheating/functions/fnc_updateTemperature.sqf

Co-authored-by: GhostIsSpooky <69561145+Salluci@users.noreply.github.com>

* deprecate ace_overheating_fnc_getBarrelMass, cache weapon bolt and barrel mass values

- cache closed bolt value by moving config look up to ace_overheating_fnc_getWeaponData
- cache barrel mass value by moving calculation from ace_overheating_fnc_getBarrelMass to ace_overheating_fnc_getWeaponData
- deprecate ace_overheating_fnc_getBarrelMass to be a wrapper for ace_overheating_fnc_getWeaponData that only returns barrel mass

* add public functions to get and set weapon and ammo temperature

* add `canCoolWeaponWithItem` function, workaround for #8657

* Apply suggestions from code review

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* add coef setting for addition heat from suppressor

* Update fnc_overheat.sqf

* improve fnc_canCoolWeaponWithItem

* remove extra (

* Move canCoolWeaponWithItem action code to function

* Use hashmaps and reset on settings change

* Apply suggestions from code review

Co-authored-by: jonpas <jonpas33@gmail.com>

Co-authored-by: TyroneMF <TyroneMF@hotmail.com>
Co-authored-by: GhostIsSpooky <69561145+Salluci@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: jonpas <jonpas33@gmail.com>
2021-11-08 12:06:31 -06:00
PabstMirror
7bc6fdfa66
Cleanup - Trim all trailing whitespace (#8651) 2021-10-30 16:42:03 -05:00
Filip Maciejewski
f1837522e5
Overheating - Fix animation glitches on empty mag (#8607) 2021-10-24 12:40:11 -05:00
PabstMirror
f2b3fe3012
Tweak Field_rations/overheating merge (#8548) 2021-10-17 21:45:01 -05:00
Drofseh
eadbc60314
Overheating - Fix errors, improve documentation, change AceX references for integration (#8522)
* Fix jam script error, improve documentation

* formatting

* Update docs/wiki/feature/overheating.md

Co-authored-by: GhostIsSpooky <69561145+Salluci@users.noreply.github.com>

* Update docs/wiki/feature/overheating.md

Co-authored-by: GhostIsSpooky <69561145+Salluci@users.noreply.github.com>

* fix icon filepath for AceX integration

* Apply suggestions from code review

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Update addons/overheating/XEH_postInit.sqf

Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>

* move old AceX references to macros

* small whitespace formatting

Co-authored-by: GhostIsSpooky <69561145+Salluci@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>
2021-10-17 17:00:16 -05:00
Drofseh
f83c605958
Overheating - Add cook off and rate of fire features and additional customization settings (#8064)
* Add jamming coef to change or disable jamming.

* change max to 5

* add setting for overheating effects distance, unjaming on barrel swap, increase rate of fire with heat

- add setting for overheating effects distance
- add unjaming on barrel swap, with setting
- add increase rate of fire with heat, with setting
- fix some formatting

* little tweaks

* add overheating cookoff feature

- add overheating cookoff feature
- add documentation
- bugfixes/improvements

* Update ace3-config-entries.md

* Update overheating-framework.md

* Update addons/overheating/XEH_postInit.sqf

Co-authored-by: jonpas <jonpas33@gmail.com>

* Update addons/overheating/XEH_postInit.sqf

Co-authored-by: jonpas <jonpas33@gmail.com>

* Update addons/overheating/functions/fnc_firedEH.sqf

Co-authored-by: jonpas <jonpas33@gmail.com>

* Update addons/overheating/stringtable.xml

Co-authored-by: jonpas <jonpas33@gmail.com>

* Update docs/wiki/feature/overheating.md

Co-authored-by: jonpas <jonpas33@gmail.com>

* Update addons/overheating/stringtable.xml

Co-authored-by: jonpas <jonpas33@gmail.com>

* Update addons/overheating/functions/fnc_jamWeapon.sqf

Co-authored-by: jonpas <jonpas33@gmail.com>

* Update addons/overheating/functions/fnc_jamWeapon.sqf

Co-authored-by: jonpas <jonpas33@gmail.com>

* remove extra underwater cooling, make cookoffCoef enable cookoff

- add coef setting for heat generation per shot
- merge cookoff setting into cookoff coef setting
- remove check for water that increased cooling
- change max rof increase from heat to 10%
- change ammo heating to a less linear formula
- change cookoffCoef to effect inginition tempurature instead of heat amount
- delay cookoff shot until any firing animation is done
- update strings based on feedback

* Update stringtable.xml

* add cookoff notification

* improvements from play testing

- move ammo heat loop into seperate function with a tighter loop
- factor rain into cooling calculation
- handle cooling while swimming
- merge cookoff take event handler into fnc_handleTakeEH
- fix case where cookoff could potentially come from underbarrel weapon muzzle
- only add TakeEH if required by enabled settings
- improve cookoff muzzle/mode handling

* fix missing semi that I swear I already fixed before pushing

* Update overheating-framework.md

* Update fnc_updateAmmoTemperature.sqf

* include wind speed in cooling calculation

* cool with X

- add ace interactions to allow cooling with water sources when Ace X is loaded
- add documentation for cooling
- move getting barrel mass to a function

* documentation formatting

* Add config array for weapon jam types, as not all weapon can get all types IRL.

* remove variable that's not required

* add some compat entries for RHS

* fix merge conflict

* fix a happy little accident

* move to CBA settings, minor styling.

* Update error message in fnc_jamWeapon.sqf

Co-authored-by: jonpas <jonpas33@gmail.com>

* Apply suggestions from code review

Co-authored-by: TyroneMF <TyroneMF@hotmail.com>

Co-authored-by: jonpas <jonpas33@gmail.com>
Co-authored-by: TyroneMF <TyroneMF@hotmail.com>
2021-10-14 10:47:52 -05:00
GhostIsSpooky
97deef5617
General - Use engine hashmaps (#8468)
Co-authored-by: Dedmen Miller <dedmen@users.noreply.github.com>
2021-10-10 18:55:14 +02:00
10Dozen
0b7aa7f3e5
Overheating - Drop jammed states on unit respawn (#8333)
* Overheating - Added respawn handler to drop jammed state

Fixes https://github.com/acemod/ACE3/issues/7651

* Description update

* Update addons/overheating/functions/fnc_handleRespawn.sqf

Co-authored-by: jonpas <jonpas33@gmail.com>
2021-07-23 15:48:16 -05:00
PabstMirror
a9a69ac4ff
Headers - Fix function names in examples (#7663) 2020-04-25 08:41:45 +02:00
Panisher
d9054e1c52 Overheating - Fix jamming sound (#7463)
* This sound was heard all over the map

* secondaryWeapon changed to handgunWeapon

* add jamming sound

* add yourself to AUTHORS.txt
2020-01-18 11:40:41 -06:00
PabstMirror
641dee39bd Fix trivial bugs (#6922) 2019-04-07 14:22:25 +02:00
Dedmen Miller
e2ac18a05d [WIP] Fix script errors reporting wrong line numbers (#6407)
* advanced_ballistics

* advanced_fatigue

* advanced_throwing

* ai

* aircraft

* arsenal

* atragmx

* attach

* backpacks

* ballistics

* captives

* cargo

* chemlights

* common

* concertina_wire

* cookoff

* dagr

* disarming

* disposable

* dogtags

* dragging

* explosives

* fastroping

* fcs

* finger

* frag

* gestures

* gforces

* goggles

* grenades

* gunbag

* hearing

* hitreactions

* huntir

* interact_menu

* interaction

* inventory

* kestrel4500

* laser

* laserpointer

* logistics_uavbattery

* logistics_wirecutter

* magazinerepack

* map

* map_gestures

* maptools

* markers

* medical

* medical_ai

* medical_blood

* medical_menu

* microdagr

* minedetector

* missileguidance

* missionmodules

* mk6mortar

* modules

* movement

* nametags

* nightvision

* nlaw

* optics

* optionsmenu

* overheating

* overpressure

* parachute

* pylons

* quickmount

* rangecard

* rearm

* recoil

* refuel

* reload

* reloadlaunchers

* repair

* respawn

* safemode

* sandbag

* scopes

* slideshow

* spectator

* spottingscope

* switchunits

* tacticalladder

* tagging

* trenches

* tripod

* ui

* vector

* vehiclelock

* vehicles

* viewdistance

* weaponselect

* weather

* winddeflection

* yardage450

* zeus

* arsenal defines.hpp

* optionals

* DEBUG_MODE_FULL 1

* DEBUG_MODE_FULL 2

* Manual fixes

* Add SQF Validator check for #include after block comment

* explosives fnc_openTimerUI

* fix uniqueItems
2018-09-17 14:19:29 -05:00
Dedmen Miller
50abe911a5 Change stringToColoredText to accept a hex string (#6241) 2018-04-09 16:20:03 +01:00
ulteq
21ae61e551 Fix allowSwapBarrel condition (#6170) 2018-02-27 17:35:03 -06:00
ulteq
5ee1df424d
Minor performance tweaks (#5796)
* Medical_ai - Optimize 'fnc_isInjured'
* Laserpointer - Optimize 'fnc_onDraw'
* Overheating - Skip ground detection if possible
* Overheating - Replace function call with inline code
* Overheating - Nest 'firedEH' abort conditions
* Overheating - Remove duplicate code / Skip function call if possible
* Overheating - Cache energy increment
2017-11-23 11:13:58 +01:00
ulteq
d4c4e68e42
Overheating - Minor performance tweaks (#5739)
* Don't try to cool down an already cooled barrel
* Don't run the projectile direction update routine if we know that the max. possible deflection is < 0.05 mrad
2017-11-11 20:45:13 +01:00
jonpas
e11e102a76 Underwater actions support (#4984)
* Enable majority of actions underwater

* Remove log

* Add logistics_wirecutter support (don't play kneel animations underwater - looks silly)

* Don't perform kneel animations when repairing or medicaling underwater

* Fix interaction menu rendering underwater (was moving based on player eye level due to height max used for large vehicles)

* Fix attach underwater (LIW does not work underwater, LIS does), Add attach scan drawing define

* Remove left-over systemChat

* Remove vehiclelock from Plane, Disallow linking belt underwater, Allow checking ammo when sitting via action (was already possible via keybind), Use param for LIS
2017-08-22 13:30:56 -05:00
Phyma
ffaa195fe5 Conform function headers to coding guidelines (#5255)
* Fixed headers to work with silentspike python script

* Fixed rest of the files

* Fixed ace-team
2017-06-08 15:31:51 +02:00
PabstMirror
00b91bed45 Minor fixes, cleanup, add lint ignore directives (#5176)
- Fix bug in getNumberMagazinesIn (func not used)
- Fix bug in seekerFindLaserSpot (func not used yet)
- Everything else is just cleanup
2017-05-31 22:09:36 +01:00
PabstMirror
fb73286242 Tweak overheating (#4969)
* Tweak overheating

* Add define for constant magic num
2017-04-11 10:04:57 -05:00
commy2
05d30c5573 convert log macros to cba versions (#4282)
* convert log macros to cba versions

* Add changes to AB

* remove obsolete macro
2016-10-02 12:55:31 +02:00
Glowbal
b489750d5b Minor optimizations using private, params, and isEqualType (#4323)
* Optimizations with private, params, and isEqualType

* Fixed tab being used instead of space

* Fixed tabs inserted by notepad++

* More usage of new private syntax and params

- changed a few checks for an array being empty to `_arr isEqualTo []`
rather than `count _arr == 0`
- added more uses of `private` on the same line as the variable is
declared
- added more uses of params to assign variables passed as parameters
- removed unnecessary parentheses
- removed several unnecessary variable declarations with private array
syntax

* clean up and formatting
2016-09-04 16:44:22 +02:00
Grey-Soldierman
dae3d8d682 Definable classname for Spare Barrel (#4121)
* Added definable barrel classname through weapon config

* Improved condition for player carrying spare barrel
2016-08-27 10:21:15 +02:00
commy2
cc76ac482a add priority parameter to doGesture 2016-07-13 11:00:31 +02:00
commy2
8a4514f8e7 use a function to do gestures 2016-07-12 16:16:01 +02:00
PabstMirror
5ad1f752ca Fix overheating spare barrels
- Remove ACE_SpareBarrel from CfgWeapons as it is now a magazine
- Don't call updateTemperature in displayTemp, as unit may not be local
- Fix targetEvent error
2016-07-03 12:58:40 -05:00
esteldunedain
18f09b9310 Rename events:
- ace_addedHeartRateAdjustment -> ace_heartRateAdjustmentAdded
- ace_cargoAddedByClass -> ace_cargoByClassAdded
- ace_enteredCardiacArrest -> ace_cardiacArrestEntered
- ace_itemAddedToTriageCard -> ace_triageCardItemAdded
- ace_reload_linkedAmmo ->  ace_reload_ammoLinked
- ace_reload_returnedAmmo -> ace_reload_ammoReturned
- ace_treatmentSuccess ->  ace_treatmentSucceded
- ace_common_engineOn -> ace_common_setEngine
- ace_explosives_clientRequestOrientations -> ace_explosives_requestOrientations
- ace_explosives_serverSendOrientations -> ace_explosives_sendOrientations
- ace_interaction_lampTurnOff -> ace_interaction_setLampOff
- ace_interaction_lampTurnOn -> ace_interaction_setLampOn
- ace_overheating_spareBarrelsLoadCoolest -> ace_overheating_loadCoolestSpareBarrel
- ace_overheating_spareBarrelsSendTemperatureHint -> ace_overheating_sendSpareBarrelTemperatureHint
Close #3533
2016-06-24 10:45:13 -03:00
jonpas
03e923aa68 Cleanup Function Headers titles 2016-06-18 11:50:41 +02:00
jonpas
b97ba4990d Normalize 2 more files 2016-06-09 14:25:57 +02:00
SilentSpike
90ebf9638b Update common event names to meet new standard 2016-06-04 11:12:56 +01:00
jonpas
26fbc36cab Merge branch 'master' into cbaEventSystem 2016-05-31 22:36:08 +02:00
commy2
fd26e2e44e Merge pull request #3516 from acemod/cbamissiontime
replace timePFH with CBA_missionTime
2016-05-30 21:23:57 +02:00
commy2
7512c4e52e manual merge 2016-05-30 21:14:34 +02:00
jonpas
7a307393a4 Merge branch 'master' into useQuotedPathMacros 2016-05-30 21:14:17 +02:00
jonpas
5d36f84eb1 qGVAR overheating and reloadlaunchers 2016-05-25 20:13:36 +02:00
SilentSpike
c4b75160a4 Run event renaming script 2016-05-24 14:13:11 +01:00
SilentSpike
108ff4f644 Replace ACE event system calls with CBA counterparts
Regex used:

\[(.+?),(.+?),(.+?)\]\s+call\s+E?FUNC\((common,)?(target|object)Event\)
[$1,$3,$2] call CBA_fnc_targetEvent

E?FUNC\((common,)?(server|global|local)Event\)
CBA_fnc_$2Event

E?FUNC\((common,)?(add|remove)EventHandler\)
CBA_fnc_$2EventHandler
2016-05-22 16:47:39 +01:00
jonpas
e7dbcd7b58 Replace delayed execution functions with new CBA counterparts 2016-05-22 15:29:01 +02:00
commy2
d93132dac8 more replacing 2016-05-18 11:57:40 +02:00
commy2
da70854568 manual merge 2016-05-18 11:48:27 +02:00