diff --git a/src/components/Icons/Entity.tsx b/src/components/Icons/Entity.tsx index 2e8f9d0..37580fb 100644 --- a/src/components/Icons/Entity.tsx +++ b/src/components/Icons/Entity.tsx @@ -168,6 +168,19 @@ const Entity: FC = ({ id, action, entityParams = {}, preview = fals return ; } + if (id === "data/entities/misc/custom_cards/bomb.xml") { + if (!preview) { + return ; + } + return ; + } + + if (id.includes("goldnugget")) { + const entity = entities[id]; + const material = materials[entity.physicsImage.material]; + return ; + } + if (id === "data/entities/items/pickup/powder_stash.xml") { if (!preview) { const entity = entities[id] as any; @@ -186,23 +199,31 @@ const Entity: FC = ({ id, action, entityParams = {}, preview = fals return ; } - if (entity.physicsImage) { - const material = materials[entity.physicsImage.material]; - return ; + if (entity.itemImage && entity.itemImage.image) { + const name = entity.itemImage.item_name; + const image = entity.itemImage.image.src; + return ; } - // TODO: animate - const animations = entity.animations; + if (entity.animations) { + // TODO: animate + const animations = entity.animations; - if (!entity.animations) { - return ; - } + if (!entity.animations) { + } - const image = animations.actions[action || animations.default || "default"]?.src[0]; + const image = animations.actions[action || animations.default || "default"]?.src[0]; - const name = entity.ui_name || entity.name; + const name = entity.ui_name || entity.name; - return ; + return ; + } + + if (entity.physicsImage) { + const material = materials[entity.physicsImage.material]; + return ; + } + return ; }; export default Entity;