ModuleManager icon indicating copy to clipboard operation
ModuleManager copied to clipboard

@<node>,1 adds to first resource if there is only one.

Open jbengtson opened this issue 10 years ago • 1 comments

When running the following script "testval" is added to the first resource (index 0) if there is only one.

@PART[*]:HAS[@RESOURCE[MonoPropellant]]
{
    @RESOURCE,1
    {
        testval = yes
    }
}

Any part that has ONLY MonoPropellant as a resource will have "testval" set on the resource. If the part has more than one resource, including MonoPropellant, "testval" is correctly added to the second resource (index 1).

If this is expected behavior, please close.

jbengtson avatar Aug 07 '15 17:08 jbengtson

this is true even for keys:

example:

@name,1 = newname

will edit the key "name" even if there is only one

same goes for

!name,1 = DEL

Sigma88 avatar Nov 27 '15 13:11 Sigma88