mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-28 12:23:24 +01:00
island tanks
This commit is contained in:
19 files changed
+138
-222
No files matched your search
@@ -19,7 +19,7 @@ export interface CompareEphemeral {
|
||||
|
||||
export const CompareEphemeral = new Soapstone<
|
||||
CompareEphemeral,
|
||||
[TankEnvironment]
|
||||
TankEnvironment
|
||||
>((environment) => ({
|
||||
environment,
|
||||
syncShells: false,
|
||||
|
||||
@@ -100,6 +100,6 @@ export type EmbedConfigItem = (
|
||||
|
||||
export type EmbedStateStore = Record<string, EmbedConfigItem["default"]>;
|
||||
|
||||
export const EmbedState = new Soapstone<EmbedStateStore, [EmbedStateStore]>(
|
||||
export const EmbedState = new Soapstone<EmbedStateStore, EmbedStateStore>(
|
||||
(data) => data
|
||||
);
|
||||
@@ -8,7 +8,9 @@ import { embedText } from "./tokens";
|
||||
|
||||
export function useEmbedStateCurry<Config extends EmbedConfig>() {
|
||||
// TODO: find a way to initialize with the correct state preset
|
||||
EmbedState.useInitialization(extractEmbedConfigDefaults(breakdownConfig));
|
||||
EmbedState.useInitialization(() =>
|
||||
extractEmbedConfigDefaults(breakdownConfig),
|
||||
);
|
||||
|
||||
function useEmbedState<Key extends keyof Config>(key: Key) {
|
||||
return EmbedState.use((state) => {
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface Guess {
|
||||
tiers: number[];
|
||||
}
|
||||
|
||||
export const Guess = new Soapstone<Guess, [number]>((tank) => ({
|
||||
export const Guess = new Soapstone<Guess, number>((tank) => ({
|
||||
tank,
|
||||
guessState: GuessState.NotGuessed,
|
||||
totalGuesses: 0,
|
||||
|
||||
@@ -18,4 +18,4 @@ export interface Mixer {
|
||||
};
|
||||
}
|
||||
|
||||
export const Mixer = new Soapstone<Mixer, [Mixer]>((data) => data);
|
||||
export const Mixer = new Soapstone<Mixer, Mixer>((data) => data);
|
||||
@@ -134,32 +134,30 @@ export enum TankopediaTab {
|
||||
|
||||
const skills = await api.skills();
|
||||
|
||||
export const Tankopedia = new Soapstone<Tankopedia, [TankDefinition]>(
|
||||
(tank) => ({
|
||||
disturbed: false,
|
||||
revealed: false,
|
||||
showControls: false,
|
||||
animate: true,
|
||||
export const Tankopedia = new Soapstone<Tankopedia, TankDefinition>((tank) => ({
|
||||
disturbed: false,
|
||||
revealed: false,
|
||||
showControls: false,
|
||||
animate: true,
|
||||
|
||||
tab: TankopediaTab.Sandbox,
|
||||
tab: TankopediaTab.Sandbox,
|
||||
|
||||
protagonist: createTankState(tank),
|
||||
antagonist: createTankState(tank),
|
||||
environment: createDefaultEnvironment(skills),
|
||||
protagonist: createTankState(tank),
|
||||
antagonist: createTankState(tank),
|
||||
environment: createDefaultEnvironment(skills),
|
||||
|
||||
relative_against: TankopediaRelativeAgainst.ClassAndTier,
|
||||
relative_against: TankopediaRelativeAgainst.ClassAndTier,
|
||||
|
||||
loaders: {
|
||||
display: {
|
||||
requested: TankopediaDisplay.Model,
|
||||
loaded: TankopediaDisplay.Model,
|
||||
},
|
||||
model: { requested: App.state.autoLoadModels, loaded: false },
|
||||
skin: { requested: undefined, loaded: undefined },
|
||||
attachment: { requested: undefined, loaded: undefined },
|
||||
loaders: {
|
||||
display: {
|
||||
requested: TankopediaDisplay.Model,
|
||||
loaded: TankopediaDisplay.Model,
|
||||
},
|
||||
model: { requested: App.state.autoLoadModels, loaded: false },
|
||||
skin: { requested: undefined, loaded: undefined },
|
||||
attachment: { requested: undefined, loaded: undefined },
|
||||
},
|
||||
|
||||
editStatic: false,
|
||||
xpMultiplier: 1,
|
||||
}),
|
||||
);
|
||||
editStatic: false,
|
||||
xpMultiplier: 1,
|
||||
}));
|
||||
Reference in new issue
Block a user