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
Captives - Blindfold captive units #9361
Captives - Blindfold captive units #9361
Conversation
ace_goggles_effects is a user setting |
I guess showing it only when the setting is forced would cause it to not work on most servers, since I doubt many communities force that setting or would start doing so in response to this feature. |
if the capturer's inventory cannot contain the captive's goggles, move them to the captive's inventory, if that also can't fit them, drop them on the ground.
I speak German and Italian fluently and can also infer the proper sentence structure and conjugations in French/Spanish/Portuguese, the other eastern languages are completely foreign to me though and I have to trust Google/DeepL.
I don't like the user text box setting for classes I would rather just goto a config based lookup with e724b3e |
We can easily convert to config case, but I agree - such a setting is not necessary imo. |
When you wrote "make this config based?" I first assumed you meant CBA Settings, wasn't familiar enough with config overriding to make the correct connection. |
I implemented @PabstMirror's changes, everything seems to work as intended except for the item dropping if neither inventory can hold the captive's previous goggles, not yet sure what broke it 🤔 |
Additionally during testing, I blindfolded a captive yet |
Because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My suggestion includes some minor formatting changes and fixes (such as item dropping on ground if inventories are full). However, also included is an action allowing the removal of blindfolds on captive units.
If my suggestion is accepted, the following function would still need to be added in its own file:
#include "script_component.hpp"
/*
* Author: johnb43
* Checks if caller can remove blindfold from the captive.
*
* Arguments:
* 0: Caller (player) <OBJECT>
* 1: Target <OBJECT>
*
* Return Value:
* Can remove blindfold <BOOL>
*
* Example:
* [player, cursorTarget] call ace_captives_fnc_canRemoveBlindfoldCaptive
*
* Public: No
*/
params ["_unit", "_target"];
// Alive, handcuffed, not being escorted, and target is wearing a blindfold
(_target getVariable [QGVAR(isHandcuffed), false]) &&
{isNull (attachedTo _target)} &&
{alive _target} &&
{isNull objectParent _unit} &&
{isNull objectParent _target} &&
{(goggles _target) in GVAR(blindfolds)}
That's what I thought too, but it worked without issues 2 days ago, with the drop animation and everything. |
True, I guess that could be avoided by also checking if the captive already has a blindfold on. |
This suggestion implements that exactly: |
Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com>
Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com>
@johnb432 Didn't see the need for a "remove blindfold" interaction initially because it can be removed almost as quickly by accessing the captive's inventory. Will gladly implement your provided code though, since it's a quicker way to retain blindfolds when freeing captives. Changed the formatting of
True, though I don't think this is critical enough to require its own function, maybe it can be done outside the |
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can allow blindfolding in vehicles in a follow-up PR.
I don't see why it shouldn't be, sounds like a totally arbitrary restriction. Hell, it would allow for transportation of ppl in an enclosed vehicle and blindfold them before disembarking if you didn't remember to do it before heading out. |
Agreed, could have been done in this PR even. |
When merged this pull request will: