TeamSpen210 / HammerAddons

Useful tweaks and content for Source Engine Games
123 stars 36 forks source link

comp_adv_output performs fixups too well #285

Open electrovoyage opened 19 hours ago

electrovoyage commented 19 hours ago

Trying to use comp_adv_output to format a RunScriptCode input. The parameter override is being formatted as: RunScriptCode($name, $radio_target_name, $min_proximity): image

However, the actual output (decompiled) produced is extremely set on fixing everything up, no matter if it's already fixed up or not: image Not to mention it's added twice.

The output's targetname gets fixed up again for some reason, after already being fixed up by VBSP because this is an instance, and the arguments also get fixed up, even the last one, which is just the number 500. RADIO is the instance's fixup name.

Regardless of whether Target - Instance Name is set in the comp_adv_output, fixups are being done on everything.

electrovoyage commented 5 hours ago

A good solution would be adding keyvalues to force-disable fixup on a replace value.

TeamSpen210 commented 3 hours ago

Currently, fixup is done by VBSP, meaning it's done before the postcompiler can do anything. That's why the 3 different keyvalues for each exist, so you can pick which behaviour you need. I redid this logic a little though, so this will be fixed.

Just noticed something else - you'll need to add ` quotes in your format template, since right now it's going to be looking for variables not strings.