|
|
@ -16,9 +16,10 @@ Quantum.Client.Menu.GetAPI = function( lib ) return include( libs[lib] ) end |
|
|
|
net.Receive( "quantum_menu_net", function( len, pl ) |
|
|
|
net.Receive( "quantum_menu_net", function( len, pl ) |
|
|
|
local dt = net.ReadTable() -- TO DO: merge datatable with cached ( if same id/type ) |
|
|
|
local dt = net.ReadTable() -- TO DO: merge datatable with cached ( if same id/type ) |
|
|
|
if( Quantum.Client.Cache[dt.id] ~= nil && #Quantum.Client.Cache[dt.id] >= 1 ) then |
|
|
|
if( Quantum.Client.Cache[dt.id] ~= nil && #Quantum.Client.Cache[dt.id] >= 1 ) then |
|
|
|
table.Merge( dt, Quantum.Client.Cache[dt.id] ) |
|
|
|
table.Merge( Quantum.Client.Cache[dt.id], dt ) |
|
|
|
end |
|
|
|
else |
|
|
|
Quantum.Client.Cache[dt.id] = dt || { id = dt.id } |
|
|
|
Quantum.Client.Cache[dt.id] = dt || { id = dt.id } |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
if( Quantum.Client.EnableDebug ) then -- debug |
|
|
|
if( Quantum.Client.EnableDebug ) then -- debug |
|
|
|
Quantum.Debug( "Datatable size: " .. len .. "b (" .. len/8 .. "B)" ) |
|
|
|
Quantum.Debug( "Datatable size: " .. len .. "b (" .. len/8 .. "B)" ) |
|
|
|