Skip to content

Profectus / features/resources/resource / Resource

Interface: Resource<T> ​

An object that represents a named and quantifiable resource in the game.

Extends ​

Type Parameters ​

• T = DecimalSource

Properties ​

[RefSymbol] ​

[RefSymbol]: true

Type differentiator only. We need this to be in public d.ts but don't want it to show up in IDE autocomplete, so we use a private Symbol instead.

Inherited from ​

Ref.[RefSymbol]

Defined in ​

node_modules/@vue/reactivity/dist/reactivity.d.ts:427


displayName ​

displayName: string

The name of this resource.

Defined in ​

profectus/src/features/resources/resource.ts:13


precision ​

precision: number

When displaying the value of this resource, how many significant digits to display.

Defined in ​

profectus/src/features/resources/resource.ts:15


small? ​

optional small: boolean

Whether or not to display very small values using scientific notation, or rounding to 0.

Defined in ​

profectus/src/features/resources/resource.ts:17

Accessors ​

value ​

Get Signature ​

get value(): T

Returns ​

T

Set Signature ​

set value(_): void

Parameters ​
_ ​

S

Returns ​

void

Inherited from ​

Ref.value

Defined in ​

node_modules/@vue/reactivity/dist/reactivity.d.ts:420