Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Trinityx

#1
Help / Settings & Dynamic Power for Buildings
December 10, 2021, 05:59:07 AM
Hey all,

In my settings I want to be able to set the power of my modded building, I've partially got this to work in the sense that if I build my building it's got the setting value but if i change the value in settings the building remains at the previous value set rather than the new value but if i build the building again it's got the correct value.

Is it possible to update the current buildings with the new value after saving my settings?

I tried to use the below code to force a refresh on drawing;
                    if (Current.ProgramState == ProgramState.Playing)
                    {
                        Current.Game.CurrentMap.mapDrawer.WholeMapChanged(MapMeshFlag.Buildings);
                    }


However this doesn't seem to have an affect, any help would be greatly appreciated, thank you.
#2
Help / Force Redraw of UI?
August 06, 2021, 06:04:33 PM
Hey All,

I'm currently adding a mod menu, it mostly works (i know what i need to do to finish things) however I'm currently hanging on trying to get my power consumption setting to work.

Once I've modified the Power Consumption (Eg: 2000 W) it will remain on the default value in the xml (1000 W), the setting does work when I click information under Building > Power Consumption but the game wont recognize until I've rebuilt it or reopened the save - any way I can force the game to redraw the box or building? Or am I tackling this all wrong?

Any help would be appreciated!