jetelain / AceArsenalExtended

Find easily your favorite gear within ACE3 Arsenal
17 stars 14 forks source link

Feature Request: Alternative Syntax #12

Closed mihal190 closed 1 year ago

mihal190 commented 2 years ago

Right now my code looks like this:

         class Gloves
            {
                label = "Gloves";
                values[] = {"OR_Black","OR_Coyote"};
                hiddenselection = "Camo2";
                class OR_Black {label = "OR";texture = "sgu_sof_2\data\gloves\ORb.paa";};
                class OR_Coyote {label = "OR";texture = "sgu_sof_2\data\gloves\OR2.paa";};
            };

And it's only useable for chaning textures, i wonder if we can improve it to switch models with hidden selections

         class Gloves
            {
                label = "Gloves";
                values[] = {"OverLord_Black","Mechanix_Red"};
                class OR_Black {label = "OR";texture = "sgu_sof_2\data\gloves\ORb.paa";hiddenselection = "Glove_OverLord";};
                class OR_Coyote {label = "OR";texture = "sgu_sof_2\data\gloves\OR2.paa";hiddenselection = "Glove_Mechanix";};
            };

with this setup i should be able to completly hide unwatned gloves with hidden selections, keeping configs and optimized. Hiddenselection inside sub-class should overwrite default one

jetelain commented 2 years ago

Having a different hiddenselection for each value will create an issue to ensure that all other hiddenselection are cleared meanwhile.

A counter proposition would be to allow to provide an array of hiddenselections and an array of textures.

class Gloves
{
    label = "Gloves";
    values[] = {"OverLord_Black","Mechanix_Red"};
    hiddenselections[] = {"Glove_OverLord", "Glove_Mechanix" }; 
    class OverLord_Black {label = "OR";textures[] = { "sgu_sof_2\data\gloves\ORB.paa", "" }; };
    class Mechanix_Red {label = "MX";texture[] = { "", "sgu_sof_2\data\gloves\MXR.paa" }; };
};