Doesn't allow players to set some items as quick keys
Based on code by David Cernat and Learwolf.
Requires DataManager
Has to be require
d before any of the modules that use it.
You can find the configuration file in server/data/custom/__config_QuickKeyCleaner.json
after first server launch.
removeRefIds
array ofrefId
s that you want to be restricted. Default[]
.restrictedCells
array of cell names in which players will always have empty quick keys. Default[]
.hotkeyPlaceholder
type
type of permanent custom record used for the item replacing restricted hotkey items. Defaultmiscellaneous
.refId
of the placeholder item. Defaulthotkey_placeholder
.name
display name of the placeholder item. DefaultEmpty
.icon
of the placeholder item. Defaultm\misc_dwrv_Ark_cube00.tga
(dwemer puzzle box).
Methods:
registerFilter(func)
add a filter function that will be called every time arefId
is checked for being restricted. If the function returns false for arefId
, the item will be considered restricted.banItem(refId)
add an item to the restricted list dynamically. Does not change the config file and is not saved between restarts.unbanItem(refId)
remove an item from the restricted list dynamically. Does not change the config file and is not saved between restarts.filterQuickKeys(pid)
checks player data for restricted quick keys and clears them.clearSlots(pid, slots)
clears quick key slots in the arrayslots
for given user.