Hi, I know this is a old thread, but as I am trying to learn how to do the exact same thing, I suppose there's no point to start a new topic.
Since I cloned the original CompRefuelable and change all names to CompRefuelableChem while creating a new method in this class with everything identical to DrawOverlay.
I don't understand how vanilla graphics are bind to this method and the way to adjust it.
public void DrawOverlay(Thing t, OverlayTypes overlayType)
{
if (OverlayDrawer.overlaysToDraw.ContainsKey(t))
{
Dictionary<Thing, OverlayTypes> dictionary;
Dictionary<Thing, OverlayTypes> expr_17 = dictionary = OverlayDrawer.overlaysToDraw;
OverlayTypes overlayTypes = dictionary[t];
expr_17[t] = (overlayTypes | overlayType);
}
else
{
OverlayDrawer.overlaysToDraw.Add(t, overlayType);
}
}
Could anyone possibly explain it more into details to me.
particularly why it is using a bitwise operator?
Thank you.