Garux / netradiant-custom

The open-source, cross-platform level editor for id Tech based games.
https://garux.github.io/NRC/
Other
334 stars 59 forks source link

Choices also merge from FGD #192

Closed sinewavey closed 5 months ago

sinewavey commented 6 months ago

I have the following line in my FGD:

image

I've tried a few different combinations including 0 and 1, "Yes" and "No', etc. However, it looks like keys end up colliding here as well like spawnflags regardless of the above tweak.

image

Expected behavior shown in TrenchBroom with the same exact fgd:

image

Is this intentional?

Garux commented 6 months ago

I'm looking at halflife.fgd and e.g. in @BaseClass base(Targetname,Global) = Breakable no collision of choices occurs 🤔

Garux commented 6 months ago

ok, problem is triggered by equal 'qwe' strings, empty in your case

@BaseClass color(123 123 123) size( -8 -8 -8, 8 8 8 ) = Breakable
[
    material(choices) : "qwe" =
    [
        2: "Glass"
        3: "Wood"
    ]
    explosion(choices) : "qwe" =
    [
        0: "Random"
        1: "Relative to Attack"
    ]
]

@PointClass base(Breakable) = func_breakable : "Breakable Object" 
[
]
sinewavey commented 6 months ago

Excellent - thank you! That closes this - we'll handle it on our side

Garux commented 6 months ago

This is bug tho, somewhere matching is done by long name, while should use key name.