Fixed broken links
This commit is contained in:
parent
717f13ebe0
commit
be96fcdd38
3 changed files with 20 additions and 20 deletions
|
@ -15,7 +15,7 @@ import { computed, unref } from "vue";
|
||||||
/** An object that configures a {@link Conversion}. */
|
/** An object that configures a {@link Conversion}. */
|
||||||
export interface ConversionOptions {
|
export interface ConversionOptions {
|
||||||
/**
|
/**
|
||||||
* The scaling function that is used to determine the rate of conversion from one {@link Resource} to the other.
|
* The scaling function that is used to determine the rate of conversion from one {@link features/resources/resource.Resource} to the other.
|
||||||
*/
|
*/
|
||||||
scaling: ScalingFunction;
|
scaling: ScalingFunction;
|
||||||
/**
|
/**
|
||||||
|
@ -41,11 +41,11 @@ export interface ConversionOptions {
|
||||||
*/
|
*/
|
||||||
nextAt?: Computable<DecimalSource>;
|
nextAt?: Computable<DecimalSource>;
|
||||||
/**
|
/**
|
||||||
* The input {@link Resource} for this conversion.
|
* The input {@link features/resources/resource.Resource} for this conversion.
|
||||||
*/
|
*/
|
||||||
baseResource: Resource;
|
baseResource: Resource;
|
||||||
/**
|
/**
|
||||||
* The output {@link Resource} for this conversion. i.e. the resource being generated.
|
* The output {@link features/resources/resource.Resource} for this conversion. i.e. the resource being generated.
|
||||||
*/
|
*/
|
||||||
gainResource: Resource;
|
gainResource: Resource;
|
||||||
/**
|
/**
|
||||||
|
@ -76,7 +76,7 @@ export interface ConversionOptions {
|
||||||
/**
|
/**
|
||||||
* An additional modifier that will be applied to the gain amounts.
|
* An additional modifier that will be applied to the gain amounts.
|
||||||
* Must be reversible in order to correctly calculate {@link nextAt}.
|
* Must be reversible in order to correctly calculate {@link nextAt}.
|
||||||
* @see {@link createSequentialModifier} if you want to apply multiple modifiers.
|
* @see {@link game/modifiers.createSequentialModifier} if you want to apply multiple modifiers.
|
||||||
*/
|
*/
|
||||||
gainModifier?: WithRequired<Modifier, "revert">;
|
gainModifier?: WithRequired<Modifier, "revert">;
|
||||||
/**
|
/**
|
||||||
|
@ -84,7 +84,7 @@ export interface ConversionOptions {
|
||||||
* That is to say, this modifier will be applied to the amount of baseResource before going into the scaling function.
|
* That is to say, this modifier will be applied to the amount of baseResource before going into the scaling function.
|
||||||
* A cost modifier of x0.5 would give gain amounts equal to the player having half the baseResource they actually have.
|
* A cost modifier of x0.5 would give gain amounts equal to the player having half the baseResource they actually have.
|
||||||
* Must be reversible in order to correctly calculate {@link nextAt}.
|
* Must be reversible in order to correctly calculate {@link nextAt}.
|
||||||
* @see {@link createSequentialModifier} if you want to apply multiple modifiers.
|
* @see {@link game/modifiers.createSequentialModifier} if you want to apply multiple modifiers.
|
||||||
*/
|
*/
|
||||||
costModifier?: WithRequired<Modifier, "revert">;
|
costModifier?: WithRequired<Modifier, "revert">;
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ export interface BaseConversion {
|
||||||
convert: VoidFunction;
|
convert: VoidFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** An object that converts one {@link Resource} into another at a given rate. */
|
/** An object that converts one {@link features/resources/resource.Resource} into another at a given rate. */
|
||||||
export type Conversion<T extends ConversionOptions> = Replace<
|
export type Conversion<T extends ConversionOptions> = Replace<
|
||||||
T & BaseConversion,
|
T & BaseConversion,
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,12 +5,12 @@ import { isRef } from "vue";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A symbol to use as a key for a vue component a feature can be rendered with
|
* A symbol to use as a key for a vue component a feature can be rendered with
|
||||||
* @see {@link VueFeature}
|
* @see {@link util/vue.VueFeature}
|
||||||
*/
|
*/
|
||||||
export const Component = Symbol("Component");
|
export const Component = Symbol("Component");
|
||||||
/**
|
/**
|
||||||
* A symbol to use as a key for a prop gathering function that a feature can use to send to its component
|
* A symbol to use as a key for a prop gathering function that a feature can use to send to its component
|
||||||
* @see {@link VueFeature}
|
* @see {@link util/vue.VueFeature}
|
||||||
*/
|
*/
|
||||||
export const GatherProps = Symbol("GatherProps");
|
export const GatherProps = Symbol("GatherProps");
|
||||||
|
|
||||||
|
|
|
@ -32,22 +32,22 @@ export interface FeatureNode {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An injection key that a {@link Context} will use to provide a function that registers a {@link FeatureNode} with the given id and HTML element.
|
* An injection key that a {@link ContextComponent} will use to provide a function that registers a {@link FeatureNode} with the given id and HTML element.
|
||||||
*/
|
*/
|
||||||
export const RegisterNodeInjectionKey: InjectionKey<(id: string, element: HTMLElement) => void> =
|
export const RegisterNodeInjectionKey: InjectionKey<(id: string, element: HTMLElement) => void> =
|
||||||
Symbol("RegisterNode");
|
Symbol("RegisterNode");
|
||||||
/**
|
/**
|
||||||
* An injection key that a {@link Context} will use to provide a function that unregisters a {@link FeatureNode} with the given id.
|
* An injection key that a {@link ContextComponent} will use to provide a function that unregisters a {@link FeatureNode} with the given id.
|
||||||
*/
|
*/
|
||||||
export const UnregisterNodeInjectionKey: InjectionKey<(id: string) => void> =
|
export const UnregisterNodeInjectionKey: InjectionKey<(id: string) => void> =
|
||||||
Symbol("UnregisterNode");
|
Symbol("UnregisterNode");
|
||||||
/**
|
/**
|
||||||
* An injection key that a {@link Context} will use to provide a ref to a map of all currently registered {@link FeatureNode}s.
|
* An injection key that a {@link ContextComponent} will use to provide a ref to a map of all currently registered {@link FeatureNode}s.
|
||||||
*/
|
*/
|
||||||
export const NodesInjectionKey: InjectionKey<Ref<Record<string, FeatureNode | undefined>>> =
|
export const NodesInjectionKey: InjectionKey<Ref<Record<string, FeatureNode | undefined>>> =
|
||||||
Symbol("Nodes");
|
Symbol("Nodes");
|
||||||
/**
|
/**
|
||||||
* An injection key that a {@link Context} will use to provide a ref to a bounding rect of the Context.
|
* An injection key that a {@link ContextComponent} will use to provide a ref to a bounding rect of the Context.
|
||||||
*/
|
*/
|
||||||
export const BoundsInjectionKey: InjectionKey<Ref<DOMRect | undefined>> = Symbol("Bounds");
|
export const BoundsInjectionKey: InjectionKey<Ref<DOMRect | undefined>> = Symbol("Bounds");
|
||||||
|
|
||||||
|
@ -93,14 +93,14 @@ export interface Position {
|
||||||
/**
|
/**
|
||||||
* An object that configures a {@link Layer}.
|
* An object that configures a {@link Layer}.
|
||||||
* Even moreso than features, the developer is expected to include extra properties in this object.
|
* Even moreso than features, the developer is expected to include extra properties in this object.
|
||||||
* All {@link persistent} refs must be included somewhere within the layer object.
|
* All {@link game/persistence.Persistent} refs must be included somewhere within the layer object.
|
||||||
*/
|
*/
|
||||||
export interface LayerOptions {
|
export interface LayerOptions {
|
||||||
/** The color of the layer, used to theme the entire layer's display. */
|
/** The color of the layer, used to theme the entire layer's display. */
|
||||||
color?: Computable<string>;
|
color?: Computable<string>;
|
||||||
/**
|
/**
|
||||||
* The layout of this layer's features.
|
* The layout of this layer's features.
|
||||||
* When the layer is open in {@link player.tabs}, this is the content that is display.
|
* When the layer is open in {@link game/player.PlayerData.tabs}, this is the content that is display.
|
||||||
*/
|
*/
|
||||||
display: Computable<CoercableComponent>;
|
display: Computable<CoercableComponent>;
|
||||||
/** An object of classes that should be applied to the display. */
|
/** An object of classes that should be applied to the display. */
|
||||||
|
@ -109,7 +109,7 @@ export interface LayerOptions {
|
||||||
style?: Computable<StyleValue>;
|
style?: Computable<StyleValue>;
|
||||||
/**
|
/**
|
||||||
* The name of the layer, used on minimized tabs.
|
* The name of the layer, used on minimized tabs.
|
||||||
* Defaults to {@link id}.
|
* Defaults to {@link BaseLayer.id}.
|
||||||
*/
|
*/
|
||||||
name?: Computable<string>;
|
name?: Computable<string>;
|
||||||
/**
|
/**
|
||||||
|
@ -119,7 +119,7 @@ export interface LayerOptions {
|
||||||
minimizable?: Computable<boolean>;
|
minimizable?: Computable<boolean>;
|
||||||
/**
|
/**
|
||||||
* Whether or not to force the go back button to be hidden.
|
* Whether or not to force the go back button to be hidden.
|
||||||
* If true, go back will be hidden regardless of {@link projInfo.allowGoBack}.
|
* If true, go back will be hidden regardless of {@link data/projInfo.allowGoBack}.
|
||||||
*/
|
*/
|
||||||
forceHideGoBack?: Computable<boolean>;
|
forceHideGoBack?: Computable<boolean>;
|
||||||
/**
|
/**
|
||||||
|
@ -146,7 +146,7 @@ export interface BaseLayer {
|
||||||
on: OmitThisParameter<Emitter<LayerEvents>["on"]>;
|
on: OmitThisParameter<Emitter<LayerEvents>["on"]>;
|
||||||
/** A function to emit a {@link LayerEvents} event to this layer. */
|
/** A function to emit a {@link LayerEvents} event to this layer. */
|
||||||
emit: <K extends keyof LayerEvents>(...args: [K, ...Parameters<LayerEvents[K]>]) => void;
|
emit: <K extends keyof LayerEvents>(...args: [K, ...Parameters<LayerEvents[K]>]) => void;
|
||||||
/** A map of {@link FeatureNode}s present in this layer's {@link Context} component. */
|
/** A map of {@link FeatureNode}s present in this layer's {@link ContextComponent} component. */
|
||||||
nodes: Ref<Record<string, FeatureNode | undefined>>;
|
nodes: Ref<Record<string, FeatureNode | undefined>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,8 +230,8 @@ export function createLayer<T extends LayerOptions>(
|
||||||
/**
|
/**
|
||||||
* Enables a layer object, so it will be updated every tick.
|
* Enables a layer object, so it will be updated every tick.
|
||||||
* Note that accessing a layer/its properties does NOT require it to be enabled.
|
* Note that accessing a layer/its properties does NOT require it to be enabled.
|
||||||
* For dynamic layers you can call this function and {@link removeLayer} as necessary. Just make sure {@link projEntry.getInitialLayers} will provide an accurate list of layers based on the player data object.
|
* For dynamic layers you can call this function and {@link removeLayer} as necessary. Just make sure {@link data/projEntry.getInitialLayers} will provide an accurate list of layers based on the player data object.
|
||||||
* For static layers just make {@link projEntry.getInitialLayers} return all the layers.
|
* For static layers just make {@link data/projEntry.getInitialLayers} return all the layers.
|
||||||
* @param layer The layer to add.
|
* @param layer The layer to add.
|
||||||
* @param player The player data object, which will have a data object for this layer.
|
* @param player The player data object, which will have a data object for this layer.
|
||||||
*/
|
*/
|
||||||
|
@ -291,7 +291,7 @@ export function reloadLayer(layer: GenericLayer): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility function for creating a modal that display's a {@link layer.display}.
|
* Utility function for creating a modal that display's a {@link LayerOptions.display}.
|
||||||
* Returns the modal itself, which can be rendered anywhere you need, as well as a function to open the modal.
|
* Returns the modal itself, which can be rendered anywhere you need, as well as a function to open the modal.
|
||||||
* @param layer The layer to display in the modal.
|
* @param layer The layer to display in the modal.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue