UNPKG

@kitten-science/kitten-analysts

Version:
22 lines 865 B
import { ucfirst } from "@kitten-science/kitten-scientists/tools/Format.js"; import { roundTo } from "@oliversalzburg/js-utils/math/core.js"; import { gaugeFactory } from "./factory.js"; export const kg_resource_value = (cache, remote) => gaugeFactory({ cache, extract(client_type, guid, location, element, subject) { subject.set({ client_type, craftable: element.craftable.toString(), guid, label: ucfirst(element.label), location, name: element.name, }, roundTo(element.value, 2)); }, help: "How many of the given resource are in your resource pool.", labelNames: ["client_type", "guid", "name", "label", "location", "craftable"], name: "kg_resource_value", remote, require: "getResourcePool", }); //# sourceMappingURL=kg_resource_value.js.map