Commit Graph
160 Commits
Author SHA1 Message Date
Mr.Crowley 18748bd775 Refactor entity movement and add Math.Nearest function
Simplifies entity movement logic in client_entity.lua by improving coordinate comparison and updating behavior triggers. Adds a new Math.Nearest function in math.lua to round values to the nearest whole number.
2025-09-04 11:42:59 -05:00
Mr.Crowley debfb06231 Refactor stash and targets behavior logic
Simplifies stash target assignment by returning early when registering a stash, ensuring consistent target setup. Enhances target update logic to check for removed targets and removes debug print statement.
2025-09-04 08:21:48 -05:00
Mr.Crowley 7443695254 Improve entity spawning and target behaviors
Refactored client entity spawning to handle missing models and improved coordinate update sensitivity. Removed model assertion from server entity creation. Enhanced resource start event handling for both server and client. Updated stash and target behaviors to support additional properties and better zone handling for entities without spawned objects.
2025-09-03 08:57:39 -05:00
Mr.Crowley dff4622a94 Refactor entity behavior to use Bridge.Entity
Replaces all usage of Bridge.ClientEntity and Bridge.ServerEntity with Bridge.Entity across shared behavior modules. Updates initialization in lib/init.lua to use cLib.Entity and marks cLib.ClientEntity and cLib.ServerEntity as deprecated for consistency and future maintainability.
2025-09-03 04:06:31 -05:00
Mr.Crowley cb9dbdf610 Adjust entity movement threshold and follow behavior
Increased the movement threshold for entity updates from 0.05 to 1.0 to reduce unnecessary position updates. Modified follow behavior to offset the entity's coordinates by -1 on the Z axis when updating, possibly to account for ground level or animation adjustments.
2025-09-03 01:23:01 -05:00
Mr.Crowley dd08f058c3 Refactor client entity management functions
Added freeze position handling in UpdateEntity and ensured OnDestroy behavior is triggered on entity destruction. Removed unused and commented-out Update function, and improved code clarity in Set and Destroy methods.
2025-09-03 01:04:04 -05:00
Mr.Crowley 8346130b00 Add modular entity behaviors and update entity logic
Introduces modular behaviors for entities, including anim, attach, clothing, follow, particles, scenarios, shop, stash, targets, and weapon, each in their own files. Updates client_entity.lua and behaviors.lua to support dynamic behavior registration, initialization, and triggering. Refactors entity update logic to improve movement handling and behavior invocation.
2025-09-03 00:28:17 -05:00
MrNewb 63d2f675f6 Buffer and batch Discord log messages
Introduces a queue and timer to batch log messages before sending them to Discord, reducing the number of HTTP requests. Refactors the built-in log handler to use the new queuing system and improves code consistency. Looks gross but works.
2025-09-01 03:33:29 -04:00
MrNewb 7f14eef82b Refactor logging system and centralize config
Reworked the logging system to use a unified handler approach supporting built-in, qb, ox_lib, and Fivemerr log systems. Deprecated Logs.Send and Logs.Notify in favor of Logs.CreateLog. Centralized all logging configuration options in serverConfig.lua for easier management and extensibility.
2025-09-01 02:29:15 -04:00
Mr.Crowley c399fbaca4 Refactor behavior and entity invocation handling
Standardizes the use of the 'invoked' property for entities and behaviors, ensuring behaviors are scoped per invoking resource. Updates behavior registration, retrieval, removal, and cleanup logic to support resource-specific behavior tables, improving modularity and preventing cross-resource conflicts.
2025-08-31 20:50:46 -05:00
Mr.Crowley f2ff03734e prep for behaviors
readded behaviors
2025-08-30 19:12:56 -05:00
MrNewb 26bd9e1cad Update server_entity.lua 2025-08-30 03:43:01 -04:00
Mr.Crowley 495b24e53f fixed last mess 2025-08-27 06:13:02 -05:00
Mr.Crowley e06e04a2c6 hope this works 2025-08-27 05:47:44 -05:00
Mr.Crowley 5b6641fc60 silly me
woopsies
2025-08-24 20:02:47 -05:00
Mr.Crowley 8c309e248e Added behaviors and documentation to oxlibs zones
Will provide file in example when more features are implimented
2025-08-23 22:53:49 -05:00
Mr.Crowley 2da3fed196 following convention for blips
switched to follow naming convention for others
2025-08-22 03:33:42 -05:00
Mr.Crowley 4e313c40cb Update to utility for blip
added .CreateBlipRadius which makes a circular blip with some radius in meters
2025-08-22 03:27:03 -05:00
Mr.Crowley d0d72bdba5 here we go again 2025-08-21 00:09:54 -05:00
Mr.Crowley cba3ba1d98 forgot to save init file 2025-08-20 23:51:03 -05:00
Mr.Crowley f900bc5ce1 Clean up 2025-08-20 23:49:22 -05:00
MrNewb b896b94001 sync 2025-08-20 23:38:22 -04:00
Mr.Crowley b06d2fb49e Discarded entityactions and updated target
Discarded entityactions: was not used and bloat. Need a new system that handled networked entities static vs dynamic (non-moving non networked vs moving networked)

