create-dubhe 1.2.0-pre.98 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/package.json +16 -16
- package/templates/101/sui-template/docker-compose.testnet.yml +73 -0
- package/templates/101/sui-template/packages/client/src/app/page.tsx +545 -41
- package/templates/101/sui-template/packages/client/src/app/providers.tsx +12 -4
- package/templates/101/sui-template/packages/contracts/Pub.localnet.toml +4 -4
- package/templates/101/sui-template/packages/contracts/counter.lock.json +20 -0
- package/templates/101/sui-template/packages/contracts/deployment.ts +8 -3
- package/templates/101/sui-template/packages/contracts/dubhe.config.json +59 -13
- package/templates/101/sui-template/packages/contracts/dubhe.config.ts +1 -4
- package/templates/101/sui-template/packages/contracts/metadata.json +1015 -68
- package/templates/101/sui-template/packages/contracts/package.json +7 -4
- package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/dapp_key.move +45 -31
- package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/error.move +8 -0
- package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/genesis.move +30 -13
- package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/init_test.move +19 -14
- package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/resources/counter2.move +198 -0
- package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/resources/counter2withkey.move +90 -0
- package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/resources/value.move +30 -20
- package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/user_storage_init.move +26 -0
- package/templates/101/sui-template/packages/contracts/src/counter/sources/scripts/deploy_hook.move +6 -11
- package/templates/101/sui-template/packages/contracts/src/counter/sources/systems/counter.move +23 -11
- package/templates/101/sui-template/packages/contracts/src/counter/sources/tests/counter.move +15 -14
- package/templates/101/sui-template/packages/contracts/src/dubhe/Move.lock +33 -30
- package/templates/101/sui-template/packages/contracts/src/dubhe/Move.toml +8 -3
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/dapp_key.move +45 -31
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/error.move +170 -0
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/genesis.move +16 -13
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/init_test.move +8 -14
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/core/account_key.move +1 -3
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/core/dapp_service.move +1776 -137
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/core/data_key.move +1 -20
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/core/events.move +864 -25
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/scripts/deploy_hook.move +15 -16
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/scripts/migrate.move +0 -3
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/systems/address_system.move +25 -17
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/systems/dapp_system.move +2802 -343
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/systems/utils.move +1 -1
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/address.move +173 -55
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/dapp_test.move +769 -0
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/fee_test.move +2965 -0
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/integration_test.move +303 -0
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/listing_test.move +1422 -0
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/scene_session_test.move +269 -0
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/session_test.move +624 -0
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/storage_test.move +700 -0
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/typed_object_test.move +177 -0
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/typed_scene_test.move +452 -0
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/user_storage_test.move +160 -0
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/utils/math.move +4 -3
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/utils/type_info.move +2 -2
- package/templates/contract/sui-template/dubhe.config.ts +0 -1
- package/templates/contract/sui-template/package.json +3 -3
- package/templates/contract/sui-template/src/dubhe/Move.lock +33 -30
- package/templates/contract/sui-template/src/dubhe/Move.toml +8 -3
- package/templates/contract/sui-template/src/dubhe/sources/codegen/dapp_key.move +45 -31
- package/templates/contract/sui-template/src/dubhe/sources/codegen/error.move +170 -0
- package/templates/contract/sui-template/src/dubhe/sources/codegen/genesis.move +16 -13
- package/templates/contract/sui-template/src/dubhe/sources/codegen/init_test.move +8 -14
- package/templates/contract/sui-template/src/dubhe/sources/core/account_key.move +1 -3
- package/templates/contract/sui-template/src/dubhe/sources/core/dapp_service.move +1776 -137
- package/templates/contract/sui-template/src/dubhe/sources/core/data_key.move +1 -20
- package/templates/contract/sui-template/src/dubhe/sources/core/events.move +864 -25
- package/templates/contract/sui-template/src/dubhe/sources/scripts/deploy_hook.move +15 -16
- package/templates/contract/sui-template/src/dubhe/sources/scripts/migrate.move +0 -3
- package/templates/contract/sui-template/src/dubhe/sources/systems/address_system.move +25 -17
- package/templates/contract/sui-template/src/dubhe/sources/systems/dapp_system.move +2802 -343
- package/templates/contract/sui-template/src/dubhe/sources/systems/utils.move +1 -1
- package/templates/contract/sui-template/src/dubhe/sources/tests/address.move +173 -55
- package/templates/contract/sui-template/src/dubhe/sources/tests/dapp_test.move +769 -0
- package/templates/contract/sui-template/src/dubhe/sources/tests/fee_test.move +2965 -0
- package/templates/contract/sui-template/src/dubhe/sources/tests/integration_test.move +303 -0
- package/templates/contract/sui-template/src/dubhe/sources/tests/listing_test.move +1422 -0
- package/templates/contract/sui-template/src/dubhe/sources/tests/scene_session_test.move +269 -0
- package/templates/contract/sui-template/src/dubhe/sources/tests/session_test.move +624 -0
- package/templates/contract/sui-template/src/dubhe/sources/tests/storage_test.move +700 -0
- package/templates/contract/sui-template/src/dubhe/sources/tests/typed_object_test.move +177 -0
- package/templates/contract/sui-template/src/dubhe/sources/tests/typed_scene_test.move +452 -0
- package/templates/contract/sui-template/src/dubhe/sources/tests/user_storage_test.move +160 -0
- package/templates/contract/sui-template/src/dubhe/sources/utils/math.move +4 -3
- package/templates/contract/sui-template/src/dubhe/sources/utils/type_info.move +2 -2
- package/templates/contract/sui-template/src/template/Move.toml +12 -0
- package/templates/contract/sui-template/src/template/sources/codegen/dapp_key.move +47 -0
- package/templates/contract/sui-template/src/template/sources/codegen/genesis.move +34 -0
- package/templates/contract/sui-template/src/template/sources/codegen/init_test.move +23 -0
- package/templates/contract/sui-template/src/template/sources/codegen/user_storage_init.move +27 -0
- package/templates/contract/sui-template/src/template/sources/scripts/deploy_hook.move +13 -0
- package/templates/contract/sui-template/src/template/sources/scripts/migrate.move +7 -0
- package/templates/nextjs/sui-card-duel/.gitignore_ +51 -0
- package/templates/nextjs/sui-card-duel/README.md +213 -0
- package/templates/nextjs/sui-card-duel/docker-compose.yml +34 -0
- package/templates/nextjs/sui-card-duel/mprocs.yaml +17 -0
- package/templates/nextjs/sui-card-duel/package.json +43 -0
- package/templates/nextjs/sui-card-duel/packages/client/.gitignore_ +48 -0
- package/templates/nextjs/sui-card-duel/packages/client/.prettierignore +1 -0
- package/templates/nextjs/sui-card-duel/packages/client/.prettierrc.json +8 -0
- package/templates/nextjs/sui-card-duel/packages/client/eslint.config.mjs +22 -0
- package/templates/nextjs/sui-card-duel/packages/client/next.config.mjs +8 -0
- package/templates/nextjs/sui-card-duel/packages/client/package.json +47 -0
- package/templates/nextjs/sui-card-duel/packages/client/postcss.config.mjs +8 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/admin/ArenaPanel.tsx +307 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/admin/page.tsx +622 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/brawl/[id]/page.tsx +559 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/collection/page.tsx +202 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/components/CardView.tsx +66 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/components/GameShell.tsx +294 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/components/icons.tsx +101 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/duel/[id]/page.tsx +477 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/favicon.ico +0 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/globals.css +85 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/hooks/useGame.ts +313 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/layout.tsx +24 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/leaderboard/page.tsx +123 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/lib/game.ts +77 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/lib/scenes.ts +226 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/market/page.tsx +418 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/page.tsx +427 -0
- package/templates/nextjs/sui-card-duel/packages/client/src/app/providers.tsx +69 -0
- package/templates/nextjs/sui-card-duel/packages/client/tailwind.config.ts +21 -0
- package/templates/nextjs/sui-card-duel/packages/client/tsconfig.json +30 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/.gitignore_ +51 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/.prettierignore +1 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/.prettierrc.json +8 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/Dockerfile +5 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/Pub.localnet.toml +13 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/card_duel.lock.json +66 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/docker-compose.yml +34 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/dubhe.config.ts +150 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/logs/combined.log +31383 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/package.json +49 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/scripts/config.ts +17 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/scripts/e2e-brawl.ts +270 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/scripts/e2e-duel.ts +272 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/scripts/e2e-lobby.ts +177 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/scripts/e2e-market.ts +219 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/scripts/e2e-session.ts +342 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/scripts/query-dapp-revenue.ts +95 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/scripts/seed.ts +92 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/scripts/withdraw-dapp-revenue.ts +56 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/Move.toml +15 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/dapp_key.move +46 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/enums/card_kind.move +47 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/enums/match_state.move +37 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/enums/rarity.move +37 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/error.move +126 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/genesis.move +33 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/init_test.move +23 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/objects/arena.move +137 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/permits/brawl_permit.move +125 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/permits/duel_permit.move +125 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/resources/battle_state.move +255 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/resources/card.move +282 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/resources/deck.move +64 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/resources/game_config.move +267 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/resources/gold.move +205 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/resources/profile.move +255 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/scenes/brawl.move +313 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/scenes/duel.move +313 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/user_storage_init.move +26 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/scripts/deploy_hook.move +32 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/scripts/migrate.move +7 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/systems/arena_system.move +57 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/systems/brawl_system.move +559 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/systems/card_system.move +146 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/systems/duel_system.move +515 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/systems/market_system.move +115 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/systems/player_system.move +37 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/tests/brawl_tests.move +385 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/tests/duel_tests.move +656 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/tests/test_helpers.move +31 -0
- package/templates/nextjs/sui-card-duel/packages/contracts/sui-indexer-schema.graphql +5973 -0
- package/templates/nextjs/sui-card-duel/pnpm-workspace.yaml +2 -0
- package/templates/nextjs/sui-farm/.gitignore_ +51 -0
- package/templates/nextjs/sui-farm/README.md +15 -0
- package/templates/nextjs/sui-farm/UPGRADE_NOTES.md +97 -0
- package/templates/nextjs/sui-farm/docker-compose.yml +34 -0
- package/templates/nextjs/sui-farm/mprocs.yaml +17 -0
- package/templates/nextjs/sui-farm/package.json +43 -0
- package/templates/nextjs/sui-farm/packages/client/.gitignore_ +48 -0
- package/templates/nextjs/sui-farm/packages/client/.prettierignore +1 -0
- package/templates/nextjs/sui-farm/packages/client/.prettierrc.json +8 -0
- package/templates/nextjs/sui-farm/packages/client/eslint.config.mjs +22 -0
- package/templates/nextjs/sui-farm/packages/client/next.config.mjs +8 -0
- package/templates/nextjs/sui-farm/packages/client/package.json +47 -0
- package/templates/nextjs/sui-farm/packages/client/postcss.config.mjs +8 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/admin/page.tsx +618 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/components/FarmLand.tsx +526 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/components/FarmPlotCard.tsx +215 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/components/PetAvatar.tsx +868 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/components/PetPanel.tsx +1360 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/components/PlantModal.tsx +147 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/components/ProxyCard.tsx +684 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/components/RanchLand.tsx +822 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/components/ResourceHUD.tsx +125 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/components/ShopPanel.tsx +232 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/components/icons/GameIcons.tsx +574 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/favicon.ico +0 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/globals.css +423 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/hooks/useWorldPermitId.ts +66 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/layout.tsx +23 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/leaderboard/page.tsx +185 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/lib/crops.ts +97 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/market/page.tsx +763 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/page.tsx +1173 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/providers.tsx +69 -0
- package/templates/nextjs/sui-farm/packages/client/src/app/state/index.tsx +5 -0
- package/templates/nextjs/sui-farm/packages/client/tailwind.config.ts +25 -0
- package/templates/nextjs/sui-farm/packages/client/tsconfig.json +30 -0
- package/templates/nextjs/sui-farm/packages/contracts/.gitignore_ +51 -0
- package/templates/nextjs/sui-farm/packages/contracts/.prettierignore +1 -0
- package/templates/nextjs/sui-farm/packages/contracts/.prettierrc.json +8 -0
- package/templates/nextjs/sui-farm/packages/contracts/Dockerfile +5 -0
- package/templates/nextjs/sui-farm/packages/contracts/Pub.localnet.toml +13 -0
- package/templates/nextjs/sui-farm/packages/contracts/counter.lock.json +14 -0
- package/templates/nextjs/sui-farm/packages/contracts/docker-compose.yml +34 -0
- package/templates/nextjs/sui-farm/packages/contracts/dubhe.config.ts +178 -0
- package/templates/nextjs/sui-farm/packages/contracts/harvest.lock.json +120 -0
- package/templates/nextjs/sui-farm/packages/contracts/package.json +48 -0
- package/templates/nextjs/sui-farm/packages/contracts/scripts/config.ts +17 -0
- package/templates/nextjs/sui-farm/packages/contracts/scripts/query-dapp-revenue.ts +95 -0
- package/templates/nextjs/sui-farm/packages/contracts/scripts/read-permit.ts +72 -0
- package/templates/nextjs/sui-farm/packages/contracts/scripts/seed.ts +85 -0
- package/templates/nextjs/sui-farm/packages/contracts/scripts/withdraw-dapp-revenue.ts +56 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/counter/Move.toml +14 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/codegen/dapp_key.move +31 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/codegen/error.move +10 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/codegen/genesis.move +33 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/codegen/init_test.move +23 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/codegen/resources/counter1.move +64 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/codegen/resources/counter2.move +70 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/codegen/user_storage_init.move +26 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/scripts/deploy_hook.move +8 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/scripts/migrate.move +8 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/systems/counter.move +13 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/tests/counter.move +28 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/Move.toml +14 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/dapp_key.move +46 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/enums/crop_type.move +47 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/enums/egg_type.move +42 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/enums/pet_rarity.move +37 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/enums/pet_species.move +52 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/error.move +110 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/genesis.move +33 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/init_test.move +23 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/permits/world.move +125 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/carrot.move +136 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/carrot_seed.move +80 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/common_egg.move +136 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/corn.move +136 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/corn_seed.move +80 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/crow_charges.move +162 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/crow_damage.move +207 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/farm_plot.move +261 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/gold.move +80 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/pet.move +467 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/pet_config.move +372 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/pet_hatch.move +162 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/pet_slot_index.move +83 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/pet_slots.move +64 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/profile.move +162 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/pumpkin.move +136 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/pumpkin_seed.move +80 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/rare_egg.move +136 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/scarecrow.move +64 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/season_config.move +197 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/season_stats.move +64 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/seasonal_egg.move +136 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/shop_config.move +267 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/trophy.move +245 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/wheat.move +136 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/wheat_seed.move +80 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/world_permit_id.move +64 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/user_storage_init.move +26 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/scripts/deploy_hook.move +45 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/scripts/migrate.move +7 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/systems/crow_system.move +96 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/systems/farm_system.move +182 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/systems/market_system.move +172 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/systems/pet_system.move +495 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/systems/season_system.move +70 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/systems/shop_system.move +112 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/systems/world_system.move +34 -0
- package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/tests/farm_tests.move +1192 -0
- package/templates/nextjs/sui-farm/pnpm-workspace.yaml +2 -0
- package/templates/nextjs/sui-template/packages/client/src/app/components/ProxyCard.tsx +683 -0
- package/templates/nextjs/sui-template/packages/client/src/app/page.tsx +510 -5
- package/templates/nextjs/sui-template/packages/client/src/app/providers.tsx +13 -5
- package/templates/nextjs/sui-template/packages/contracts/Pub.localnet.toml +4 -4
- package/templates/nextjs/sui-template/packages/contracts/counter.lock.json +14 -0
- package/templates/nextjs/sui-template/packages/contracts/deployment.ts +8 -3
- package/templates/nextjs/sui-template/packages/contracts/dubhe.config.json +9 -9
- package/templates/nextjs/sui-template/packages/contracts/dubhe.config.ts +0 -4
- package/templates/nextjs/sui-template/packages/contracts/metadata.json +180 -124
- package/templates/nextjs/sui-template/packages/contracts/package.json +8 -4
- package/templates/nextjs/sui-template/packages/contracts/src/counter/Move.toml +4 -0
- package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/dapp_key.move +45 -31
- package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/error.move +10 -0
- package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/genesis.move +30 -13
- package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/init_test.move +19 -14
- package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/resources/counter1.move +30 -20
- package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/resources/counter2.move +35 -24
- package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/user_storage_init.move +26 -0
- package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/scripts/deploy_hook.move +6 -10
- package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/systems/counter.move +7 -20
- package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/tests/counter.move +14 -27
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/Move.lock +33 -30
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/Move.toml +8 -3
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/dapp_key.move +45 -31
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/error.move +170 -0
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/genesis.move +16 -13
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/init_test.move +8 -14
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/core/account_key.move +1 -3
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/core/dapp_service.move +1776 -137
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/core/data_key.move +1 -20
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/core/events.move +864 -25
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/scripts/deploy_hook.move +15 -16
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/scripts/migrate.move +0 -3
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/systems/address_system.move +25 -17
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/systems/dapp_system.move +2802 -343
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/systems/utils.move +1 -1
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/address.move +173 -55
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/dapp_test.move +769 -0
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/fee_test.move +2965 -0
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/integration_test.move +303 -0
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/listing_test.move +1422 -0
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/scene_session_test.move +269 -0
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/session_test.move +624 -0
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/storage_test.move +700 -0
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/typed_object_test.move +177 -0
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/typed_scene_test.move +452 -0
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/user_storage_test.move +160 -0
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/utils/math.move +4 -3
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/utils/type_info.move +2 -2
- package/templates/101/sui-template/packages/contracts/src/counter/Move.lock +0 -41
- package/templates/101/sui-template/packages/contracts/src/counter/Published.toml +0 -9
- package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/errors.move +0 -12
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/errors.move +0 -140
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dapp_fee_config.move +0 -186
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dapp_fee_state.move +0 -306
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dapp_metadata.move +0 -396
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dubhe_config.move +0 -246
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/core/dapp_store.move +0 -29
- package/templates/101/sui-template/packages/contracts/src/dubhe/sources/systems/session_system.move +0 -44
- package/templates/contract/sui-template/src/dubhe/sources/codegen/errors.move +0 -140
- package/templates/contract/sui-template/src/dubhe/sources/codegen/resources/dapp_fee_config.move +0 -186
- package/templates/contract/sui-template/src/dubhe/sources/codegen/resources/dapp_fee_state.move +0 -306
- package/templates/contract/sui-template/src/dubhe/sources/codegen/resources/dapp_metadata.move +0 -396
- package/templates/contract/sui-template/src/dubhe/sources/codegen/resources/dubhe_config.move +0 -246
- package/templates/contract/sui-template/src/dubhe/sources/core/dapp_store.move +0 -29
- package/templates/contract/sui-template/src/dubhe/sources/systems/session_system.move +0 -44
- package/templates/nextjs/sui-template/packages/contracts/src/counter/Move.lock +0 -47
- package/templates/nextjs/sui-template/packages/contracts/src/counter/Published.toml +0 -9
- package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/errors.move +0 -12
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/errors.move +0 -140
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dapp_fee_config.move +0 -186
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dapp_fee_state.move +0 -306
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dapp_metadata.move +0 -396
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dubhe_config.move +0 -246
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/core/dapp_store.move +0 -29
- package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/systems/session_system.move +0 -44
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pixel-art SVG icons for the farm game.
|
|
3
|
+
* All icons use a 16×16 viewBox — no external assets needed.
|
|
4
|
+
*
|
|
5
|
+
* Crop growth stages (0–3):
|
|
6
|
+
* 0 = Seed (just planted)
|
|
7
|
+
* 1 = Sprout (first leaves)
|
|
8
|
+
* 2 = Growing (almost mature)
|
|
9
|
+
* 3 = Ripe (ready to harvest)
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
interface IconProps {
|
|
13
|
+
size?: number;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function R({ x, y, w = 1, h = 1, c }: { x: number; y: number; w?: number; h?: number; c: string }) {
|
|
18
|
+
return <rect x={x} y={y} width={w} height={h} fill={c} />;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const ISO: React.CSSProperties = { imageRendering: 'pixelated', display: 'block' };
|
|
22
|
+
|
|
23
|
+
// ─── Gold Coin ────────────────────────────────────────────────────────────────
|
|
24
|
+
export function IconGold({ size = 20, className }: IconProps) {
|
|
25
|
+
return (
|
|
26
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO} className={className}>
|
|
27
|
+
<R x={4} y={1} w={8} h={1} c="#FFD700" />
|
|
28
|
+
<R x={2} y={2} w={12} h={1} c="#FFD700" />
|
|
29
|
+
<R x={1} y={3} w={14} h={10} c="#FFD700" />
|
|
30
|
+
<R x={2} y={13} w={12} h={1} c="#FFD700" />
|
|
31
|
+
<R x={4} y={14} w={8} h={1} c="#FFD700" />
|
|
32
|
+
<R x={3} y={3} w={3} h={2} c="#FFF176" />
|
|
33
|
+
<R x={7} y={4} w={3} h={1} c="#B8860B" />
|
|
34
|
+
<R x={6} y={5} w={1} h={1} c="#B8860B" />
|
|
35
|
+
<R x={7} y={6} w={2} h={1} c="#B8860B" />
|
|
36
|
+
<R x={9} y={7} w={1} h={1} c="#B8860B" />
|
|
37
|
+
<R x={7} y={8} w={3} h={1} c="#B8860B" />
|
|
38
|
+
<R x={8} y={4} w={1} h={7} c="#B8860B" />
|
|
39
|
+
<R x={2} y={12} w={12} h={1} c="#B8860B" />
|
|
40
|
+
</svg>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// ─── Lock ─────────────────────────────────────────────────────────────────────
|
|
45
|
+
export function IconLock({ size = 20, className }: IconProps) {
|
|
46
|
+
return (
|
|
47
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO} className={className}>
|
|
48
|
+
<R x={5} y={2} w={6} h={1} c="#8B7355" />
|
|
49
|
+
<R x={4} y={3} w={1} h={4} c="#8B7355" />
|
|
50
|
+
<R x={11} y={3} w={1} h={4} c="#8B7355" />
|
|
51
|
+
<R x={3} y={7} w={10} h={7} c="#C8A96E" />
|
|
52
|
+
<R x={3} y={7} w={10} h={1} c="#8B7355" />
|
|
53
|
+
<R x={3} y={13} w={10} h={1} c="#8B7355" />
|
|
54
|
+
<R x={3} y={7} w={1} h={7} c="#8B7355" />
|
|
55
|
+
<R x={12} y={7} w={1} h={7} c="#8B7355" />
|
|
56
|
+
<R x={7} y={9} w={2} h={2} c="#5C3D1A" />
|
|
57
|
+
<R x={7} y={11} w={2} h={2} c="#5C3D1A" />
|
|
58
|
+
</svg>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// ─── Seedling (empty plot hint) ───────────────────────────────────────────────
|
|
63
|
+
export function IconSeedling({ size = 20, className }: IconProps) {
|
|
64
|
+
return (
|
|
65
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO} className={className}>
|
|
66
|
+
<R x={7} y={7} w={2} h={6} c="#5A8A3C" />
|
|
67
|
+
<R x={3} y={8} w={4} h={3} c="#4A7C3F" />
|
|
68
|
+
<R x={9} y={6} w={4} h={3} c="#5A8A3C" />
|
|
69
|
+
<R x={5} y={5} w={2} h={3} c="#5A8A3C" />
|
|
70
|
+
</svg>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// ─── Plots icon ───────────────────────────────────────────────────────────────
|
|
75
|
+
export function IconPlots({ size = 20, className }: IconProps) {
|
|
76
|
+
return (
|
|
77
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO} className={className}>
|
|
78
|
+
<R x={1} y={1} w={6} h={6} c="#8B6914" />
|
|
79
|
+
<R x={9} y={1} w={6} h={6} c="#6B4423" />
|
|
80
|
+
<R x={1} y={9} w={6} h={6} c="#6B4423" />
|
|
81
|
+
<R x={9} y={9} w={6} h={6} c="#8B6914" />
|
|
82
|
+
<R x={7} y={1} w={2} h={14} c="#3D2B1F" />
|
|
83
|
+
<R x={1} y={7} w={14} h={2} c="#3D2B1F" />
|
|
84
|
+
<R x={3} y={4} w={2} h={2} c="#5A8A3C" />
|
|
85
|
+
</svg>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// ─── Scarecrow ────────────────────────────────────────────────────────────────
|
|
90
|
+
export function IconScarecrow({ size = 20, className }: IconProps) {
|
|
91
|
+
return (
|
|
92
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO} className={className}>
|
|
93
|
+
<R x={7} y={8} w={2} h={8} c="#8B6914" />
|
|
94
|
+
<R x={4} y={6} w={8} h={2} c="#8B6914" />
|
|
95
|
+
<R x={5} y={8} w={6} h={5} c="#C8A96E" />
|
|
96
|
+
<R x={5} y={2} w={6} h={6} c="#F5E6C8" />
|
|
97
|
+
<R x={4} y={1} w={8} h={2} c="#3D2B1F" />
|
|
98
|
+
<R x={5} y={0} w={6} h={2} c="#3D2B1F" />
|
|
99
|
+
<R x={6} y={4} w={1} h={1} c="#3D2B1F" />
|
|
100
|
+
<R x={9} y={4} w={1} h={1} c="#3D2B1F" />
|
|
101
|
+
<R x={6} y={6} w={4} h={1} c="#3D2B1F" />
|
|
102
|
+
</svg>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// ════════════════════════════════════════════════════════════════════════════════
|
|
107
|
+
// WHEAT · 4 growth stages
|
|
108
|
+
// ════════════════════════════════════════════════════════════════════════════════
|
|
109
|
+
|
|
110
|
+
/** Stage 0 — Seed */
|
|
111
|
+
function WheatSeed({ size }: { size: number }) {
|
|
112
|
+
return (
|
|
113
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
114
|
+
{/* Oval seed body */}
|
|
115
|
+
<R x={6} y={9} w={4} h={1} c="#C8A040" />
|
|
116
|
+
<R x={5} y={10} w={6} h={1} c="#D4B048" />
|
|
117
|
+
<R x={5} y={11} w={6} h={1} c="#C8A040" />
|
|
118
|
+
<R x={6} y={12} w={4} h={1} c="#A07820" />
|
|
119
|
+
<R x={7} y={13} w={2} h={1} c="#806010" />
|
|
120
|
+
{/* Shine */}
|
|
121
|
+
<R x={6} y={10} w={2} h={1} c="#ECD870" />
|
|
122
|
+
{/* Tiny crack – starting to sprout */}
|
|
123
|
+
<R x={7} y={8} w={2} h={1} c="#7AC050" />
|
|
124
|
+
</svg>
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** Stage 1 — Sprout */
|
|
129
|
+
function WheatSprout({ size }: { size: number }) {
|
|
130
|
+
return (
|
|
131
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
132
|
+
{/* Stem */}
|
|
133
|
+
<R x={7} y={7} w={2} h={7} c="#5A8A3C" />
|
|
134
|
+
{/* Bright new tip */}
|
|
135
|
+
<R x={7} y={6} w={2} h={1} c="#80C050" />
|
|
136
|
+
{/* Left leaf */}
|
|
137
|
+
<R x={4} y={9} w={3} h={1} c="#4A7C3F" />
|
|
138
|
+
<R x={4} y={10} w={2} h={1} c="#3A6A30" />
|
|
139
|
+
{/* Right leaf */}
|
|
140
|
+
<R x={9} y={11} w={3} h={1} c="#5A8A3C" />
|
|
141
|
+
<R x={10} y={12} w={2} h={1} c="#4A7A30" />
|
|
142
|
+
</svg>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** Stage 2 — Growing (grain head forming) */
|
|
147
|
+
function WheatGrowing({ size }: { size: number }) {
|
|
148
|
+
return (
|
|
149
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
150
|
+
{/* Stalk */}
|
|
151
|
+
<R x={7} y={5} w={2} h={9} c="#7A6520" />
|
|
152
|
+
{/* Left leaf */}
|
|
153
|
+
<R x={3} y={7} w={4} h={1} c="#5A8A3C" />
|
|
154
|
+
<R x={3} y={8} w={3} h={1} c="#4A7C3F" />
|
|
155
|
+
{/* Right leaf */}
|
|
156
|
+
<R x={9} y={9} w={4} h={1} c="#5A8A3C" />
|
|
157
|
+
<R x={10} y={10} w={3} h={1} c="#4A7C3F" />
|
|
158
|
+
{/* Forming grain head — greenish-gold */}
|
|
159
|
+
<R x={7} y={3} w={2} h={1} c="#C0A030" />
|
|
160
|
+
<R x={6} y={4} w={4} h={2} c="#B89030" />
|
|
161
|
+
<R x={6} y={3} w={1} h={1} c="#D4B040" />
|
|
162
|
+
<R x={9} y={3} w={1} h={1} c="#D4B040" />
|
|
163
|
+
</svg>
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** Stage 3 — Ripe (full golden wheat) */
|
|
168
|
+
function WheatRipe({ size }: { size: number }) {
|
|
169
|
+
return (
|
|
170
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
171
|
+
{/* Stalk */}
|
|
172
|
+
<R x={7} y={8} w={2} h={7} c="#8B6914" />
|
|
173
|
+
{/* Golden grain head */}
|
|
174
|
+
<R x={6} y={1} w={4} h={1} c="#F5C518" />
|
|
175
|
+
<R x={5} y={2} w={6} h={2} c="#F5C518" />
|
|
176
|
+
<R x={6} y={4} w={4} h={2} c="#DAA520" />
|
|
177
|
+
<R x={7} y={6} w={2} h={2} c="#B8860B" />
|
|
178
|
+
{/* Grain bumps */}
|
|
179
|
+
<R x={5} y={2} w={1} h={1} c="#FFF176" />
|
|
180
|
+
<R x={10} y={2} w={1} h={1} c="#FFF176" />
|
|
181
|
+
<R x={6} y={4} w={1} h={1} c="#F0D030" />
|
|
182
|
+
<R x={9} y={4} w={1} h={1} c="#F0D030" />
|
|
183
|
+
{/* Leaves */}
|
|
184
|
+
<R x={3} y={9} w={4} h={2} c="#5A8A3C" />
|
|
185
|
+
<R x={9} y={11} w={4} h={2} c="#5A8A3C" />
|
|
186
|
+
</svg>
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// ════════════════════════════════════════════════════════════════════════════════
|
|
191
|
+
// CORN · 4 growth stages
|
|
192
|
+
// ════════════════════════════════════════════════════════════════════════════════
|
|
193
|
+
|
|
194
|
+
/** Stage 0 — Kernel */
|
|
195
|
+
function CornSeed({ size }: { size: number }) {
|
|
196
|
+
return (
|
|
197
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
198
|
+
{/* Kernel shape */}
|
|
199
|
+
<R x={7} y={8} w={2} h={1} c="#FFD700" />
|
|
200
|
+
<R x={6} y={9} w={4} h={1} c="#FFD700" />
|
|
201
|
+
<R x={5} y={10} w={6} h={1} c="#FFD700" />
|
|
202
|
+
<R x={5} y={11} w={6} h={1} c="#E6C200" />
|
|
203
|
+
<R x={6} y={12} w={4} h={1} c="#C8A800" />
|
|
204
|
+
<R x={7} y={13} w={2} h={1} c="#A08000" />
|
|
205
|
+
{/* Shine */}
|
|
206
|
+
<R x={6} y={10} w={2} h={1} c="#FFF176" />
|
|
207
|
+
{/* Embryo stripe */}
|
|
208
|
+
<R x={8} y={10} w={1} h={3} c="#8B7020" />
|
|
209
|
+
</svg>
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/** Stage 1 — Sprout (single rolled sheath leaf) */
|
|
214
|
+
function CornSprout({ size }: { size: number }) {
|
|
215
|
+
return (
|
|
216
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
217
|
+
{/* Stem/sheath */}
|
|
218
|
+
<R x={7} y={8} w={2} h={6} c="#5A8A3C" />
|
|
219
|
+
{/* Rolled leaf emerging */}
|
|
220
|
+
<R x={6} y={5} w={2} h={5} c="#4A7C3F" />
|
|
221
|
+
<R x={7} y={4} w={3} h={5} c="#5A8A3C" />
|
|
222
|
+
<R x={9} y={6} w={2} h={3} c="#4A7C3F" />
|
|
223
|
+
{/* Leaf shine */}
|
|
224
|
+
<R x={7} y={5} w={1} h={2} c="#80C060" />
|
|
225
|
+
</svg>
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/** Stage 2 — Growing (tall stalk, cob forming) */
|
|
230
|
+
function CornGrowing({ size }: { size: number }) {
|
|
231
|
+
return (
|
|
232
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
233
|
+
{/* Main stalk */}
|
|
234
|
+
<R x={7} y={2} w={2} h={12} c="#4A8C3A" />
|
|
235
|
+
{/* Left leaf */}
|
|
236
|
+
<R x={3} y={5} w={4} h={1} c="#5A9A3C" />
|
|
237
|
+
<R x={2} y={6} w={5} h={1} c="#4A8A30" />
|
|
238
|
+
<R x={2} y={7} w={4} h={1} c="#3A7A28" />
|
|
239
|
+
{/* Right leaf */}
|
|
240
|
+
<R x={9} y={8} w={4} h={1} c="#5A9A3C" />
|
|
241
|
+
<R x={9} y={9} w={5} h={1} c="#4A8A30" />
|
|
242
|
+
<R x={10} y={10} w={4} h={1} c="#3A7A28" />
|
|
243
|
+
{/* Small cob forming (left side of stalk) */}
|
|
244
|
+
<R x={4} y={4} w={3} h={5} c="#4A8A30" /> {/* husk */}
|
|
245
|
+
<R x={5} y={5} w={2} h={3} c="#E8C840" /> {/* tiny kernels */}
|
|
246
|
+
{/* Tassel */}
|
|
247
|
+
<R x={7} y={1} w={2} h={1} c="#C8A040" />
|
|
248
|
+
<R x={6} y={2} w={1} h={1} c="#A08030" />
|
|
249
|
+
<R x={10} y={2} w={1} h={1} c="#A08030" />
|
|
250
|
+
</svg>
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/** Stage 3 — Ripe (full corn with golden cob) */
|
|
255
|
+
function CornRipe({ size }: { size: number }) {
|
|
256
|
+
return (
|
|
257
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
258
|
+
{/* Stalk */}
|
|
259
|
+
<R x={7} y={11} w={2} h={5} c="#5A8A3C" />
|
|
260
|
+
{/* Husk */}
|
|
261
|
+
<R x={5} y={3} w={6} h={9} c="#4A7C3F" />
|
|
262
|
+
<R x={4} y={5} w={1} h={5} c="#4A7C3F" />
|
|
263
|
+
<R x={11} y={5} w={1} h={5} c="#4A7C3F" />
|
|
264
|
+
{/* Kernels */}
|
|
265
|
+
<R x={6} y={4} w={4} h={7} c="#FFD700" />
|
|
266
|
+
<R x={7} y={3} w={2} h={1} c="#FFD700" />
|
|
267
|
+
{/* Kernel highlights */}
|
|
268
|
+
<R x={6} y={5} w={1} h={1} c="#FFF176" />
|
|
269
|
+
<R x={8} y={6} w={1} h={1} c="#FFF176" />
|
|
270
|
+
<R x={6} y={8} w={1} h={1} c="#FFF176" />
|
|
271
|
+
{/* Tassel */}
|
|
272
|
+
<R x={7} y={1} w={1} h={3} c="#8B6914" />
|
|
273
|
+
<R x={6} y={2} w={1} h={2} c="#8B6914" />
|
|
274
|
+
<R x={9} y={2} w={1} h={2} c="#8B6914" />
|
|
275
|
+
</svg>
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// ════════════════════════════════════════════════════════════════════════════════
|
|
280
|
+
// CARROT · 4 growth stages
|
|
281
|
+
// ════════════════════════════════════════════════════════════════════════════════
|
|
282
|
+
|
|
283
|
+
/** Stage 0 — Seed */
|
|
284
|
+
function CarrotSeed({ size }: { size: number }) {
|
|
285
|
+
return (
|
|
286
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
287
|
+
<R x={6} y={9} w={4} h={1} c="#CC6600" />
|
|
288
|
+
<R x={5} y={10} w={6} h={1} c="#DD7700" />
|
|
289
|
+
<R x={5} y={11} w={6} h={1} c="#CC6600" />
|
|
290
|
+
<R x={6} y={12} w={4} h={1} c="#AA4400" />
|
|
291
|
+
<R x={7} y={13} w={2} h={1} c="#883300" />
|
|
292
|
+
{/* Shine */}
|
|
293
|
+
<R x={6} y={10} w={2} h={1} c="#FF9040" />
|
|
294
|
+
</svg>
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/** Stage 1 — Tiny green tops */
|
|
299
|
+
function CarrotSprout({ size }: { size: number }) {
|
|
300
|
+
return (
|
|
301
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
302
|
+
{/* Three wispy carrot-top leaves */}
|
|
303
|
+
<R x={5} y={7} w={1} h={5} c="#4A7C3F" />
|
|
304
|
+
<R x={6} y={6} w={2} h={6} c="#5A8A3C" />
|
|
305
|
+
<R x={7} y={4} w={2} h={8} c="#68A040" />
|
|
306
|
+
<R x={9} y={6} w={2} h={5} c="#5A8A3C" />
|
|
307
|
+
<R x={10} y={7} w={1} h={4} c="#4A7C3F" />
|
|
308
|
+
{/* Tiny orange tip at ground level */}
|
|
309
|
+
<R x={7} y={12} w={2} h={2} c="#FF8030" />
|
|
310
|
+
</svg>
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/** Stage 2 — Growing (leafy tops + visible orange body) */
|
|
315
|
+
function CarrotGrowing({ size }: { size: number }) {
|
|
316
|
+
return (
|
|
317
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
318
|
+
{/* Feathery green tops — three clusters */}
|
|
319
|
+
<R x={3} y={4} w={2} h={5} c="#4A7C3F" />
|
|
320
|
+
<R x={4} y={3} w={2} h={4} c="#5A8A3C" />
|
|
321
|
+
<R x={6} y={2} w={2} h={7} c="#5A8A3C" />
|
|
322
|
+
<R x={7} y={1} w={2} h={8} c="#70B048" />
|
|
323
|
+
<R x={9} y={3} w={2} h={6} c="#5A8A3C" />
|
|
324
|
+
<R x={10} y={4} w={2} h={5} c="#4A7C3F" />
|
|
325
|
+
{/* Orange carrot body (emerging from soil) */}
|
|
326
|
+
<R x={6} y={9} w={4} h={1} c="#FF8C00" />
|
|
327
|
+
<R x={6} y={10} w={4} h={1} c="#FF6B00" />
|
|
328
|
+
<R x={7} y={11} w={2} h={1} c="#E55A00" />
|
|
329
|
+
<R x={7} y={12} w={2} h={1} c="#CC4400" />
|
|
330
|
+
{/* Highlight */}
|
|
331
|
+
<R x={6} y={10} w={1} h={1} c="#FFA040" />
|
|
332
|
+
</svg>
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/** Stage 3 — Ripe (full carrot) */
|
|
337
|
+
function CarrotRipe({ size }: { size: number }) {
|
|
338
|
+
return (
|
|
339
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
340
|
+
{/* Lush leaves */}
|
|
341
|
+
<R x={5} y={1} w={2} h={4} c="#4A7C3F" />
|
|
342
|
+
<R x={7} y={1} w={2} h={3} c="#5A8A3C" />
|
|
343
|
+
<R x={9} y={1} w={2} h={4} c="#4A7C3F" />
|
|
344
|
+
{/* Full orange body */}
|
|
345
|
+
<R x={5} y={5} w={6} h={1} c="#FF8C00" />
|
|
346
|
+
<R x={5} y={6} w={6} h={2} c="#FF6B00" />
|
|
347
|
+
<R x={6} y={8} w={4} h={2} c="#FF6B00" />
|
|
348
|
+
<R x={7} y={10} w={2} h={2} c="#E55A00" />
|
|
349
|
+
<R x={8} y={12} w={1} h={2} c="#CC4400" />
|
|
350
|
+
{/* Highlight */}
|
|
351
|
+
<R x={5} y={6} w={1} h={2} c="#FFA040" />
|
|
352
|
+
</svg>
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// ════════════════════════════════════════════════════════════════════════════════
|
|
357
|
+
// PUMPKIN · 4 growth stages
|
|
358
|
+
// ════════════════════════════════════════════════════════════════════════════════
|
|
359
|
+
|
|
360
|
+
/** Stage 0 — Flat seed */
|
|
361
|
+
function PumpkinSeed({ size }: { size: number }) {
|
|
362
|
+
return (
|
|
363
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
364
|
+
<R x={6} y={9} w={4} h={1} c="#D4C880" />
|
|
365
|
+
<R x={5} y={10} w={6} h={1} c="#E0D498" />
|
|
366
|
+
<R x={5} y={11} w={6} h={1} c="#C8C078" />
|
|
367
|
+
<R x={6} y={12} w={4} h={1} c="#B0A860" />
|
|
368
|
+
<R x={7} y={13} w={2} h={1} c="#907848" />
|
|
369
|
+
{/* Center stripe (characteristic pumpkin seed) */}
|
|
370
|
+
<R x={8} y={10} w={1} h={3} c="#A09050" />
|
|
371
|
+
{/* Shine */}
|
|
372
|
+
<R x={6} y={10} w={2} h={1} c="#F0EAB8" />
|
|
373
|
+
</svg>
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/** Stage 1 — Vine with first leaf */
|
|
378
|
+
function PumpkinSprout({ size }: { size: number }) {
|
|
379
|
+
return (
|
|
380
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
381
|
+
{/* Vine stem */}
|
|
382
|
+
<R x={7} y={8} w={2} h={6} c="#5A8A3C" />
|
|
383
|
+
<R x={6} y={7} w={2} h={2} c="#4A7C3F" />
|
|
384
|
+
{/* Tendril curling right */}
|
|
385
|
+
<R x={9} y={6} w={3} h={1} c="#5A8A3C" />
|
|
386
|
+
<R x={11} y={7} w={1} h={1} c="#4A7C3F" />
|
|
387
|
+
{/* Big rounded pumpkin leaf */}
|
|
388
|
+
<R x={3} y={7} w={4} h={1} c="#5A9A3C" />
|
|
389
|
+
<R x={2} y={8} w={5} h={1} c="#5A9A3C" />
|
|
390
|
+
<R x={2} y={9} w={4} h={1} c="#4A8830" />
|
|
391
|
+
<R x={3} y={6} w={3} h={1} c="#4A7C3F" />
|
|
392
|
+
{/* Leaf veins */}
|
|
393
|
+
<R x={4} y={7} w={1} h={2} c="#3A6A28" />
|
|
394
|
+
</svg>
|
|
395
|
+
);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/** Stage 2 — Small pumpkin forming on vine */
|
|
399
|
+
function PumpkinGrowing({ size }: { size: number }) {
|
|
400
|
+
return (
|
|
401
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
402
|
+
{/* Vine */}
|
|
403
|
+
<R x={6} y={9} w={3} h={1} c="#4A7C3F" />
|
|
404
|
+
<R x={7} y={10} w={1} h={4} c="#5A8A3C" />
|
|
405
|
+
{/* Leaf (left) */}
|
|
406
|
+
<R x={2} y={7} w={4} h={1} c="#5A9A3C" />
|
|
407
|
+
<R x={2} y={8} w={4} h={1} c="#4A8A30" />
|
|
408
|
+
<R x={3} y={6} w={3} h={1} c="#4A7C3F" />
|
|
409
|
+
{/* Small pumpkin body */}
|
|
410
|
+
<R x={8} y={4} w={5} h={5} c="#E06808" />
|
|
411
|
+
<R x={7} y={5} w={7} h={3} c="#E06808" />
|
|
412
|
+
{/* Rib */}
|
|
413
|
+
<R x={10} y={4} w={1} h={5} c="#C04800" />
|
|
414
|
+
{/* Stem */}
|
|
415
|
+
<R x={10} y={3} w={1} h={2} c="#5A8A3C" />
|
|
416
|
+
{/* Highlight */}
|
|
417
|
+
<R x={8} y={5} w={1} h={1} c="#FF9040" />
|
|
418
|
+
</svg>
|
|
419
|
+
);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/** Stage 3 — Ripe (full pumpkin) */
|
|
423
|
+
function PumpkinRipe({ size }: { size: number }) {
|
|
424
|
+
return (
|
|
425
|
+
<svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
|
|
426
|
+
{/* Stem */}
|
|
427
|
+
<R x={7} y={1} w={2} h={2} c="#5A8A3C" />
|
|
428
|
+
{/* Body */}
|
|
429
|
+
<R x={3} y={3} w={10} h={9} c="#E8650A" />
|
|
430
|
+
<R x={1} y={5} w={14} h={5} c="#E8650A" />
|
|
431
|
+
<R x={2} y={4} w={12} h={7} c="#E8650A" />
|
|
432
|
+
{/* Ribs */}
|
|
433
|
+
<R x={5} y={3} w={1} h={9} c="#CC4A00" />
|
|
434
|
+
<R x={10} y={3} w={1} h={9} c="#CC4A00" />
|
|
435
|
+
{/* Jack face */}
|
|
436
|
+
<R x={4} y={6} w={2} h={2} c="#1A0A00" />
|
|
437
|
+
<R x={10} y={6} w={2} h={2} c="#1A0A00" />
|
|
438
|
+
<R x={4} y={9} w={8} h={1} c="#1A0A00" />
|
|
439
|
+
<R x={5} y={10} w={2} h={1} c="#1A0A00" />
|
|
440
|
+
<R x={9} y={10} w={2} h={1} c="#1A0A00" />
|
|
441
|
+
{/* Highlight */}
|
|
442
|
+
<R x={3} y={4} w={2} h={2} c="#FF8C30" />
|
|
443
|
+
</svg>
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
// ════════════════════════════════════════════════════════════════════════════════
|
|
448
|
+
// PUBLIC EXPORTS
|
|
449
|
+
// ════════════════════════════════════════════════════════════════════════════════
|
|
450
|
+
|
|
451
|
+
// Mature icons (stage 3) kept as named exports for HUD / shop use
|
|
452
|
+
export const IconWheat = ({ size = 20, className }: IconProps) => <WheatRipe size={size} />;
|
|
453
|
+
export const IconCorn = ({ size = 20, className }: IconProps) => <CornRipe size={size} />;
|
|
454
|
+
export const IconCarrot = ({ size = 20, className }: IconProps) => <CarrotRipe size={size} />;
|
|
455
|
+
export const IconPumpkin = ({ size = 20, className }: IconProps) => <PumpkinRipe size={size} />;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Render a crop icon at a specific growth stage.
|
|
459
|
+
* stage: 0=Seed 1=Sprout 2=Growing 3=Ripe
|
|
460
|
+
*/
|
|
461
|
+
export function CropStageIcon({
|
|
462
|
+
cropType,
|
|
463
|
+
stage,
|
|
464
|
+
size = 32
|
|
465
|
+
}: {
|
|
466
|
+
cropType: number;
|
|
467
|
+
stage: number;
|
|
468
|
+
size?: number;
|
|
469
|
+
}) {
|
|
470
|
+
const s = Math.max(0, Math.min(3, stage));
|
|
471
|
+
|
|
472
|
+
if (cropType === 1) {
|
|
473
|
+
return [
|
|
474
|
+
<WheatSeed size={size} />,
|
|
475
|
+
<WheatSprout size={size} />,
|
|
476
|
+
<WheatGrowing size={size} />,
|
|
477
|
+
<WheatRipe size={size} />
|
|
478
|
+
][s];
|
|
479
|
+
}
|
|
480
|
+
if (cropType === 2) {
|
|
481
|
+
return [
|
|
482
|
+
<CornSeed size={size} />,
|
|
483
|
+
<CornSprout size={size} />,
|
|
484
|
+
<CornGrowing size={size} />,
|
|
485
|
+
<CornRipe size={size} />
|
|
486
|
+
][s];
|
|
487
|
+
}
|
|
488
|
+
if (cropType === 3) {
|
|
489
|
+
return [
|
|
490
|
+
<CarrotSeed size={size} />,
|
|
491
|
+
<CarrotSprout size={size} />,
|
|
492
|
+
<CarrotGrowing size={size} />,
|
|
493
|
+
<CarrotRipe size={size} />
|
|
494
|
+
][s];
|
|
495
|
+
}
|
|
496
|
+
if (cropType === 4) {
|
|
497
|
+
return [
|
|
498
|
+
<PumpkinSeed size={size} />,
|
|
499
|
+
<PumpkinSprout size={size} />,
|
|
500
|
+
<PumpkinGrowing size={size} />,
|
|
501
|
+
<PumpkinRipe size={size} />
|
|
502
|
+
][s];
|
|
503
|
+
}
|
|
504
|
+
return <IconSeedling size={size} />;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/** Legacy helper — always returns the mature (stage 3) icon. */
|
|
508
|
+
export function CropIcon({ cropType, size = 48 }: { cropType: number; size?: number }) {
|
|
509
|
+
return <CropStageIcon cropType={cropType} stage={3} size={size} />;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
513
|
+
// Seed-bag icon: shows a burlap sack wrapping a tiny crop seed icon.
|
|
514
|
+
// The knot / tie ribbon uses the crop's accent colour for quick recognition.
|
|
515
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
516
|
+
|
|
517
|
+
const SEED_BAG_COLORS: Record<number, { bag: string; knot: string; label: string }> = {
|
|
518
|
+
1: { bag: '#C8A660', knot: '#DAA520', label: 'W' }, // Wheat — amber
|
|
519
|
+
2: { bag: '#C8A660', knot: '#F5D020', label: 'C' }, // Corn — yellow
|
|
520
|
+
3: { bag: '#C8A660', knot: '#E07820', label: 'Ca' }, // Carrot — orange
|
|
521
|
+
4: { bag: '#C8A660', knot: '#E06820', label: 'P' } // Pumpkin — deep-orange
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
export function SeedBagIcon({ cropType, size = 22 }: { cropType: number; size?: number }) {
|
|
525
|
+
const c = SEED_BAG_COLORS[cropType] ?? { bag: '#C8A660', knot: '#888', label: '?' };
|
|
526
|
+
const s = size;
|
|
527
|
+
return (
|
|
528
|
+
<svg width={s} height={s} viewBox="0 0 22 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
529
|
+
{/* Bag body */}
|
|
530
|
+
<path
|
|
531
|
+
d="M4 10.5 C3 10.5 2 11.5 2.5 14 L4 20.5 C4.5 22 6 22.5 8 22.5 L14 22.5 C16 22.5 17.5 22 18 20.5 L19.5 14 C20 11.5 19 10.5 18 10.5 Z"
|
|
532
|
+
fill={c.bag}
|
|
533
|
+
stroke="#7A5820"
|
|
534
|
+
strokeWidth="0.6"
|
|
535
|
+
/>
|
|
536
|
+
{/* Bag neck pinch */}
|
|
537
|
+
<path
|
|
538
|
+
d="M8 10.5 L8.5 8 C9 6.5 10 6 11 6 C12 6 13 6.5 13.5 8 L14 10.5"
|
|
539
|
+
stroke="#7A5820"
|
|
540
|
+
strokeWidth="0.8"
|
|
541
|
+
fill="none"
|
|
542
|
+
strokeLinecap="round"
|
|
543
|
+
/>
|
|
544
|
+
{/* Knot / ribbon */}
|
|
545
|
+
<ellipse cx="11" cy="7" rx="2.2" ry="1.4" fill={c.knot} stroke="#5A3810" strokeWidth="0.5" />
|
|
546
|
+
{/* Cross-hatch texture lines on bag */}
|
|
547
|
+
<line x1="6" y1="13" x2="16" y2="13" stroke="#7A5820" strokeWidth="0.4" strokeOpacity="0.4" />
|
|
548
|
+
<line
|
|
549
|
+
x1="5.5"
|
|
550
|
+
y1="16"
|
|
551
|
+
x2="16.5"
|
|
552
|
+
y2="16"
|
|
553
|
+
stroke="#7A5820"
|
|
554
|
+
strokeWidth="0.4"
|
|
555
|
+
strokeOpacity="0.4"
|
|
556
|
+
/>
|
|
557
|
+
<line x1="5" y1="19" x2="17" y2="19" stroke="#7A5820" strokeWidth="0.4" strokeOpacity="0.4" />
|
|
558
|
+
{/* Small crop stage-0 icon centred in the bag */}
|
|
559
|
+
<foreignObject x="7" y="12" width="8" height="8">
|
|
560
|
+
<div
|
|
561
|
+
style={{
|
|
562
|
+
width: '100%',
|
|
563
|
+
height: '100%',
|
|
564
|
+
display: 'flex',
|
|
565
|
+
alignItems: 'center',
|
|
566
|
+
justifyContent: 'center'
|
|
567
|
+
}}
|
|
568
|
+
>
|
|
569
|
+
<CropStageIcon cropType={cropType} stage={0} size={7} />
|
|
570
|
+
</div>
|
|
571
|
+
</foreignObject>
|
|
572
|
+
</svg>
|
|
573
|
+
);
|
|
574
|
+
}
|
|
Binary file
|