Remove unused asset images and update BuildingButton component to include new image mapping for building types.
0
assets/city.png → src/assets/city.png
Normal file → Executable file
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 2.5 MiB |
0
assets/continent.png → src/assets/continent.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
0
assets/country.png → src/assets/country.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
0
assets/data center.png → src/assets/data center.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
0
assets/galaxy.png → src/assets/galaxy.png
Normal file → Executable file
|
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.2 MiB |
0
assets/god.png → src/assets/god.png
Normal file → Executable file
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
0
assets/keyboard.png → src/assets/keyboard.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
0
assets/monitor.png → src/assets/monitor.png
Normal file → Executable file
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
0
assets/moon.png → src/assets/moon.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
0
assets/mouse.png → src/assets/mouse.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
0
assets/office.png → src/assets/office.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
0
assets/server room.png → src/assets/server room.png
Normal file → Executable file
|
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.1 MiB |
0
assets/solar system.png → src/assets/solar system.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
0
assets/universe.png → src/assets/universe.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
0
assets/world.png → src/assets/world.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
@ -5,10 +5,47 @@ import {
|
|||||||
Text,
|
Text,
|
||||||
Badge,
|
Badge,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
HStack
|
HStack,
|
||||||
|
Image
|
||||||
} from '@chakra-ui/react'
|
} from '@chakra-ui/react'
|
||||||
import { useGameStore } from '../store/gameStore'
|
import { useGameStore } from '../store/gameStore'
|
||||||
|
|
||||||
|
// Import all building images
|
||||||
|
import mouseImg from '../assets/mouse.png'
|
||||||
|
import keyboardImg from '../assets/keyboard.png'
|
||||||
|
import monitorImg from '../assets/monitor.png'
|
||||||
|
import officeImg from '../assets/office.png'
|
||||||
|
import serverRoomImg from '../assets/server room.png'
|
||||||
|
import dataCenterImg from '../assets/data center.png'
|
||||||
|
import cityImg from '../assets/city.png'
|
||||||
|
import countryImg from '../assets/country.png'
|
||||||
|
import continentImg from '../assets/continent.png'
|
||||||
|
import worldImg from '../assets/world.png'
|
||||||
|
import moonImg from '../assets/moon.png'
|
||||||
|
import solarSystemImg from '../assets/solar system.png'
|
||||||
|
import galaxyImg from '../assets/galaxy.png'
|
||||||
|
import universeImg from '../assets/universe.png'
|
||||||
|
import godImg from '../assets/god.png'
|
||||||
|
|
||||||
|
// Create an image mapping object
|
||||||
|
const buildingImages = {
|
||||||
|
mouseFarms: mouseImg,
|
||||||
|
keyboardFactories: keyboardImg,
|
||||||
|
monitorDisplays: monitorImg,
|
||||||
|
officeSpace: officeImg,
|
||||||
|
serverRooms: serverRoomImg,
|
||||||
|
dataCenters: dataCenterImg,
|
||||||
|
dataCities: cityImg,
|
||||||
|
dataCountries: countryImg,
|
||||||
|
dataContinents: continentImg,
|
||||||
|
dataWorlds: worldImg,
|
||||||
|
dataMoons: moonImg,
|
||||||
|
dataSolarSystems: solarSystemImg,
|
||||||
|
dataGalaxies: galaxyImg,
|
||||||
|
dataUniverses: universeImg,
|
||||||
|
dataGods: godImg
|
||||||
|
}
|
||||||
|
|
||||||
interface BuildingButtonProps {
|
interface BuildingButtonProps {
|
||||||
title: string
|
title: string
|
||||||
cost: number
|
cost: number
|
||||||
@ -62,6 +99,25 @@ export function BuildingButton({
|
|||||||
<Text>Level: {level}</Text>
|
<Text>Level: {level}</Text>
|
||||||
</HStack>
|
</HStack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
{/* Add the building image */}
|
||||||
|
<Box
|
||||||
|
display="flex"
|
||||||
|
justifyContent="center"
|
||||||
|
bg="gray.800"
|
||||||
|
borderRadius="md"
|
||||||
|
p={2}
|
||||||
|
height="120px"
|
||||||
|
overflow="hidden"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src={buildingImages[buildingType as keyof typeof buildingImages]}
|
||||||
|
alt={title}
|
||||||
|
objectFit="contain"
|
||||||
|
maxHeight="100%"
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
|
||||||
<Text fontSize="sm" color="gray.400">{description}</Text>
|
<Text fontSize="sm" color="gray.400">{description}</Text>
|
||||||
<Box>
|
<Box>
|
||||||
<Text fontSize="sm">Production:</Text>
|
<Text fontSize="sm">Production:</Text>
|
||||||
|
|||||||