Skip to content

Commit

Permalink
patch bomb 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ArgentumHeart committed Oct 22, 2023
1 parent 85bd279 commit f9cc001
Show file tree
Hide file tree
Showing 42 changed files with 1,873 additions and 2,667 deletions.
12 changes: 0 additions & 12 deletions .editorconfig

This file was deleted.

33 changes: 0 additions & 33 deletions .eslintignore

This file was deleted.

35 changes: 0 additions & 35 deletions .eslintrc.js

This file was deleted.

20 changes: 5 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"description": "Tool for easy loading your custom maps save codes.",
"description": "Companion app for custom Wc3 map Twilights Eve Evo",
"main": "./src/main/main.ts",
"scripts": {
"build": "concurrently \"npm run build:main\" \"npm run build:renderer\"",
Expand Down Expand Up @@ -69,6 +69,7 @@
"@fontsource/roboto": "^5.0.8",
"@mui/icons-material": "^5.14.13",
"@mui/material": "^5.14.13",
"@mui/x-tree-view": "^6.0.0-beta.0",
"electron-debug": "^3.2.0",
"electron-log": "^4.4.8",
"electron-updater": "^6.1.4",
Expand All @@ -93,6 +94,7 @@
"@types/webpack-bundle-analyzer": "^4.6.0",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"babel-eslint": "^10.1.0",
"browserslist-config-erb": "^0.0.3",
"chalk": "^4.1.2",
"concurrently": "^8.2.1",
Expand All @@ -105,18 +107,6 @@
"electron-builder": "^24.6.4",
"electron-devtools-installer": "^3.2.0",
"electronmon": "^2.0.2",
"eslint": "^8.49.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-erb": "^4.1.0-0",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-import-resolver-webpack": "^0.13.7",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jest": "^27.4.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.3",
"identity-obj-proxy": "^3.0.0",
Expand Down Expand Up @@ -144,8 +134,8 @@
"webpack-merge": "^5.9.0"
},
"build": {
"productName": "WC3SaveLoader",
"appId": "shr.WC3SaveLoader",
"productName": "Evo Helper",
"appId": "shr.EvoHelper",
"asar": true,
"asarUnpack": "**\\*.{node,dll}",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions release/app/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "wc3loader",
"name": "evohelper",
"version": "0.3.0",
"author": {
"name": "ArgentumHeart",
"url": "https://github.com/ArgentumHeart/WC3RPGLoader"
"url": "https://github.com/ArgentumHeart/EvoHelper"
},
"main": "./dist/main/main.js",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions src/icons/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ import { angelSunIcons } from './angelSun';
import { godlyIcons } from './godlyIcons';
import { fishingIcon } from './fishing';
import { forgottenCryptIcons } from './forgottenCrypt';
import { imp3matsIcons } from './imp3mats';

const icons = {
EmptySlotIcon,
Expand Down Expand Up @@ -363,6 +364,7 @@ const icons = {
...angelSunIcons,
...angelFireIcons,
...flameIcons,
...imp3matsIcons,
};

export const iconFromId = (id: keyof typeof icons): string => {
Expand Down
21 changes: 21 additions & 0 deletions src/icons/imp3mats.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import FireRising from "./png/evo/imp3mats/FireRising.png";
import Incinerator from "./png/evo/imp3mats/Incinerator.png";
import CurseOfHell from "./png/evo/imp3mats/CurseOfHell.png";
import FireStone from "./png/evo/imp3mats/FireStone.png";
import CrystalOfEternalFlame from "./png/evo/imp3mats/CrystalOfEternalFlame.png";
import DemonicFlame from "./png/evo/imp3mats/DemonicFlame.png";
import ImpsTail from "./png/evo/imp3mats/ImpsTail.png";
import BlessingOfFire from "./png/evo/imp3mats/BlessingOfFire.png";
import HellishBehemoth from "./png/evo/imp3mats/HellishBehemoth.png";

export const imp3matsIcons = {
FireRising,
Incinerator,
CurseOfHell,
FireStone,
CrystalOfEternalFlame,
DemonicFlame,
ImpsTail,
BlessingOfFire,
HellishBehemoth,
};
Binary file added src/icons/png/evo/imp3mats/BlessingOfFire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/icons/png/evo/imp3mats/CurseOfHell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/icons/png/evo/imp3mats/DemonicFlame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/icons/png/evo/imp3mats/FireRising.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/icons/png/evo/imp3mats/FireStone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/icons/png/evo/imp3mats/HellishBehemoth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/icons/png/evo/imp3mats/ImpsTail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/icons/png/evo/imp3mats/Incinerator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 10 additions & 7 deletions src/main/dirt/keyboard.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { Key, keyboard, clipboard } from '@nut-tree/nut-js';

export const executeCommand = async (command: string) => {
keyboard.config.autoDelayMs = 5;
await clipboard.setContent(command);
await keyboard.pressKey(Key.Enter);
await keyboard.releaseKey(Key.Enter);
await keyboard.type(Key.LeftControl, Key.V);
await keyboard.pressKey(Key.Enter);
await keyboard.releaseKey(Key.Enter);
keyboard.config.autoDelayMs = 50;
return clipboard.setContent(command).then(
async () => {
await keyboard.pressKey(Key.Enter);
await keyboard.releaseKey(Key.Enter);
await keyboard.type(Key.LeftControl, Key.V);
await keyboard.pressKey(Key.Enter);
await keyboard.releaseKey(Key.Enter);
}
);
};

export const executeCommandLegacy = async (command: string) => {
Expand Down
24 changes: 19 additions & 5 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,25 @@ ipcMain.on('load', async (event, arg, legacy) => {
});

ipcMain.on('settings_read', async (event) => {
const settings = await fs.readFile(
`${app.getPath('userData')}\\settings.json`,
'utf-8',
);
event.reply('settings_read', JSON.parse(settings));
try {
const settings = await fs.readFile(
`${app.getPath('userData')}\\settings.json`,
'utf-8',
);
const json = JSON.parse(settings);
const defaultWc3Path = `${app.getPath('documents')}\\Warcraft III`;
if (!json.wc3path) {
json.wc3path = defaultWc3Path;
}

event.reply('settings_read', json);
} catch (e) {
// smth went wrong, return default settings
event.reply('settings_read', {
wc3path: `${app.getPath('documents')}\\Warcraft III`,
});
return;
}
});

ipcMain.on('settings_write', async (event, arg) => {
Expand Down
2 changes: 2 additions & 0 deletions src/main/maps/evo/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ const extractItem = (str: string, key: string, end = '" )'): string => {
}
const item = str
.slice(
// 10 is a 'magic' number to cut color code before name
// |cff8B4513Scepter of Mastery <--- example of the name
str.indexOf(key) + key.length + 10,
str.indexOf(end, str.indexOf(key) + 1),
)
Expand Down
60 changes: 21 additions & 39 deletions src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,19 @@ import MenuList from '@mui/material/MenuList';
import MenuItem from '@mui/material/MenuItem';
import Box from '@mui/material/Box';
import CachedIcon from '@mui/icons-material/Cached';
import ListItemText from '@mui/material/ListItemText';
import IconButton from '@mui/material/IconButton';
import Divider from '@mui/material/Divider';
import Typography from '@mui/material/Typography';
import { useMemo } from 'react';
import Settings from './Settings';
import { Character } from './Evo/Character';
import Settings from './components/pages/Settings';
import { Character } from './components/Character';
import theme from './theme';
import { useCharacterContext } from '../context';
import { tier4Classes } from '../constants/evo/classes';
import { useSettingsContext } from '../settingsContext';
import { Class } from '../main/maps/evo/load';
import { ItemsPage } from './components/pages/ItemsPage';
import { LoaderPage } from './components/pages/LoaderPage';
import { ItemPage } from './components/pages/ItemPage';

export default function App() {
const { allClasses, loadClasses } = useCharacterContext();
const { onlyT4Classes } = useSettingsContext();

const classesMenu = useMemo(() => {
if (!onlyT4Classes) return allClasses;
return allClasses.filter((character) =>
tier4Classes.includes(character.hero),
);
}, [allClasses, onlyT4Classes]);
const { loadClasses } = useCharacterContext();

return (
<Router initialEntries={['/settings']}>
Expand All @@ -39,7 +29,7 @@ export default function App() {
justifyContent: 'space-between',
flexDirection: 'column',
display: 'flex',
width: 220,
minWidth: '220px',
height: '100vh',
position: 'relative',
}}
Expand All @@ -54,34 +44,21 @@ export default function App() {
alignItems: 'center',
}}
>
<Typography>EvoLoader alpha</Typography>
<Typography>Evo helper (alpha)</Typography>
<IconButton onClick={loadClasses}>
<CachedIcon />
</IconButton>
</Box>
<MenuList
sx={{ overflowY: 'auto', height: 'calc(100vh - 90px)' }}
>
{classesMenu.map((character: Class) => (
<MenuItem
component={Link}
to={`/character/${character.hero}`}
key={character.hero.split(' ').join('_')}
>
<ListItemText>{character.hero}</ListItemText>
</MenuItem>
))}
<MenuList>
<MenuItem component={Link} to="/characters">
Loader
</MenuItem>
<MenuItem component={Link} to="/items">
Items
</MenuItem>
</MenuList>
</Box>
<Box
sx={{
width: '100%',
position: 'absolute',
bottom: 0,
left: 0,
backgroundColor: '#121212',
}}
>
<Box sx={{ width: '100%', backgroundColor: '#121212' }}>
<Divider />
<MenuItem component={Link} to="/settings">
Settings
Expand All @@ -98,10 +75,15 @@ export default function App() {
background: theme.palette.grey[900],
}}
>
<Box sx={{ maxWidth: '105ch' }}>
<Routes>
<Route path="/items" element={<ItemsPage/>}/>
<Route path="/item/:id" element={<ItemPage/>}/>
<Route path="/characters" element={<LoaderPage />} />
<Route path="/settings" element={<Settings />} />
<Route path="/character/:id" element={<Character />} />
</Routes>
</Box>
</Box>
</Box>
</ThemeProvider>
Expand Down
14 changes: 0 additions & 14 deletions src/renderer/Evo/Stash.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/renderer/Evo/items/forging/angelSun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const angelSunItems: { [id: string]: EvoItem } = {
'Revered as the blade of the tyrant, wielding it grants insurmountable power.',
effects: ['+5200 Damage', 'Passive: 75% chance to deal 3x Physical Damage'],
crafting: [
'The Patriach',
'The Patriarch',
'Lavender Fragment',
'Amethyst',
'Mythical Weapon Piece',
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/Evo/items/forging/fire.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export const fireItems: { [id: string]: EvoItem } = {
effects: [
'+6400 Damage',
'Active: Next 3 basic attacks will deal [15000 + 75% Agi] Magic Damage to enemies around the target. Cooldown 20s.',
'Passive: Deals 35% damage to the enemies around the target.',
'Passive: Deals 35% damage to tshe enemies around the target.',
],
crafting: ['Blaze Touch', 'Fire Stone'],
crafting: ["Blaze's Touch", 'Fire Stone'],
source: 'Fire merchant',
},
Hatred: {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/Evo/items/forging/godly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const godlyItemsNew: { [id: string]: EvoItem } = {
id: 'Guardian Force',
restriction: EvoItemRestictions.SWORDSMAN,
rarity: EvoRarity.FORGED,
icon: 'Fate',
icon: 'GuardianForce',
description:
'From the realms of God, the Guardian Force is a relic that oaths to protect its wielder and destroy evil for good.',
effects: [
Expand Down
Loading

0 comments on commit f9cc001

Please sign in to comment.