Item refactor (#1)
* Load item definitions from json - Convert item registration code using regex * Display item descriptions on hover - Read descriptions from l10n file - Only en_US is supported for now * Add remaining missing materials - Also add misc. weaponry & armor - Rename and reorder items to match game - Keep deprecated alternate names * Add remaining missing key items - Replace SpiritOrb image with more accurate one - Fix positioning on MasterSword and PotLid images - Add padding to more closely simulate in-game menu * Rename Meal item type to Food to match game * Add support for animated icons - Add support for reading webp files - Mark all potentially animated items in json - Add animated icons only for SpiritOrb / TravelMedallion for now - Add menu option but leave disabled by default * Review feedback * Move icon files into subdirectories * Remove item enum in favor of building list from config - Fix some incorrect item ordering - Rename some generic item images * Add remaining missing items - Add 122 Weapons, 23 Bows, and 30 Shields - Add 105 Armor and 189 Food - Include alternate icons (e.g. charged OHO) for later use * Clean up types and respond to review feedback * Add .webp files to lint ignore * Stupid linter
|
@ -28,6 +28,7 @@ ignore_exts = [
|
|||
".ico",
|
||||
".ps1",
|
||||
".wasm",
|
||||
".webp",
|
||||
".tar.gz",
|
||||
".otf",
|
||||
".svg"
|
||||
|
|
|
@ -86,6 +86,7 @@ h1 {
|
|||
border: 1px solid #999999;
|
||||
box-sizing: border-box;
|
||||
margin:1px;
|
||||
padding:1px;
|
||||
width:62px;
|
||||
height:62px;
|
||||
display:inline-block;
|
||||
|
|
|
@ -33,6 +33,7 @@ export const App: React.FC = () => {
|
|||
const [page, setPageInState] = useState<string>("#simulation");
|
||||
// Option States
|
||||
const [interlaceInventory, setInterlaceInventory] = useState<boolean>(false);
|
||||
const [isIconAnimated, setIsIconAnimated] = useState<boolean>(false);
|
||||
|
||||
const [commands, setCommands] = useState<Command[]>(getDefaultCommands());
|
||||
const [selectedSaveName, setSelectedSaveName] = useState<string>("");
|
||||
|
@ -258,13 +259,13 @@ export const App: React.FC = () => {
|
|||
if (selectedSaveName === ""){
|
||||
const manualSave = simulationStates[displayIndex].getManualSave();
|
||||
if(manualSave){
|
||||
return <ItemList slots={manualSave.getDisplayedSlots()}/>;
|
||||
return <ItemList slots={manualSave.getDisplayedSlots(isIconAnimated)}/>;
|
||||
}
|
||||
}else if(selectedSaveName){
|
||||
const namedSaves = simulationStates[displayIndex].getNamedSaves();
|
||||
if(selectedSaveName in namedSaves){
|
||||
const save = namedSaves[selectedSaveName];
|
||||
return <ItemList slots={save.getDisplayedSlots()}/>;
|
||||
return <ItemList slots={save.getDisplayedSlots(isIconAnimated)}/>;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -288,6 +289,7 @@ export const App: React.FC = () => {
|
|||
{displayIndex >= 0 && displayIndex < commands.length &&
|
||||
<DisplayPane
|
||||
overlaySave={interlaceInventory}
|
||||
isIconAnimated={isIconAnimated}
|
||||
displayIndex={displayIndex}
|
||||
command={commands[displayIndex].getDisplayString()}
|
||||
simulationState={simulationStates[displayIndex]}
|
||||
|
@ -310,6 +312,8 @@ export const App: React.FC = () => {
|
|||
<OptionPage
|
||||
interlaceInventory={interlaceInventory}
|
||||
setInterlaceInventory={setInterlaceInventory}
|
||||
isIconAnimated={isIconAnimated}
|
||||
setIsIconAnimated={setIsIconAnimated}
|
||||
commandText={commandText}
|
||||
setCommandText={(value)=>{
|
||||
if(value !== commandText){
|
||||
|
|
BIN
src/assets/img/Armor/AmberEarrings.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/Armor/AncientCuirass.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/img/Armor/AncientGreaves.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/Armor/AncientHelm.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/Armor/BarbarianArmor.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
src/assets/img/Armor/BarbarianHelm.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/img/Armor/BarbarianLegWraps.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/img/Armor/BokoblinMask.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/Armor/CapOfTheHero.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/CapOfTheSky.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/img/Armor/CapOfTheWild.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/CapOfTheWind.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/img/Armor/CapOfTime.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/img/Armor/CapOfTwilight.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/ChampionsTunic.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/Armor/ClimbersBandanna.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/img/Armor/ClimbingBoots.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/img/Armor/ClimbingGear.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/Armor/DarkHood.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/img/Armor/DarkTrousers.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/img/Armor/DarkTunic.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/DesertVoeHeadband.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/DesertVoeSpaulder.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
src/assets/img/Armor/DesertVoeTrousers.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/Armor/DiamondCirclet.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/FierceDeityArmor.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/Armor/FierceDeityBoots.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/img/Armor/FierceDeityMask.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/FlamebreakerArmor.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
src/assets/img/Armor/FlamebreakerBoots.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/Armor/FlamebreakerHelm.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/Armor/GerudoSirwal.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/img/Armor/GerudoTop.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/Armor/GerudoVeil.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/Armor/HylianHood.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/HylianTrousers.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/Armor/HylianTunic.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/Armor/IslandLobsterShirt.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/img/Armor/KorokMask.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
src/assets/img/Armor/LizalfosMask.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/img/Armor/LynelMask.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/img/Armor/MajorasMask.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/img/Armor/MidnasHelmet.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
src/assets/img/Armor/MoblinMask.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
src/assets/img/Armor/NintendoSwitchShirt.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/OldShirt.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/img/Armor/OpalEarrings.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/img/Armor/PhantomArmor.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/Armor/PhantomGanonArmor.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/Armor/PhantomGanonGreaves.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/img/Armor/PhantomGanonSkull.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/Armor/PhantomGreaves.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
BIN
src/assets/img/Armor/PhantomHelmet.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/Armor/RadiantMask.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/img/Armor/RadiantShirt.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/RadiantTights.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/img/Armor/RaviosHood.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/img/Armor/RoyalGuardBoots.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
src/assets/img/Armor/RoyalGuardCap.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
src/assets/img/Armor/RoyalGuardUniform.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/Armor/RubberArmor.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/Armor/RubberHelm.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/RubberTights.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/Armor/RubyCirclet.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/img/Armor/SalvagerHeadwear.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/Armor/SalvagerTrousers.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/SalvagerVest.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/Armor/SandBoots.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/Armor/SapphireCirclet.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/img/Armor/SheiksMask.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/SnowBoots.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/img/Armor/SnowquillHeaddress.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/SnowquillTrousers.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/img/Armor/SnowquillTunic.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
src/assets/img/Armor/SoldiersArmor.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/img/Armor/SoldiersGreaves.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/Armor/SoldiersHelm.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/StealthChestGuard.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/StealthMask.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/Armor/StealthTights.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
BIN
src/assets/img/Armor/ThunderHelm.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/Armor/TinglesHood.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/Armor/TinglesShirt.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/Armor/TinglesTights.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
src/assets/img/Armor/TopazEarrings.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/img/Armor/TrousersOfTheHero.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/img/Armor/TrousersOfTheSky.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/img/Armor/TrousersOfTheWild.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/Armor/TrousersOfTheWind.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/img/Armor/TrousersOfTime.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
BIN
src/assets/img/Armor/TrousersOfTwilight.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/img/Armor/TunicOfTheHero.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/Armor/TunicOfTheSky.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/TunicOfTheWild.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/Armor/TunicOfTheWind.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/img/Armor/TunicOfTime.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/Armor/TunicOfTwilight.png
Normal file
After Width: | Height: | Size: 16 KiB |