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.
This commit is contained in:
Mr.Crowley committed 2025-09-03 04:06:31 -05:00
1 parent cb9dbdf610
commit dff4622a94
11 files changed
+52 -43

No files matched your search

+2 -2
View File
@@ -36,12 +36,12 @@ function Shop.OnCreate(entityData)
)
end
if not IsDuplicityVersion() then return Bridge.ClientEntity.RegisterBehavior("shop", Shop) end
if not IsDuplicityVersion() then return Bridge.Entity.RegisterBehavior("shop", Shop) end
RegisterNetEvent("community_bridge:server:OpenShop", function(id)
local src = source
if not src then return end
local entityData = Bridge.ServerEntity.Get(id)
local entityData = Bridge.Entity.Get(id)
if not entityData or not entityData.shop then
return print(string.format("[Shop] OpenShop: Entity %s does not exist or has no shop", id))
end