How to have a different out of fuel icon

Started by SenaCat, March 19, 2017, 05:41:58 PM

Previous topic - Next topic


use Console.WriteLine to emit into log code lines you do not understand

in your case Console.WriteLine(overlayTypes | overlayType);

this is very easy and fast way to get information about what exactly code does and how conditions are resolved.


After a few days of trying, not sure if I am getting this, please enlighten me a bit more.
I am a total newbie, probably some more details a long the way.

I suppose it was creating 3 dictionaries, the if statement is checking whether a predefined OverlayTypes enum is in there or not, else it would add a new Thing paring OverlayTypes.
So, the goal here is to pass Thing(Chemfuel) and a new OverlayTypes(OutOfChemfuel) into the dictionary from else statement, Correct?

Bitwise | would result the enum name and the matching OverlayTypes called overlayType.
However, I still don't understand how the actual graphics should be path linked in here.
I saw there's the MaterialPool class that would source graphics from the ShaderDatabase.
The next step is to add a new line in static OverlayDrawer() ?

Should I create an entire OverlayDrawer Class if that's the case?

besides the custom compRefuel, a compProperty is also needed to use in XML correct?

thx for the help.


replace CompRefuelable with custom implementation that render required image over object directly, without using any wrappers over unity engine provided by game period

is this soo hard to understand?
required method postdraw is marked virtual and you do not need code injection to override it.