2023-07-19 03:18:34 -04:00
|
|
|
AddCSLuaFile()
|
2023-07-24 20:17:07 -04:00
|
|
|
-- prime the native lua module & add clientside files to send
|
|
|
|
-- if running on the server
|
2023-07-24 06:50:18 -04:00
|
|
|
if SERVER then
|
|
|
|
require("lcpu_native")
|
2023-07-27 06:03:28 -04:00
|
|
|
if LCPUNative.ModuleVersion ~= 1 then
|
2023-07-24 06:50:18 -04:00
|
|
|
print("Your LCPU native module is somehow lagging behind the Lua code. Please rebuild it.")
|
|
|
|
LCPUNative = nil
|
|
|
|
return
|
|
|
|
end
|
2023-07-28 06:05:58 -04:00
|
|
|
|
2023-07-28 18:12:27 -04:00
|
|
|
LCPU = {};
|
|
|
|
LCPU.Devices = {};
|
2023-07-28 06:05:58 -04:00
|
|
|
|
2023-07-29 01:56:19 -04:00
|
|
|
-- Uncomment this to enable debug logging (useful for troubleshooting bugs)
|
2023-07-28 18:12:27 -04:00
|
|
|
--LCPUNative.EnableDebug()
|
2023-07-29 01:56:19 -04:00
|
|
|
|
2023-07-24 06:50:18 -04:00
|
|
|
AddCSLuaFile("entities/gmod_lcpu_cpu.lua")
|
2023-07-28 18:12:27 -04:00
|
|
|
|
2023-07-29 01:56:19 -04:00
|
|
|
-- Serverside devices (that don't depend on wiremod being loaded)
|
2023-07-28 18:12:27 -04:00
|
|
|
include("lcpu/devices/uart.lua")
|
2023-07-24 06:50:18 -04:00
|
|
|
end
|