Page MenuHomeFeedback Tracker

Make inheritsFrom and configHierarchy work with properties
Feedback, NormalPublic

Description

Currently inheritsFrom and configHierarchy only work with classes and there is no way to return config property parents or hierarchy.

inheritsFrom (configfile >> "CfgGlasses" >> "G_Sport_Blackyellow" >> "name") => configNull, should be config class where property is defined
configHierarchy (configfile >> "CfgGlasses" >> "G_Sport_Blackyellow" >> "name") =>[], should be full hierarchy

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

SaMatra created this task.Apr 21 2023, 12:39 PM
POLPOX added a subscriber: POLPOX.Apr 21 2023, 1:17 PM
dedmen set Ref Ticket to AIII-55663.May 1 2023, 4:44 PM
dedmen changed the task status from New to Feedback.EditedMay 1 2023, 6:32 PM
dedmen added a subscriber: dedmen.

configHierarchy before
[bin\config.bin,bin\config.bin/CfgGlasses,bin\config.bin/CfgGlasses/G_Sport_Blackyellow]
[]

After
[bin\config.bin,bin\config.bin/CfgGlasses,bin\config.bin/CfgGlasses/G_Sport_Blackyellow]
[bin\config.bin,bin\config.bin/CfgGlasses,bin\config.bin/CfgGlasses/None,bin\config.bin/CfgGlasses/None/name]

inheritsFrom
Before:
``
After:
bin\config.bin/CfgGlasses/None

configNull
Before:
``
After:
<NULL-config>

Just realized that we shouldn't make str configNull return anything but empty string for backwards compatibility reasons. Personally I use configName CONFIG as a way to check if class exists AND return its config letter casing. Pretty sure I'm not the only one. Since

(configFile >> "CfgWeapons" >> "asd") isEqualTo configNull

is true,

configName (configFile >> "CfgWeapons" >> "asd")

will now return "<NULL-config>" instead of empty string. I suggest to revert it.

dedmen added a comment.May 2 2023, 5:24 PM

configName should still keep returning empty string. Thats different thing.
str configNull should chage
configName configNull should not

dedmen added a comment.May 2 2023, 5:29 PM

Ok didn't realize this change didn't go to dev-branch yet so you cannot have tested this.
I just checked

will now return "<NULL-config>" instead of empty string. I suggest to revert it.

No that's wrong, I don't see how you got to that as there was no mention about changing configName
We changed the string representation of configNull, we did not change what configName returns.
str config and configName config are very different things.

Ok didn't realize this change didn't go to dev-branch yet so you cannot have tested this.
I just checked

will now return "<NULL-config>" instead of empty string. I suggest to revert it.

No that's wrong, I don't see how you got to that as there was no mention about changing configName
We changed the string representation of configNull, we did not change what configName returns.
str config and configName config are very different things.

Oops, I mixed two things up, realized that configName configNull returns empty string and for some reason thought new change will have it return <NULL-config> too. Sorry, nevermind my comment then.

This comment was removed by LouMontana.