diff --git a/components/unit-description-card.tsx b/components/unit-description-card.tsx new file mode 100644 index 00000000..c37b0450 --- /dev/null +++ b/components/unit-description-card.tsx @@ -0,0 +1,65 @@ +import React from "react"; +import { Flex, Image, Text, Title, Tooltip } from "@mantine/core"; + +/** + * These fields can be found at `sbps` inside each unit object. + * + * Most locstrings and symbol / icons are within: + * - `squadexts` -> `template_reference` which gives the group within the + * Essence editor as `sbpextensions\\squad_ui_ext`. + * - The sibling `race_list` contains a list with an object `race_data/info`. In this + * object the locstring values can be found. + * + * Specific paths defined per property. + */ +type UnitDescription = { + /** Locstring value. Found at `screen_name/locstring/value`. */ + screen_name: string; + /** Locstring value. Found at `help_text/locstring/value`. */ + help_text: string; + /** Locstring value. Found at `brief_text/locstring/value`. */ + brief_text: string; + /** File path. Found at `symbol_icon_name`. */ + symbol_icon_name: string; + /** File path. Found at `icon_name`. */ + icon_name: string; +}; + +export const UnitDescriptionCard = (desc: UnitDescription) => ( + <> + + {desc.screen_name} + + + {desc.help_text} + + + + {desc.screen_name} + + + {/* Symbol horizontal aligned with brief text. */} + + {`${desc.screen_name} + + + {desc.brief_text} + + + + + + +); diff --git a/pages/unit-example.tsx b/pages/unit-example.tsx index b3b31bc6..e40e05db 100644 --- a/pages/unit-example.tsx +++ b/pages/unit-example.tsx @@ -1,7 +1,8 @@ import React from "react"; -import { Container, Title, Text, Grid, Flex, Tooltip, Card } from "@mantine/core"; +import { Container, Title, Text, Grid, Flex, Tooltip, Card, SimpleGrid } from "@mantine/core"; import { StatsCosts } from "../components/cost-card"; import { StatsVehicleArmor } from "../components/vehicle-armor-card"; +import { UnitDescriptionCard } from "../components/unit-description-card"; /** * This is example page you can find it by going on ur /unit-example @@ -15,7 +16,30 @@ const UnitExample = () => { - Side Example description and components goes here! + + + + + + + + + + + + diff --git a/public/icons/races/afrika_corps/symbols/l6_40_ak.png b/public/icons/races/afrika_corps/symbols/l6_40_ak.png new file mode 100644 index 00000000..a88e079b Binary files /dev/null and b/public/icons/races/afrika_corps/symbols/l6_40_ak.png differ diff --git a/public/icons/races/afrika_corps/vehicles/l6_40_ak.png b/public/icons/races/afrika_corps/vehicles/l6_40_ak.png new file mode 100644 index 00000000..b6a0c953 Binary files /dev/null and b/public/icons/races/afrika_corps/vehicles/l6_40_ak.png differ diff --git a/public/icons/races/afrika_corps/vehicles/m13_40_ak.png b/public/icons/races/afrika_corps/vehicles/m13_40_ak.png new file mode 100644 index 00000000..759abe77 Binary files /dev/null and b/public/icons/races/afrika_corps/vehicles/m13_40_ak.png differ diff --git a/public/icons/races/german/symbols/m13_40_ger.png b/public/icons/races/german/symbols/m13_40_ger.png new file mode 100644 index 00000000..e464aa9f Binary files /dev/null and b/public/icons/races/german/symbols/m13_40_ger.png differ