updated target to improve performance on canInteract. It seems that the target systems spam this function. Using a state and checking every second instead of allowing spamming

Added ClientEntity.ChangeModel
2025-08-20 22:23:07 -05:00
MrNewb 718214d135 This is busted, should be removed.
Should be removed as not working for external resources.
It will work in the bridge itself but could lead to bloat/misuse and we shouldn't be responsible.
2025-08-20 16:59:04 -04:00
Mr.Crowley cdeba0652d Community Feedback on cache
serverid in cache is pointless and will never change

unit tests are not actually unit tests so i renamed to examples.
2025-08-18 18:32:38 -05:00
Mr.Crowley c34b1cce27 Merge branch 'dev' of https://github.com/The-Order-Of-The-Sacred-Framework/community_bridge into dev 2025-08-16 19:28:09 -05:00
Mr.Crowley 6106f76b2d small mistake
got rid of cellkey as it was clamped to a 10 meter radius, replaced with id
2025-08-16 19:27:06 -05:00
MrNewb 58242b4213 possible fix
Before only one point could exist per cell.
This corrects that but im unsure on the impact to performance or grids
2025-08-16 07:04:00 -04:00
MrNewb 0fc872a102 patch for vector4 2025-08-16 05:56:25 -04:00
MrNewb defc7c0e8b blip tweak 2025-08-16 01:03:45 -04:00
Mr.Crowley 972399ebf6 forogt a print 2025-08-15 23:58:29 -05:00
Mr.Crowley 255462493f cache error fix 2025-08-15 23:57:31 -05:00
Mr.Crowley bdde5124ff Simplified Points
Reduced code and calculations should hopefully be more performant
2025-08-15 23:54:55 -05:00
Mr.Crowley 7a598dd8d8 update for fivem appearance
should be working for esx now
2025-08-15 13:28:13 -05:00
Mr.Crowley e11ef1242d tweaks 2025-08-12 19:23:15 -05:00
MrNewb 29c19f3cb4 Update client_entity.lua 2025-08-12 20:20:49 -04:00
MrNewb 35d18972e6 Update points.lua 2025-08-09 23:40:27 -04:00
MrNewb 249f1c4032 Update server_entity.lua 2025-08-07 02:19:20 -04:00
MrNewb a63837bd1f Refactored model/anim checks, utility functions, and text rendering
Modified EnsureModelLoaded to skip validation and request loops if the model is already loaded

Condensed SafeAddBlip, SafeRemoveBlip, etc. into dedicated utility functions

Removed AddTextEntryOnce and SafeAddTextEntry — native existence checks were redundant

Replaced repetitive table inserts with keyed tables using tostring(number) to avoid unnecessary loops

Added HasAnimDictLoaded check to RequestAnimDict to prevent redundant request loops

Introduced FloatingHelpText in utilities (aesthetic improvement)

Updated DrawText: replaced outdated logic, switched 1 to true for clarity/preference
2025-08-07 01:50:50 -04:00
Mr.Crowley 140bad5b34 made woopsie to entities 2025-08-05 20:57:26 -05:00
MrNewb d8f1599052 Update points.lua 2025-08-05 00:01:32 -04:00
Mr.Crowley 2fd5c7c08f Update client_entity.lua
Added skip to remove so we dont call external on remove.
2025-07-28 00:58:02 -05:00
MrNewb 88b4daa2e8 migrate cache.ped to PlayerPedId() 2025-07-28 01:37:52 -04:00
Mr.Crowley 0970bdd604 migrated management to banking
also fixed loadmodel typo
2025-07-25 02:51:14 -05:00
Mr.Crowley 2ad1f4669c small update
target got a print if onSelect or action are nil

also added groups in fixoptions for sleepless

client entities using return for loadmodel
2025-07-24 05:03:07 -05:00
MrNewb 9c98bd00f3 Update callbacks.lua 2025-07-20 00:38:35 -04:00
gononono64 b4679f1866 fixed old placer locale issue 2025-07-09 08:10:01 -05:00
gononono64 003153be63 entity adjustments
depricating register / unregister and replacing with Create/Destroy to follow convention
math.Inbounds checks a list of points (table.points = vector3[] minZ = int || -math.huge, maxZ = int || math.huge)
2025-06-30 15:18:01 -05:00
gononono64 725a86ed8d placeable objects + small tweaks
skills booboo. This should do it (working properly now)
utility shortnames used for command buttons getter
en.json added placeable tags (was missing 1) NEEDS OTHER CONVERSIONS

Placer: Lots of stuff. Pass model and settings. Refer to .lua for setting params
2025-06-30 02:07:20 -05:00
gononono64 9b44fcbc16 small tweaks
entities now has register bulk
added docs to a function for sql module
added table.count
2025-06-22 17:40:41 -05:00