Add ambient artillery and logistics modules#1062
Open
AnAngrySalad1 wants to merge 13 commits intomainfrom
Open
Add ambient artillery and logistics modules#1062AnAngrySalad1 wants to merge 13 commits intomainfrom
AnAngrySalad1 wants to merge 13 commits intomainfrom
Conversation
tbeswick96
requested changes
Jul 18, 2024
|
|
||
| TRACE_1("ambient arty", _position); | ||
|
|
||
| _artyPiece doArtilleryFire [_position, currentMagazine _artyPiece, _minimumRounds + round(_randomRounds)]; |
Member
There was a problem hiding this comment.
There's no randomness applied to the round count. Should be round (random _randomRounds)
| (_this select 1) params ["_logic"]; | ||
|
|
||
| private _artyPieces = (synchronizedObjects _logic) select {typeOf _x != "uksf_mission_moduleAmbientArtilleryTargetArea"}; | ||
| private _targetAreas = (synchronizedObjects _logic) select {typeOf _x == "uksf_mission_moduleAmbientArtilleryTargetArea"}; |
Member
There was a problem hiding this comment.
Exit if no arty or no target areas
|
|
||
| (_this select 1) params ["_logic"]; | ||
|
|
||
| private _artyPieces = (synchronizedObjects _logic) select {typeOf _x != "uksf_mission_moduleAmbientArtilleryTargetArea"}; |
| */ | ||
| (_this select 1) params ["_logic"]; | ||
|
|
||
| private _destinations = synchronizedObjects _logic; |
| (_this select 1) params ["_logic"]; | ||
|
|
||
| private _destinations = synchronizedObjects _logic; | ||
| private _time = _logic getVariable [QGVAR(ambientLogisticsInterval), 0]; |
|
|
||
| private _artyPieces = (synchronizedObjects _logic) select {typeOf _x != "uksf_mission_moduleAmbientArtilleryTargetArea"}; | ||
| private _targetAreas = (synchronizedObjects _logic) select {typeOf _x == "uksf_mission_moduleAmbientArtilleryTargetArea"}; | ||
| private _time = _logic getVariable [QGVAR(ambientArtilleryInterval), 0]; |
| }; | ||
|
|
||
| // create vehicle and crew | ||
| private _logiSpawnPos = getPos _logic; |
Member
There was a problem hiding this comment.
Would prefer to keep vehicle and unit spawning in one place, use common,spawnGroupVehicle. Can't see anything here that it doesn't support
|
|
||
| TRACE_1("ambient arty", _position); | ||
|
|
||
| _artyPiece doArtilleryFire [_position, currentMagazine _artyPiece, _minimumRounds + round(_randomRounds)]; |
| _artyPiece setVehicleAmmo 1; | ||
| }, [_artyPiece], 60] call cba_fnc_waitAndExecute; | ||
|
|
||
| }, _time, [_x, _targetAreas, _minimumRounds, _randomRounds]] call cba_fnc_addPerFrameHandler; |
Member
There was a problem hiding this comment.
Nitpick, use capital CBA prefix for function calls (and BIS too)
| [{ | ||
| params ["_artyPiece"]; | ||
| _artyPiece setVehicleAmmo 1; | ||
| }, [_artyPiece], 60] call cba_fnc_waitAndExecute; |
Member
There was a problem hiding this comment.
Can be simplified: [{_this setVehicleAmmo 1}, _artyPiece, 60] call CBA_fnc_waitAndExecute;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When merged this pull request will:
Neither have pretty pictures at the moment