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

Cargo - Add name to bodybags #8297

Merged
merged 3 commits into from
Oct 24, 2021
Merged

Conversation

BrettMayson
Copy link
Member

When merged this pull request will:

  • Add support for labels on cargo items ace_cargo_label
  • Add labels to bodybags with the unit name
    image

@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label Jun 27, 2021
@PabstMirror PabstMirror added this to the 3.14.0 milestone Jun 27, 2021
@PabstMirror
Copy link
Contributor

This is great, I remember someone having an issue with multiple cargo boxes and not having any way to tell the difference between them.

https://github.com/acemod/ACE3/blob/master/docs/wiki/framework/cargo-framework.md

### 4.7 Adding labels to a mission's cargo objects (Added in ACE3 3.14.0)

You can add labels to loadable cargo objects by using `setVariable`:

//```
this setVariable ["ace_cargo_label", "Crayons"]
//```

@jonpas
Copy link
Member

jonpas commented Jun 27, 2021

How does this differ from #8023?

@BrettMayson
Copy link
Member Author

It differs because I was unaware of that one

@BaerMitUmlaut BaerMitUmlaut changed the title Cargo: labels Cargo - Add labels to cargo items Jul 21, 2021
@jonpas
Copy link
Member

jonpas commented Oct 10, 2021

I am in favour of #8023 but would like to see bodybag name added to it.

@BrettMayson
Copy link
Member Author

If #8023 is merged I can create a PR to add bodybag labels

@PabstMirror PabstMirror modified the milestones: Ongoing, 3.14.1 Oct 21, 2021
@PabstMirror PabstMirror changed the title Cargo - Add labels to cargo items Cargo - Add name to bodybags Oct 21, 2021
@PabstMirror
Copy link
Contributor

Updated to master (changed setVar name)

@PabstMirror
Copy link
Contributor

I guess we could check if dogtags is loaded and use it's var if it exists, it would save a global setVar, but probably not needed

https://github.com/acemod/ACE3/blob/master/addons/dogtags/XEH_postInit.sqf#L40

@jonpas
Copy link
Member

jonpas commented Oct 22, 2021

I think this is fine. For the rare case, people can still hide the name with something like this:

["ace_placedInBodyBag", {
    [{
        params ["", "_bodyBag"];
        _bodyBag setVariable ["ace_cargo_customName", "", true];
    }, _this] call CBA_fnc_execNextFrame;
}] call CBA_fnc_addEventHandler;

@PabstMirror PabstMirror merged commit a801d0d into acemod:master Oct 24, 2021
AndreasBrostrom pushed a commit to AndreasBrostrom/ACE3 that referenced this pull request Dec 3, 2021
* cargo: labels

* Update XEH_postInit.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
@BrettMayson BrettMayson deleted the cargo_names branch March 7, 2022 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants