Skip to content

Commit

Permalink
Merge pull request #973 from EmmaRamirez/release/1.16.0
Browse files Browse the repository at this point in the history
release: 1.16.0
  • Loading branch information
EmmaRamirez authored Mar 23, 2024
2 parents 659313e + c982a72 commit d1b8791
Show file tree
Hide file tree
Showing 75 changed files with 338 additions and 76 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuzlocke-generator",
"version": "1.15.1",
"version": "1.16.0",
"description": "A tool for generating nuzlocke team pics from data",
"main": "dist/bundle.js",
"type": "commonjs",
Expand Down
3 changes: 2 additions & 1 deletion src/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ export * from './updateEditorHistory';
export * from './triggerDownload';
export * from './toggleDialog';
export * from './setEditorHistoryEnabled';
export * from './updateExcludedAreas';
export * from './updateExcludedAreas';
export * from './updateCustomAreas';
13 changes: 13 additions & 0 deletions src/actions/updateCustomAreas.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* eslint-disable @typescript-eslint/no-redeclare */
import { Action } from 'actions';

export type UPDATE_CUSTOM_AREAS = 'UPDATE_CUSTOM_AREAS';
export const UPDATE_CUSTOM_AREAS: UPDATE_CUSTOM_AREAS = 'UPDATE_CUSTOM_AREAS';

