diff --git a/play.pokemonshowdown.com/src/battle-team-editor.tsx b/play.pokemonshowdown.com/src/battle-team-editor.tsx index 723d0d36b..f8e1cab1d 100644 --- a/play.pokemonshowdown.com/src/battle-team-editor.tsx +++ b/play.pokemonshowdown.com/src/battle-team-editor.tsx @@ -811,17 +811,6 @@ export class TeamEditor extends preact.Component<{ this.wizard = wizard; this.forceUpdate(); }; - static renderTypeIcon(type: string | null, b?: boolean) { // b is just for utilichart.js - if (!type) return null; - - type = Dex.types.get(type).name; - if (!type) type = '???'; - let sanitizedType = type.replace(/\?/g, '%3f'); - return {type}; - } static probablyMobile() { return document.body.offsetWidth < 500; } @@ -1599,11 +1588,11 @@ class TeamTextbox extends preact.Component<{ {editor.gen === 9 ? ( - {TeamEditor.renderTypeIcon(set.teraType || species.requiredTeraType || species.types[0])} + ) : editor.hpTypeMatters(set) ? ( - {TeamEditor.renderTypeIcon(editor.getHPType(set))} + ) : ( @@ -1676,17 +1665,11 @@ class TeamTextbox extends preact.Component<{ const num = Dex.getPokemonIconNum(species.id); if (!num) return null; - const top = Math.floor(num / 12) * 30; - const left = (num % 12) * 40; - const iconStyle = `background:transparent url(${Dex.resourcePrefix}sprites/pokemonicons-sheet.png) no-repeat scroll -${left}px -${top}px`; - - const itemStyle = set.item && Dex.getItemIcon(editor.dex.items.get(set.item)); - if (editor.narrow) { return
-
- {species.types.map(type =>
{TeamEditor.renderTypeIcon(type)}
)} -
+
+ {species.types.map(type =>
)} +
; } return [
-
{species.types.map(type => TeamEditor.renderTypeIcon(type))}
+
{species.types.map(type => )}
,
{this.renderStats(set, i)}
,
@@ -1909,7 +1892,7 @@ class TeamWizard extends preact.Component<{
@@ -1966,7 +1949,7 @@ class TeamWizard extends preact.Component<{
)} {editor.canAdd() &&
  • ; }); diff --git a/play.pokemonshowdown.com/src/client-main.ts b/play.pokemonshowdown.com/src/client-main.ts index 9114eabce..49cd388e1 100644 --- a/play.pokemonshowdown.com/src/client-main.ts +++ b/play.pokemonshowdown.com/src/client-main.ts @@ -159,7 +159,7 @@ class PSPrefs extends PSStreamModel { afd: boolean | 'sprites' = false; highlights: Record | null = null; - logtimes: Record | null = null; + logtimes: { [serverid: ID]: { [roomid: RoomID]: number } } | null = null; // PREFS END HERE diff --git a/play.pokemonshowdown.com/src/panels.tsx b/play.pokemonshowdown.com/src/panels.tsx index 4d8bc7965..233fc3e6e 100644 --- a/play.pokemonshowdown.com/src/panels.tsx +++ b/play.pokemonshowdown.com/src/panels.tsx @@ -916,7 +916,7 @@ export class PSView extends preact.Component { export function PSIcon( props: { pokemon: string | Pokemon | ServerPokemon | Dex.PokemonSet | null } | - { item: string } | { type: string, b?: boolean } | { category: string } + { item: string | null } | { type: string, b?: boolean } | { category: string } ) { if ('pokemon' in props) { return ; @@ -930,7 +930,7 @@ export function PSIcon( let sanitizedType = type.replace(/\?/g, '%3f'); return {type}; } if ('category' in props) { @@ -948,7 +948,7 @@ export function PSIcon( } return {sanitizedCategory}; } return null!; diff --git a/play.pokemonshowdown.com/style/teambuilder.css b/play.pokemonshowdown.com/style/teambuilder.css index 25105d316..20fac79af 100644 --- a/play.pokemonshowdown.com/style/teambuilder.css +++ b/play.pokemonshowdown.com/style/teambuilder.css @@ -633,6 +633,9 @@ you can't delete it by pressing Backspace */ .set-button .set-ability .button, .set-button .set-item .button { height: 40px; } +.set-item .itemicon { + float: right; +} .set-button .set-moves .button { line-height: 18px; }