Open aph3rson opened 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.
@aph3rson drawSize cannot be put in the building def. It is an attribute of graphicData, not of thingDef or buildingDef.
If I was to change the
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.
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:
Convert this to a 1x1 thing. The drawSize
would need to be larger than the actual def, and would be centered on the 1x1 tile.
It's possible/likely that the base MinifiedThing would draw the texture with the same offset, though, meaning that we'd have a floating small light (albeit a bit bigger), so...
Create a custom subclass of MinifiedThing
, overriding DrawAt
, and assign that to our defs. This is a pretty straight-forward method in the base def - we'd likely have to change where the Draw
call puts the texture, and which cardinal direction is used:
public override void DrawAt(Vector3 drawLoc, bool flip = false)
{
this.CrateFrontGraphic.DrawFromDef(drawLoc + Altitudes.AltIncVect * 0.1f, Rot4.North, null, 0f);
if (this.Graphic is Graphic_Single)
{
this.Graphic.Draw(drawLoc, Rot4.North, this, 0f);
return;
}
this.Graphic.Draw(drawLoc, Rot4.South, this, 0f);
}
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.
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.
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](https://github.com/NanoCE/Glass_N_Lights/raw/71d3633da9fcbb072b9b80c666a8a249846c8f32/Glass%26Lights/Textures/Things/Building/Lights/WallLamp/RoundWallLight_north.png)
However, this causes a problematic texture when minified, and is incredible hard to discern:![image](https://user-images.githubusercontent.com/838916/148483659-f2a5ec2c-3cbf-41fc-9273-6b39d2b76c4f.png)
To Reproduce Steps to reproduce the behavior:
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.