export type updateCustomAreas = (areas: string[]) => Action<UPDATE_CUSTOM_AREAS>;
export const updateCustomAreas = (areas: string[]): Action<UPDATE_CUSTOM_AREAS> => {
return {
type: UPDATE_CUSTOM_AREAS,
areas,
};
};
Binary file added src/assets/icons/hold-item/fairy-feather.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/assets/icons/hold-item/throat-spray.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/assets/icons/pokemon/regular/archaludon.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/assets/icons/pokemon/regular/basculegion.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/assets/icons/pokemon/regular/dipplin.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/assets/icons/pokemon/regular/fezandipiti.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/assets/icons/pokemon/regular/gouging-fire.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/assets/icons/pokemon/regular/hydrapple.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/assets/icons/pokemon/regular/iron-boulder.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/assets/icons/pokemon/regular/iron-crown.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/assets/icons/pokemon/regular/iron-leaves.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/assets/icons/pokemon/regular/munkidori.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.
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.
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.
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/assets/icons/pokemon/regular/ogerpon.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/assets/icons/pokemon/regular/okidogi.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/assets/icons/pokemon/regular/poltchageist.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/assets/icons/pokemon/regular/raging-bolt.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/assets/icons/pokemon/regular/sinistcha.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/assets/icons/pokemon/regular/walking-wake.png
77 changes: 76 additions & 1 deletion src/components/Credits/credits.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@
"link": "https://www.pinterest.ph/pin/297800594081702545/"
},
{
"role": "Thundurus-Therian, Sneasler",
"role": "Thundurus-Therian, Sneasler, Basculegion-F",
"name": "ewokakuaaede",
"link": "https://danbooru.donmai.us/posts?tags=ewokakukaede&z=1"
},
Expand Down Expand Up @@ -700,6 +700,81 @@
"role": "Charizard-Gmax",
"name": "irictran",
"link": "https://www.deviantart.com/irictran"
},
{
"role": "Chesnaught",
"name": "fusnryo",
"link": "https://danbooru.donmai.us/posts/5740962"
},
{
"role": "Walking Wake",
"name": "plive",
"link": "https://danbooru.donmai.us/posts/7032110?q=walking_wake"
},
{
"role": "Iron Leaves",
"name": "zeroartwo",
"link": "https://danbooru.donmai.us/posts/7348625?q=iron_leaves"
},
{
"role": "Gouging Fire",
"name": "kelvin trainerk",
"link": "https://danbooru.donmai.us/posts/7047880?q=gouging_fire"
},
{
"role": "Raging Bolt",
"name": "katkichi",
"link": "https://danbooru.donmai.us/posts/6571418?q=raging_bolt"
},
{
"role": "Pecharunt",
"name": "komepan",
"link": "https://danbooru.donmai.us/posts/7299876?q=pecharunt"
},
{
"role": "Archaludon",
"name": "nagi gaming",
"link": "https://danbooru.donmai.us/posts/7243183?q=archaludon"
},
{
"role": "Ogerpon",
"name": "siedorran",
"link": "https://danbooru.donmai.us/posts/7274755?q=ogerpon"
},
{
"role": "Ogerpon-wellspring",
"name": "enden",
"link": "https://danbooru.donmai.us/posts/7221314?q=ogerpon"
},
{
"role": "Ogerpon-heartflame",
"name": "qookidoe",
"link": "https://danbooru.donmai.us/posts/6711472?q=ogerpon"
},
{
"role": "Ogerpon-cornerstone",
"name": "truejakart",
"link": "https://danbooru.donmai.us/posts/7143933?q=ogerpon_%28cornerstone_mask%29+"
},
{
"role": "Hydrapple",
"name": "peace7322",
"link": "https://danbooru.donmai.us/posts/7043422?q=hydrapple+no_humans"
},
{
"role": "Dipplin",
"name": "momopatchi",
"link": "https://danbooru.donmai.us/posts/6667210?q=dipplin+no_humans"
},
{
"role": "Terpagos",
"name": "rei hinkitsu",
"link": "https://danbooru.donmai.us/posts/7068786?q=terapagos+no_humans"
},
{
"role": "Terapagos-terastal",
"name": "arc draws",
"link": "https://danbooru.donmai.us/posts/6108414?q=terapagos+no_humans"
}
]
}
2 changes: 1 addition & 1 deletion src/components/DataEditor/DataEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export class DataEditorBase extends React.Component<DataEditorProps, DataEditorS
const data = handleExceptions(JSON.parse(this.state.data));
const nuz = this.props.state;
// @NOTE this prevents previously undefined states from blowing up the app
const safeguards = { customTypes: [], customMoveMap: [], stats: [], excludedAreas: [] };
const safeguards = { customTypes: [], customMoveMap: [], stats: [], excludedAreas: [], customAreas: [] };
if (!Array.isArray(data.customMoveMap)) {
noop();
} else {
Expand Down
15 changes: 7 additions & 8 deletions src/components/PokemonEditor/CurrentPokemonEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import { CurrentPokemonInput } from 'components/PokemonEditor';
import { DeletePokemonButton } from 'components/DeletePokemonButton';
import { Autocomplete, ErrorBoundary } from 'components/Shared';
import { selectPokemon, editPokemon } from 'actions';
import { connect, useSelector } from 'react-redux';
import { connect } from 'react-redux';
import { listOfGames, accentedE } from 'utils';
import { PokemonIconBase, PokemonIconPlain } from 'components/PokemonIcon';
import { PokemonIconPlain } from 'components/PokemonIcon';
import { cx } from 'emotion';
import * as Styles from './styles';
const uuid = require('uuid');
Expand All @@ -45,7 +45,6 @@ import { State } from 'state';
import { CurrentPokemonLayoutItem } from './CurrentPokemonLayoutItem';
import { MoveEditor } from 'components/MoveEditor';
import { CheckpointsInputList } from 'components/TrainerEditor';
import { gameNameSelector } from 'selectors';
import { getImages, Image } from 'components/Shared/ImagesDrawer';

const pokeball = require('assets/pokeball.png').default;
Expand Down Expand Up @@ -82,6 +81,7 @@ export interface CurrentPokemonEditProps {
game: { name: Game; customName: string };
editor: Editor;
customTypes: State['customTypes'];
customAreas: State['customAreas'];
}

export interface CurrentPokemonEditState {
Expand Down Expand Up @@ -141,10 +141,7 @@ export function EvolutionSelection({ currentPokemon, onEvolve }) {
}
}

export class CurrentPokemonEditBase extends React.Component<
CurrentPokemonEditProps,
CurrentPokemonEditState
> {
export class CurrentPokemonEditBase extends React.Component<CurrentPokemonEditProps, CurrentPokemonEditState> {
public constructor(props: CurrentPokemonEditProps) {
super(props);
this.state = {
Expand Down Expand Up @@ -472,6 +469,7 @@ export class CurrentPokemonEditBase extends React.Component<

public render() {
const currentPokemon = this.getCurrentPokemon();
const { customAreas } = this.props;

if (currentPokemon == null) {
return (
Expand Down Expand Up @@ -583,7 +581,7 @@ export class CurrentPokemonEditBase extends React.Component<
key={this.state.selectedId + 'level'}
/>
<Autocomplete
items={listOfLocations}
items={[...listOfLocations, ...customAreas]}
name="met"
label="Met Location"
placeholder="Pallet Town"
Expand Down Expand Up @@ -685,6 +683,7 @@ export const CurrentPokemonEdit = connect(
game: state.game,
editor: state.editor,
customTypes: state.customTypes,
customAreas: state.customAreas,
}),
{
selectPokemon,
Expand Down
12 changes: 7 additions & 5 deletions src/components/PokemonEditor/PokemonEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import { connect } from 'react-redux';
import { Pokemon, Box as BoxModel, Boxes, Game } from 'models';
import { State } from 'state';
import { generateEmptyPokemon } from 'utils';
import { generateEmptyPokemon, listOfPokemon, matchSpeciesToTypes } from 'utils';
import { CurrentPokemonEdit } from '.';
import { AddPokemonButton } from 'components/AddPokemonButton';
import { BaseEditor } from 'components/BaseEditor';
Expand All @@ -18,10 +18,11 @@ export interface PokemonEditorProps {
game: Game;
style: State['style'];
excludedAreas: State['excludedAreas'];
customAreas: State['customAreas'];

// @NOTE: uncomment this if you need to auto-generate Pokemon
// will create failing tests as a warning to not push this :]
// addPokemon: addPokemon;
addPokemon: addPokemon;
}

export interface PokemonEditorState {
Expand Down Expand Up @@ -77,7 +78,7 @@ export class PokemonEditorBase extends React.Component<PokemonEditorProps, Pokem
// @NOTE: refactor so that there's an easier way to auto-generate Pokemon data
// const {team} = this.props;

// listOfPokemon.slice(906).forEach((value) => {
// listOfPokemon.slice(1008).forEach((value) => {
// this.props.addPokemon(
// generateEmptyPokemon(team, {
// species: value,
Expand All @@ -88,7 +89,7 @@ export class PokemonEditorBase extends React.Component<PokemonEditorProps, Pokem
}

public render() {
const { team, boxes, game, style, excludedAreas } = this.props;
const { team, boxes, game, style, excludedAreas, customAreas } = this.props;

return (
<>
Expand Down Expand Up @@ -128,7 +129,7 @@ export class PokemonEditorBase extends React.Component<PokemonEditorProps, Pokem
<CurrentPokemonEdit />
<BaseEditor name="Location Checklist" defaultOpen={false}>
<React.Suspense fallback={<Spinner />}>
<PokemonLocationChecklist excludedAreas={excludedAreas} boxes={boxes} style={style} pokemon={team} game={game} />
<PokemonLocationChecklist customAreas={customAreas} excludedAreas={excludedAreas} boxes={boxes} style={style} pokemon={team} game={game} />
</React.Suspense>
</BaseEditor>
</BaseEditor>
Expand Down Expand Up @@ -158,6 +159,7 @@ export const PokemonEditor = connect(
game: state.game,
style: state.style,
excludedAreas: state.excludedAreas,
customAreas: state.customAreas,
}),
{
addPokemon: addPokemon,
Expand Down
Loading

0 comments on commit d1b8791

Please sign in to comment.