sledge-formats icon indicating copy to clipboard operation
sledge-formats copied to clipboard

Can't access fgd behaviour dictionary in S2

Open xPaw opened this issue 2 years ago • 2 comments

@PointClass
	base( Targetname, Parentname, CanBeClientOnly, Light2Inputs )
	omnilight()
	metadata
	{
		entity_tool_name = "Omni Light"
		entity_tool_tip = "Omni directional light source"
		entity_tool_group = "Lighting"
		entity_tool_sortname = "lights2"
		default_pitch = 90.0
	}
	iconsprite
	{
		image = "materials/editor/light_omni.vmat"
		tintKey = "color"
	}
= light_omni2 : "A sphere or tube shaped light"

In this example, class.Behaviour for iconsprite has no values, and the actual values are in class.Dictionaries, but as far as I can tell there is no way to know which dictionary to access for this behaviour since I don't know which dictionary index it is.

xPaw avatar Jun 20 '23 08:06 xPaw

I might have to review how the library separates dictionaries and behaviours, since it seems that S2 treats them somewhat the same. But dictionaries have a Name field that you can use, to see which property the dictionary is associated with:

image

LogicAndTrick avatar Jun 25 '23 09:06 LogicAndTrick

Indeed I can look at the name, VS annoyingly hid it and only displayed the values.

xPaw avatar Jun 25 '23 14:06 xPaw