Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cargo logic, adjust function for captives #8000

Merged
merged 1 commit into from Nov 13, 2020

Conversation

PabstMirror
Copy link
Contributor

for pr #7980
captive used same logic but different loading logic that is hardcoded to reject non-cargo slots, so added optional param

@PabstMirror PabstMirror added the ignore-changelog Release Notes: Excluded label Nov 10, 2020
Copy link
Member

@BaerMitUmlaut BaerMitUmlaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me, would you like me to test this or do you think we're good?

((_x emptyPositions "cargo" > 0) && {!(_unit getVariable ['ACE_isUnconscious', false])} || {(getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "ejectDeadCargo")) == 0})
|| {{isNull (_x#0)} count fullCrew [_x, "", true] > _x emptyPositions "driver"}
private _canSitInCargo = (!(_unit getVariable ['ACE_isUnconscious', false])) || {(getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "ejectDeadCargo")) == 0};
((fullCrew [_x, "", true]) findIf {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How aboutfullCrew [_x, ["", "cargo"] select _cargoOnly, true]? Would reduce the entries you have to iterate over.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, that would not find any seats in the Polaris DAGOR for example.

@PabstMirror PabstMirror merged commit f6f8f17 into fix-turret-patient-loading Nov 13, 2020
@PabstMirror PabstMirror deleted the fixCargoCaptive branch November 13, 2020 16:42
PabstMirror added a commit that referenced this pull request Nov 15, 2020
* Fix loading patients into turret only seats

* Fix cargo logic, adjust function for captives (#8000)

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-changelog Release Notes: Excluded
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants