nojanath / SublimeKSP

Fork of Nils Liberg's SublimeKSP plugin. See README for details.
GNU General Public License v3.0
89 stars 18 forks source link

"Optimize Compiled Code" option broken for HIDE_PART_BG .or. HIDE_PART_VALUE #423

Closed blackeyedpony closed 11 months ago

blackeyedpony commented 11 months ago

please check this example with "Optimize compiled code" enabled:

on init 

    declare ui_table t[8](2, 2, 100)
    t -> hide :=  HIDE_PART_BG .or. HIDE_PART_VALUE

end on

The problem was introduced around this commit: Segregate built-in constants from variables in ksp_builtins_data.py (#412) dc4cbe8 EvilDragon mario.kruselj@gmail.com 30.11.2023, 21:24 The optimise logic tries to convert HIDE_PART_BG into an int.

mkruselj commented 11 months ago

Thanks for the report! I think I have a potential fix. See here.

mkruselj commented 11 months ago

@blackeyedpony Could you test with current state of master branch? Thanks!

blackeyedpony commented 11 months ago

Thanks Mario ! I ran a quick test. It works as it should now.