erdelf / AlienRaces

Rimworld mod alien race framework
MIT License
103 stars 69 forks source link

Allow bodyaddons to be drawn invisible #64

Closed martinlyra closed 2 years ago

martinlyra commented 2 years ago

This issue that arose when trying to use the Invisibility psycaster ability:

Ability active Normal
image image

Turns out, the addons were skipped entirely when the invisible flag was set. Even if when it would proceed to draw the part when the flag was set, it was not using the correct invisible-version of the material. So this PR is supposed to fix that as well. It accounts for that invisibility will not work when drawn for portraits (colonist bar, etc.). This is similar to how materials are handled in Vanilla Rimworld.

So the end result would be like: image

Although I've not tested this exhaustively with other races and mods that use HAR. I am not sure how I can test how this affect enemy pawns.

martinlyra commented 2 years ago

Also keep in mind to recompile the DLL. I have not done it in this PR to avoid conflicts during merge.

erdelf commented 2 years ago

Thank you. When I initially wrote the invisible flag recognition, I didn't actually know what it was for, so I just skipped it for the time. Thanks for fixing that.