-
Notifications
You must be signed in to change notification settings - Fork 3
/
loader.lua
33 lines (22 loc) · 1.01 KB
/
loader.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- loader for park vehicle
local directory = g_currentModDirectory
local modName = g_currentModName
source(Utils.getFilename("ParkVehicleSystem.lua", directory))
local function validateVehicleTypes(typeManager)
if typeManager.typeName == "vehicle" then
g_parkVehicleSystem:installSpecialization(g_vehicleTypeManager, g_specializationManager)
end
end
local function registerActionEvents()
g_parkVehicleSystem:registerActionEvents()
end
local function unregisterActionEvents()
g_parkVehicleSystem:unregisterActionEvents()
end
local function init()
g_parkVehicleSystem = ParkVehicleSystem:new(modName, directory, g_inputBinding, false)
TypeManager.validateTypes = Utils.prependedFunction(TypeManager.validateTypes, validateVehicleTypes)
FSBaseMission.registerActionEvents = Utils.appendedFunction(FSBaseMission.registerActionEvents, registerActionEvents)
BaseMission.unregisterActionEvents = Utils.appendedFunction(BaseMission.unregisterActionEvents, unregisterActionEvents)
end
init()