Tweaked sign render conditions

*SignRenderer now won't render a sign that has no icon field in its definition - this is to allow for attachable-only signs
This commit is contained in:
izawartka 2025-08-01 14:00:51 +02:00
parent 407a787e75
commit 3824ae1463

View File

@ -2,8 +2,8 @@ import { ReactSVG } from 'react-svg'
export default function SignRenderer(props) {
const { object } = props;
if(!object.def) return null;
if(object.attached_skip_rendering) return null;
const shouldRender = object.def?.icon && !object.attached_skip_rendering;
if (!shouldRender) return null;
const [x, y] = object.pos.toSVGCoords();