31 lines
697 B
TypeScript
31 lines
697 B
TypeScript
export interface ModifiableData<T> {
|
|
mod: T;
|
|
}
|
|
|
|
export interface HasBase<T> {
|
|
base: T;
|
|
}
|
|
export interface ModifiableDataBase<T> extends ModifiableData<T>, HasBase<T> {}
|
|
|
|
export interface HasTotal<T> {
|
|
total: T;
|
|
}
|
|
|
|
export interface ModifiableDataTotal<T> extends ModifiableData<T>, HasTotal<T> {}
|
|
|
|
export interface ModifiableDataBaseTotal<T> extends ModifiableDataBase<T>, HasTotal<T> {}
|
|
|
|
export interface ResourceData<T> extends ModifiableData<T> {
|
|
value: T;
|
|
}
|
|
|
|
export interface HasMax<T> {
|
|
max: T;
|
|
}
|
|
|
|
export interface ResourceDataBaseTotalMax<T> extends ResourceData<T>, HasBase<T>, HasTotal<T>, HasMax<T> {}
|
|
|
|
export interface UsableResource<T> {
|
|
total: T;
|
|
used: T;
|
|
}
|