Changelog
0.35.1 (2024-11-20)
Add
cleanUpItemFromCraftedItemsTable
to inventory api (needed for nss_quests 1.6.4).
What must be considered during update?
Nothing.
0.35.0 (2024-08-04)
Update README to make it clearer that only developers need the
config.demo.lua
and config files in the modules.When a resource is stopped, the
AttachPropApi
only outputs a message that props are being removed if the stopped resource had previously been created these props withnss_libs
.Add
onBankInventoryOpen()
,onMoveToCustomInventory()
,onMoveToBankInventory()
,onTakeFromCustomInventory()
andonTakeFromBankInventory()
toNssLibsInventoryApi
.Add
addSourceToCallback()
,doNotAddSourceToCallback()
,getResourceName()
,setCustomData()
andgetCustomData()
toNssLibsSharedHelperEventHandlerApi
.Add
createCallbackApi(callback, resource_name)
toNssLibsHelper
(client and server side) which returns an api to handle the callback e.g. viaapi:disable()
orapi:call('hello world')
.Add
getNearestPlayersInRadius()
toNssLibsClientHelper
.Add
priority
to notification methods inNssLibsNotifyApi
.
What must be considered during update?
Nothing.
0.34.0 (2024-05-22)
NssLibsInventoryApi.registerUsableItem
callback now returns item id, crafted id and item label of used item.NssLibsInventoryApi.subItem
now optionally considers the metadata.Add
setItemMetadata
andsubItemByCraftedId
toNssLibsInventoryApi
.
What must be considered during update?
Nothing.
0.33.0 (2024-04-15)
Fix "404 not found" in
NssClient
module.Add method
isTableEqual
toNssLibsSharedHelper
.Add methods
onGroupChange
,onJobChange
,onJobGradeChange
,getSourceOfChar
andgetSteamIdOfChar
toNssLibsCharacter
api.NssLibsCharacterApi
now uses the VORP cache instead of database for job and group information. VORP does not save changes of jobs and groups directly to the database. So we have to use the VORP cache.All instances of
char_data
formNssLibsCharacterApi
are now singletons. If a group, job or job grade changes, then the singletons will be updated with the new data.
What must be considered during update?
Nothing.
0.32.0 (2024-03-30)
Add
playAnimation()
andrequestAnimDict()
toNssLibsClientHelper
.Fix thread id check
NssLibsSharedHelper:createThreadSafeMonitor
. Monitor now stops if:stop()
is called.
What must be considered during update?
Nothing.
0.31.0 (2024-03-26)
Add
appendTo()
toNssButtons
ui component.Fix
getClientCharacterApi
so it now returns the requested character api.Fix
NssLibsSharedHelper:createThreadSafeMonitor
now uses the correctgetUniqueId
method considering client and server.Update arguments for
vorp_inventory:useItem
to new version3.5
ofvorp_inventory
(use nowdata
object withid
anditem
instead of argumentsitemId
anditemName
).
What must be considered during update?
Update
vorp_inventory
to version3.5.0
or higher.Note: If you can not update
vorp_inventory
to version3.5.0
or higher, then do not updatenss_libs
to version0.31.0
or higher.
0.30.0 (2024-03-02)
Add
setMovementDetectionSensitivity()
toNssLibsPromptsGroupApi
.Add
hideOnMovement()
,showOnMovement()
andisHideOnMovement()
toNssLibsPromptsPromptApi
.Fix issues with prompts on movement detection.
Add special notes to
NssLibsPromptsPromptApi
group restriction documentation.
What must be considered during update?
Nothing.
0.29.0 (2024-02-23)
Add
getEntitiesNearby()
toNssLibsEntityInRangeApi
.Add
createResourceEventName()
,padWithZeros()
,dateToUnixTimestamp()
andunixTimestampToDate()
toNssLibsSharedHelper
.Add
getCurrentServerTimestamp()
andgetCurrentMsTimestamp()
toNssLibsClientHelper
.Change
getCurrentTimestamp()
to a local way in the client.Add property
required_message
toNssLibsConfigValidatorRule
.Extend the logic for
serverIsReady()
andonServerReady()
. Now ships info about timeout and can ship additional data.Make
serverIsReady()
andonServerReady()
silent in server console.Add
getHandle()
toNssLibsParticleFxPlayerApi
.Add
closeInventory()
toNssLibsInventoryApi
.Add
NssLibsClientCharacterApi
for the client and prepare a demo bridge to VORP for it.Rename
allowDuringDuringHogtied
,forbidDuringDuringHogtied
,allowDuringDuringMovement
andforbidDuringDuringMovement
toallowDuringHogtied
,forbidDuringHogtied
,allowDuringMovement
andforbidDuringMovement
inNssLibsPromptsPromptApi
(remove doubleduring
in name).NssLibsServerHelper:addEventHandler()
now returns an api to handle the event handler e.g. viaapi:destroy()
.NssLibsClientHelper:addEventHandler()
now returns an api to handle the event handler e.g. viaapi:destroy()
.Extend the documentation of the
NssLibsHelper
module.Extend the documentation of the
NssLibsCharacter
module.Add more details to error messages in
NssLibsPrompts
module if the given key for a prompt is not valid.Add
higher_or_equal_as_number_properties
,pre_check_rule
anddoes_not_exists
rules toNssLibsConfigValidator
.Add
hasOneOfTheJobs()
,hasJob()
,hasJobGrade()
andisEmployed()
toNssLibsCharacterItem
.Fix
_isEntityValid()
ofNssLibsSharedHelper
now recognizes custom filter function correctly.Fix
createThreadSafeMonitor()
ofNssLibsSharedHelper
now returns a monitor object.Fix missing array of strings in
contains
rule self test ofNssLibsConfigValidator
.
What must be considered during update?
Ensure that
allowDuringHogtied
,forbidDuringHogtied
,allowDuringMovement
andforbidDuringMovement
ofNssLibsPromptsPromptApi
is used correctly in your own developed resources.
0.28.1 (2023-12-12)
Add rules
max
,higher_as_number_properties
andlinked_with_properties
to rule set ofNssLibsConfigValidator
.
0.28.0 (2023-12-11)
Add
addGold
,hasGold
andsubGold
toNssLibsCharacter
module.Add
getGoldImage
,getWeaponImage
,getWeaponImages
,canCarryWeapon
andcreateWeapon
toNssLibsInventory
module.Add type
weapon
toConfigValidator
module.Ensure prints containing only strings to prevent
SCRIPT ERROR: error object is not a string
.
0.27.1 (2023-11-24)
Fix endless while loop in
InventoryClient:getUsedFramework()
, thx to @Valko.Add
createThreadSafeMonitor()
toNssLibsSharedHelper
module.Make file name more detailed in
NssLibsServerHelper:requireFiles()
error message (white spaces are now visible).Fix and remove some print outputs.
0.27.0 (2023-10-09)
Add
NssLibsAttachProp
module.NssLibsSharedHelper:hasTableEntries()
initially checks fornil
before checking for entries.Add
fireToAll(event_name, ...)
toClientEventApi
module.Add
getPlayersInRadius()
,getPlayerClientIdsInRadius()
andgetPlayerServerIdsInRadius()
toNssLibsClientHelper
module.Add named keys to
NssLibsPromptsApi
so you can give "E" instead of hash as key value.
0.26.0 (2023-08-03)
Add
NssLibsNotify
module/api.Add
NssLibsConfigValidator
module/api.Add
waitUntilLoadingsScreenEnds()
toNssLibsClientHelper
module.Add
isFloat()
,isFunction()
,isTableArray()
andisTable()
toNssLibsSharedHelper
module.Add
setRadius()
andcreateRadiusAtCoords()
toNssLibsBlip
module.Add
getCharacterByCharId()
toNssLibsCharacterApi
module.Add
serverIsReady()
toNssLibsServerListenerApi
module.Add
onServerReady()
toNssLibsServerEventApi
module.Add
getRandomArrayElement()
toNssHelper
ui module.Title of blips are now shown.
0.25.3 (2023-07-13)
Add
requireFiles()
toNssLibsServerHelper
module.Add
existsItemInDb()
andrequireItemsInDb()
toNssLibsInventoryApi
module.Add
onConnected()
andisStarted()
toNssLibsDatabase
module.
0.25.2 (2023-06-30)
Fix null pointer exception in
NssTip
ui module.Add more meaningful error messages for database errors in
NssLibsDatabase
module.Add more meaningful documentation for
NssLibsDatabase
module.
0.25.1 (2023-06-29)
config.demo.lua
is not encrypted anymore. README.md is updated.
0.25.0 (2023-06-28)
getFirstFoundWrapper
ofNssLibsServerHelper
now returns additionally the resource name.Extend
Inventory
module by client side, e.g. to use items and weapons.Add
debounce
toNssHelper
ui module.Add
hide
toNssTip
ui module.Add
debounced
toNssLibsSharedHelper
module.Inventory change listener is now debounced to prevent multiple calls of same cause/reason.
ClientEvent
module now checks correctly if no callbacks are available.listenInventoryChange
ofNssLibsInventoryApi
listen now to more Vorp Inventory events.If multiple sounds are start playing at same time the master volume is now used correctly in
NssAudio
ui module.NssHelper.debounce
andNsshelper.debounceClock
now considering arguments for debounced function.
0.24.0 (2023-05-06)
Add mock for
NssClient
UI module to simulate LUA client calls and NUI calls in your local browser during development.Add
getHelper()
toNssUiComponentInterface
UI module.Add new font to
NssResponsive
UI module.Add pitching to
NssAudio
UI module.Add
SVG to CSS mask-image
feature toNssSvgReplacer
UI module.Prevent duplicated mouse events for
NssPadLock
.Add code caching to
NssPadLock
.Add
getUserInventory
andlistenInventoryChange
toNssLibsInventoryApi
module.Add
debouncedClock
toNssLibsSharedHelper
module.Add
addEventHandler
toNssLibsClientHelper
andNssLibsServerHelper
modules.XHR loading indicator now works as expected in
NssClient
ui module.Move GIF animation to CSS for
NssLoadingIndicator
ui module.Add
setMasterVolumeInPercent
andresetMasterVolumeInPercent
toNssAudio
ui module.Steam profile url in
NssLibsCharacterApi
is now correctly formatted.Add
createObjectClone
toNssHelper
ui module.
0.23.0 (2023-04-03)
Encapsulate
NssLibsPromptsPromptApi
callbacks in separate threads to prevent blocking the main thread.NPC
module uses newNssLibsChunk
module instead ofPointInRange
for better performance. The size of the chunks in theNssLibsChunk
module is adjustable. TheNPC
module has high radius of 100 meters and more which causes in extreme high counts of chunks in thePointOfRange
module. In theNssLibsChunk
module with higher chunk size the count of chunks are reduced. That saves CPU and memory usage.The
PointInRange
module now has a limit to prevent too much CPU and memory usage at high radius.Add "buffer" chunks to
NssLibsChunk
to ensure that a coordinate directly on the border of a chunk is still recognized.Add restrictions to
Prompts
module, like allow or forbid prompt enabled on mount.Fix press/release events for prompts with multiple keys.
0.22.0 (2023-03-30)
Add new module
NssLibsChunk
.Add new methods to
NssLibsPromptsGroupApi
:linkToCoords
- Links prompt group to specific coordinates.linkToEntity
- Links prompt group to specific entity.linkToPlayer
- Links prompt group to specific player.linkToEntityModels
- Links prompt group to specific entity models.
Add new methods to
NssLibsPromptsPromptApi
:disableOnMoveOn
- Disables prompt if player moves.disableOnMoveOff
- Do not disable prompt if player moves.
Extend
NssLibsPromptsPromptApi
to add on-press/on-release mode.Add new methods
getDecimalCount
,inlineError
andinlineWarning
toNssLibsSharedHelper
.Add new method
getUid
toNssLibsClass
.Add new method
disablePlaceOnGround
,enablePlaceOnGround
andgetEntity
toNssLibsNpcEntityApi
.Optimize system messages if a resource stops. Only messages from modules that have related dependencies to the stopped resource will be shown.
Add dependency check to
VersionCheck
module.
0.21.2
Properties now inheriting correctly from child classes in
NssLibsClass
.Refactor
Class
to useNssLibsClass
internally.Remove
NssLibsClass
from exports because "deeper" functions are not shareable in exports.Add new optional argument
entity_type
togetNearestObjectEntity
inEntityInRangeApi
.Add new static constants
ENTITY_TYPE_OBJECT
,ENTITY_TYPE_PLAYER
andENTITY_TYPE_VEHICLE
toEntityInRangeApi
.NssLibsCharacterApi:getCharacterByName()
now checks the steam id correctly.Replace
config.lua
withconfig.demo.lua
to prevent overwriting the config file on update.Add
config.demo.lua
toNssLibsCharacterApi
to offer new debug option (create copy namedconfig.lua
in that folder to use it).
0.21.1
Blip
color now overwrites other blip modifiers.NPC
has new methodsonShow
,onHide
,onTimeWindowChange
,onTimeWindowChange
,hasTimeWindows
andisInTimeWindow
.
0.21.0
Refactor whole
NssLibsBlip
module.
0.20.1
NssLibsPointInRangeApi
now optionally ignores the nearest check for a point.Performance improvement for
NssLibsNpcApi
. Only NPCs in range will be checked if they are visible by time window.
0.20.0
Add new
NPC
api. Easy to create Non-Player-Character (NPC) for your REDM resource.Optimize
NssLibsSharedHelper:toFloat
method to prevent nil pointer exception.Add
NssLibsSharedHelper:toInt
method.NssLibsPointInRange:unListen
now consider empty chunks correctly.Add more delay to automatic restart of resources by
DependencyAutoRestart
ifnss_libs
restarts to prevent crashes.
0.19.0
Add new
Prompts
api.Add new
ParticleFxPlayer
api.Fix null pointer exception in
EntityInRange
api.Fix wrong return value in
NssLibsSharedHelper:getHashKey
Add
send
toNssClientApi
to send a message to the client.playAudio
ofNssAudio
now returns a promise which resolves when the audio is ended.Add
getId()
toNssLibsPointInRangeListenerApi
.Fix null pointer exception in
PointInRange
if no "on leave" callback is set.Fix calling init on source class instead of child class on inherited classes.
Fix wrong
getModelHash
(togetHashKey
) method inNssLibsEntityInRangeApi
.getNearestObjectEntity
inNssLibsEntityInRangeApi
ignores now listener check.Add new method
getNearestObjectEntity
toNssLibsEntityInRangeApi
.Add new methods
stop
,loopAudio
,getDurationInPercent
,getCurrentTime
,getDuration
toNssAudio
ui component.Fix wrong admin group name in
NssLibsCharacterApi
.
0.18.1
Add new method
setWebhookUrl
,setUsername
,setAvatarUrl
andmessage
to Discord API (NssLibsDiscordApi
).Extend Discord API documentation.
0.18.0
Add integrated sound fx to
NssAudio
ui component.Update
NssModal
ui component with new integrated sound fx.Add server player id to character data if available.
Add date and timestamp methods to helper modules.
Loading indicator now hides correctly on
NssClient
requests with callbacks.Add events to call "nss_libs loaded and started".
Add
getDate(format)
toNssLibsClientHelper
module.Move some sensitive config vars to
internal_cfg.lua
.Add "Last allowed version" feature to version check.
Prevent loading version urls from cache.
Refactor
Helper
module into separate server and client helper modules.Fix wrong argument name in
NssLibsSharedHelper:getHashKey()
.Refactor
EntityInRangeApi
(clear instead destroy item sets).Add loading indicator to
NssClient
ui component if a callback is given topost
method.Add
getUniqueId()
method toNssHelper
class.Fix missing fade animation for
NssLoadingIndicator
ui component.
0.17.0
Added
NssLoadingIndicator
ui component.Added
NssAudio
ui component.Switch all ui components to new base class.
Fix "editable" method in
NssModal
ui component.
0.16.5
NssModal
now consider if the user currently typing in an editable element (like input or textarea) and prevents the modal from closing if a close key was pressed during typing.Add some content to some readme files ;)
0.16.4
Add method
strTrim
toNssLibsHelper
.Add method
getCharacterByName
toNssLibsCharacter
module.Add sounds to
NssButtons
ui component.Add
NssButtons
toNssConfirm
ui component.Add
Character:getCharacterByName
.
0.16.3
Rename
Helper
toNssLibsHelper
to avoid namespace conflicts.Remove deprecated custom
Promises
class.Add
NssClient
LUA module toNssClient
ui component.Fix method name in
Inventory
module.Add timeout to
ServerEvent.await
method.Add README.md for
Discord
module.Add
NssModal
ui component.
0.16.2
Extend
Helper
module withcreateWrapperFinder
,getKeysFromTable
,getCurrentTimestamp
,waitUntilFirstStarted
,waitUntilStarted
anddoUntilTimeout
functions.Character
module now waits/searches for first loaded character framework.Inventory
module now waits/searches for first loaded inventory framework.
0.16.1
Add
RegisterUsableItem
toInventory
module.
0.16.0
Add
DatabaseUpdater
module: Automatic database updater for resources based on theVersionCheck
module.Extend
VersionCheck
module: AddgetCurrentVersion
function.
0.15.2
Fix entry check in
EntityInRangeController
.Add possibility to create
config.lua
file each LUA module.Refactor
Keyboard
module to new requirements.
0.15.1
Replace error messages in VorpCore wrapper of
Character
module withprint
calls.Extend
Character
module with new methods likegetIdentifiers
,getSteamId
,getSteamProfileUrl
,getDiscordId
,getDiscordProfileUrl
,getRedmCharacterName
and more.Extend
Helper
module with new methodsisSteamWebApiKeyAvailable
andstrSplit
.
0.15.0
Refactor
EntityInRange
module to new api style.Add
onResourceStop
logic to remove listeners from stopped resources automatically.See README.md for more information.
0.14.3
Add new helper method
round
andgetEmptyFunction
toHelper
.Mark
Promise
as deprecated.
0.14.2
Prevent
DependencyAutoRestart
from restarting resources that never was started before.
0.14.1
Prevent
DependencyAutoRestart
from restarting resources on server startup.
0.14.0
Add new
DependencyAutoRestart
module. See README.md for more information.nss_libs
now usingDependencyAutoRestart
module to auto-restart resources that havenss_libs
as dependency.
0.13.1
Switch to more readable front for NssPadLock.
0.13.0
Add new ui component
NssClient
. See README.md for more information.Add some README.md files to ui components.
0.12.2
Fix wrong path to sound files in NssPadLock.
Add new
DisableAutomatic
mode in NssPadLock.Change behaviour of
onNewCode
listener in NssPadLock.
0.12.1
Add translations support for NssPadLock.
0.12.0
NssUiComponentInterface now automatically load styles of component if instance is created and imported directly.
New component NssLockPad
0.11.3
Use new css module loader instead of relative paths.
0.11.2
NssSimpleTextEditor
Order of text sections are now correct if inserted between two existing sections.
Last updated