NanoCE / Glass_N_Lights

Adds glass and lights to rimworld.
11 stars 7 forks source link

Texture issues with minified wall light #16

Open aph3rson opened 2 years ago

aph3rson commented 2 years ago

Describe the bug The texture for the wall light takes up the full 1x2 space. Transparent whitespace is added around the texture for alignment. Example here: RoundWallLight_north.png

However, this causes a problematic texture when minified, and is incredible hard to discern: image

To Reproduce Steps to reproduce the behavior:

  1. Open dev mode
  2. Spawn a minified wall light
  3. Observe that the minified texture is broken, and hard to determine exactly what it is.

Expected behavior The minified version of the building shows that it's a wall light.

Screenshots Screenshots are above.

Additional context This should be fixable by setting drawSize in the building def, and removing the whitespace from the texture. More information in the #mod-development channel on the Rimworld discord here.

NanoCE commented 2 years ago

I have spent quite a few nights trying to figure out this exact issue and ended up just leaving it in because it was only a minor visual issue. If what you say is true, ill definitely try implementing it this weekend. Thanks for such a good bug report; it is appreciated as I have had little time to play the game/ develop my mod.

NanoCE commented 2 years ago

@aph3rson drawSize cannot be put in the building def. It is an attribute of graphicData, not of thingDef or buildingDef. is probably what you were thinking of and while that would probably fix the issue, it would remove the offset behavior I am using for the wall light.

If I was to change the from 1x2 to a 1x1, I would also need a way to offset the texture by half a tile which I don't think I can do. I dove into the decompiled version of the game to look at all the availiable attributes and as far as I can tell, vanilla rimworld doesn't have something like this. So unless I want to do some coding, i don't see an easy way to fix this issue.

I am aware of the rimworld discord and have used it in the past. Something like this is so obscure that I don't really want to use it.

aph3rson commented 2 years ago

I just tried removing some of the margin around the texture, and playing with decimal values in drawSize. Even when the math is right, the minified thing draws the texture just like it would on the 1x2 thing (i.e. same as in the report). This makes this a bit harder to implement.

Only other options I can think of would be:

NanoCE commented 2 years ago

I have a better idea I'd like to implement to allow for the object to be a 1x1 while still overhanging the wall. It's going to take some time to implement so for the time being, this issue will just have to wait to be fixed. I appreciate the effort and suggestions, not too many people actually care to do this.

NanoCE commented 1 year ago

Latest update should have this fixed. Its been changed to look a bit better, let me know if its reflected for you. Thank you for your patience.