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:
parent
407a787e75
commit
3824ae1463
@ -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();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user