Jump to content
Sign in to follow this  
Insnee

3DEN Custom Unit Property: Cannot include Entries from description.ext

Recommended Posts

Edit: Please move to addons: config & scripting, sry.

 

Hi,

 

I have a combo box where should be static values from the configfile and mission based extra entries.

With the following config, only the values from "Values" are loaded in the combo box. The Entries from the mission are not present.

displayName etc. are defined elsewhere for the category. It's working except for the mission entries.

 

I already searched in the BI's code for errors, but I'm sure I've done it right. Please correct me that I'm wrong and why :D

 

// my_addon\config.cpp

class Cfg3DEN {

    class Object {

        class AttributeCategories {

            class PREFIX {

                class Attributes {

                    class GVAR(type) {
                        displayName = "Type";
                        tooltip = "tooltip";
                        property = QGVAR(type); // emod_units_type
                        condition = "objectControllable";
                        control = "Combo";

                        expression = "_this setVariable ['%s', _value];";
                        defaultValue = "rifleman";
                        typeName = "STRING";

                        class Values {
                            class Rifleman {
                                name = "Rifleman";
                                value = "rifleman";
                            };
                            class Medic {
                                name = "Medic";
                                value = "medic";
                            };
                        };

                        class ItemsConfig {
                            path[] = { "Editor_Types" };
                            localConfig = 1;
                            propertyText = "text";
						    propertyData = "data";
                        };
                    };

                };

            };

        };

    };

};

 

 

And the following entries in my missions description.ext

// description.ext

class Editor_Types {

    class Test {
        text = "Test";
        data = "test";
    };

};

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×