Skip to main content

sys.upgrades

sys.upgrades displays information about the upgrades present on the system.

Security Level

HIGHSEC

Syntax

CLI

sys.upgrades

Script

#hs.sys.upgrades()

Parameters

filter

The 'filter' parameter takes an object which can specify properties of the upgrade(s). Can take discrete values or MongoDB compatible queries, e.g. chars: { "$gte" : 2000 }

full

The 'full' parameter takes a boolean. If the value is set to true, sys.upgrades will display the full details object of each upgrade.

i

The 'i' parameter takes either a number or an array of numbers.

is_script

The 'is_script' parameter takes a boolean. If the value is set to true, sys.upgrades returns the same output as if the script was called inside of a script.

If it is false, it returns the same output as if the script was called from the CLI.

Return

Returns an object.

CLI

No parameters or invalid parameters:

>>sys.upgrades
To filter list, add filter:<filter object>; e.g. filter:{loaded:true, chars:{"$gte":2000}}
full:true for upgrade details
i:<index or array> to pre-filter on index(es)

000 tier_3 chat channel_count_v3
001 tier_3 script_space char_count_v3
002 tier_3 script_space public_script_v3
003 tier_3 script_space script_slot_v3

Script

{
i: 0,
loaded: true,
tier: 3,
rarity: 2,
name: "channel_count_v3",
type: "chat"
}
{
i: 1,
loaded: true,
tier: 3,
rarity: 1,
name: "char_count_v3",
type: "script_space"
}
{
i: 2,
loaded: true,
tier: 3,
rarity: 1,
name: "public_script_v3",
type: "script_space"
}
{
i: 3,
loaded: true,
tier: 3,
rarity: 1,
name: "script_slot_v3",
type: "script_space"
}

Example

function(context, args)
{
return #hs.sys.upgrades({ filter: { loaded: true }})
}