├── .gitattributes
├── .github
└── FUNDING.yml
├── .gitignore
├── CHANGELOG.md
├── Cockpit
└── Scripts
│ ├── SYSTEMS
│ ├── PNT_update.lua
│ ├── clickable.lua
│ ├── functions.lua
│ └── tmp.lua
│ ├── UTILS
│ ├── dev_install.lua
│ ├── show_restart_window.lua
│ ├── show_support_window.lua
│ └── utils.lua
│ ├── clickable_defs.lua
│ ├── clickabledata.lua
│ ├── command_defs.lua
│ ├── device_init.lua
│ ├── devices.lua
│ ├── dump.lua
│ ├── mainpanel_init.lua
│ ├── supported.lua
│ └── utils.lua
├── DATA
└── Open Mod Manager
│ ├── F-15C
│ ├── F-15C.oml
│ └── Library
│ │ ├── F-15C Standalone
│ │ └── Mods
│ │ │ └── aircraft
│ │ │ └── F-15C
│ │ │ ├── Cockpit
│ │ │ ├── KneeboardRight
│ │ │ │ ├── SYSTEMS
│ │ │ │ │ ├── clickable.lua
│ │ │ │ │ ├── cmd_control.lua
│ │ │ │ │ ├── elec_control.lua
│ │ │ │ │ ├── engines_control.lua
│ │ │ │ │ ├── fuel_control.lua
│ │ │ │ │ ├── light_control.lua
│ │ │ │ │ ├── misc_control.lua
│ │ │ │ │ ├── radar_control.lua
│ │ │ │ │ └── radio_control.lua
│ │ │ │ ├── clickable_defs.lua
│ │ │ │ ├── clickabledata.lua
│ │ │ │ ├── command_defs.lua
│ │ │ │ ├── device_init.lua
│ │ │ │ ├── devices.lua
│ │ │ │ ├── mainpanel_init.lua
│ │ │ │ ├── supported.lua
│ │ │ │ └── utils.lua
│ │ │ └── Shape
│ │ │ │ └── cockpit_f-15c.edm.json
│ │ │ └── Liveries
│ │ │ └── Cockpit_F-15C
│ │ │ └── default
│ │ │ └── description.lua
│ │ └── F-15C With FC3
│ │ └── Mods
│ │ └── aircraft
│ │ └── Flaming Cliffs
│ │ ├── Cockpit
│ │ ├── KneeboardRight
│ │ │ ├── SYSTEMS
│ │ │ │ ├── clickable.lua
│ │ │ │ ├── cmd_control.lua
│ │ │ │ ├── elec_control.lua
│ │ │ │ ├── engines_control.lua
│ │ │ │ ├── fuel_control.lua
│ │ │ │ ├── light_control.lua
│ │ │ │ ├── misc_control.lua
│ │ │ │ ├── radar_control.lua
│ │ │ │ └── radio_control.lua
│ │ │ ├── clickable_defs.lua
│ │ │ ├── clickabledata.lua
│ │ │ ├── command_defs.lua
│ │ │ ├── device_init.lua
│ │ │ ├── devices.lua
│ │ │ ├── mainpanel_init.lua
│ │ │ ├── supported.lua
│ │ │ └── utils.lua
│ │ └── Shape
│ │ │ └── cockpit_f-15c.edm.json
│ │ └── Liveries
│ │ └── Cockpit_F-15C
│ │ └── default
│ │ └── description.lua
│ └── Redk0d Clickable F-15C.omc
├── Help_Pictures
├── A10.jpg
├── F15.jpg
├── MiG29.jpg
├── SU-27.jpg
├── SU-33.jpg
├── SU25.jpg
└── SU25T.jpg
├── INSTALL.md
├── Options
├── options.dlg
├── optionsData.lua
└── optionsDb.lua
├── README.md
├── Shapes
├── A-10A-CLICKABLE.edm
├── F-15C-CLICKABLE.edm
├── MIG-29-CLICKABLE.edm
├── SU-25-CLICKABLE.edm
├── SU-25T-CLICKABLE.edm
├── SU-27-CLICKABLE.edm
└── SU-33-CLICKABLE.edm
├── Skins
├── icon 76x76.png
├── icon-38x38.png
├── icon.png
├── icon_active.png
├── icon_noactive.png
└── icon_select.png
└── entry.lua
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: RedK0d
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13 | custom: ["https://redk0d.gumroad.com/l/fvkodo","https://www.paypal.com/donate/?hosted_button_id=8RA626VEJD2SC"]
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.blend
2 | *.blend1
3 | *.code-workspace
4 | Cockpit*.edm
5 | /Source
6 |
--------------------------------------------------------------------------------
/Cockpit/Scripts/SYSTEMS/PNT_update.lua:
--------------------------------------------------------------------------------
1 | dt = 0.0001
2 | make_default_activity(dt)
3 | local aircraft = get_aircraft_type()
4 |
5 |
6 |
7 |
8 | local PNT_AIRBRAKE = nil
9 | local PNT_CTM_ONCE = nil
10 | local PNT_UNLOCK = nil
11 | local PNT_LOCK = nil
12 | local PNT_STATION = nil
13 | local PNT_AA_MODES_STICK = nil
14 | local PNT_AUTO_LEVEL_STICK = nil
15 | local PNT_AUTO_RESET_STICK = nil
16 | local PNT_UNLOCK_STICK = nil
17 | local PNT_LOCK_STICK = nil
18 | local PNT_MIRROR_U = nil
19 | local PNT_MIRROR_L = nil
20 | local PNT_MIRROR_R = nil
21 | local PNT_GEAR = nil
22 | local PNT_CANOPY = nil
23 | local PNT_TGT_L = nil
24 | local PNT_TGT_R = nil
25 | local PNT_TGT_U = nil
26 | local PNT_TGT_D = nil
27 | local PNT_TRIM_L = nil
28 | local PNT_TRIM_R = nil
29 | local PNT_TRIM_U = nil
30 | local PNT_TRIM_D = nil
31 | local PNT_CTM_CHAFF = nil
32 | local PNT_CTM_FLARE = nil
33 | local PNT_CTM_F15 = nil
34 | local PNT_FLAPS_MULTI_BIS = nil
35 | local PNT_STICK_LOCK = nil
36 | local PNT_STICK_UNLOCK = nil
37 | local PNT_STICK_STATION = nil
38 | local PNT_STICK_SHOOT = nil
39 | local PNT_COM = nil
40 |
41 | --local TEST = nil
42 | --[[
43 | local THROTTLE_L_PNTS = get_param_handle("THROTTLE_L_PNTS")
44 | local THROTTLE_R_PNTS = get_param_handle("THROTTLE_R_PNTS")
45 | local STICK_PITCH_PNTS = get_param_handle("STICK_PITCH_PNTS")
46 | local STICK_ROLL_PNTS = get_param_handle("STICK_ROLL_PNTS")
47 | local CANOPY_PNTS = get_param_handle("CANOPY_PNTS")
48 | local GEARLEVER_PNTS = get_param_handle("GEARLEVER_PNTS")
49 | local CANOPYLEVER_PNTS = get_param_handle("CANOPYLEVER_PNTS")
50 | ]]
51 | function post_initialize()
52 |
53 | PNT_AIRBRAKE = get_clickable_element_reference("PNT_AIRBRAKE")
54 | PNT_CTM_ONCE = get_clickable_element_reference("PNT_CTM_ONCE")
55 | PNT_UNLOCK = get_clickable_element_reference("PNT_UNLOCK")
56 | PNT_LOCK = get_clickable_element_reference("PNT_LOCK")
57 | PNT_STATION = get_clickable_element_reference("PNT_STATION")
58 | PNT_AA_MODES_STICK = get_clickable_element_reference("PNT_AA_MODES_STICK")
59 | PNT_AUTO_LEVEL_STICK = get_clickable_element_reference("PNT_AUTO_LEVEL_STICK")
60 | PNT_AUTO_RESET_STICK = get_clickable_element_reference("PNT_AUTO_RESET_STICK")
61 | PNT_UNLOCK_STICK = get_clickable_element_reference("PNT_UNLOCK_STICK")
62 | PNT_LOCK_STICK = get_clickable_element_reference("PNT_LOCK_STICK")
63 | PNT_MIRROR_U = get_clickable_element_reference("PNT_MIRROR_U")
64 | PNT_MIRROR_L = get_clickable_element_reference("PNT_MIRROR_L")
65 | PNT_MIRROR_R = get_clickable_element_reference("PNT_MIRROR_R")
66 | PNT_GEAR = get_clickable_element_reference("PNT_GEAR")
67 | PNT_CANOPY = get_clickable_element_reference("PNT_CANOPY")
68 | PNT_TGT_L = get_clickable_element_reference("PNT_TGT_L")
69 | PNT_TGT_R = get_clickable_element_reference("PNT_TGT_R")
70 | PNT_TGT_U = get_clickable_element_reference("PNT_TGT_U")
71 | PNT_TGT_D = get_clickable_element_reference("PNT_TGT_D")
72 | PNT_TRIM_L = get_clickable_element_reference("PNT_TRIM_L")
73 | PNT_TRIM_R = get_clickable_element_reference("PNT_TRIM_R")
74 | PNT_TRIM_U = get_clickable_element_reference("PNT_TRIM_U")
75 | PNT_TRIM_D = get_clickable_element_reference("PNT_TRIM_D")
76 | PNT_CTM_CHAFF = get_clickable_element_reference("PNT_CTM_CHAFF")
77 | PNT_CTM_FLARE = get_clickable_element_reference("PNT_CTM_FLARE")
78 | PNT_CTM_F15 = get_clickable_element_reference("PNT_CTM_F15")
79 | PNT_FLAPS_MULTI_BIS = get_clickable_element_reference("PNT_FLAPS_MULTI_BIS")
80 | PNT_STICK_LOCK = get_clickable_element_reference("PNT_STICK_LOCK")
81 | PNT_STICK_UNLOCK = get_clickable_element_reference("PNT_STICK_UNLOCK")
82 | PNT_STICK_STATION = get_clickable_element_reference("PNT_STICK_STATION")
83 | PNT_STICK_SHOOT = get_clickable_element_reference("PNT_STICK_SHOOT")
84 | PNT_COM = get_clickable_element_reference("PNT_COM")
85 |
86 | end
87 |
88 | function update()
89 | --[[
90 |
91 | THROTTLE_L_PNTS:set(get_cockpit_draw_argument_value(104))
92 | THROTTLE_R_PNTS:set(get_cockpit_draw_argument_value(105))
93 | STICK_PITCH_PNTS:set(get_cockpit_draw_argument_value(74))
94 | STICK_ROLL_PNTS:set(get_cockpit_draw_argument_value(71))
95 | CANOPY_PNTS:set(get_cockpit_draw_argument_value(181))
96 | GEARLEVER_PNTS:set(get_cockpit_draw_argument_value(83))
97 | if aircraft=="MiG-29A"or aircraft=="MiG-29G"or aircraft=="MiG-29S" then
98 | CANOPYLEVER_PNTS:set(get_cockpit_draw_argument_value(800))
99 | elseif aircraft=="Su-25T"then
100 | CANOPYLEVER_PNTS:set(get_cockpit_draw_argument_value(181))
101 | end
102 | ]]
103 |
104 | if PNT_AIRBRAKE then
105 | PNT_AIRBRAKE:update()
106 | end
107 | if PNT_CTM_ONCE then
108 | PNT_CTM_ONCE:update()
109 | end
110 | if PNT_UNLOCK then
111 | PNT_UNLOCK:update()
112 | end
113 | if PNT_LOCK then
114 | PNT_LOCK:update()
115 | end
116 | if PNT_STATION then
117 | PNT_STATION:update()
118 | end
119 | if PNT_AA_MODES_STICK then
120 | PNT_AA_MODES_STICK:update()
121 | end
122 | if PNT_UNLOCK_STICK then
123 | PNT_UNLOCK_STICK:update()
124 | end
125 | if PNT_LOCK_STICK then
126 | PNT_LOCK_STICK:update()
127 | end
128 | if PNT_AUTO_LEVEL_STICK then
129 | PNT_AUTO_LEVEL_STICK:update()
130 | end
131 | if PNT_AUTO_RESET_STICK then
132 | PNT_AUTO_RESET_STICK:update()
133 | end
134 | if PNT_MIRROR_U then
135 | PNT_MIRROR_U:update()
136 | end
137 | if PNT_MIRROR_L then
138 | PNT_MIRROR_L:update()
139 | end
140 | if PNT_MIRROR_R then
141 | PNT_MIRROR_R:update()
142 | end
143 | if PNT_GEAR then
144 | PNT_GEAR:update()
145 | end
146 | if PNT_CANOPY then
147 | PNT_CANOPY:update()
148 | end
149 | if PNT_TGT_L then
150 | PNT_TGT_L:update()
151 | end
152 | if PNT_TGT_R then
153 | PNT_TGT_R:update()
154 | end
155 | if PNT_TGT_U then
156 | PNT_TGT_U:update()
157 | end
158 | if PNT_TGT_D then
159 | PNT_TGT_D:update()
160 | end
161 | if PNT_TRIM_L then
162 | PNT_TRIM_L:update()
163 | end
164 | if PNT_TRIM_R then
165 | PNT_TRIM_R:update()
166 | end
167 | if PNT_TRIM_U then
168 | PNT_TRIM_U:update()
169 | end
170 | if PNT_TRIM_D then
171 | PNT_TRIM_D:update()
172 | end
173 | if PNT_CTM_CHAFF then
174 | PNT_CTM_CHAFF:update()
175 | end
176 | if PNT_CTM_FLARE then
177 | PNT_CTM_FLARE:update()
178 | end
179 | if PNT_CTM_F15 then
180 | PNT_CTM_F15:update()
181 | end
182 | if PNT_FLAPS_MULTI_BIS then
183 | PNT_FLAPS_MULTI_BIS:update()
184 | end
185 | if PNT_STICK_LOCK then
186 | PNT_STICK_LOCK:update()
187 | end
188 | if PNT_STICK_UNLOCK then
189 | PNT_STICK_UNLOCK:update()
190 | end
191 | if PNT_STICK_STATION then
192 | PNT_STICK_STATION:update()
193 | end
194 | if PNT_STICK_SHOOT then
195 | PNT_STICK_SHOOT:update()
196 | end
197 | if PNT_COM then
198 | PNT_COM:update()
199 | end
200 | end
201 |
202 |
203 |
204 | need_to_be_closed = false -- close lua state after initialization
205 |
--------------------------------------------------------------------------------
/Cockpit/Scripts/SYSTEMS/functions.lua:
--------------------------------------------------------------------------------
1 |
2 | local io, os, error = io, os, error
3 | local file = {}
4 | ------------------------------------------------------------------------------
5 | -- ### file.exists
6 | --
7 | -- Determine if the file in the `path` exists.
8 | --
9 | -- - `path` is a string.
10 | function file.exists(path)
11 | local file = io.open(path, 'rb')
12 | if file then
13 | file:close()
14 | end
15 | return file ~= nil
16 | end
17 | ------------------------------------------------------------------------------
18 | -- ### file.read
19 | --
20 | -- Return the content of the file by reading the given `path` and `mode`.
21 | --
22 | -- - `path` is a string.
23 | -- - `mode` is a string.
24 | --
25 | function file.read(path, mode)
26 | mode = mode or '*a'
27 | local file, err = io.open(path, 'rb')
28 | if err then
29 | error(err)
30 | end
31 | local content = file:read(mode)
32 | file:close()
33 | return content
34 | end
35 | ------------------------------------------------------------------------------
36 | -- ### file.write
37 | --
38 | -- Write to the file with the given `path`, `content` and `mode`.
39 | --
40 | -- - `path` is a string.
41 | -- - `content` is a string.
42 | -- - `mode` is a string.
43 | --
44 | function file.write(path, content, mode)
45 | mode = mode or 'w'
46 | local file, err = io.open(path, mode)
47 | if err then
48 | error(err)
49 | end
50 | file:write(content)
51 | file:close()
52 | end
53 | ------------------------------------------------------------------------------
54 | -- ### file.copy
55 | --
56 | -- Copy the file by reading the `src` and writing it to the `dest`.
57 | --
58 | -- - `src` is a string.
59 | -- - `dest` is a string.
60 | --
61 | function file.copy(src, dest)
62 | local content = file.read(src)
63 | file.write(dest, content)
64 | end
65 | ------------------------------------------------------------------------------
66 | -- ### file.move
67 | --
68 | -- Move the file from `src` to the `dest`.
69 | --
70 | -- - `src` is a string.
71 | -- - `dest` is a string.
72 | --
73 | function file.move(src, dest)
74 | os.rename(src, dest)
75 | end
76 | ------------------------------------------------------------------------------
77 | -- ### file.remove
78 | --
79 | -- Remove the file from the given `path`.
80 | --
81 | -- - `path` is a string.
82 | --
83 | function file.remove(path)
84 | os.remove(path)
85 | end
86 | ------------------------------------------------------------------------------
87 | -- ## Exports
88 | --
89 | -- Export `file` as a Lua module.
90 | --
91 | return file
92 |
--------------------------------------------------------------------------------
/Cockpit/Scripts/UTILS/show_restart_window.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | local version = get_plugin_option_value("RedK0d Clickable", "Version", "local")
4 | local update_time_step = 5
5 | local bin_dir = lfs.realpath(lfs.currentdir().."bin\\")
6 | make_default_activity(update_time_step)
7 |
8 | package.path = package.path
9 | .. ';./Scripts/?.lua;'
10 | .. './Scripts/Common/?.lua;'
11 | .. './Scripts/UI/?.lua;'
12 | .. './Scripts/UI/F10View/?.lua;'
13 | .. './dxgui/bind/?.lua;'
14 | .. './dxgui/loader/?.lua;'
15 | .. './dxgui/skins/skinME/?.lua;'
16 | .. './dxgui/skins/common/?.lua;'
17 | .. './MissionEditor/modules/?.lua;'
18 | .. './Mods/tech/CombinedArms/UI/?.lua;'
19 | local MsgWindow = require("MsgWindow")
20 | local Picture = require('Picture')
21 | local dxgui = require('dxgui')
22 | local Skin = require('Skin')
23 | local cdata = {
24 | instructions = "\n\nTo complete installation, please click OK and restart DCS",
25 | title = "[ RedK0d Clickable "..version.." ]",
26 | yes = "OK",
27 | picture = Picture.new(get_dcs_plugin_path("RedK0d Clickable").."\\Skins\\icon 76x76.png"),
28 | }
29 | local function notallfeatures()
30 | local handler = MsgWindow.error(cdata.instructions2,cdata.title,cdata.ok)
31 | handler:show()
32 | end
33 | local handler = MsgWindow.user(cdata.instructions, cdata.title,cdata.picture,cdata.yes)
34 | function handler:onChange(buttonText)
35 | if buttonText == cdata.yes then
36 | handler:close()
37 |
38 | os.execute("taskkill /F /im DCS.EXE")
39 | elseif buttonText == cdata.no then
40 | handler:close()
41 | notallfeatures()
42 | end
43 | end
44 | function handler:onClose()
45 | os.execute("taskkill /F /im DCS.EXE")
46 |
47 | end
48 |
49 | handler:show()
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/Cockpit/Scripts/UTILS/show_support_window.lua:
--------------------------------------------------------------------------------
1 | package.path = package.path
2 | .. ';./Scripts/?.lua;'
3 | .. './Scripts/Common/?.lua;'
4 | .. './Scripts/UI/?.lua;'
5 | .. './Scripts/UI/F10View/?.lua;'
6 | .. './dxgui/bind/?.lua;'
7 | .. './dxgui/loader/?.lua;'
8 | .. './dxgui/skins/skinME/?.lua;'
9 | .. './dxgui/skins/common/?.lua;'
10 | .. './MissionEditor/modules/?.lua;'
11 | .. './Mods/tech/CombinedArms/UI/?.lua;'
12 | local MsgWindow = require("MsgWindow")
13 | local Picture = require('Picture')
14 | local dxgui = require('dxgui')
15 | local Skin = require('Skin')
16 | local version = get_plugin_option_value("RedK0d Clickable", "Version", "local")
17 | local io, os, error = io, os, error
18 | local cdata = {
19 | patreon = "Patreon",
20 | paypal = "Paypal",
21 | shop = "Shop",
22 | nothanks = "No",
23 | support = "[ RedK0d Clickable "..version.." ]",
24 | supporttext = "If you like this mod, please support it. 3 possibilities to support.",
25 | picture = Picture.new(get_dcs_plugin_path("RedK0d Clickable").."\\Skins\\icon 76x76.png"),
26 | }
27 |
28 |
29 | local handler = MsgWindow.user(cdata.supporttext, cdata.support,cdata.picture,cdata.patreon,cdata.paypal,cdata.shop, cdata.nothanks)
30 | local users_params = get_dcs_plugin_path("RedK0d Clickable").."\\Cockpit\\Scripts\\UTILS\\users_params.txt"
31 | local t = os.date("*t")
32 | function handler:onChange(buttonText)
33 | local file = io.open(users_params, 'w')
34 | local fileContent = {}
35 | for line in file:lines() do
36 | table.insert (fileContent, line)
37 | end
38 | io.close(file)
39 |
40 | if buttonText == cdata.patreon then
41 | fileContent[1] = 'Patreon Visit'
42 | fileContent[2] = t.yday
43 | os.open_uri("www.patreon.com/RedK0d")
44 | elseif buttonText == cdata.paypal then
45 | fileContent[1] = 'Paypal Visit'
46 | fileContent[2] = t.yday
47 | os.open_uri("www.paypal.com/donate/?hosted_button_id=8RA626VEJD2SC")
48 | elseif buttonText == cdata.shop then
49 | fileContent[1] = 'Shop Visit'
50 | fileContent[2] = t.yday
51 | os.open_uri("https://redk0d.myshopify.com/")
52 | elseif buttonText == cdata.nothanks then
53 | fileContent[1] = 'No'
54 | end
55 | file = io.open(users_params, 'w')
56 | for index, value in ipairs(fileContent) do
57 | file:write(value..'\n')
58 | end
59 | io.close(file)
60 | end
61 | function handler:onClose()
62 | local file = io.open(users_params, 'w')
63 | local fileContent = {}
64 | for line in file:lines() do
65 | table.insert (fileContent, line)
66 | end
67 | io.close(file)
68 | fileContent[1] = 'No'
69 | file = io.open(users_params, 'w')
70 | for index, value in ipairs(fileContent) do
71 | file:write(value..'\n')
72 | end
73 | io.close(file)
74 | end
75 | function read_users_params()
76 | local file = io.open(users_params, 'r')
77 | if not file then
78 | handler:show()
79 | else
80 | local fileContent = {}
81 | for line in file:lines() do
82 | table.insert (fileContent, line)
83 | end
84 | io.close(file)
85 | if fileContent[1] == 'No' or
86 | fileContent[1] == nil then
87 | handler:show()
88 | end
89 | if tonumber(fileContent[2]) +7 <= t.yday then
90 | handler:show()
91 | end
92 | if t.yday < tonumber(fileContent[2]) then
93 | handler:show()
94 | end
95 | end
96 | end
97 | read_users_params()
98 |
99 |
--------------------------------------------------------------------------------
/Cockpit/Scripts/UTILS/utils.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | local update_time_step = 5
4 | make_default_activity(update_time_step)
5 | local entry = get_dcs_plugin_path("RedK0d Clickable").."\\entry.lua"
6 | package.path = package.path
7 | .. ';./Scripts/?.lua;'
8 | .. './Scripts/Common/?.lua;'
9 | .. './Scripts/UI/?.lua;'
10 | .. './Scripts/UI/F10View/?.lua;'
11 | .. './dxgui/bind/?.lua;'
12 | .. './dxgui/loader/?.lua;'
13 | .. './dxgui/skins/skinME/?.lua;'
14 | .. './dxgui/skins/common/?.lua;'
15 | .. './MissionEditor/modules/?.lua;'
16 | .. './Mods/tech/CombinedArms/UI/?.lua;'
17 | local TIMER = 0
18 | local optionsEditor = require('optionsEditor')
19 | local update_time_step = 5
20 | local F15c_extended = get_plugin_option_value("RedK0d Clickable", "F15c_extended", "local")
21 | local version
22 | local aircraft = get_aircraft_type()
23 | function check_entry_version()
24 | local file = io.open(entry, 'r')
25 | local fileContent = {}
26 | for line in file:lines() do
27 | table.insert (fileContent, line)
28 | end
29 | io.close(file)
30 | version =string.match(fileContent[8],'............',15)
31 | return version
32 | end
33 | function dev_install()
34 | dofile(LockOn_Options.script_path.."UTILS\\dev_install.lua")
35 | end
36 | check_entry_version()
37 | optionsEditor.setOption("plugins.RedK0d Clickable.Version",version)
38 | dev_install()
39 | function post_initialize()
40 | TIMER = 20
41 | print_message_to_user("[ RedK0d Clickable ] \n[ "..version.." ]\n[ " .. aircraft .." ]",10)
42 | end
43 | need_to_be_closed = false
44 |
45 | function update()
46 | if TIMER > 0 then
47 | TIMER = TIMER - update_time_step
48 | if TIMER <= 0 then
49 | TIMER = 0
50 | --dofile(LockOn_Options.script_path.."UTILS\\show_support_window.lua")
51 | end
52 |
53 | end
54 | end
55 |
--------------------------------------------------------------------------------
/Cockpit/Scripts/clickable_defs.lua:
--------------------------------------------------------------------------------
1 | cursor_mode =
2 | {
3 | CUMODE_CLICKABLE = 0,
4 | CUMODE_CLICKABLE_AND_CAMERA = 1,
5 | CUMODE_CAMERA = 2
6 | }
7 |
8 | clickable_mode_initial_status = cursor_mode.CUMODE_CAMERA
9 | use_pointer_name = true
10 | anim_speed_default = 16
11 |
12 | function default_movable_axis(hint_,device_,command_,arg_, default_, gain_,updatable_,relative_)
13 |
14 | local default = default_ or 1
15 | local gain = gain_ or 0.1
16 | local updatable = updatable_ or false
17 | local relative = relative_ or false
18 |
19 | return {
20 | class = {class_type.MOVABLE_LEV},
21 | hint = hint_,
22 | device = device_,
23 | action = {command_},
24 | arg = {arg_},
25 | arg_value = {default},
26 | arg_lim = {{0,1}},
27 | updatable = updatable,
28 | use_OBB = true,
29 | gain = {gain},
30 | relative = {relative},
31 | }
32 | end
33 |
34 | function default_button(hint_, device_, command_, arg_, arg_val_, arg_lim_, sound_)
35 | local arg_val_ = arg_val_ or 1
36 | local arg_lim_ = arg_lim_ or {0, 1}
37 |
38 | return {
39 | class = {class_type.BTN},
40 | hint = hint_,
41 | device = device_,
42 | action = {command_},
43 | stop_action = {command_},
44 | arg = {arg_},
45 | arg_value = {arg_val_},
46 | arg_lim = {arg_lim_},
47 | use_release_message = {true},
48 | updatable = true,
49 | relative = true,
50 | sound = sound_ and {{sound_}, {sound_}} or nil
51 | }
52 | end
53 |
54 |
55 | -- not in use
56 | function default_1_position_tumb(hint_, device_, command_, arg_, arg_val_, arg_lim_)
57 | local arg_val_ = arg_val_ or 1
58 | local arg_lim_ = arg_lim_ or {0, 1}
59 | return {
60 | class = {class_type.TUMB},
61 | hint = hint_,
62 | device = device_,
63 | action = {command_},
64 | arg = {arg_},
65 | arg_value = {arg_val_},
66 | arg_lim = {arg_lim_},
67 | updatable = true,
68 | use_OBB = true
69 | }
70 | end
71 |
72 | function default_2_position_tumb(hint_, device_, command_, arg_, sound_, animation_speed_)
73 | local animation_speed_ = animation_speed_ or anim_speed_default
74 | return {
75 | class = {class_type.BTN, class_type.BTN},
76 | hint = hint_,
77 | device = device_,
78 | action = {command_, command_},
79 | arg = {arg_, arg_},
80 | arg_value = {-1, 1},
81 | arg_lim = {{0, 1}, {0, 1}},
82 | updatable = true,
83 | use_OBB = true,
84 | animated = {true, true},
85 | animation_speed = {animation_speed_, animation_speed_},
86 | sound = sound_ and {{sound_, sound_}} or nil
87 | }
88 |
89 | end
90 |
91 |
92 |
93 | -- default_3_position_tumb = bouton 3 positions -1,0,1 souris gauche ou souris droite indiff�remment
94 | function default_3_position_tumb(hint_, device_, command_, arg_, cycled_, inversed_, sound_, animation_speed_)
95 | local animation_speed_ = animation_speed_ or anim_speed_default
96 | local cycled = false
97 |
98 | local val = 1
99 | if inversed_ then
100 | val = -1
101 | end
102 |
103 | if cycled_ ~= nil then
104 | cycled = cycled_
105 | end
106 |
107 | return {
108 | class = {class_type.TUMB, class_type.TUMB},
109 | hint = hint_,
110 | device = device_,
111 | action = {command_, command_},
112 | arg = {arg_, arg_},
113 | arg_value = {val, -val},
114 | arg_lim = {{-1, 1}, {-1, 1}},
115 | updatable = true,
116 | use_OBB = true,
117 | cycle = cycled,
118 | animated = {true, true},
119 | animation_speed = {animation_speed_, animation_speed_},
120 | sound = sound_ and {{sound_, sound_}} or nil
121 | }
122 | end
123 |
124 |
125 | function springloaded_3_1_pos_tumb(hint_,device_,command1_,command2_,arg_,animation_speed_,val1_,val2_,val3_)
126 | local animation_speed_ = animation_speed_ or anim_speed_default
127 | local val1 = val1_ or -1.0
128 | local val2 = val2_ or 0.0
129 | local val3 = val3_ or 1.0
130 | return {
131 | class = {class_type.BTN,class_type.BTN},
132 | hint = hint_,
133 | device = device_,
134 | action = {command1_,command2_},
135 | stop_action = {command1_,command2_},
136 | arg = {arg_,arg_},
137 | arg_value = {val1,val3},
138 | arg_lim = {{val1,val2},{val2,val3}},
139 | updatable = true,
140 | use_OBB = true,
141 | use_release_message = {true,true},
142 | animated = {true,true},
143 | animation_speed = {animation_speed_,animation_speed_},
144 | sound = {{SOUND_SW1}, {SOUND_SW1}},
145 | side = {{BOX_SIDE_Z_top},{BOX_SIDE_Z_bottom}}
146 | }
147 | end
148 |
149 | function default_3_1_position_tumb(hint_, device_, command_, arg_, cycled_, inversed_, sound_, animation_speed_)
150 | local animation_speed_ = animation_speed_ or anim_speed_default
151 | local cycled = false
152 |
153 | local val = 1
154 | if inversed_ then
155 | val = -1
156 | end
157 |
158 | if cycled_ ~= nil then
159 | cycled = cycled_
160 | end
161 |
162 | return {
163 | class = {class_type.TUMB, class_type.TUMB},
164 | hint = hint_,
165 | device = device_,
166 | action = {command_, command_},
167 | stop_action = {nil, command_},
168 | arg = {arg_, arg_},
169 | arg_value = {val, -val},
170 | arg_lim = {{-1, 1}, {-1, 1}},
171 | updatable = true,
172 | use_OBB = true,
173 | use_release_message = true,
174 | cycle = cycled,
175 | animated = {true, true},
176 | animation_speed = {animation_speed_, animation_speed_},
177 | sound = sound_ and {{sound_, sound_}} or nil
178 | }
179 | end
180 |
181 | function springloaded_3_pos_tumb(hint_, device_, command_, arg_, inversed_, sound_, animation_speed_)
182 | local animation_speed_ = animation_speed_ or anim_speed_default
183 | local val = 1
184 | if inversed_ then
185 | val = -1
186 | end
187 |
188 | return {
189 | class = {class_type.BTN, class_type.TUMB},
190 | hint = hint_,
191 | device = device_,
192 | action = {command_, command_},
193 | stop_action = {command_, command_},
194 | arg = {arg_, arg_},
195 | arg_value = {val, -val},
196 | arg_lim = {{-1, 1}, {-1, 1}},
197 | updatable = true,
198 | use_OBB = true,
199 | use_release_message = true,
200 | animated = {true, true},
201 | animation_speed = {animation_speed_, animation_speed_},
202 | sound = sound_ and {{sound_, sound_}} or nil
203 | }
204 | end
205 |
206 | -- rotary axis with no end stops. suitable for continuously rotating knobs
207 | function default_axis(hint_, device_, command_, arg_, default_, gain_, updatable_, relative_)
208 | local default = default_ or 1
209 | local gain = gain_ or 0.1
210 | local updatable = updatable_ or false
211 | local relative = relative_ or false
212 |
213 | return {
214 | class = {class_type.LEV},
215 | hint = hint_,
216 | device = device_,
217 | action = {command_},
218 | arg = {arg_},
219 | arg_value = {default},
220 | arg_lim = {{0, 1}},
221 | updatable = updatable,
222 | use_OBB = true,
223 | gain = {gain},
224 | relative = {relative}
225 | }
226 | end
227 |
228 | function default_axis_limited(hint_, device_, command_, arg_, default_, gain_, updatable_, relative_, arg_lim_)
229 | local default = default_ or 0
230 | local updatable = updatable_ or false
231 | local relative = relative_ or false
232 |
233 | local gain = gain_ or 0.1
234 | return {
235 | class = {class_type.LEV},
236 | hint = hint_,
237 | device = device_,
238 | action = {command_},
239 | stop_action = {command_},
240 | arg = {arg_},
241 | arg_value = {default},
242 | arg_lim = {arg_lim_},
243 | updatable = updatable,
244 | use_OBB = false,
245 | gain = {gain},
246 | relative = {relative},
247 | cycle = true
248 | }
249 | end
250 |
251 |
252 | function default_movable_axis(hint_,device_,command_,arg_, default_, gain_,updatable_,relative_)
253 |
254 | local default = default_ or 1
255 | local gain = gain_ or 0.1
256 | local updatable = updatable_ or false
257 | local relative = relative_ or false
258 |
259 | return {
260 | class = {class_type.MOVABLE_LEV},
261 | hint = hint_,
262 | device = device_,
263 | action = {command_},
264 | arg = {arg_},
265 | arg_value = {default},
266 | arg_lim = {{0,1}},
267 | updatable = updatable,
268 | use_OBB = true,
269 | gain = {gain},
270 | relative = {relative},
271 | }
272 | end
273 |
274 | -- not in use. this multiple position switch is cyclable.
275 | function multiposition_switch(hint_, device_, command_, arg_, count_, delta_, inversed_, min_, sound_, animation_speed_)
276 | local animation_speed_ = animation_speed_ or anim_speed_default
277 |
278 | local min_ = min_ or 0
279 | local delta_ = delta_ or 0.5
280 |
281 | local inversed = 1
282 | if inversed_ then
283 | inversed = -1
284 | end
285 |
286 | return {
287 | class = {class_type.TUMB, class_type.TUMB},
288 | hint = hint_,
289 | device = device_,
290 | action = {command_, command_},
291 | arg = {arg_, arg_},
292 | arg_value = {-delta_ * inversed, delta_ * inversed},
293 | arg_lim = {
294 | {min_, min_ + delta_ * (count_ - 1)},
295 | {min_, min_ + delta_ * (count_ - 1)}
296 | },
297 | updatable = true,
298 | use_OBB = true,
299 | animated = {true, true},
300 | animation_speed = {animation_speed_, animation_speed_},
301 | sound = sound_ and {{sound_, sound_}} or nil
302 | }
303 | end
304 |
305 | function multiposition_switch_limited(hint_, device_, command_, arg_, count_, delta_, inversed_, min_, sound_, animation_speed_)
306 | local animation_speed_ = animation_speed_ or anim_speed_default
307 |
308 | local min_ = min_ or 0
309 | local delta_ = delta_ or 0.5
310 |
311 | local inversed = 1
312 | if inversed_ then
313 | inversed = -1
314 | end
315 |
316 | return {
317 | class = {class_type.TUMB, class_type.TUMB},
318 | hint = hint_,
319 | device = device_,
320 | action = {command_, command_},
321 | arg = {arg_, arg_},
322 | arg_value = {-delta_ * inversed, delta_ * inversed},
323 | arg_lim = {
324 | {min_, min_ + delta_ * (count_ - 1)},
325 | {min_, min_ + delta_ * (count_ - 1)}
326 | },
327 | updatable = true,
328 | use_OBB = true,
329 | cycle = false,
330 | animated = {true, true},
331 | animation_speed = {animation_speed_, animation_speed_},
332 | sound = sound_ and {{sound_, sound_}} or nil
333 | }
334 | end
335 |
336 | -- rotary axis with push button
337 | function default_button_axis(hint_, device_, command_1, command_2, arg_1, arg_2, limit_1, limit_2)
338 | local limit_1_ = limit_1 or {0, 1.0}
339 | local limit_2_ = limit_2 or {0, 1.0}
340 | return {
341 | class = {class_type.BTN, class_type.LEV},
342 | hint = hint_,
343 | device = device_,
344 | action = {command_1, command_2},
345 | stop_action = {command_1, 0},
346 | arg = {arg_1, arg_2},
347 | arg_value = {1, 0.5},
348 | arg_lim = {limit_1_, limit_2_},
349 | animated = {false, true},
350 | animation_speed = {1, 1},
351 | gain = {1.0, 0.5},
352 | relative = {false, false},
353 | updatable = true,
354 | use_OBB = true,
355 | use_release_message = {true, false}
356 | }
357 | end
358 |
359 | -- NOT IN USE
360 | function default_animated_lever(hint_, device_, command_, arg_, animation_speed_,arg_lim_,arg_value_)
361 | local arg_lim = arg_lim_ or {0.0,1.0}
362 | local arg_value = arg_value_ or 1.0
363 | return {
364 | class = {class_type.TUMB, class_type.TUMB},
365 | hint = hint_,
366 | device = device_,
367 | action = {command_, command_},
368 | arg = {arg_, arg_},
369 | arg_value = {arg_value, -arg_value},
370 | arg_lim = {arg_lim, arg_lim},
371 | updatable = true,
372 | gain = {0.1, 0.1},
373 | animated = {true, true},
374 | animation_speed = {animation_speed_, animation_speed_}
375 | }
376 | end
377 | -- default_button_tumb = bouton � deux commandes
378 | -- bouton gauche commande 1
379 | -- bouton droit commande 2
380 | -- stop_action = {command1_,0}, => le bouton gauche revient au 0, alors que le bouton droit non/ the left button returns to 0, while the right button does not
381 | -- stop_action = {command1_,command2_}, => le bouton gauche et le bouton droit reviennent au 0/ left button and right button return to 0
382 | function default_button_tumb(hint_, device_, command1_, command2_, arg_,style)
383 | if style == 1 or style == nil then
384 | stop_action_ = {command1_,0}
385 | elseif style == 2 then -- speedbrake
386 | stop_action_ = {command1_,command2_}
387 | end
388 | return {
389 | class = {class_type.TUMB,class_type.TUMB},
390 | hint = hint_,
391 | device = device_,
392 | action = {command1_,command2_},
393 | stop_action = stop_action_,
394 | arg = {arg_,arg_},
395 | arg_value = {1,1},
396 | arg_lim = {{0,1},{0,1}},
397 | updatable = true,
398 | use_OBB = true,
399 | use_release_message = {true,false}
400 | }
401 | end
402 |
--------------------------------------------------------------------------------
/Cockpit/Scripts/command_defs.lua:
--------------------------------------------------------------------------------
1 | local function counter()
2 | count = count + 1
3 | return count
4 | end
5 |
6 | Keys =
7 | {
8 | iCommandToggleReceiveMode = 1626;
9 | iCommandPlaneAttackMyTarget = 118;
10 | iCommandToggleCommandMenu = 179;
11 | iCommandPlanePickleOn = 350;
12 | iCommandPlanePickleOff = 351;
13 | iCommandPlaneFire = 84;
14 | iCommandPlaneFireOff = 85;
15 | iCommandSensorReset = 1635;
16 | iCommandPlaneRadarChangeMode = 285;
17 | iCommandPlaneRadarCenter = 92;
18 | iCommandPlaneChangeRadarPRF = 394;
19 | iCommandPlaneEOSOnOff = 87;
20 | iCommandPlaneRadarLeft = 88;
21 | iCommandPlaneRadarRight = 89;
22 | iCommandPlaneRadarUp = 90;
23 | iCommandPlaneRadarDown = 91;
24 | iCommandPlaneRadarStop = 235;
25 | iCommandSelecterLeft = 139;
26 | iCommandSelecterRight = 140;
27 | iCommandSelecterUp = 141;
28 | iCommandSelecterDown = 142;
29 | iCommandSelecterStop = 230;
30 | iCommandPlaneZoomIn = 103;
31 | iCommandPlaneZoomOut = 104;
32 | iCommandIncreaseRadarScanArea = 263;
33 | iCommandDecreaseRadarScanArea = 262;
34 | iCommandPlaneChangeLock = 100;
35 | iCommandPlaneModeNAV = 105;
36 | iCommandPlaneModeBVR = 106;
37 | iCommandPlaneModeVS = 107;
38 | iCommandPlaneModeBore = 108;
39 | iCommandPlaneModeHelmet = 109;
40 | iCommandPlaneModeFI0 = 110;
41 | iCommandPlaneModeGround = 111;
42 | iCommandPlaneModeGrid = 112;
43 | iCommandPlaneModeCannon = 113;
44 | iCommandPlaneFlaps = 72;
45 | iCommandPlaneFlapsOn = 145;
46 | iCommandPlaneFlapsOff = 146;
47 | iCommandPlaneHeadLightOnOff = 328;
48 | iCommandPlaneCobra = 121;
49 | iCommandPlaneFuelOn = 79;
50 | iCommandPlaneFuelOff = 80;
51 | iCommandPlaneFSQuantityIndicatorSelectorMAIN= 1093;
52 | iCommandPlaneFSQuantityIndicatorSelectorEXTCTR= 1096;
53 | iCommandPlaneFSQuantityIndicatorTest = 1097;
54 | iCommandPlaneStabCancel = 408;
55 | iCommandPlaneStabHbarBank = 387;
56 | iCommandPlaneStabHbar = 389;
57 | iCommandPlaneStabHorizon = 388;
58 | iCommandPlaneRouteAutopilot = 429;
59 | iCommandPlaneAutopilot = 62;
60 | iCommandHelicopter_PPR_button_T_up = 303;
61 | iCommandHelicopter_PPR_button_H_up = 302;
62 | iCommandHelicopter_PPR_button_K_up = 301;
63 | iCommandPlaneRightMFD_OSB1 = 672;
64 | iCommandPowerOnOff = 315;
65 | iCommandLeftEngineStart = 311;
66 | iCommandRightEngineStart = 312;
67 | iCommandLeftEngineStop = 313;
68 | iCommandRightEngineStop = 314;
69 | iCommandPlaneDropSnar = 77;
70 | iCommandPlaneDropSnarOnce = 176;
71 | iCommandPlaneDropFlareOnce = 357;
72 | iCommandPlaneDropChaffOnce = 358;
73 | iCommandActiveJamming = 136;
74 | iCommandPlaneHUDFilterOnOff = 247;
75 | iCommandPlaneGear = 68;
76 | iCommandPlaneFonar = 71;
77 | iCommandPlaneLightsOnOff = 175;
78 | iCommandPlaneCockpitIllumination = 300;
79 | iCommandPlaneJettisonWeapons = 82;
80 | iCommandPlaneJettisonFuelTanks = 178,
81 | iCommandPlaneRadarOnOff = 86;
82 | iCommandHUDBrightnessUp = 746;
83 | iCommandHUDBrightnessDown = 747;
84 | iCommandBrightnessILS = 156;
85 | iCommandToggleMirrors = 1625;
86 | iCommandPlaneAUTOnOff = 63;
87 | iCommandPlaneAUTIncrease = 64;
88 | iCommandPlane_ADF_Mode_change = 583;
89 | iCommandPlaneAirRefuel = 155;
90 | iCommandPlane_P_51_WarEmergencyPower = 1601;
91 | iCommandPlane_ADF_Test = 588;
92 | iCommandPlaneHook = 69;
93 | iCommandPlanePackWing = 70;
94 | iCommandPlane_HOTAS_ChinaHatForward = 566;
95 | iCommandPlaneWheelParkingBrake = 855;
96 | iCommandPlaneWheelBrakeLeftOn = 961;
97 | iCommandPlaneWheelBrakeLeftOff = 962;
98 | iCommandPlaneWheelBrakeRightOn = 963;
99 | iCommandPlaneWheelBrakeRightOff = 964;
100 | iCommandPlane_HOTAS_NoseWheelSteeringButton = 562;
101 | iCommandPlaneEject = 83;
102 | iCommandChangeRWRMode = 286;
103 | iCommandPlaneThreatWarnSoundVolumeDown = 409;
104 | iCommandPlaneThreatWarnSoundVolumeUp = 410;
105 | iCommandPlaneResetMasterWarning = 144;
106 | iCommandPlaneSAUHRadio = 60;
107 | iCommandFlightClockReset = 288;
108 | iCommandClockElapsedTimeReset = 1629;
109 | iCommandCockpitClickModeOnOff = 363;
110 | iCommandPlaneStabHrad = 390;
111 | iCommandPlaneStabTangBank = 386;
112 | iCommandAltimeterPressureIncrease = 316;
113 | iCommandAltimeterPressureDecrease = 317;
114 | iCommandAltimeterPressureStop = 318;
115 | iCommandActiveIRJamming = 391;
116 | iCommandChangeRippleInterval = 282;
117 | iCommandChangeRippleIntervalDown = 308;
118 | iCommandChangeRippleQuantity = 281;
119 | iCommandChangeGunRateOfFire = 280;
120 | iCommandPlaneParachute = 76;
121 | iCommandPlaneChangeTarget = 102;
122 | iCommandPlaneUFC_STEER_DOWN = 1315;
123 | iCommandThrottleIncrease = 1032;
124 | iCommandThrottleDecrease = 1033;
125 | iCommandThrottleStop = 1034;
126 | iCommandPlaneChangeWeapon = 101;
127 | iCommandPlaneAirBrake = 73;
128 | iCommandPlaneLaserRangerOnOff = 392;
129 | iCommandPlaneTrimLeft = 93;
130 | iCommandPlaneTrimRight = 94;
131 | iCommandPlaneTrimUp = 95;
132 | iCommandPlaneTrimDown = 96;
133 | iCommandPlaneTrimStop = 215;
134 | iCommandPlaneNightTVOnOff = 393;
135 | iCommandPlaneWheelBrakeOn = 74;
136 | iCommandPlaneWheelBrakeOff = 75;
137 | iCommandChangeReleaseMode = 284;
138 | iCommandPlaneFSQuantityIndicatorSelectorINT = 1092;
139 | iCommandPlaneLaunchPermissionOverride = 349;
140 | iCommandPlaneTrimOn = 957;
141 | iCommandPlaneTrimOff = 958;
142 | iCommandPlaneAntiCollisionLights = 518;
143 | iCommandPlaneWingtipSmokeOnOff = 78;
144 |
145 |
146 |
147 | }
148 | local LMFD_OSB_01 = 10000;
149 |
150 | count = 3500
151 |
152 | device_commands =
153 | {
154 | CLIC_FLAPS_UP = counter(),
155 | CLIC_FLAPS_DOWN = counter(),
156 | CLIC_FLAPS_LAND = counter(),
157 | CLIC_FLAPS_MULTI = counter(),
158 | CLIC_LANDING_LIGHTS = counter(),
159 | CLIC_LANDING_LIGHTS_F15 = counter(),
160 | CLIC_ASC_DC = counter(),
161 | CLIC_FUEL_DUMP_ON = counter(),
162 | CLIC_FUEL_DUMP_OFF = counter(),
163 | CLIC_FUEL_DUMP = counter(),
164 | CLIC_BINGO = counter(),
165 | CLIC_BINGO_STOP = counter(),
166 | CLIC_AUTO_DAMPER = counter(),
167 | CLIC_AUTO_STOP = counter(),
168 | CLIC_AUTO_BARO = counter(),
169 | CLIC_AUTO_LEVEL = counter(),
170 | CLIC_AUTO_ROUTE = counter(),
171 | CLIC_AUTO_RADAR = counter(),
172 | CLIC_AUTO_ALT = counter(),
173 | CLIC_AUTO_GCA = counter(),
174 | CLIC_AUTO_PATH = counter(),
175 | CLIC_AUTO_REAP = counter(),
176 | CLIC_LA = counter(),
177 | CLIC_HUD_REPEATER = counter(),
178 | CLIC_POWER = counter(),
179 | CLIC_ENG_L_START = counter(),
180 | CLIC_ENG_R_START = counter(),
181 | CLIC_ENG_L_STOP = counter(),
182 | CLIC_ENG_R_STOP = counter(),
183 | CLIC_CTM = counter(),
184 | CLIC_CTM_CHAFF = counter(),
185 | CLIC_CTM_FLARE = counter(),
186 | CLIC_CTM_F15 = counter(),
187 | CLIC_JAM = counter(),
188 | CLIC_JAM_IR = counter(),
189 | CLIC_HUD_FILTER = counter(),
190 | CLIC_GEAR = counter(),
191 | CLIC_CANOPY = counter(),
192 | CLIC_NAVLIGHTS = counter(),
193 | CLIC_COCKPITLIGHT = counter(),
194 | CLIC_COCKPITLIGHT_F15 = counter(),
195 | CLIC_JETTINSON = counter(),
196 | CLIC_JETTINSON_EMER = counter(),
197 | CLIC_JETTINSON_TANK = counter(),
198 | CLIC_RADAR_ON_OFF = counter(),
199 | CLIC_RADAR_ON_OFF_F15 = counter(),
200 | CLIC_EOS_ON_OFF = counter(),
201 | CLIC_RADAR_MODE = counter(),
202 | CLIC_RADAR_FREQ = counter(),
203 | CLIC_RADAR_FREQ_F15 = counter(),
204 | CLIC_RADAR_AZ = counter(),
205 | CLIC_RADAR_EL = counter(),
206 | CLIC_RADAR_RANGE = counter(),
207 | CLIC_SCAN_L = counter(),
208 | CLIC_SCAN_R = counter(),
209 | CLIC_SCAN_C = counter(),
210 | CLIC_SCAN_EL = counter(),
211 | CLIC_MODE = counter(),
212 | CLIC_MODE_QUICK = counter(),
213 | CLIC_MODE_F15 = counter(),
214 | CLIC_HUD_COLOR = counter(),
215 | CLIC_HUD_COLOR_F15 = counter(),
216 | CLIC_HUD_BRT = counter(),
217 | CLIC_NAVMODES = counter(),
218 | CLIC_MIRROR = counter(),
219 | CLIC_MIRROR_UPDL = counter(),
220 | CLIC_MIRROR_UPDR = counter(),
221 | CLIC_MIRROR_UPDU = counter(),
222 | CLIC_ENG_INLET = counter(),
223 | CLIC_EMER_BRAKE = counter(),
224 | CLIC_EMERGENCY_BRAKES_ON = counter(),
225 | CLIC_EMERGENCY_BRAKES_OFF = counter(),
226 | CLIC_NOSE_WHEEL = counter(),
227 | CLIC_AUTOTHRUST = counter(),
228 | CLIC_AUTOTHRUST_I = counter(),
229 | CLIC_AUTOTHRUST_D = counter(),
230 | CLIC_ASC_REFUEL = counter(),
231 | CLIC_RBOOM = counter(),
232 | CLIC_AFTERURN_S = counter(),
233 | CLIC_RLIGHTS = counter(),
234 | CLIC_TAILHOOK = counter(),
235 | CLIC_WINGSF = counter(),
236 | CLIC_EJECT = counter(),
237 | CLIC_RWR_MODE = counter(),
238 | CLIC_RWR_SOUND = counter(),
239 | CLIC_WARNING_RST = counter(),
240 | CLIC_DSP_ZOOMIN = counter(),
241 | CLIC_DSP_ZOOMOUT = counter(),
242 | CLIC_CLOCK_F = counter(),
243 | CLIC_CLOCK_E = counter(),
244 | CLIC_ALTIMETER = counter(),
245 | CLIC_RIPPLE_INT = counter(),
246 | CLIC_RIPPLE_QT = counter(),
247 | CLIC_RIPPLE_QTA10 = counter(),
248 | CLIC_CUTBURST = counter(),
249 | CLIC_PARACHUTE = counter(),
250 | CLIC_WAYPOINT = counter(),
251 | CLIC_CHUTE_DEP = counter(),
252 | CLIC_CHUTE_REL = counter(),
253 | CLIC_CHUTE = counter(),
254 | CLIC_AIRBRAKE = counter(),
255 | CLIC_CTM_ONCE = counter(),
256 | CLIC_LOCK_REL = counter(),
257 | CLIC_LOCK = counter(),
258 | CLIC_STATION = counter(),
259 | CLIC_FIRE = counter(),
260 | CLIC_MODE_AA = counter(),
261 | CLIC_LASER = counter(),
262 | CLIC_TV = counter(),
263 | CLIC_TV_NIGHT = counter(),
264 | CLIC_TGT_D = counter(),
265 | CLIC_TGT_U = counter(),
266 | CLIC_TGT_L = counter(),
267 | CLIC_TGT_R = counter(),
268 | CLIC_TGT_C = counter(),
269 | CLIC_ZOOM = counter(),
270 | CLIC_ZOOM_F15 = counter(),
271 | CLIC_TRIM_L = counter(),
272 | CLIC_TRIM_R = counter(),
273 | CLIC_TRIM_U = counter(),
274 | CLIC_TRIM_D = counter(),
275 | CLIC_ASP = counter(),
276 | CLIC_TARGET_UD = counter(),
277 | CLIC_TARGET_LR = counter(),
278 | CLIC_GRID = counter(),
279 | CLIC_WHEELBRAKE = counter(),
280 | CLIC_PRS_SGL = counter(),
281 | CLIC_COM = counter(),
282 | CLIC_COM_R = counter(),
283 | CLIC_TAKEOFFTRIMF15 = counter(),
284 | CLIC_COL_LIGHTS = counter(),
285 | CLIC_TEST = counter(),
286 |
287 | }
--------------------------------------------------------------------------------
/Cockpit/Scripts/device_init.lua:
--------------------------------------------------------------------------------
1 | dofile(LockOn_Options.script_path.."devices.lua")
2 | dofile(LockOn_Options.script_path.."supported.lua") --Call lua file to detect current aircraft
3 | dofile(LockOn_Options.common_script_path.."tools.lua")
4 |
5 | if supported == true then --Mod launching logic.
6 | MainPanel = {"ccMainPanel",LockOn_Options.script_path.."mainpanel_init.lua", {} }
7 | creators = {}
8 | creators[devices.CLICKABLE] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/clickable.lua"}
9 | creators[devices.PNT_UPD] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/PNT_update.lua"}
10 | creators[devices.UTILS] = {"avLuaDevice" ,LockOn_Options.script_path.."UTILS/utils.lua"}
11 |
12 | end
--------------------------------------------------------------------------------
/Cockpit/Scripts/devices.lua:
--------------------------------------------------------------------------------
1 | local count = 0
2 | local function counter()
3 | count = count + 1
4 | return count
5 | end
6 | -------DEVICE ID-------
7 | devices = {}
8 | devices["CLICKABLE"] = counter()
9 | devices["PNT_UPD"] = counter()
10 | devices["UTILS"] = counter()
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Cockpit/Scripts/dump.lua:
--------------------------------------------------------------------------------
1 | function basic_dump (o)
2 | if type(o) == "number" then
3 | return tostring(o)
4 | elseif type(o) == "string" then
5 | return string.format("%q", o)
6 | else -- nil, boolean, function, userdata, thread; assume it can be converted to a string
7 | return tostring(o)
8 | end
9 | end
10 |
11 |
12 | function dump (name, value, saved, result)
13 | seen = seen or {} -- initial value
14 | result = result or ""
15 | result=result..name.." = "
16 | if type(value) ~= "table" then
17 | result=result..basic_dump(value).."\n"
18 | log.info(result)
19 | result = ""
20 | elseif type(value) == "table" then
21 | if seen[value] then -- value already saved?
22 | result=result.."->"..seen[value].."\n" -- use its previous name
23 | log.info(result)
24 | result = ""
25 | else
26 | seen[value] = name -- save name for next time
27 | result=result.."{}\n" -- create a new table
28 | log.info(result)
29 | result = ""
30 | for k,v in pairs(value) do -- save its fields
31 | local fieldname = string.format("%s[%s]", name,
32 | basic_dump(k))
33 | if fieldname~="_G[\"seen\"]" then
34 | result=dump(fieldname, v, seen, result)
35 | end
36 | end
37 | end
38 | end
39 | return result
40 | end
41 |
42 | function dump_params(tbl)
43 | if not indent then indent = 0 end
44 | for k, v in pairs(tbl) do
45 | formatting = string.rep(" ", indent) .. k .. ": "
46 | if type(v) == "table" then
47 | log.info(formatting)
48 | dump_params(v, indent+1)
49 | elseif type(v) == 'boolean' then
50 | log.info(formatting .. tostring(v))
51 | else
52 | log.info(formatting .. v)
53 | end
54 | end
55 | end
--------------------------------------------------------------------------------
/Cockpit/Scripts/mainpanel_init.lua:
--------------------------------------------------------------------------------
1 | dofile(LockOn_Options.script_path.."dump.lua")
2 | local aircraft = get_aircraft_type()
3 |
4 | if aircraft=="Su-27"or aircraft=="J-11A" then
5 | shape_name = "SU-27-CLICKABLE"
6 | elseif aircraft=="Su-33" then
7 | shape_name = "SU-33-CLICKABLE"
8 | elseif aircraft=="Su-25T" then
9 | shape_name = "SU-25T-CLICKABLE"
10 | elseif aircraft=="Su-25" then
11 | shape_name = "SU-25-CLICKABLE"
12 | elseif aircraft=="MiG-29A"or aircraft=="MiG-29G"or aircraft=="MiG-29S" then
13 | shape_name = "MIG-29-CLICKABLE"
14 | elseif aircraft=="A-10A" then
15 | shape_name = "A-10A-CLICKABLE"
16 | elseif aircraft=="VSN_MirageIIIC" then
17 | shape_name = "F-15C-CLICKABLE"
18 | elseif aircraft=="VSN_MirageIIIS" then
19 | shape_name = "F-15C-CLICKABLE"
20 | elseif aircraft=="F-15C" then
21 | shape_name = "F-15C-CLICKABLE"
22 | end
23 |
24 |
25 |
26 | local controllers = LoRegisterPanelControls()
27 |
28 | THROTTLE_L_PNTS = CreateGauge("parameter")
29 | THROTTLE_L_PNTS.arg_number = 1
30 | THROTTLE_L_PNTS.input = {0,1}
31 | THROTTLE_L_PNTS.output = {-1,0}
32 | THROTTLE_L_PNTS.parameter_name = "BASE_SENSOR_LEFT_THROTTLE_POS"
33 |
34 | THROTTLE_R_PNTS = CreateGauge("parameter")
35 | THROTTLE_R_PNTS.arg_number = 2
36 | THROTTLE_R_PNTS.input = {0,1}
37 | THROTTLE_R_PNTS.output = {-1,0}
38 | THROTTLE_R_PNTS.parameter_name = "BASE_SENSOR_RIGHT_THROTTLE_POS"
39 |
40 |
41 | STICK_PITCH_PNTS = CreateGauge("parameter")
42 | STICK_PITCH_PNTS.arg_number = 3
43 | STICK_PITCH_PNTS.input = {-1,1}
44 | STICK_PITCH_PNTS.output = {-1,1}
45 | STICK_PITCH_PNTS.parameter_name = "BASE_SENSOR_STICK_PITCH_NORMED"
46 |
47 | STICK_ROLL_PNTS = CreateGauge("parameter")
48 | STICK_ROLL_PNTS.arg_number = 4
49 | STICK_ROLL_PNTS.input = {-1,1}
50 | STICK_ROLL_PNTS.output = {-1,1}
51 | STICK_ROLL_PNTS.parameter_name = "BASE_SENSOR_STICK_ROLL_NORMED"
52 |
53 | CANOPY_PNTS = CreateGauge("parameter")
54 | CANOPY_PNTS.arg_number = 5
55 | CANOPY_PNTS.input = {-1,1}
56 | CANOPY_PNTS.output = {-1,1}
57 | CANOPY_PNTS.parameter_name = "BASE_SENSOR_CANOPY_POS"
58 |
59 | GEARLEVER_PNTS = CreateGauge("parameter")
60 | GEARLEVER_PNTS.arg_number = 6
61 | GEARLEVER_PNTS.input = {0,1}
62 | GEARLEVER_PNTS.output = {100,-100}
63 | GEARLEVER_PNTS.parameter_name = "BASE_SENSOR_GEAR_HANDLE"
64 |
65 | CANOPYLEVER_PNTS = CreateGauge("parameter")
66 | CANOPYLEVER_PNTS.arg_number = 7
67 | CANOPYLEVER_PNTS.input = {-1,1}
68 | CANOPYLEVER_PNTS.output = {-1,1}
69 | CANOPYLEVER_PNTS.parameter_name = "CANOPYLEVER_PNTS"
70 |
71 | if aircraft=="F-15C" then
72 | THROTTLE_R_PNTS = CreateGauge("parameter")
73 | THROTTLE_R_PNTS.arg_number = 2
74 | THROTTLE_R_PNTS.input = {-1,1}
75 | THROTTLE_R_PNTS.output = {-1,1}
76 | THROTTLE_R_PNTS.parameter_name = "BASE_SENSOR_RIGHT_THROTTLE_POS"
77 | end
78 |
79 |
80 |
81 |
82 |
83 | --[[
84 | BASE_SENSOR_RADALT:5424.042480\
85 | BASE_SENSOR_NOSE_GEAR_UP:1.000000\
86 | BASE_SENSOR_AOS:0.000000\
87 | BASE_SENSOR_STICK_PITCH_NORMED:0.044524\
88 | BASE_SENSOR_BAROALT:6174.404297\
89 | BASE_SENSOR_AOA:0.038323\
90 | BASE_SENSOR_IAS:188.135193\
91 | BASE_SENSOR_VERTICAL_SPEED:0.000000\
92 | BASE_SENSOR_TAS:256.944458\
93 | BASE_SENSOR_FLAPS_POS:0.000000\
94 | BASE_SENSOR_HELI_CORRECTION:0.000000\
95 | BASE_SENSOR_VERTICAL_ACCEL:1.000000\
96 | BASE_SENSOR_LEFT_THROTTLE_RAW_CONTROL:0.000000\
97 | BASE_SENSOR_MACH:0.812169\
98 | BASE_SENSOR_LEFT_GEAR_UP:1.000000\
99 | BASE_SENSOR_HORIZONTAL_ACCEL:0.000000\
100 | EJECTION_BLOCKED_0:0.000000\
101 | BASE_SENSOR_LATERAL_ACCEL:0.000000\
102 | BASE_SENSOR_ROLL_RATE:0.000000\
103 | BASE_SENSOR_YAW_RATE:0.000000\
104 | BASE_SENSOR_PROPELLER_RPM:0.000000\
105 | BASE_SENSOR_PITCH_RATE:0.000000\
106 | BASE_SENSOR_LEFT_ENGINE_TEMP_BEFORE_TURBINE:320.000000\
107 | BASE_SENSOR_LEFT_ENGINE_FUEL_CONSUPMTION:0.000000\
108 | BASE_SENSOR_LEFT_THROTTLE_POS:0.000000\
109 | BASE_SENSOR_WOW_NOSE_GEAR:0.000000\
110 | BASE_SENSOR_ROLL:-0.000000\
111 | BASE_SENSOR_MAG_HEADING:3.773644\
112 | BASE_SENSOR_LEFT_GEAR_DOWN:0.000000\
113 | BASE_SENSOR_HEADING:2.395708\
114 | BASE_SENSOR_FUEL_TOTAL:6580.000000\
115 | BASE_SENSOR_SPEED_BRAKE_POS:0.000000\
116 | BASE_SENSOR_GEAR_HANDLE:0.000000\
117 | BASE_SENSOR_NOSE_GEAR_DOWN:0.000000\
118 | EJECTION_INITIATED_0:-1.000000\
119 | BASE_SENSOR_RIGHT_ENGINE_FAN_RPM:70.000008\
120 | BASE_SENSOR_WOW_LEFT_GEAR:0.000000\
121 | BASE_SENSOR_WOW_RIGHT_GEAR:0.000000\
122 | BASE_SENSOR_RIGHT_GEAR_DOWN:0.000000\
123 | BASE_SENSOR_RIGHT_GEAR_UP:1.000000\
124 | BASE_SENSOR_ALTIMETER_ATMO_PRESSURE_HG:0.000000\
125 | BASE_SENSOR_STICK_ROLL_POS:4.452443\
126 | BASE_SENSOR_STICK_PITCH_POS:0.000000\
127 | BASE_SENSOR_RIGHT_ENGINE_RPM:70.000008\
128 | BASE_SENSOR_RUDDER_POS:0.000000\
129 | BASE_SENSOR_HELI_COLLECTIVE:0.000000\
130 | BASE_SENSOR_CANOPY_POS:0.000000\
131 | BASE_SENSOR_RIGHT_ENGINE_TEMP_BEFORE_TURBINE:320.000000\
132 | BASE_SENSOR_RIGHT_ENGINE_FUEL_CONSUMPTION:0.000000\
133 | BASE_SENSOR_CANOPY_STATE:0.000000\
134 | BASE_SENSOR_FLAPS_RETRACTED:1.000000\
135 | BASE_SENSOR_STICK_ROLL_NORMED:0.000000\
136 | BASE_SENSOR_RUDDER_NORMED:0.000000\
137 | BASE_SENSOR_PROPELLER_PITCH:0.000000\
138 | BASE_SENSOR_RELATIVE_TORQUE:0.000000\
139 | BASE_SENSOR_PROPELLER_TILT:0.000000\
140 | BASE_SENSOR_LEFT_ENGINE_RPM:70.000008\
141 | BASE_SENSOR_LEFT_ENGINE_FAN_RPM:70.000008\
142 | BASE_SENSOR_RIGHT_THROTTLE_POS:0.000000\
143 | BASE_SENSOR_RIGHT_THROTTLE_RAW_CONTROL:0.000000\
144 |
145 | ]]
146 | need_to_be_closed = true -- close lua state after initialization
147 |
148 |
--------------------------------------------------------------------------------
/Cockpit/Scripts/supported.lua:
--------------------------------------------------------------------------------
1 | local aircraft = get_aircraft_type() --Reading the variable
2 | if aircraft == "Su-27" or
3 | aircraft == "Su-33" or
4 | aircraft == "J-11A" or
5 | aircraft == "Su-25T" or
6 | aircraft == "Su-25" or
7 | aircraft =="MiG-29A" or
8 | aircraft =="MiG-29G" or
9 | aircraft =="MiG-29S" or
10 | aircraft =="A-10A" or
11 | aircraft =="VSN_MirageIIIS" or
12 | aircraft =="VSN_MirageIIIC" or
13 | aircraft =="F-15C" then
14 | supported = true --The mod will start
15 | else
16 | supported = false --The mod will not start
17 | end
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/F-15C.oml:
--------------------------------------------------------------------------------
1 |
2 |
3 | f0dbfd72-8477-47c9-8edf-ff9963efbeec
4 | F-15C
5 | C:\Program Files (x86)\Steam\steamapps\common\DCSWorld
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C Standalone/Mods/aircraft/F-15C/Cockpit/KneeboardRight/SYSTEMS/clickable.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 |
6 |
7 | local update_time_step = 0.02 --update will be called 50 times per second
8 | make_default_activity(update_time_step)
9 | sensor_data = get_base_data()
10 | local dev = GetSelf()
11 | local aircraft = get_aircraft_type()
12 | --------------------------------------------------------------------
13 | -- Update Connectors Position Step 1/3
14 | local connector = {}
15 | connector["TMB_FUEL_OPEN/CLOSE"] = nil
16 | connector["TBM_Wheels"] = nil
17 | connector["MIRROR_1"] = nil
18 | connector["MIRROR_2"] = nil
19 | connector["MIRROR_3"] = nil
20 |
21 | --------------------------------------------------------------------
22 | -- Variables Declaration
23 | local mastermodeF15 = 0
24 |
25 | function reset_mastermodeF15(mastermodeF15)
26 | local max_mastermodeF15 = 5
27 |
28 | if mastermodeF15 > max_mastermodeF15 then
29 | return 2
30 | elseif mastermodeF15 <2 then
31 | return 2
32 | else
33 | return mastermodeF15
34 | end
35 | end
36 |
37 | function post_initialize()
38 | --print_message_to_user(aircraft,15)
39 | --print_message_to_user("DEV.CLICKABLE_GENERIC_SYSTEM",0.2)
40 |
41 | --dispatch_action(nil,Keys.iCommandCockpitClickModeOnOff)
42 | --show_param_handles_list()
43 | local birth = LockOn_Options.init_conditions.birth_place
44 | --------------------------------------------------------------------------------------------------------
45 | -- Update Connectors Position Step 2/3
46 | connector["TMB_FUEL_OPEN/CLOSE"] = get_clickable_element_reference("TMB_FUEL_OPEN/CLOSE")
47 | connector["TBM_Wheels"] = get_clickable_element_reference("TBM_Wheels")
48 | connector["MIRROR_1"] = get_clickable_element_reference("MIRROR_1")
49 | connector["MIRROR_2"] = get_clickable_element_reference("MIRROR_2")
50 | connector["MIRROR_3"] = get_clickable_element_reference("MIRROR_3")
51 |
52 | --------------------------------------------------------------------------------------------------------
53 |
54 | if birth=="GROUND_HOT" or birth=="AIR_HOT" then
55 |
56 | dev:performClickableAction(device_commands.CLIC_HUD_BRT, 0.75, false)
57 | dev:performClickableAction(device_commands.CLIC_HUD_BRT_2, 0.75, false)
58 | dev:performClickableAction(device_commands._321, 0.20, false)
59 | dev:performClickableAction(device_commands._361, -1, false)
60 | dev:performClickableAction(device_commands._404, 1, false)
61 | dev:performClickableAction(device_commands._405, 1, false)
62 | dev:performClickableAction(device_commands._406, 1, false)
63 | dev:performClickableAction(device_commands._407, 1, false)
64 | dev:performClickableAction(device_commands.CLIC_LENG, 1, false)
65 | dev:performClickableAction(device_commands.CLIC_RENG, 1, false)
66 | elseif birth=="GROUND_COLD" then
67 | dev:performClickableAction(device_commands.CLIC_LENG, -1, false)
68 | dev:performClickableAction(device_commands.CLIC_RENG, -1, false)
69 | end
70 |
71 |
72 |
73 | end
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | function SetCommand(command,value)
87 |
88 | if command == device_commands.CLIC_MIRROR and
89 | value == 1 then
90 | dispatch_action(nil,Keys.iCommandToggleMirrors)
91 |
92 | end
93 | if command == device_commands.CLIC_LENG then
94 | if value == 1 then
95 | dispatch_action(nil,Keys.iCommandLeftEngineStart)
96 | elseif value == -1 then
97 | dispatch_action(nil,Keys.iCommandLeftEngineStop)
98 | end
99 |
100 | end
101 | if command == device_commands.CLIC_RENG then
102 | if value == 1 then
103 | dispatch_action(nil,Keys.iCommandRightEngineStart)
104 | elseif value == -1 then
105 | dispatch_action(nil,Keys.iCommandRightEngineStop)
106 | end
107 |
108 | end
109 | if command == device_commands.CLIC_GEAR and
110 | value == 1 then
111 | dispatch_action(nil,Keys.iCommandPlaneGear)
112 | end
113 | if command == device_commands.CLIC_RADAR_ON_OFF_F15 then
114 | dispatch_action(nil,Keys.iCommandPlaneRadarOnOff)
115 | end
116 | if command == device_commands.CLIC_JETTINSON_TANK and
117 | value == 1 or
118 | command == device_commands.CLIC_JETTINSON_TANK2 and
119 | value == 1 then
120 | dispatch_action(nil,Keys.iCommandPlaneJettisonFuelTanks)
121 | end
122 | if command == device_commands.CLIC_MODE_F15 and
123 | value > 0 then
124 | mastermodeF15 = mastermodeF15 + 1
125 |
126 | elseif command == device_commands.CLIC_MODE_F15 and
127 | value < 0 then
128 | mastermodeF15 = mastermodeF15 - 1
129 |
130 | end
131 | if command == device_commands.CLIC_MODE_F15 then
132 | if mastermodeF15 == 2 then
133 | dispatch_action(nil,Keys.iCommandPlaneModeBVR)
134 | elseif mastermodeF15 == 3 then
135 | dispatch_action(nil,Keys.iCommandPlaneModeVS)
136 | elseif mastermodeF15 == 4 then
137 | dispatch_action(nil,Keys.iCommandPlaneModeBore)
138 | elseif mastermodeF15 == 5 then
139 | dispatch_action(nil,Keys.iCommandPlaneModeFI0)
140 | end
141 | mastermodeF15 = reset_mastermodeF15(mastermodeF15)
142 | end
143 | if command == device_commands.CLIC_RPORT and
144 | value == 1 then
145 | dispatch_action(nil,Keys.iCommandPlaneAirRefuel)
146 | end
147 |
148 | if command == device_commands.CLIC_TAKEOFFTRIMF15 then
149 | if value == 1 then
150 | dispatch_action(nil,Keys.iCommandPlaneTrimOn)
151 | elseif value == 0 then
152 | dispatch_action(nil,Keys.iCommandPlaneTrimOff)
153 | end
154 |
155 | end
156 | if command == device_commands.CLIC_RWR_MODE and
157 | value == 1 then
158 | dispatch_action(nil,Keys.iCommandChangeRWRMode)
159 | end
160 | if command == device_commands.CLIC_RWR_SOUND and
161 | value > 0 then
162 | dispatch_action(nil,Keys.iCommandPlaneThreatWarnSoundVolumeUp)
163 | elseif command == device_commands.CLIC_RWR_SOUND and
164 | value < 0 then
165 | dispatch_action(nil,Keys.iCommandPlaneThreatWarnSoundVolumeDown)
166 | end
167 |
168 | if command == device_commands.CLIC_NAVMODES and value ~=0 then
169 | dispatch_action(nil,Keys.iCommandPlaneModeNAV)
170 | end
171 |
172 | if command == device_commands.CLIC_WAYPOINT and
173 | value >0 then
174 | dispatch_action(nil,Keys.iCommandPlaneChangeTarget)
175 | elseif command == device_commands.CLIC_WAYPOINT and
176 | value <0 then
177 | dispatch_action(nil,Keys.iCommandPlaneUFC_STEER_DOWN)
178 | end
179 |
180 | if get_cockpit_draw_argument_value(320)>0 and
181 | get_cockpit_draw_argument_value(320)<0.29 then
182 |
183 | if command == device_commands.CLIC_JETTINSON then
184 |
185 | if value ==1 then
186 | dispatch_action(nil,Keys.iCommandPlaneJettisonWeapons)
187 | end
188 |
189 | end
190 | elseif get_cockpit_draw_argument_value(320)<-0.29 then
191 |
192 | if command == device_commands.CLIC_JETTINSON then
193 |
194 | if value ==1 then
195 | dispatch_action(nil,Keys.iCommandPlaneJettisonFuelTanks)
196 | end
197 |
198 | end
199 | end
200 |
201 |
202 | if command == device_commands.CLIC_HUD_BRT and value >0.5 or device_commands.CLIC_HUD_BRT_2 and value >0.5 then
203 |
204 | dispatch_action(nil,Keys.iCommandHUDBrightnessUp)
205 | dispatch_action(nil,Keys.iCommandHUDBrightnessUp)
206 | dispatch_action(nil,Keys.iCommandHUDBrightnessUp)
207 | dispatch_action(nil,Keys.iCommandHUDBrightnessUp)
208 |
209 |
210 |
211 | elseif command == device_commands.CLIC_HUD_BRT and value <0.5 or device_commands.CLIC_HUD_BRT_2 and value <0.5 then
212 |
213 | dispatch_action(nil,Keys.iCommandHUDBrightnessDown)
214 | dispatch_action(nil,Keys.iCommandHUDBrightnessDown)
215 | dispatch_action(nil,Keys.iCommandHUDBrightnessDown)
216 | dispatch_action(nil,Keys.iCommandHUDBrightnessDown)
217 |
218 |
219 | end
220 | if command == device_commands.CLIC_HUD_COLOR_F15 then
221 | dispatch_action(nil,Keys.iCommandBrightnessILS)
222 |
223 | end
224 |
225 |
226 |
227 | end
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 | function update()
237 |
238 | --------------------------------------------------------------------
239 | -- Update Connectors Position Step 3/3
240 | if connector["TMB_FUEL_OPEN/CLOSE"] then
241 | connector["TMB_FUEL_OPEN/CLOSE"]:update()
242 | end
243 | if connector["TBM_Wheels"] then
244 | connector["TBM_Wheels"]:update()
245 | end
246 | if connector["MIRROR_1"] then
247 | connector["MIRROR_1"]:update()
248 | end
249 | if connector["MIRROR_2"] then
250 | connector["MIRROR_2"]:update()
251 | end
252 | if connector["MIRROR_3"] then
253 | connector["MIRROR_3"]:update()
254 | end
255 | --------------------------------------------------------------------
256 | end
257 |
258 | need_to_be_closed = false -- close lua state after initialization
259 |
260 |
261 |
262 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C Standalone/Mods/aircraft/F-15C/Cockpit/KneeboardRight/SYSTEMS/cmd_control.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 |
6 |
7 | local update_time_step = 0.02
8 | make_default_activity(update_time_step)
9 | sensor_data = get_base_data()
10 | local dev = GetSelf()
11 | local aircraft = get_aircraft_type()
12 | --------------------------------------------------------------------
13 | --Variable declaration
14 | --------------------------------------------------------------------
15 | local cmd_type = 0 -- 1:Chaff 0:Both -1:Flare
16 | local cmd_mode = 0 -- 0:Automatic 1:Semi-Automatic 2:Man-Only 3:Standby 4:Off
17 | local cmd_stat = 0 -- 0:Off 1:Dispensing
18 | local cmd_stat_p = 0 -- cmd_stat previous state
19 | local cmd_timer = 0 -- timer chaff
20 | local cmd_timer_s = 1.5 -- timer value
21 | local CMD_ONOFF = 10000 -- command definition
22 | --------------------------------------------------------------------
23 | dev:listen_command(CMD_ONOFF) -- listening for command
24 | function post_initialize()
25 | --print_message_to_user("DEV.COUNTERMEASURES_SYSTEM",0.2)
26 | dev:performClickableAction(device_commands.CMD_MODE, 4, false)
27 | dev:performClickableAction(device_commands.CMD_SEL, 0, false)
28 | local birth = LockOn_Options.init_conditions.birth_place
29 |
30 |
31 | if birth=="GROUND_HOT" or birth=="AIR_HOT" then
32 |
33 |
34 | elseif birth=="GROUND_COLD" then
35 |
36 | end
37 |
38 |
39 |
40 | end
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | function SetCommand(command,value)
54 | if command == device_commands.CMD_MODE then
55 | cmd_mode = round(value*10, 0)
56 | if cmd_mode ~= 1 then
57 | cmd_stat = cmd_stat_p
58 | end
59 | end
60 | if command == device_commands.CMD_SEL then
61 | cmd_type = value
62 | end
63 | if command == CMD_ONOFF then
64 | if cmd_mode == 1 then
65 | cmd_timer = cmd_timer_s
66 | elseif cmd_mode == 2 then
67 | if cmd_type == 1 then
68 | dispatch_action(nil,Keys.iCommandPlaneDropChaffOnce)
69 | elseif cmd_type == 0 then
70 | dispatch_action(nil,Keys.iCommandPlaneDropSnarOnce)
71 | elseif cmd_type == -1 then
72 | dispatch_action(nil,Keys.iCommandPlaneDropFlareOnce)
73 | end
74 | elseif cmd_mode == 3 then
75 | print_message_to_user("CMD Mode STBY\nSelect Man-Only or Semi-Auto",3)
76 | elseif cmd_mode == 4 then
77 | print_message_to_user("CMD Mode OFF\nSelect Man-Only or Semi-Auto",3)
78 | elseif cmd_mode == 0 then
79 | print_message_to_user("CMD Mode Auto\nNot yet implemented\nSelect Man-Only or Semi-Auto",3)
80 | end
81 | if cmd_mode ~= 1 then
82 | cmd_timer = 0
83 | end
84 | if cmd_mode == 1 and
85 | cmd_stat == cmd_stat_p then
86 | cmd_stat = cmd_stat+1
87 | else
88 | cmd_stat = cmd_stat_p
89 | end
90 | end
91 |
92 |
93 | end
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 | function update()
104 | if cmd_timer > 0 then
105 | cmd_timer = cmd_timer - update_time_step
106 | if cmd_timer <= 0 then
107 | cmd_timer = 0
108 | if cmd_type == 1 then
109 | dispatch_action(nil,Keys.iCommandPlaneDropChaffOnce)
110 | elseif cmd_type == 0 then
111 | dispatch_action(nil,Keys.iCommandPlaneDropSnarOnce)
112 | elseif cmd_type == -1 then
113 | dispatch_action(nil,Keys.iCommandPlaneDropFlareOnce)
114 | end
115 | if cmd_stat == 1 then
116 | cmd_timer = cmd_timer_s
117 | elseif cmd_stat == 0 or
118 | cmd_mode ~= 1 then
119 | cmd_timer = 0
120 | end
121 | end
122 | end
123 | end
124 | need_to_be_closed = false
125 |
126 |
127 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C Standalone/Mods/aircraft/F-15C/Cockpit/KneeboardRight/SYSTEMS/elec_control.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 |
6 |
7 | local update_time_step = 0.02 --update will be called 50 times per second
8 | make_default_activity(update_time_step)
9 | sensor_data = get_base_data()
10 | local dev = GetSelf()
11 | local aircraft = get_aircraft_type()
12 | --------------------------------------------------------------------
13 | -- Variables Declaration
14 | local GND_EPS ,GND_PWR_2,GND_PWR_3,GND_PWR_4,GND_PWR_CC
15 | local SYSTEM_STAT,SYSTEM_TARGET
16 | local AC_BUS_1 = get_param_handle("AC_BUS_1")
17 | local AC_BUS_2 = get_param_handle("AC_BUS_2")
18 | local DC_BUS_1 = get_param_handle("DC_BUS_1")
19 | local DC_BUS_2 = get_param_handle("DC_BUS_2")
20 | local ECS = get_param_handle("ECS_READY")
21 | local birth = LockOn_Options.init_conditions.birth_place
22 | --------------------------------------------------------------------
23 | local function elec_hot_start()
24 | dev:performClickableAction(device_commands.GND_EPS , 1, false)
25 | dev:performClickableAction(device_commands.GND_PWR_2, 1, false)
26 | dev:performClickableAction(device_commands.GND_PWR_3, 1, false)
27 | dev:performClickableAction(device_commands.GND_PWR_4, 1, false)
28 | dev:performClickableAction(device_commands.GND_PWR_CC, 1, false)
29 | end
30 | local function elec_cold_start()
31 | dev:performClickableAction(device_commands.GND_EPS , 0, false)
32 | dev:performClickableAction(device_commands.GND_PWR_2, -1, false)
33 | dev:performClickableAction(device_commands.GND_PWR_3, -1, false)
34 | dev:performClickableAction(device_commands.GND_PWR_4, -1, false)
35 | dev:performClickableAction(device_commands.GND_PWR_CC, -1, false)
36 | end
37 | function post_initialize()
38 | --print_message_to_user("DEV.ELEC_CONTROL_SYSTEM",0.2) debug
39 | if birth == "GROUND_HOT" or
40 | birth == "AIR_HOT" then
41 | SYSTEM_STAT = 1
42 | elec_hot_start()
43 |
44 |
45 | elseif birth == "GROUND_COLD" then
46 | SYSTEM_STAT = 0
47 | elec_cold_start()
48 |
49 |
50 | end
51 |
52 |
53 |
54 | end
55 | function SetCommand(command,value)
56 | --print_message_to_user(tostring(command).." = "..tostring(value)) debug
57 | if command == device_commands.GND_EPS then
58 | GND_EPS = value
59 | end
60 | if command == device_commands.GND_PWR_2 then
61 | GND_PWR_2 = value
62 | end
63 | if command == device_commands.GND_PWR_3 then
64 | GND_PWR_3 = value
65 | end
66 | if command == device_commands.GND_PWR_4 then
67 | GND_PWR_4 = value
68 | end
69 | if command == device_commands.GND_PWR_CC then
70 | GND_PWR_CC = value
71 | end
72 | if GND_EPS == 1 then
73 | SYSTEM_TARGET = 1
74 |
75 | else
76 | SYSTEM_TARGET = 0
77 |
78 | end
79 | if SYSTEM_STAT == 1 and
80 | SYSTEM_TARGET == 0 then
81 | dispatch_action(nil,Keys.iCommandPowerOnOff)
82 | SYSTEM_STAT = SYSTEM_TARGET
83 | elseif SYSTEM_STAT == 0 and
84 | SYSTEM_TARGET == 1 then
85 | dispatch_action(nil,Keys.iCommandPowerOnOff)
86 | SYSTEM_STAT = SYSTEM_TARGET
87 |
88 | end
89 | if SYSTEM_STAT == 1 then
90 | dev:AC_Generator_1_on(true)
91 | dev:AC_Generator_2_on(true)
92 | dev:DC_Battery_on(true)
93 | else
94 | dev:AC_Generator_1_on(false)
95 | dev:AC_Generator_2_on(false)
96 | dev:DC_Battery_on(false)
97 | end
98 |
99 | end
100 |
101 |
102 | function update()
103 | AC_BUS_1:set(dev:get_AC_Bus_1_voltage())
104 | AC_BUS_2:set(dev:get_AC_Bus_2_voltage())
105 | DC_BUS_1:set(dev:get_DC_Bus_1_voltage())
106 | DC_BUS_2:set(dev:get_DC_Bus_2_voltage())
107 | ECS:set(SYSTEM_STAT)
108 | end
109 |
110 | need_to_be_closed = false -- close lua state after initialization
111 |
112 |
113 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C Standalone/Mods/aircraft/F-15C/Cockpit/KneeboardRight/SYSTEMS/fuel_control.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 |
6 |
7 | local update_time_step = 0.02 --update will be called 50 times per second
8 | make_default_activity(update_time_step)
9 | sensor_data = get_base_data()
10 | local dev = GetSelf()
11 | local aircraft = get_aircraft_type()
12 | --------------------------------------------------------------------
13 | -- Variables Declaration
14 |
15 | local birth = LockOn_Options.init_conditions.birth_place
16 | local SYSTEM_STAT,SYSTEM_TARGET,REFUEL_STAT,REFUEL_INIT
17 | local FUEL_TANK,FUEL_CENTER,FUEL_WINGS,FUEL_DUMP,FUEL_EXTTR,FUEL_EMERTR,FUEL_REFUEL
18 | local FCS = get_param_handle("FCS_READY")
19 | --------------------------------------------------------------------
20 | local function fuel_hot_start()
21 | dev:performClickableAction(device_commands.FUEL_TANK, 0, false)
22 | dev:performClickableAction(device_commands.FUEL_CENTER, 0, false)
23 | dev:performClickableAction(device_commands.FUEL_WINGS, 0, false)
24 | dev:performClickableAction(device_commands.FUEL_DUMP, -1, false)
25 | dev:performClickableAction(device_commands.FUEL_EXTTR, -1, false)
26 | dev:performClickableAction(device_commands.FUEL_EMERTR,-1, false)
27 | dev:performClickableAction(device_commands.FUEL_REFUEL,-1, false)
28 | REFUEL_INIT = -1
29 | end
30 | local function fuel_cold_start()
31 | dev:performClickableAction(device_commands.FUEL_TANK, 0, false)
32 | dev:performClickableAction(device_commands.FUEL_CENTER, 0, false)
33 | dev:performClickableAction(device_commands.FUEL_WINGS, 0, false)
34 | dev:performClickableAction(device_commands.FUEL_DUMP, -1, false)
35 | dev:performClickableAction(device_commands.FUEL_EXTTR, -1, false)
36 | dev:performClickableAction(device_commands.FUEL_EMERTR,-1, false)
37 | dev:performClickableAction(device_commands.FUEL_REFUEL,-1, false)
38 | REFUEL_INIT = -1
39 | end
40 | function post_initialize()
41 | --print_message_to_user("DEV.FUEL_CONTROL_SYSTEM",0.2)
42 | if birth == "GROUND_HOT" or
43 | birth == "AIR_HOT" then
44 | fuel_hot_start()
45 | elseif birth == "GROUND_COLD" then
46 | fuel_cold_start()
47 | end
48 | end
49 | function SetCommand(command,value)
50 | --print_message_to_user(tostring(command).." = "..tostring(value))
51 | if command == device_commands.FUEL_TANK then
52 | FUEL_TANK = value
53 | end
54 | if command == device_commands.FUEL_CENTER then
55 | FUEL_CENTER = value
56 | end
57 | if command == device_commands.FUEL_WINGS then
58 | FUEL_WINGS = value
59 | end
60 | if command == device_commands.FUEL_DUMP then
61 | FUEL_DUMP = value
62 | end
63 | if command == device_commands.FUEL_EMERTR then
64 | FUEL_EMERTR = value
65 | end
66 | if command == device_commands.FUEL_EXTTR then
67 | FUEL_EXTTR = value
68 | end
69 | if command == device_commands.FUEL_REFUEL then
70 | FUEL_REFUEL = value
71 | end
72 | if command == device_commands.FUEL_REFUEL then
73 | REFUEL_STAT = value
74 | end
75 | if REFUEL_INIT == -1 then
76 | if REFUEL_STAT == 1 then
77 | dispatch_action(nil,Keys.iCommandPlaneAirRefuel)
78 | REFUEL_INIT = REFUEL_STAT
79 | end
80 | end
81 | if REFUEL_INIT == 1 then
82 | if REFUEL_STAT == -1 then
83 | dispatch_action(nil,Keys.iCommandPlaneAirRefuel)
84 | REFUEL_INIT = REFUEL_STAT
85 | end
86 | end
87 | if FUEL_DUMP == -1 and
88 | FUEL_REFUEL == -1 and
89 | FUEL_EMERTR == -1 and
90 | FUEL_WINGS == 0 and
91 | FUEL_CENTER == 0 and
92 | FUEL_TANK == 0 then
93 | SYSTEM_STAT = 1
94 | else
95 | SYSTEM_STAT = 0
96 | end
97 |
98 |
99 |
100 | end
101 |
102 |
103 | function update()
104 | FCS:set(SYSTEM_STAT)
105 | end
106 |
107 | need_to_be_closed = false -- close lua state after initialization
108 |
109 |
110 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C Standalone/Mods/aircraft/F-15C/Cockpit/KneeboardRight/SYSTEMS/light_control.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 |
6 |
7 | local update_time_step = 0.02 --update will be called 50 times per second
8 | make_default_activity(update_time_step)
9 | sensor_data = get_base_data()
10 | local dev = GetSelf()
11 | local aircraft = get_aircraft_type()
12 |
13 | --------------------------------------------------------------------
14 | -- Mainpanel Hijacking
15 | local MISC_TAXI_LIGHT = get_param_handle("MISC_TAXI_LIGHT")
16 | --------------------------------------------------------------------
17 | -- Update Connectors Position Step 1/3
18 | local connector = {}
19 | connector["TMB_MISC_TAXI-LIGHT"]= nil
20 | --------------------------------------------------------------------
21 | -- Variables Declaration
22 | local n_flash_stat = 0 -- 0:Off 1:Flashing
23 | local n_flash = 0
24 | local n_flash_s = 1.5
25 | local c_flash_stat = 0 -- 0:Off 1:Flashing
26 | local c_flash = 0
27 | local c_flash_s = 1
28 | local LIGHT_ANTICOL,LIGHT_POS,LIGHT_FORM,PROC
29 |
30 | local navlight_s
31 | local LCS = get_param_handle("LICS_READY")
32 | local ECS = get_param_handle("ECS_READY")
33 |
34 |
35 | --------------------------------------------------------------------
36 | local function LCS_CHECK_SYSTEMS()
37 | if LIGHT_ANTICOL == 1 and
38 | LIGHT_POS > 0 then
39 | PROC = 1
40 |
41 | else PROC = 0
42 | end
43 | end
44 | local function lics_hot_start()
45 | dev:performClickableAction(device_commands.LIGHT_ANTICOL, 1, false)
46 | dev:performClickableAction(device_commands.LIGHT_FORM, 0, false)
47 | dev:performClickableAction(device_commands.LIGHT_POS, 0.5, false)
48 |
49 | LCS_CHECK_SYSTEMS()
50 | end
51 | local function lics_cold_start()
52 | dev:performClickableAction(device_commands.LIGHT_ANTICOL, -1, false)
53 | dev:performClickableAction(device_commands.LIGHT_FORM, 0, false)
54 | dev:performClickableAction(device_commands.LIGHT_POS, 0, false)
55 | LCS_CHECK_SYSTEMS()
56 | end
57 | function post_initialize()
58 | --print_message_to_user("DEV.LIGHT_CONTROL_SYSTEM",0.2)
59 |
60 |
61 | local birth = LockOn_Options.init_conditions.birth_place
62 | --------------------------------------------------------------------------------------------------------
63 | -- Update Connectors Position Step 2/3
64 | connector["TMB_MISC_TAXI-LIGHT"] = get_clickable_element_reference("TMB_MISC_TAXI-LIGHT")
65 | --------------------------------------------------------------------------------------------------------
66 |
67 |
68 | if birth=="GROUND_HOT" or birth=="AIR_HOT" then
69 |
70 | lics_hot_start()
71 | elseif birth=="GROUND_COLD" then
72 | lics_cold_start()
73 | end
74 |
75 |
76 |
77 | end
78 | function SetCommand(command,value)
79 |
80 |
81 | if ECS:get() == 1 then
82 | if command == device_commands._409 then
83 | dev:performClickableAction(device_commands._180,value)
84 | dev:performClickableAction(device_commands.LIGHT_COCKPIT,value)
85 | end
86 | if command == device_commands.LIGHT_COCKPIT then
87 | dev:performClickableAction(device_commands._180,value)
88 | end
89 | if command == device_commands.LIGHT_LDG_TAXI then
90 | dispatch_action(nil,Keys.iCommandPlaneHeadLightOnOff)
91 | end
92 | if command == device_commands.LIGHT_ANTICOL then
93 | LIGHT_ANTICOL= value
94 | if
95 | LIGHT_ANTICOL== 1 then
96 | c_flash_stat= 1
97 | elseif LIGHT_ANTICOL== -1 then
98 | c_flash_stat= 0
99 | end
100 | end
101 | if command == device_commands.LIGHT_POS then
102 | LIGHT_POS = round(value*10,0)
103 | --print_message_to_user(value)
104 | if LIGHT_POS >= 0 and
105 | LIGHT_POS <= 6 then
106 | n_flash_stat= 0
107 | set_aircraft_draw_argument_value(190,LIGHT_POS/10) --navl
108 | set_aircraft_draw_argument_value(191,LIGHT_POS/10) --navr
109 | set_aircraft_draw_argument_value(192,LIGHT_POS/10) --strob
110 | elseif LIGHT_POS == 7 then
111 | n_flash_stat= 1
112 | end
113 |
114 | end
115 | if n_flash_stat== 1 then
116 | n_flash = n_flash_s
117 | elseif n_flash_stat== 0 then
118 | n_flash = 0
119 | end
120 | if c_flash_stat== 1 then
121 | c_flash = c_flash_s
122 | elseif c_flash_stat== 0 then
123 | c_flash = 0
124 | end
125 | if command == device_commands.LIGHT_FORM then
126 | LIGHT_FORM = value
127 |
128 | end
129 | LCS_CHECK_SYSTEMS()
130 | end
131 | end
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 | function update()
141 | --------------------------------------------------------------------
142 | -- Sync landing and taxi lights with lever via Mainpanel
143 | if get_aircraft_draw_argument_value(208) == 1 then
144 | MISC_TAXI_LIGHT:set(1)
145 |
146 | elseif get_aircraft_draw_argument_value(209) == 1 then
147 | MISC_TAXI_LIGHT:set(-1)
148 | elseif get_aircraft_draw_argument_value(208) == 0 and
149 | get_aircraft_draw_argument_value(209) == 0 then
150 | MISC_TAXI_LIGHT:set(0)
151 | end
152 | --------------------------------------------------------------------
153 | -- Update Connectors Position Step 3/3
154 | if connector["TMB_MISC_TAXI-LIGHT"] then
155 | connector["TMB_MISC_TAXI-LIGHT"]:update()
156 | end
157 | --------------------------------------------------------------------
158 | -- Navigation lights flash logic
159 | if n_flash > 0 then
160 | n_flash = n_flash - update_time_step
161 | if n_flash <= 0 then
162 | n_flash = n_flash_s
163 | end
164 | if n_flash >= 0.5 and
165 | n_flash >= 1.00 then
166 | set_aircraft_draw_argument_value(190,1) --navl
167 | set_aircraft_draw_argument_value(191,1) --navr
168 | set_aircraft_draw_argument_value(192,1) --strob
169 | else
170 | set_aircraft_draw_argument_value(190,0) --navl
171 | set_aircraft_draw_argument_value(191,0) --navr
172 | set_aircraft_draw_argument_value(192,0) --strob
173 | end
174 | end
175 | --------------------------------------------------------------------
176 | -- Collision lights flash logic
177 | if c_flash > 0 then
178 | c_flash = c_flash - update_time_step
179 | if c_flash <= 0 then
180 | c_flash = c_flash_s
181 | end
182 | if c_flash >= 0.5 and
183 | c_flash <= 0.6 then
184 | set_aircraft_draw_argument_value(199,1) --coll
185 | else
186 | set_aircraft_draw_argument_value(199,0) --coll
187 | end
188 | end
189 | --------------------------------------------------------------------
190 | -- Sync Formation lights with rotary
191 | set_aircraft_draw_argument_value(88,LIGHT_FORM)
192 | --------------------------------------------------------------------
193 | LCS:set(PROC)
194 |
195 | end
196 |
197 | need_to_be_closed = false -- close lua state after initialization
198 |
199 |
200 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C Standalone/Mods/aircraft/F-15C/Cockpit/KneeboardRight/SYSTEMS/misc_control.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 |
6 |
7 | local update_time_step = 0.02 --update will be called 50 times per second
8 | make_default_activity(update_time_step)
9 | sensor_data = get_base_data()
10 | local dev = GetSelf()
11 | local aircraft = get_aircraft_type()
12 | --------------------------------------------------------------------
13 | -- Variables Declaration
14 | local E_BRAKES,PROC
15 | local birth = LockOn_Options.init_conditions.birth_place
16 | local MCS = get_param_handle("MCS_READY")
17 |
18 | --------------------------------------------------------------------
19 | local function MCS_CHECK_SYSTEMS()
20 | if E_BRAKES == 1 then
21 | PROC = 1
22 |
23 | else PROC = 0
24 | end
25 | end
26 | local function misc_hot_start()
27 | dev:performClickableAction(device_commands.MISC_ANTISKID, -1, false)
28 | dev:performClickableAction(device_commands.MISC_INLET_R, 1, false)
29 | dev:performClickableAction(device_commands.MISC_INLET_L, 1, false)
30 | dev:performClickableAction(device_commands.MISC_ROLL, 1, false)
31 | dev:performClickableAction(device_commands.MISC_MASTERARM, -1, false)
32 | dev:performClickableAction(device_commands.MISC_EBRAKES, -1, false)
33 | MCS_CHECK_SYSTEMS()
34 |
35 | end
36 | local function misc_cold_start()
37 | dev:performClickableAction(device_commands.MISC_ANTISKID, -1, false)
38 | dev:performClickableAction(device_commands.MISC_INLET_R, 1, false)
39 | dev:performClickableAction(device_commands.MISC_INLET_L, 1, false)
40 | dev:performClickableAction(device_commands.MISC_ROLL, 1, false)
41 | dev:performClickableAction(device_commands.MISC_MASTERARM, -1, false)
42 | dev:performClickableAction(device_commands.MISC_EBRAKES, -1, false)
43 | MCS_CHECK_SYSTEMS()
44 |
45 | end
46 |
47 |
48 | function post_initialize()
49 | --print_message_to_user("DEV.MISC_CONTROL_SYSTEM",0.2)
50 | if birth == "GROUND_HOT" or
51 | birth == "AIR_HOT" then
52 | misc_hot_start()
53 |
54 |
55 | elseif birth == "GROUND_COLD" then
56 | misc_cold_start()
57 |
58 |
59 | end
60 |
61 |
62 |
63 | end
64 | function SetCommand(command,value)
65 | --print_message_to_user(tostring(command).." = "..tostring(value))
66 | if command == device_commands.MISC_EBRAKES then
67 | E_BRAKES = value
68 | if E_BRAKES == -1 then
69 | dispatch_action(nil,Keys.iCommandPlaneWheelBrakeOff)
70 | elseif E_BRAKES == 1 then
71 | dispatch_action(nil,Keys.iCommandPlaneWheelBrakeOn)
72 | end
73 | end
74 | MCS_CHECK_SYSTEMS()
75 |
76 |
77 |
78 | end
79 |
80 |
81 | function update()
82 | MCS:set(PROC)
83 |
84 | end
85 |
86 | need_to_be_closed = false -- close lua state after initialization
87 |
88 |
89 | --arg 25 == hook
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C Standalone/Mods/aircraft/F-15C/Cockpit/KneeboardRight/SYSTEMS/radar_control.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 |
6 |
7 | local update_time_step = 0.005
8 | make_default_activity(update_time_step)
9 | sensor_data = get_base_data()
10 | local dev = GetSelf()
11 | local aircraft = get_aircraft_type()
12 | --------------------------------------------------------------------
13 | --Variable declaration
14 | local radar_mode = 0 -- 1:LRS 2:VS 3:SRS
15 | local radar_stat = 0 -- -1:Off 0.5:Stby 1:Opr
16 | local radar_spl = 0 -- 0:Off 1:Flood
17 | local scan_area = 1
18 | local r_timer = 0
19 | local s_timer = 0
20 | --------------------------------------------------------------------
21 | --
22 | local RADAR_POWER = get_param_handle("RADAR_POWER")
23 | local RADAR_MODE_SEL = get_param_handle("RADAR_MODE_SEL")
24 | local RADAR_SPL_MODE = get_param_handle("RADAR_SPL_MODE")
25 |
26 | function post_initialize()
27 | --print_message_to_user("DEV.RADAR_CONTROL_SYSTEM",0.2)
28 | local birth = LockOn_Options.init_conditions.birth_place
29 | if birth=="GROUND_HOT" or birth=="AIR_HOT" then
30 |
31 |
32 | elseif birth=="GROUND_COLD" then
33 |
34 | end
35 |
36 |
37 |
38 | end
39 | local function reset_scan_area(scan_area)
40 | local max_scan_area = 1
41 | if scan_area > max_scan_area then
42 | return 1
43 | elseif scan_area < 0 then
44 | return 0
45 | else
46 | return scan_area
47 | end
48 | end
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | dev:listen_command(Keys.iCommandPlaneRadarOnOff)
57 | dev:listen_command(Keys.iCommandPlaneModeNAV)
58 | dev:listen_command(Keys.iCommandPlaneModeBVR)
59 | dev:listen_command(Keys.iCommandPlaneModeVS)
60 | dev:listen_command(Keys.iCommandPlaneModeBore)
61 | dev:listen_command(Keys.iCommandPlaneModeFI0)
62 | dev:listen_command(Keys.iCommandPlaneRadarChangeMode)
63 | dev:listen_command(Keys.iCommandPlaneChangeRadarPRF)
64 | dev:listen_command(Keys.iCommandRefusalTWS)
65 |
66 |
67 |
68 | function SetCommand(command,value)
69 | if command == device_commands.CLIC_RADAR_SPL_MODE then
70 | radar_spl = value
71 | if radar_spl == 1 then
72 | dispatch_action(nil,Keys.iCommandPlaneModeFI0)
73 | end
74 | if radar_spl == 0 then
75 | dispatch_action(nil,Keys.iCommandPlaneModeBore)
76 | end
77 |
78 | end
79 | if command == device_commands.CLIC_RADAR_MODE_SEL then
80 | if value == 1 then
81 | radar_mode = radar_mode + 1
82 | elseif value == 0 then
83 | radar_mode = radar_mode - 1
84 | end
85 | if radar_mode > 3 then
86 | radar_mode = 3
87 | end
88 | if radar_mode < 0 then
89 | radar_mode = 0
90 | end
91 | if radar_mode == 1 then
92 | dispatch_action(nil,Keys.iCommandPlaneModeBVR)
93 | end
94 | if radar_mode == 2 then
95 | dispatch_action(nil,Keys.iCommandPlaneModeVS)
96 | end
97 | if radar_mode == 3 then
98 | dispatch_action(nil,Keys.iCommandPlaneModeBore)
99 | end
100 | end
101 | if command == device_commands.CLIC_RADAR_POWER then
102 | dispatch_action(nil,Keys.iCommandPlaneRadarOnOff)
103 | end
104 | if radar_stat == 0 then
105 | if command == Keys.iCommandPlaneRadarOnOff then
106 | radar_stat = 1
107 | end
108 | elseif radar_stat == 1 then
109 | if command == Keys.iCommandPlaneRadarOnOff then
110 | radar_stat = 0
111 | end
112 | end
113 | if command == Keys.iCommandPlaneModeBVR then
114 |
115 | radar_mode = 1
116 | radar_spl = 0
117 | if radar_stat == 0 then
118 | dispatch_action(nil,Keys.iCommandPlaneRadarOnOff)
119 | end
120 |
121 | end
122 | if command == Keys.iCommandPlaneModeVS then
123 | radar_mode = 2
124 | radar_spl = 0
125 | if radar_stat == 0 then
126 | radar_stat = 1
127 | end
128 | end
129 | if command == Keys.iCommandPlaneModeBore then
130 | radar_mode = 3
131 | radar_spl = 0
132 |
133 | if radar_stat == 0 then
134 | radar_stat = 1
135 | end
136 | end
137 | if command == Keys.iCommandPlaneModeFI0 then
138 | radar_mode = 3
139 | radar_spl = 1
140 | if radar_stat == 1 then
141 | dispatch_action(nil,Keys.iCommandPlaneRadarOnOff)
142 |
143 | end
144 | end
145 | if command == device_commands.CLIC_RADAR_EL_SCAN then
146 | s_timer = 0.3
147 | if value == 1 then
148 | dispatch_action(nil,Keys.iCommandSelecterUp)
149 | elseif value == 0 then
150 | dispatch_action(nil,Keys.iCommandSelecterDown)
151 | end
152 | end
153 | if command == device_commands.CLIC_RADAR_RANGE then
154 | if value == 1 then
155 | dispatch_action(nil,Keys.iCommandPlaneZoomIn)
156 | elseif value == 0 then
157 | dispatch_action(nil,Keys.iCommandPlaneZoomOut)
158 | end
159 | end
160 | if command == device_commands.CLIC_RADAR_AZ_SCAN and
161 | value > 0 then
162 | scan_area = scan_area +1
163 | elseif command == device_commands.CLIC_RADAR_AZ_SCAN and
164 | value < 0 then
165 | scan_area = scan_area -1
166 | end
167 | if command == device_commands.CLIC_RADAR_AZ_SCAN then
168 | if scan_area == 1 then
169 | dispatch_action(nil,Keys.iCommandIncreaseRadarScanArea)
170 | elseif scan_area == 0 then
171 | dispatch_action(nil,Keys.iCommandDecreaseRadarScanArea)
172 | end
173 | end
174 | scan_area = reset_scan_area(scan_area)
175 | end
176 |
177 |
178 |
179 |
180 | function update_radar()
181 | RADAR_MODE_SEL:set(radar_mode)
182 | RADAR_POWER:set(radar_stat)
183 | RADAR_SPL_MODE:set(radar_spl)
184 | end
185 |
186 |
187 | function update()
188 |
189 | if s_timer > 0 then
190 | s_timer = s_timer - update_time_step
191 | if s_timer <= 0 then
192 | s_timer = 0
193 | dispatch_action(nil,Keys.iCommandSelecterStop)
194 | end
195 | end
196 | if r_timer > 0 then
197 | r_timer = r_timer - update_time_step
198 | if r_timer <= 0 then
199 | r_timer = 0
200 | dispatch_action(nil,Keys.iCommandPlaneRadarStop)
201 | end
202 | end
203 | update_radar()
204 | --print_message_to_user(get_cockpit_draw_argument_value(429))
205 | end
206 |
207 | need_to_be_closed = false
208 |
209 |
210 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C Standalone/Mods/aircraft/F-15C/Cockpit/KneeboardRight/SYSTEMS/radio_control.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 | --dofile(lfs.writedir() .. 'Mods\\Services\\DCS-SRS\\Scripts\\DCS-SimpleRadioStandalone.lua')
6 |
7 |
8 | local update_time_step = 0.02 --update will be called 50 times per second
9 | make_default_activity(update_time_step)
10 | sensor_data = get_base_data()
11 | local dev = GetSelf()
12 | local aircraft = get_aircraft_type()
13 | --------------------------------------------------------------------
14 | local RADIO_CHAN_TENS = get_param_handle("RADIO_CHAN_TENS")
15 | local RADIO_CHAN_ONES = get_param_handle("RADIO_CHAN_ONES")
16 | local RADIO_FREQ1_TENS = get_param_handle("RADIO_FREQ1_TENS")
17 | local RADIO_FREQ1_ONES = get_param_handle("RADIO_FREQ1_ONES")
18 | local RADIO_FREQ2 = get_param_handle("RADIO_FREQ2")
19 | local RADIO_FREQ3_CENTS = get_param_handle("RADIO_FREQ3_CENTS")
20 | local RADIO_FREQ3_TENS = get_param_handle("RADIO_FREQ3_TENS")
21 | local RADIO_FREQ3_ONES = get_param_handle("RADIO_FREQ3_ONES")
22 | local RADIO_SRS_TEST = get_param_handle("RADIO_SRS_TEST")
23 |
24 | local radio_chan = 0
25 | local radio_freq1 = 0
26 | local radio_freq2 = 0
27 | local radio_freq3 = 0
28 | local radio_freq3m = 0
29 | local radio_freq3c = 0
30 | local radio_draw_chan = 0
31 | local radio_draw_freq1 = 0
32 | local radio_draw_freq2 = 0
33 | local radio_draw_freq3 = 0
34 | local radio_draw_freq3m = 0
35 | local radio_draw_freq3c = 0
36 | local radio_freq_srs
37 |
38 |
39 | function radio_draw_chan(count)
40 | local tens = math.floor(count/10 + 0.02)
41 | local ones = math.floor(count%10 + 0.01)
42 | RADIO_CHAN_TENS:set(tens/10)
43 | RADIO_CHAN_ONES:set(ones/10)
44 | end
45 | function radio_draw_freq1(count)
46 | local tens = math.floor(count/10 + 0.02)
47 | local ones = math.floor(count%10 + 0.01)
48 | RADIO_FREQ1_TENS:set(tens/10)
49 | RADIO_FREQ1_ONES:set(ones/10)
50 | end
51 | function radio_draw_freq2(count)
52 | local ones = math.floor(count%10 + 0.02)
53 | RADIO_FREQ2:set(ones/10)
54 | end
55 | function radio_draw_freq3m(count)
56 | local cents = math.floor(count/100 + 0.02)
57 | local ones = math.floor(count%10 + 0.01)
58 | RADIO_FREQ3_CENTS:set(cents/10)
59 | RADIO_FREQ3_ONES:set(ones/10)
60 | end
61 | function radio_draw_freq3c(count)
62 | local tens = math.floor(count/10 + 0.02)
63 | RADIO_FREQ3_TENS:set(tens/10)
64 | end
65 |
66 | function update_radio_display()
67 | radio_draw_chan(radio_chan)
68 | radio_draw_freq1(radio_freq1)
69 | radio_draw_freq2(radio_freq2)
70 | radio_draw_freq3m(radio_freq3m)
71 | radio_draw_freq3c(radio_freq3c)
72 | end
73 | function update_radio_srs()
74 | RADIO_SRS_TEST:set(radio_freq_srs)
75 | --print_message_to_user(RADIO_SRS_TEST:get())
76 | end
77 |
78 |
79 | function post_initialize()
80 | --print_message_to_user("DEV.RADIO_CONTROL_SYSTEM",0.2)
81 | dev:performClickableAction(device_commands.CLIC_RCHAN, 0.1, false)
82 | dev:performClickableAction(device_commands.CLIC_RFREQ_1, 0.455, false)
83 | dev:performClickableAction(device_commands.CLIC_RFREQ_2, 0.6, false)
84 | dev:performClickableAction(device_commands.CLIC_RFREQ_3, 0.6, false)
85 |
86 |
87 | local birth = LockOn_Options.init_conditions.birth_place
88 | dev:performClickableAction(device_commands.CLIC_RUHF, 0.5, false)
89 | dev:performClickableAction(device_commands.CLIC_RVOL, 0.66, false)
90 | if birth=="GROUND_HOT" or birth=="AIR_HOT" then
91 |
92 |
93 |
94 | elseif birth=="GROUND_COLD" then
95 |
96 | end
97 |
98 |
99 |
100 | end
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 | function SetCommand(command,value)
114 |
115 | --print_message_to_user(tostring(command).." = "..tostring(value))
116 | if command == device_commands.CLIC_RCOMMENU and
117 | value == 1 then
118 | dispatch_action(nil,Keys.iCommandToggleCommandMenu)
119 | end
120 |
121 | if command == device_commands.CLIC_RFREQ_3 then
122 | radio_freq3 = round(radio_freq3 + 50*value)
123 | radio_freq3m = radio_freq3 % 1000
124 | radio_freq3c = radio_freq3 % 100
125 | --print_message_to_user("CLIC_RFREQ_3"..(value))
126 | end
127 | if command == device_commands.CLIC_RFREQ_2 then
128 | radio_freq2 = round(radio_freq2 + 50*value)
129 | radio_freq2 = radio_freq2 % 10
130 | --print_message_to_user(radio_freq2) --radio_freq2 Radio freq2 number, can be used to implement radios
131 | end
132 | if command == device_commands.CLIC_RFREQ_1 then
133 | radio_freq1 = round(radio_freq1 + 50*value)
134 | radio_freq1 = radio_freq1 % 100
135 | --print_message_to_user(radio_freq1) --radio_freq1 Radio freq1 number, can be used to implement radios
136 | end
137 |
138 | if command == device_commands.CLIC_RCHAN then
139 | radio_chan = round(radio_chan + 50*value)
140 | radio_chan = radio_chan % 100
141 | --radio_chan Radio channel number, can be used to implement radios
142 | end
143 | radio_freq_srs = radio_freq1*10 + radio_freq2 + radio_freq3m/1000
144 |
145 |
146 | end
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 | function update()
157 | --print_message_to_user(RADIO_SRS_TEST:get())
158 |
159 | --[[
160 | if get_cockpit_draw_argument_value(272)~=get_cockpit_draw_argument_value(272) then
161 | print_message_to_user(get_cockpit_draw_argument_value(272))
162 | end]]
163 |
164 | update_radio_display()
165 | update_radio_srs()
166 | end
167 |
168 | need_to_be_closed = false -- close lua state after initialization
169 |
170 |
171 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C Standalone/Mods/aircraft/F-15C/Cockpit/KneeboardRight/device_init.lua:
--------------------------------------------------------------------------------
1 | dofile(LockOn_Options.script_path.."devices.lua")
2 | dofile(LockOn_Options.script_path.."supported.lua") --Call lua file to detect current aircraft
3 | dofile(LockOn_Options.common_script_path.."tools.lua")
4 |
5 | attributes = {
6 | "support_for_cws",
7 | }
8 |
9 | if supported == true then --Mod launching logic.
10 | MainPanel = {"ccMainPanel",LockOn_Options.script_path.."mainpanel_init.lua", {} }
11 | creators = {}
12 | creators[devices.CLICKABLE_GENERIC_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/clickable.lua"}
13 | creators[devices.RADIO_CONTROL_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/radio_control.lua"}
14 | creators[devices.COUNTERMEASURES_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/cmd_control.lua"}
15 | creators[devices.RADAR_CONTROL_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/radar_control.lua"}
16 | creators[devices.LIGHT_CONTROL_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/light_control.lua"}
17 | creators[devices.ELEC_CONTROL_SYSTEM] = {"avSimpleElectricSystem" ,LockOn_Options.script_path.."SYSTEMS/elec_control.lua"}
18 | --creators[devices.ENGINES_CONTROL_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/engines_control.lua"}
19 | --creators[devices.FUEL_CONTROL_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/fuel_control.lua"}
20 | creators[devices.MISC_CONTROL_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/misc_control.lua"}
21 | end
22 | ---------------------------------------------
23 | dofile(LockOn_Options.common_script_path.."KNEEBOARD/declare_kneeboard_device.lua")
24 | ---------------------------------------------
25 |
26 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C Standalone/Mods/aircraft/F-15C/Cockpit/KneeboardRight/devices.lua:
--------------------------------------------------------------------------------
1 | local count = 0
2 | local function counter()
3 | count = count + 1
4 | return count
5 | end
6 | -------DEVICE ID-------
7 | devices = {}
8 | devices["CLICKABLE_GENERIC_SYSTEM"] = counter()
9 | devices["RADIO_CONTROL_SYSTEM"] = counter()
10 | devices["COUNTERMEASURES_SYSTEM"] = counter()
11 | devices["RADAR_CONTROL_SYSTEM"] = counter()
12 | devices["LIGHT_CONTROL_SYSTEM"] = counter()
13 | devices["ELEC_CONTROL_SYSTEM"] = counter()
14 | devices["ENGINES_CONTROL_SYSTEM"] = counter()
15 | devices["FUEL_CONTROL_SYSTEM"] = counter()
16 | devices["MISC_CONTROL_SYSTEM"] = counter()
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C Standalone/Mods/aircraft/F-15C/Cockpit/KneeboardRight/mainpanel_init.lua:
--------------------------------------------------------------------------------
1 |
2 | local aircraft = get_aircraft_type()
3 |
4 | if aircraft=="F-15C" then
5 | shape_name = "Cockpit_F-15C"
6 | end
7 |
8 | is_EDM = true
9 | new_model_format = true
10 | ambient_light = {255,255,255}
11 | ambient_color_day_texture = {72, 100, 160}
12 | ambient_color_night_texture = {40, 60 ,150}
13 | ambient_color_from_devices = {50, 50, 40}
14 | ambient_color_from_panels = {35, 25, 25}
15 |
16 | dusk_border = 0.4
17 | draw_pilot = false
18 |
19 | external_model_canopy_arg = 38
20 |
21 | use_external_views = false
22 |
23 | day_texture_set_value = 0.0
24 | night_texture_set_value = 0.1
25 |
26 | local controllers = LoRegisterPanelControls()
27 |
28 | RADIO_CHAN_TENS = CreateGauge("parameter")
29 | RADIO_CHAN_TENS.arg_number = 348
30 | RADIO_CHAN_TENS.input = {0.0, 1.0}
31 | RADIO_CHAN_TENS.output = {0.0, 1.0}
32 | RADIO_CHAN_TENS.parameter_name = "RADIO_CHAN_TENS"
33 |
34 | RADIO_CHAN_ONES = CreateGauge("parameter")
35 | RADIO_CHAN_ONES.arg_number = 349
36 | RADIO_CHAN_ONES.input = {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0} --Animation calibration.
37 | RADIO_CHAN_ONES.output = {0.4,0.5,0.6,0.7,0.8,0.9,1.0,0.1,0.2,0.3,0.39} --Animation calibration.
38 | RADIO_CHAN_ONES.parameter_name = "RADIO_CHAN_ONES"
39 |
40 | RADIO_FREQ1_TENS = CreateGauge("parameter")
41 | RADIO_FREQ1_TENS.arg_number = 350
42 | RADIO_FREQ1_TENS.input = {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
43 | RADIO_FREQ1_TENS.output = {0.8,0.9,1.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.79}
44 | RADIO_FREQ1_TENS.parameter_name = "RADIO_FREQ1_TENS"
45 |
46 | RADIO_FREQ1_ONES = CreateGauge("parameter")
47 | RADIO_FREQ1_ONES.arg_number = 351
48 | RADIO_FREQ1_ONES.input = {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
49 | RADIO_FREQ1_ONES.output = {0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.0,0.1,0.2,0.29}
50 | RADIO_FREQ1_ONES.parameter_name = "RADIO_FREQ1_ONES"
51 |
52 | RADIO_FREQ2 = CreateGauge("parameter")
53 | RADIO_FREQ2.arg_number = 352
54 | RADIO_FREQ2.input = {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
55 | RADIO_FREQ2.output = {0.4,0.5,0.6,0.7,0.8,0.9,1.0,0.1,0.2,0.3,0.39}
56 | RADIO_FREQ2.parameter_name = "RADIO_FREQ2"
57 |
58 | RADIO_FREQ3_CENTS = CreateGauge("parameter")
59 | RADIO_FREQ3_CENTS.arg_number = 353
60 | RADIO_FREQ3_CENTS.input = {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
61 | RADIO_FREQ3_CENTS.output = {0.7,0.8,0.9,0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.69}
62 | RADIO_FREQ3_CENTS.parameter_name = "RADIO_FREQ3_CENTS"
63 |
64 | RADIO_FREQ3_TENS = CreateGauge("parameter")
65 | RADIO_FREQ3_TENS.arg_number = 354
66 | RADIO_FREQ3_TENS.input = {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
67 | RADIO_FREQ3_TENS.output = {0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.0,0.1,0.2,0.29}
68 |
69 | RADIO_FREQ3_TENS.parameter_name = "RADIO_FREQ3_TENS"
70 |
71 | RADIO_FREQ3_ONES = CreateGauge("parameter")
72 | RADIO_FREQ3_ONES.arg_number = 355
73 | RADIO_FREQ3_ONES.input = {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
74 | RADIO_FREQ3_ONES.output = {0.5,0.6,0.7,0.8,0.9,0.0,0.1,0.2,0.3,0.4,0.49}
75 | RADIO_FREQ3_ONES.parameter_name = "RADIO_FREQ3_ONES"
76 |
77 | MISC_TAXI_LIGHT = CreateGauge("parameter")
78 | MISC_TAXI_LIGHT.arg_number = 428
79 | MISC_TAXI_LIGHT.input = {-1, 1}
80 | MISC_TAXI_LIGHT.output = {-1, 1}
81 | MISC_TAXI_LIGHT.parameter_name = "MISC_TAXI_LIGHT"
82 |
83 |
84 | RADAR_POWER = CreateGauge("parameter")
85 | RADAR_POWER.arg_number = 488
86 | RADAR_POWER.input = {0.0,0.5,1.0}
87 | RADAR_POWER.output = {-1,0.1,0.2}
88 | RADAR_POWER.parameter_name = "RADAR_POWER"
89 |
90 | RADAR_MODE_SEL = CreateGauge("parameter")
91 | RADAR_MODE_SEL.arg_number = 493
92 | RADAR_MODE_SEL.input = {1, 2, 3}
93 | RADAR_MODE_SEL.output = {0, 0.1, 0.2}
94 | RADAR_MODE_SEL.parameter_name = "RADAR_MODE_SEL"
95 |
96 | RADAR_SPL_MODE = CreateGauge("parameter")
97 | RADAR_SPL_MODE.arg_number = 492
98 | RADAR_SPL_MODE.input = {0, 1}
99 | RADAR_SPL_MODE.output = {-1.0, 1.0}
100 | RADAR_SPL_MODE.parameter_name = "RADAR_SPL_MODE"
101 |
102 |
103 |
104 |
105 |
106 | need_to_be_closed = false
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C Standalone/Mods/aircraft/F-15C/Cockpit/KneeboardRight/supported.lua:
--------------------------------------------------------------------------------
1 | local aircraft = get_aircraft_type()
2 | --Reading the variable
3 | if
4 |
5 | aircraft =="F-15C" then
6 |
7 |
8 | supported = true --The mod will start
9 | else
10 | supported = false --The mod will not start
11 | end
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C Standalone/Mods/aircraft/F-15C/Liveries/Cockpit_F-15C/default/description.lua:
--------------------------------------------------------------------------------
1 | livery =
2 | {
3 |
4 | {"F-15C_Mirrors", 0 ,"mirrors",true};--mirrors texture replacement with runtime rendered one
5 | }
6 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C With FC3/Mods/aircraft/Flaming Cliffs/Cockpit/KneeboardRight/SYSTEMS/clickable.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 |
6 |
7 | local update_time_step = 0.02 --update will be called 50 times per second
8 | make_default_activity(update_time_step)
9 | sensor_data = get_base_data()
10 | local dev = GetSelf()
11 | local aircraft = get_aircraft_type()
12 | --------------------------------------------------------------------
13 | -- Update Connectors Position Step 1/3
14 | local connector = {}
15 | connector["TMB_FUEL_OPEN/CLOSE"] = nil
16 | connector["TBM_Wheels"] = nil
17 | connector["MIRROR_1"] = nil
18 | connector["MIRROR_2"] = nil
19 | connector["MIRROR_3"] = nil
20 |
21 | --------------------------------------------------------------------
22 | -- Variables Declaration
23 | local mastermodeF15 = 0
24 |
25 | function reset_mastermodeF15(mastermodeF15)
26 | local max_mastermodeF15 = 5
27 |
28 | if mastermodeF15 > max_mastermodeF15 then
29 | return 2
30 | elseif mastermodeF15 <2 then
31 | return 2
32 | else
33 | return mastermodeF15
34 | end
35 | end
36 |
37 | function post_initialize()
38 | --print_message_to_user(aircraft,15)
39 | --print_message_to_user("DEV.CLICKABLE_GENERIC_SYSTEM",0.2)
40 |
41 | --dispatch_action(nil,Keys.iCommandCockpitClickModeOnOff)
42 | --show_param_handles_list()
43 | local birth = LockOn_Options.init_conditions.birth_place
44 | --------------------------------------------------------------------------------------------------------
45 | -- Update Connectors Position Step 2/3
46 | connector["TMB_FUEL_OPEN/CLOSE"] = get_clickable_element_reference("TMB_FUEL_OPEN/CLOSE")
47 | connector["TBM_Wheels"] = get_clickable_element_reference("TBM_Wheels")
48 | connector["MIRROR_1"] = get_clickable_element_reference("MIRROR_1")
49 | connector["MIRROR_2"] = get_clickable_element_reference("MIRROR_2")
50 | connector["MIRROR_3"] = get_clickable_element_reference("MIRROR_3")
51 |
52 | --------------------------------------------------------------------------------------------------------
53 |
54 | if birth=="GROUND_HOT" or birth=="AIR_HOT" then
55 |
56 | dev:performClickableAction(device_commands.CLIC_HUD_BRT, 0.75, false)
57 | dev:performClickableAction(device_commands.CLIC_HUD_BRT_2, 0.75, false)
58 | dev:performClickableAction(device_commands._321, 0.20, false)
59 | dev:performClickableAction(device_commands._361, -1, false)
60 | dev:performClickableAction(device_commands._404, 1, false)
61 | dev:performClickableAction(device_commands._405, 1, false)
62 | dev:performClickableAction(device_commands._406, 1, false)
63 | dev:performClickableAction(device_commands._407, 1, false)
64 | dev:performClickableAction(device_commands.CLIC_LENG, 1, false)
65 | dev:performClickableAction(device_commands.CLIC_RENG, 1, false)
66 | elseif birth=="GROUND_COLD" then
67 | dev:performClickableAction(device_commands.CLIC_LENG, -1, false)
68 | dev:performClickableAction(device_commands.CLIC_RENG, -1, false)
69 | end
70 |
71 |
72 |
73 | end
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | function SetCommand(command,value)
87 |
88 | if command == device_commands.CLIC_MIRROR and
89 | value == 1 then
90 | dispatch_action(nil,Keys.iCommandToggleMirrors)
91 |
92 | end
93 | if command == device_commands.CLIC_LENG then
94 | if value == 1 then
95 | dispatch_action(nil,Keys.iCommandLeftEngineStart)
96 | elseif value == -1 then
97 | dispatch_action(nil,Keys.iCommandLeftEngineStop)
98 | end
99 |
100 | end
101 | if command == device_commands.CLIC_RENG then
102 | if value == 1 then
103 | dispatch_action(nil,Keys.iCommandRightEngineStart)
104 | elseif value == -1 then
105 | dispatch_action(nil,Keys.iCommandRightEngineStop)
106 | end
107 |
108 | end
109 | if command == device_commands.CLIC_GEAR and
110 | value == 1 then
111 | dispatch_action(nil,Keys.iCommandPlaneGear)
112 | end
113 | if command == device_commands.CLIC_RADAR_ON_OFF_F15 then
114 | dispatch_action(nil,Keys.iCommandPlaneRadarOnOff)
115 | end
116 | if command == device_commands.CLIC_JETTINSON_TANK and
117 | value == 1 or
118 | command == device_commands.CLIC_JETTINSON_TANK2 and
119 | value == 1 then
120 | dispatch_action(nil,Keys.iCommandPlaneJettisonFuelTanks)
121 | end
122 | if command == device_commands.CLIC_MODE_F15 and
123 | value > 0 then
124 | mastermodeF15 = mastermodeF15 + 1
125 |
126 | elseif command == device_commands.CLIC_MODE_F15 and
127 | value < 0 then
128 | mastermodeF15 = mastermodeF15 - 1
129 |
130 | end
131 | if command == device_commands.CLIC_MODE_F15 then
132 | if mastermodeF15 == 2 then
133 | dispatch_action(nil,Keys.iCommandPlaneModeBVR)
134 | elseif mastermodeF15 == 3 then
135 | dispatch_action(nil,Keys.iCommandPlaneModeVS)
136 | elseif mastermodeF15 == 4 then
137 | dispatch_action(nil,Keys.iCommandPlaneModeBore)
138 | elseif mastermodeF15 == 5 then
139 | dispatch_action(nil,Keys.iCommandPlaneModeFI0)
140 | end
141 | mastermodeF15 = reset_mastermodeF15(mastermodeF15)
142 | end
143 | if command == device_commands.CLIC_RPORT and
144 | value == 1 then
145 | dispatch_action(nil,Keys.iCommandPlaneAirRefuel)
146 | end
147 |
148 | if command == device_commands.CLIC_TAKEOFFTRIMF15 then
149 | if value == 1 then
150 | dispatch_action(nil,Keys.iCommandPlaneTrimOn)
151 | elseif value == 0 then
152 | dispatch_action(nil,Keys.iCommandPlaneTrimOff)
153 | end
154 |
155 | end
156 | if command == device_commands.CLIC_RWR_MODE and
157 | value == 1 then
158 | dispatch_action(nil,Keys.iCommandChangeRWRMode)
159 | end
160 | if command == device_commands.CLIC_RWR_SOUND and
161 | value > 0 then
162 | dispatch_action(nil,Keys.iCommandPlaneThreatWarnSoundVolumeUp)
163 | elseif command == device_commands.CLIC_RWR_SOUND and
164 | value < 0 then
165 | dispatch_action(nil,Keys.iCommandPlaneThreatWarnSoundVolumeDown)
166 | end
167 |
168 | if command == device_commands.CLIC_NAVMODES and value ~=0 then
169 | dispatch_action(nil,Keys.iCommandPlaneModeNAV)
170 | end
171 |
172 | if command == device_commands.CLIC_WAYPOINT and
173 | value >0 then
174 | dispatch_action(nil,Keys.iCommandPlaneChangeTarget)
175 | elseif command == device_commands.CLIC_WAYPOINT and
176 | value <0 then
177 | dispatch_action(nil,Keys.iCommandPlaneUFC_STEER_DOWN)
178 | end
179 |
180 | if get_cockpit_draw_argument_value(320)>0 and
181 | get_cockpit_draw_argument_value(320)<0.29 then
182 |
183 | if command == device_commands.CLIC_JETTINSON then
184 |
185 | if value ==1 then
186 | dispatch_action(nil,Keys.iCommandPlaneJettisonWeapons)
187 | end
188 |
189 | end
190 | elseif get_cockpit_draw_argument_value(320)<-0.29 then
191 |
192 | if command == device_commands.CLIC_JETTINSON then
193 |
194 | if value ==1 then
195 | dispatch_action(nil,Keys.iCommandPlaneJettisonFuelTanks)
196 | end
197 |
198 | end
199 | end
200 |
201 |
202 | if command == device_commands.CLIC_HUD_BRT and value >0.5 or device_commands.CLIC_HUD_BRT_2 and value >0.5 then
203 |
204 | dispatch_action(nil,Keys.iCommandHUDBrightnessUp)
205 | dispatch_action(nil,Keys.iCommandHUDBrightnessUp)
206 | dispatch_action(nil,Keys.iCommandHUDBrightnessUp)
207 | dispatch_action(nil,Keys.iCommandHUDBrightnessUp)
208 |
209 |
210 |
211 | elseif command == device_commands.CLIC_HUD_BRT and value <0.5 or device_commands.CLIC_HUD_BRT_2 and value <0.5 then
212 |
213 | dispatch_action(nil,Keys.iCommandHUDBrightnessDown)
214 | dispatch_action(nil,Keys.iCommandHUDBrightnessDown)
215 | dispatch_action(nil,Keys.iCommandHUDBrightnessDown)
216 | dispatch_action(nil,Keys.iCommandHUDBrightnessDown)
217 |
218 |
219 | end
220 | if command == device_commands.CLIC_HUD_COLOR_F15 then
221 | dispatch_action(nil,Keys.iCommandBrightnessILS)
222 |
223 | end
224 |
225 |
226 |
227 | end
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 | function update()
237 |
238 | --------------------------------------------------------------------
239 | -- Update Connectors Position Step 3/3
240 | if connector["TMB_FUEL_OPEN/CLOSE"] then
241 | connector["TMB_FUEL_OPEN/CLOSE"]:update()
242 | end
243 | if connector["TBM_Wheels"] then
244 | connector["TBM_Wheels"]:update()
245 | end
246 | if connector["MIRROR_1"] then
247 | connector["MIRROR_1"]:update()
248 | end
249 | if connector["MIRROR_2"] then
250 | connector["MIRROR_2"]:update()
251 | end
252 | if connector["MIRROR_3"] then
253 | connector["MIRROR_3"]:update()
254 | end
255 | --------------------------------------------------------------------
256 | end
257 |
258 | need_to_be_closed = false -- close lua state after initialization
259 |
260 |
261 |
262 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C With FC3/Mods/aircraft/Flaming Cliffs/Cockpit/KneeboardRight/SYSTEMS/cmd_control.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 |
6 |
7 | local update_time_step = 0.02
8 | make_default_activity(update_time_step)
9 | sensor_data = get_base_data()
10 | local dev = GetSelf()
11 | local aircraft = get_aircraft_type()
12 | --------------------------------------------------------------------
13 | --Variable declaration
14 | --------------------------------------------------------------------
15 | local cmd_type = 0 -- 1:Chaff 0:Both -1:Flare
16 | local cmd_mode = 0 -- 0:Automatic 1:Semi-Automatic 2:Man-Only 3:Standby 4:Off
17 | local cmd_stat = 0 -- 0:Off 1:Dispensing
18 | local cmd_stat_p = 0 -- cmd_stat previous state
19 | local cmd_timer = 0 -- timer chaff
20 | local cmd_timer_s = 1.5 -- timer value
21 | local CMD_ONOFF = 10000 -- command definition
22 | --------------------------------------------------------------------
23 | dev:listen_command(CMD_ONOFF) -- listening for command
24 | function post_initialize()
25 | --print_message_to_user("DEV.COUNTERMEASURES_SYSTEM",0.2)
26 | dev:performClickableAction(device_commands.CMD_MODE, 4, false)
27 | dev:performClickableAction(device_commands.CMD_SEL, 0, false)
28 | local birth = LockOn_Options.init_conditions.birth_place
29 |
30 |
31 | if birth=="GROUND_HOT" or birth=="AIR_HOT" then
32 |
33 |
34 | elseif birth=="GROUND_COLD" then
35 |
36 | end
37 |
38 |
39 |
40 | end
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | function SetCommand(command,value)
54 | if command == device_commands.CMD_MODE then
55 | cmd_mode = round(value*10, 0)
56 | if cmd_mode ~= 1 then
57 | cmd_stat = cmd_stat_p
58 | end
59 | end
60 | if command == device_commands.CMD_SEL then
61 | cmd_type = value
62 | end
63 | if command == CMD_ONOFF then
64 | if cmd_mode == 1 then
65 | cmd_timer = cmd_timer_s
66 | elseif cmd_mode == 2 then
67 | if cmd_type == 1 then
68 | dispatch_action(nil,Keys.iCommandPlaneDropChaffOnce)
69 | elseif cmd_type == 0 then
70 | dispatch_action(nil,Keys.iCommandPlaneDropSnarOnce)
71 | elseif cmd_type == -1 then
72 | dispatch_action(nil,Keys.iCommandPlaneDropFlareOnce)
73 | end
74 | elseif cmd_mode == 3 then
75 | print_message_to_user("CMD Mode STBY\nSelect Man-Only or Semi-Auto",3)
76 | elseif cmd_mode == 4 then
77 | print_message_to_user("CMD Mode OFF\nSelect Man-Only or Semi-Auto",3)
78 | elseif cmd_mode == 0 then
79 | print_message_to_user("CMD Mode Auto\nNot yet implemented\nSelect Man-Only or Semi-Auto",3)
80 | end
81 | if cmd_mode ~= 1 then
82 | cmd_timer = 0
83 | end
84 | if cmd_mode == 1 and
85 | cmd_stat == cmd_stat_p then
86 | cmd_stat = cmd_stat+1
87 | else
88 | cmd_stat = cmd_stat_p
89 | end
90 | end
91 |
92 |
93 | end
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 | function update()
104 | if cmd_timer > 0 then
105 | cmd_timer = cmd_timer - update_time_step
106 | if cmd_timer <= 0 then
107 | cmd_timer = 0
108 | if cmd_type == 1 then
109 | dispatch_action(nil,Keys.iCommandPlaneDropChaffOnce)
110 | elseif cmd_type == 0 then
111 | dispatch_action(nil,Keys.iCommandPlaneDropSnarOnce)
112 | elseif cmd_type == -1 then
113 | dispatch_action(nil,Keys.iCommandPlaneDropFlareOnce)
114 | end
115 | if cmd_stat == 1 then
116 | cmd_timer = cmd_timer_s
117 | elseif cmd_stat == 0 or
118 | cmd_mode ~= 1 then
119 | cmd_timer = 0
120 | end
121 | end
122 | end
123 | end
124 | need_to_be_closed = false
125 |
126 |
127 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C With FC3/Mods/aircraft/Flaming Cliffs/Cockpit/KneeboardRight/SYSTEMS/elec_control.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 |
6 |
7 | local update_time_step = 0.02 --update will be called 50 times per second
8 | make_default_activity(update_time_step)
9 | sensor_data = get_base_data()
10 | local dev = GetSelf()
11 | local aircraft = get_aircraft_type()
12 | --------------------------------------------------------------------
13 | -- Variables Declaration
14 | local GND_EPS ,GND_PWR_2,GND_PWR_3,GND_PWR_4,GND_PWR_CC
15 | local SYSTEM_STAT,SYSTEM_TARGET
16 | local AC_BUS_1 = get_param_handle("AC_BUS_1")
17 | local AC_BUS_2 = get_param_handle("AC_BUS_2")
18 | local DC_BUS_1 = get_param_handle("DC_BUS_1")
19 | local DC_BUS_2 = get_param_handle("DC_BUS_2")
20 | local ECS = get_param_handle("ECS_READY")
21 | local birth = LockOn_Options.init_conditions.birth_place
22 | --------------------------------------------------------------------
23 | local function elec_hot_start()
24 | dev:performClickableAction(device_commands.GND_EPS , 1, false)
25 | dev:performClickableAction(device_commands.GND_PWR_2, 1, false)
26 | dev:performClickableAction(device_commands.GND_PWR_3, 1, false)
27 | dev:performClickableAction(device_commands.GND_PWR_4, 1, false)
28 | dev:performClickableAction(device_commands.GND_PWR_CC, 1, false)
29 | end
30 | local function elec_cold_start()
31 | dev:performClickableAction(device_commands.GND_EPS , 0, false)
32 | dev:performClickableAction(device_commands.GND_PWR_2, -1, false)
33 | dev:performClickableAction(device_commands.GND_PWR_3, -1, false)
34 | dev:performClickableAction(device_commands.GND_PWR_4, -1, false)
35 | dev:performClickableAction(device_commands.GND_PWR_CC, -1, false)
36 | end
37 | function post_initialize()
38 | --print_message_to_user("DEV.ELEC_CONTROL_SYSTEM",0.2) debug
39 | if birth == "GROUND_HOT" or
40 | birth == "AIR_HOT" then
41 | SYSTEM_STAT = 1
42 | elec_hot_start()
43 |
44 |
45 | elseif birth == "GROUND_COLD" then
46 | SYSTEM_STAT = 0
47 | elec_cold_start()
48 |
49 |
50 | end
51 |
52 |
53 |
54 | end
55 | function SetCommand(command,value)
56 | --print_message_to_user(tostring(command).." = "..tostring(value)) debug
57 | if command == device_commands.GND_EPS then
58 | GND_EPS = value
59 | end
60 | if command == device_commands.GND_PWR_2 then
61 | GND_PWR_2 = value
62 | end
63 | if command == device_commands.GND_PWR_3 then
64 | GND_PWR_3 = value
65 | end
66 | if command == device_commands.GND_PWR_4 then
67 | GND_PWR_4 = value
68 | end
69 | if command == device_commands.GND_PWR_CC then
70 | GND_PWR_CC = value
71 | end
72 | if GND_EPS == 1 then
73 | SYSTEM_TARGET = 1
74 |
75 | else
76 | SYSTEM_TARGET = 0
77 |
78 | end
79 | if SYSTEM_STAT == 1 and
80 | SYSTEM_TARGET == 0 then
81 | dispatch_action(nil,Keys.iCommandPowerOnOff)
82 | SYSTEM_STAT = SYSTEM_TARGET
83 | elseif SYSTEM_STAT == 0 and
84 | SYSTEM_TARGET == 1 then
85 | dispatch_action(nil,Keys.iCommandPowerOnOff)
86 | SYSTEM_STAT = SYSTEM_TARGET
87 |
88 | end
89 | if SYSTEM_STAT == 1 then
90 | dev:AC_Generator_1_on(true)
91 | dev:AC_Generator_2_on(true)
92 | dev:DC_Battery_on(true)
93 | else
94 | dev:AC_Generator_1_on(false)
95 | dev:AC_Generator_2_on(false)
96 | dev:DC_Battery_on(false)
97 | end
98 |
99 | end
100 |
101 |
102 | function update()
103 | AC_BUS_1:set(dev:get_AC_Bus_1_voltage())
104 | AC_BUS_2:set(dev:get_AC_Bus_2_voltage())
105 | DC_BUS_1:set(dev:get_DC_Bus_1_voltage())
106 | DC_BUS_2:set(dev:get_DC_Bus_2_voltage())
107 | ECS:set(SYSTEM_STAT)
108 | end
109 |
110 | need_to_be_closed = false -- close lua state after initialization
111 |
112 |
113 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C With FC3/Mods/aircraft/Flaming Cliffs/Cockpit/KneeboardRight/SYSTEMS/fuel_control.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 |
6 |
7 | local update_time_step = 0.02 --update will be called 50 times per second
8 | make_default_activity(update_time_step)
9 | sensor_data = get_base_data()
10 | local dev = GetSelf()
11 | local aircraft = get_aircraft_type()
12 | --------------------------------------------------------------------
13 | -- Variables Declaration
14 |
15 | local birth = LockOn_Options.init_conditions.birth_place
16 | local SYSTEM_STAT,SYSTEM_TARGET,REFUEL_STAT,REFUEL_INIT
17 | local FUEL_TANK,FUEL_CENTER,FUEL_WINGS,FUEL_DUMP,FUEL_EXTTR,FUEL_EMERTR,FUEL_REFUEL
18 | local FCS = get_param_handle("FCS_READY")
19 | --------------------------------------------------------------------
20 | local function fuel_hot_start()
21 | dev:performClickableAction(device_commands.FUEL_TANK, 0, false)
22 | dev:performClickableAction(device_commands.FUEL_CENTER, 0, false)
23 | dev:performClickableAction(device_commands.FUEL_WINGS, 0, false)
24 | dev:performClickableAction(device_commands.FUEL_DUMP, -1, false)
25 | dev:performClickableAction(device_commands.FUEL_EXTTR, -1, false)
26 | dev:performClickableAction(device_commands.FUEL_EMERTR,-1, false)
27 | dev:performClickableAction(device_commands.FUEL_REFUEL,-1, false)
28 | REFUEL_INIT = -1
29 | end
30 | local function fuel_cold_start()
31 | dev:performClickableAction(device_commands.FUEL_TANK, 0, false)
32 | dev:performClickableAction(device_commands.FUEL_CENTER, 0, false)
33 | dev:performClickableAction(device_commands.FUEL_WINGS, 0, false)
34 | dev:performClickableAction(device_commands.FUEL_DUMP, -1, false)
35 | dev:performClickableAction(device_commands.FUEL_EXTTR, -1, false)
36 | dev:performClickableAction(device_commands.FUEL_EMERTR,-1, false)
37 | dev:performClickableAction(device_commands.FUEL_REFUEL,-1, false)
38 | REFUEL_INIT = -1
39 | end
40 | function post_initialize()
41 | --print_message_to_user("DEV.FUEL_CONTROL_SYSTEM",0.2)
42 | if birth == "GROUND_HOT" or
43 | birth == "AIR_HOT" then
44 | fuel_hot_start()
45 | elseif birth == "GROUND_COLD" then
46 | fuel_cold_start()
47 | end
48 | end
49 | function SetCommand(command,value)
50 | --print_message_to_user(tostring(command).." = "..tostring(value))
51 | if command == device_commands.FUEL_TANK then
52 | FUEL_TANK = value
53 | end
54 | if command == device_commands.FUEL_CENTER then
55 | FUEL_CENTER = value
56 | end
57 | if command == device_commands.FUEL_WINGS then
58 | FUEL_WINGS = value
59 | end
60 | if command == device_commands.FUEL_DUMP then
61 | FUEL_DUMP = value
62 | end
63 | if command == device_commands.FUEL_EMERTR then
64 | FUEL_EMERTR = value
65 | end
66 | if command == device_commands.FUEL_EXTTR then
67 | FUEL_EXTTR = value
68 | end
69 | if command == device_commands.FUEL_REFUEL then
70 | FUEL_REFUEL = value
71 | end
72 | if command == device_commands.FUEL_REFUEL then
73 | REFUEL_STAT = value
74 | end
75 | if REFUEL_INIT == -1 then
76 | if REFUEL_STAT == 1 then
77 | dispatch_action(nil,Keys.iCommandPlaneAirRefuel)
78 | REFUEL_INIT = REFUEL_STAT
79 | end
80 | end
81 | if REFUEL_INIT == 1 then
82 | if REFUEL_STAT == -1 then
83 | dispatch_action(nil,Keys.iCommandPlaneAirRefuel)
84 | REFUEL_INIT = REFUEL_STAT
85 | end
86 | end
87 | if FUEL_DUMP == -1 and
88 | FUEL_REFUEL == -1 and
89 | FUEL_EMERTR == -1 and
90 | FUEL_WINGS == 0 and
91 | FUEL_CENTER == 0 and
92 | FUEL_TANK == 0 then
93 | SYSTEM_STAT = 1
94 | else
95 | SYSTEM_STAT = 0
96 | end
97 |
98 |
99 |
100 | end
101 |
102 |
103 | function update()
104 | FCS:set(SYSTEM_STAT)
105 | end
106 |
107 | need_to_be_closed = false -- close lua state after initialization
108 |
109 |
110 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C With FC3/Mods/aircraft/Flaming Cliffs/Cockpit/KneeboardRight/SYSTEMS/light_control.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 |
6 |
7 | local update_time_step = 0.02 --update will be called 50 times per second
8 | make_default_activity(update_time_step)
9 | sensor_data = get_base_data()
10 | local dev = GetSelf()
11 | local aircraft = get_aircraft_type()
12 |
13 | --------------------------------------------------------------------
14 | -- Mainpanel Hijacking
15 | local MISC_TAXI_LIGHT = get_param_handle("MISC_TAXI_LIGHT")
16 | --------------------------------------------------------------------
17 | -- Update Connectors Position Step 1/3
18 | local connector = {}
19 | connector["TMB_MISC_TAXI-LIGHT"]= nil
20 | --------------------------------------------------------------------
21 | -- Variables Declaration
22 | local n_flash_stat = 0 -- 0:Off 1:Flashing
23 | local n_flash = 0
24 | local n_flash_s = 1.5
25 | local c_flash_stat = 0 -- 0:Off 1:Flashing
26 | local c_flash = 0
27 | local c_flash_s = 1
28 | local LIGHT_ANTICOL,LIGHT_POS,LIGHT_FORM,PROC
29 |
30 | local navlight_s
31 | local LCS = get_param_handle("LICS_READY")
32 | local ECS = get_param_handle("ECS_READY")
33 |
34 |
35 | --------------------------------------------------------------------
36 | local function LCS_CHECK_SYSTEMS()
37 | if LIGHT_ANTICOL == 1 and
38 | LIGHT_POS > 0 then
39 | PROC = 1
40 |
41 | else PROC = 0
42 | end
43 | end
44 | local function lics_hot_start()
45 | dev:performClickableAction(device_commands.LIGHT_ANTICOL, 1, false)
46 | dev:performClickableAction(device_commands.LIGHT_FORM, 0, false)
47 | dev:performClickableAction(device_commands.LIGHT_POS, 0.5, false)
48 |
49 | LCS_CHECK_SYSTEMS()
50 | end
51 | local function lics_cold_start()
52 | dev:performClickableAction(device_commands.LIGHT_ANTICOL, -1, false)
53 | dev:performClickableAction(device_commands.LIGHT_FORM, 0, false)
54 | dev:performClickableAction(device_commands.LIGHT_POS, 0, false)
55 | LCS_CHECK_SYSTEMS()
56 | end
57 | function post_initialize()
58 | --print_message_to_user("DEV.LIGHT_CONTROL_SYSTEM",0.2)
59 |
60 |
61 | local birth = LockOn_Options.init_conditions.birth_place
62 | --------------------------------------------------------------------------------------------------------
63 | -- Update Connectors Position Step 2/3
64 | connector["TMB_MISC_TAXI-LIGHT"] = get_clickable_element_reference("TMB_MISC_TAXI-LIGHT")
65 | --------------------------------------------------------------------------------------------------------
66 |
67 |
68 | if birth=="GROUND_HOT" or birth=="AIR_HOT" then
69 |
70 | lics_hot_start()
71 | elseif birth=="GROUND_COLD" then
72 | lics_cold_start()
73 | end
74 |
75 |
76 |
77 | end
78 | function SetCommand(command,value)
79 |
80 |
81 | if ECS:get() == 1 then
82 | if command == device_commands._409 then
83 | dev:performClickableAction(device_commands._180,value)
84 | dev:performClickableAction(device_commands.LIGHT_COCKPIT,value)
85 | end
86 | if command == device_commands.LIGHT_COCKPIT then
87 | dev:performClickableAction(device_commands._180,value)
88 | end
89 | if command == device_commands.LIGHT_LDG_TAXI then
90 | dispatch_action(nil,Keys.iCommandPlaneHeadLightOnOff)
91 | end
92 | if command == device_commands.LIGHT_ANTICOL then
93 | LIGHT_ANTICOL= value
94 | if
95 | LIGHT_ANTICOL== 1 then
96 | c_flash_stat= 1
97 | elseif LIGHT_ANTICOL== -1 then
98 | c_flash_stat= 0
99 | end
100 | end
101 | if command == device_commands.LIGHT_POS then
102 | LIGHT_POS = round(value*10,0)
103 | --print_message_to_user(value)
104 | if LIGHT_POS >= 0 and
105 | LIGHT_POS <= 6 then
106 | n_flash_stat= 0
107 | set_aircraft_draw_argument_value(190,LIGHT_POS/10) --navl
108 | set_aircraft_draw_argument_value(191,LIGHT_POS/10) --navr
109 | set_aircraft_draw_argument_value(192,LIGHT_POS/10) --strob
110 | elseif LIGHT_POS == 7 then
111 | n_flash_stat= 1
112 | end
113 |
114 | end
115 | if n_flash_stat== 1 then
116 | n_flash = n_flash_s
117 | elseif n_flash_stat== 0 then
118 | n_flash = 0
119 | end
120 | if c_flash_stat== 1 then
121 | c_flash = c_flash_s
122 | elseif c_flash_stat== 0 then
123 | c_flash = 0
124 | end
125 | if command == device_commands.LIGHT_FORM then
126 | LIGHT_FORM = value
127 |
128 | end
129 | LCS_CHECK_SYSTEMS()
130 | end
131 | end
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 | function update()
141 | --------------------------------------------------------------------
142 | -- Sync landing and taxi lights with lever via Mainpanel
143 | if get_aircraft_draw_argument_value(208) == 1 then
144 | MISC_TAXI_LIGHT:set(1)
145 |
146 | elseif get_aircraft_draw_argument_value(209) == 1 then
147 | MISC_TAXI_LIGHT:set(-1)
148 | elseif get_aircraft_draw_argument_value(208) == 0 and
149 | get_aircraft_draw_argument_value(209) == 0 then
150 | MISC_TAXI_LIGHT:set(0)
151 | end
152 | --------------------------------------------------------------------
153 | -- Update Connectors Position Step 3/3
154 | if connector["TMB_MISC_TAXI-LIGHT"] then
155 | connector["TMB_MISC_TAXI-LIGHT"]:update()
156 | end
157 | --------------------------------------------------------------------
158 | -- Navigation lights flash logic
159 | if n_flash > 0 then
160 | n_flash = n_flash - update_time_step
161 | if n_flash <= 0 then
162 | n_flash = n_flash_s
163 | end
164 | if n_flash >= 0.5 and
165 | n_flash >= 1.00 then
166 | set_aircraft_draw_argument_value(190,1) --navl
167 | set_aircraft_draw_argument_value(191,1) --navr
168 | set_aircraft_draw_argument_value(192,1) --strob
169 | else
170 | set_aircraft_draw_argument_value(190,0) --navl
171 | set_aircraft_draw_argument_value(191,0) --navr
172 | set_aircraft_draw_argument_value(192,0) --strob
173 | end
174 | end
175 | --------------------------------------------------------------------
176 | -- Collision lights flash logic
177 | if c_flash > 0 then
178 | c_flash = c_flash - update_time_step
179 | if c_flash <= 0 then
180 | c_flash = c_flash_s
181 | end
182 | if c_flash >= 0.5 and
183 | c_flash <= 0.6 then
184 | set_aircraft_draw_argument_value(199,1) --coll
185 | else
186 | set_aircraft_draw_argument_value(199,0) --coll
187 | end
188 | end
189 | --------------------------------------------------------------------
190 | -- Sync Formation lights with rotary
191 | set_aircraft_draw_argument_value(88,LIGHT_FORM)
192 | --------------------------------------------------------------------
193 | LCS:set(PROC)
194 |
195 | end
196 |
197 | need_to_be_closed = false -- close lua state after initialization
198 |
199 |
200 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C With FC3/Mods/aircraft/Flaming Cliffs/Cockpit/KneeboardRight/SYSTEMS/misc_control.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 |
6 |
7 | local update_time_step = 0.02 --update will be called 50 times per second
8 | make_default_activity(update_time_step)
9 | sensor_data = get_base_data()
10 | local dev = GetSelf()
11 | local aircraft = get_aircraft_type()
12 | --------------------------------------------------------------------
13 | -- Variables Declaration
14 | local E_BRAKES,PROC
15 | local birth = LockOn_Options.init_conditions.birth_place
16 | local MCS = get_param_handle("MCS_READY")
17 |
18 | --------------------------------------------------------------------
19 | local function MCS_CHECK_SYSTEMS()
20 | if E_BRAKES == 1 then
21 | PROC = 1
22 |
23 | else PROC = 0
24 | end
25 | end
26 | local function misc_hot_start()
27 | dev:performClickableAction(device_commands.MISC_ANTISKID, -1, false)
28 | dev:performClickableAction(device_commands.MISC_INLET_R, 1, false)
29 | dev:performClickableAction(device_commands.MISC_INLET_L, 1, false)
30 | dev:performClickableAction(device_commands.MISC_ROLL, 1, false)
31 | dev:performClickableAction(device_commands.MISC_MASTERARM, -1, false)
32 | dev:performClickableAction(device_commands.MISC_EBRAKES, -1, false)
33 | MCS_CHECK_SYSTEMS()
34 |
35 | end
36 | local function misc_cold_start()
37 | dev:performClickableAction(device_commands.MISC_ANTISKID, -1, false)
38 | dev:performClickableAction(device_commands.MISC_INLET_R, 1, false)
39 | dev:performClickableAction(device_commands.MISC_INLET_L, 1, false)
40 | dev:performClickableAction(device_commands.MISC_ROLL, 1, false)
41 | dev:performClickableAction(device_commands.MISC_MASTERARM, -1, false)
42 | dev:performClickableAction(device_commands.MISC_EBRAKES, -1, false)
43 | MCS_CHECK_SYSTEMS()
44 |
45 | end
46 |
47 |
48 | function post_initialize()
49 | --print_message_to_user("DEV.MISC_CONTROL_SYSTEM",0.2)
50 | if birth == "GROUND_HOT" or
51 | birth == "AIR_HOT" then
52 | misc_hot_start()
53 |
54 |
55 | elseif birth == "GROUND_COLD" then
56 | misc_cold_start()
57 |
58 |
59 | end
60 |
61 |
62 |
63 | end
64 | function SetCommand(command,value)
65 | --print_message_to_user(tostring(command).." = "..tostring(value))
66 | if command == device_commands.MISC_EBRAKES then
67 | E_BRAKES = value
68 | if E_BRAKES == -1 then
69 | dispatch_action(nil,Keys.iCommandPlaneWheelBrakeOff)
70 | elseif E_BRAKES == 1 then
71 | dispatch_action(nil,Keys.iCommandPlaneWheelBrakeOn)
72 | end
73 | end
74 | MCS_CHECK_SYSTEMS()
75 |
76 |
77 |
78 | end
79 |
80 |
81 | function update()
82 | MCS:set(PROC)
83 |
84 | end
85 |
86 | need_to_be_closed = false -- close lua state after initialization
87 |
88 |
89 | --arg 25 == hook
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C With FC3/Mods/aircraft/Flaming Cliffs/Cockpit/KneeboardRight/SYSTEMS/radar_control.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 |
6 |
7 | local update_time_step = 0.005
8 | make_default_activity(update_time_step)
9 | sensor_data = get_base_data()
10 | local dev = GetSelf()
11 | local aircraft = get_aircraft_type()
12 | --------------------------------------------------------------------
13 | --Variable declaration
14 | local radar_mode = 0 -- 1:LRS 2:VS 3:SRS
15 | local radar_stat = 0 -- -1:Off 0.5:Stby 1:Opr
16 | local radar_spl = 0 -- 0:Off 1:Flood
17 | local scan_area = 1
18 | local r_timer = 0
19 | local s_timer = 0
20 | --------------------------------------------------------------------
21 | --
22 | local RADAR_POWER = get_param_handle("RADAR_POWER")
23 | local RADAR_MODE_SEL = get_param_handle("RADAR_MODE_SEL")
24 | local RADAR_SPL_MODE = get_param_handle("RADAR_SPL_MODE")
25 |
26 | function post_initialize()
27 | --print_message_to_user("DEV.RADAR_CONTROL_SYSTEM",0.2)
28 | local birth = LockOn_Options.init_conditions.birth_place
29 | if birth=="GROUND_HOT" or birth=="AIR_HOT" then
30 |
31 |
32 | elseif birth=="GROUND_COLD" then
33 |
34 | end
35 |
36 |
37 |
38 | end
39 | local function reset_scan_area(scan_area)
40 | local max_scan_area = 1
41 | if scan_area > max_scan_area then
42 | return 1
43 | elseif scan_area < 0 then
44 | return 0
45 | else
46 | return scan_area
47 | end
48 | end
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | dev:listen_command(Keys.iCommandPlaneRadarOnOff)
57 | dev:listen_command(Keys.iCommandPlaneModeNAV)
58 | dev:listen_command(Keys.iCommandPlaneModeBVR)
59 | dev:listen_command(Keys.iCommandPlaneModeVS)
60 | dev:listen_command(Keys.iCommandPlaneModeBore)
61 | dev:listen_command(Keys.iCommandPlaneModeFI0)
62 | dev:listen_command(Keys.iCommandPlaneRadarChangeMode)
63 | dev:listen_command(Keys.iCommandPlaneChangeRadarPRF)
64 | dev:listen_command(Keys.iCommandRefusalTWS)
65 |
66 |
67 |
68 | function SetCommand(command,value)
69 | if command == device_commands.CLIC_RADAR_SPL_MODE then
70 | radar_spl = value
71 | if radar_spl == 1 then
72 | dispatch_action(nil,Keys.iCommandPlaneModeFI0)
73 | end
74 | if radar_spl == 0 then
75 | dispatch_action(nil,Keys.iCommandPlaneModeBore)
76 | end
77 |
78 | end
79 | if command == device_commands.CLIC_RADAR_MODE_SEL then
80 | if value == 1 then
81 | radar_mode = radar_mode + 1
82 | elseif value == 0 then
83 | radar_mode = radar_mode - 1
84 | end
85 | if radar_mode > 3 then
86 | radar_mode = 3
87 | end
88 | if radar_mode < 0 then
89 | radar_mode = 0
90 | end
91 | if radar_mode == 1 then
92 | dispatch_action(nil,Keys.iCommandPlaneModeBVR)
93 | end
94 | if radar_mode == 2 then
95 | dispatch_action(nil,Keys.iCommandPlaneModeVS)
96 | end
97 | if radar_mode == 3 then
98 | dispatch_action(nil,Keys.iCommandPlaneModeBore)
99 | end
100 | end
101 | if command == device_commands.CLIC_RADAR_POWER then
102 | dispatch_action(nil,Keys.iCommandPlaneRadarOnOff)
103 | end
104 | if radar_stat == 0 then
105 | if command == Keys.iCommandPlaneRadarOnOff then
106 | radar_stat = 1
107 | end
108 | elseif radar_stat == 1 then
109 | if command == Keys.iCommandPlaneRadarOnOff then
110 | radar_stat = 0
111 | end
112 | end
113 | if command == Keys.iCommandPlaneModeBVR then
114 |
115 | radar_mode = 1
116 | radar_spl = 0
117 | if radar_stat == 0 then
118 | dispatch_action(nil,Keys.iCommandPlaneRadarOnOff)
119 | end
120 |
121 | end
122 | if command == Keys.iCommandPlaneModeVS then
123 | radar_mode = 2
124 | radar_spl = 0
125 | if radar_stat == 0 then
126 | radar_stat = 1
127 | end
128 | end
129 | if command == Keys.iCommandPlaneModeBore then
130 | radar_mode = 3
131 | radar_spl = 0
132 |
133 | if radar_stat == 0 then
134 | radar_stat = 1
135 | end
136 | end
137 | if command == Keys.iCommandPlaneModeFI0 then
138 | radar_mode = 3
139 | radar_spl = 1
140 | if radar_stat == 1 then
141 | dispatch_action(nil,Keys.iCommandPlaneRadarOnOff)
142 |
143 | end
144 | end
145 | if command == device_commands.CLIC_RADAR_EL_SCAN then
146 | s_timer = 0.3
147 | if value == 1 then
148 | dispatch_action(nil,Keys.iCommandSelecterUp)
149 | elseif value == 0 then
150 | dispatch_action(nil,Keys.iCommandSelecterDown)
151 | end
152 | end
153 | if command == device_commands.CLIC_RADAR_RANGE then
154 | if value == 1 then
155 | dispatch_action(nil,Keys.iCommandPlaneZoomIn)
156 | elseif value == 0 then
157 | dispatch_action(nil,Keys.iCommandPlaneZoomOut)
158 | end
159 | end
160 | if command == device_commands.CLIC_RADAR_AZ_SCAN and
161 | value > 0 then
162 | scan_area = scan_area +1
163 | elseif command == device_commands.CLIC_RADAR_AZ_SCAN and
164 | value < 0 then
165 | scan_area = scan_area -1
166 | end
167 | if command == device_commands.CLIC_RADAR_AZ_SCAN then
168 | if scan_area == 1 then
169 | dispatch_action(nil,Keys.iCommandIncreaseRadarScanArea)
170 | elseif scan_area == 0 then
171 | dispatch_action(nil,Keys.iCommandDecreaseRadarScanArea)
172 | end
173 | end
174 | scan_area = reset_scan_area(scan_area)
175 | end
176 |
177 |
178 |
179 |
180 | function update_radar()
181 | RADAR_MODE_SEL:set(radar_mode)
182 | RADAR_POWER:set(radar_stat)
183 | RADAR_SPL_MODE:set(radar_spl)
184 | end
185 |
186 |
187 | function update()
188 |
189 | if s_timer > 0 then
190 | s_timer = s_timer - update_time_step
191 | if s_timer <= 0 then
192 | s_timer = 0
193 | dispatch_action(nil,Keys.iCommandSelecterStop)
194 | end
195 | end
196 | if r_timer > 0 then
197 | r_timer = r_timer - update_time_step
198 | if r_timer <= 0 then
199 | r_timer = 0
200 | dispatch_action(nil,Keys.iCommandPlaneRadarStop)
201 | end
202 | end
203 | update_radar()
204 | --print_message_to_user(get_cockpit_draw_argument_value(429))
205 | end
206 |
207 | need_to_be_closed = false
208 |
209 |
210 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C With FC3/Mods/aircraft/Flaming Cliffs/Cockpit/KneeboardRight/SYSTEMS/radio_control.lua:
--------------------------------------------------------------------------------
1 |
2 | dofile(LockOn_Options.script_path.."devices.lua")
3 | dofile(LockOn_Options.script_path.."command_defs.lua")
4 | dofile(LockOn_Options.script_path.."utils.lua")
5 | --dofile(lfs.writedir() .. 'Mods\\Services\\DCS-SRS\\Scripts\\DCS-SimpleRadioStandalone.lua')
6 |
7 |
8 | local update_time_step = 0.02 --update will be called 50 times per second
9 | make_default_activity(update_time_step)
10 | sensor_data = get_base_data()
11 | local dev = GetSelf()
12 | local aircraft = get_aircraft_type()
13 | --------------------------------------------------------------------
14 | local RADIO_CHAN_TENS = get_param_handle("RADIO_CHAN_TENS")
15 | local RADIO_CHAN_ONES = get_param_handle("RADIO_CHAN_ONES")
16 | local RADIO_FREQ1_TENS = get_param_handle("RADIO_FREQ1_TENS")
17 | local RADIO_FREQ1_ONES = get_param_handle("RADIO_FREQ1_ONES")
18 | local RADIO_FREQ2 = get_param_handle("RADIO_FREQ2")
19 | local RADIO_FREQ3_CENTS = get_param_handle("RADIO_FREQ3_CENTS")
20 | local RADIO_FREQ3_TENS = get_param_handle("RADIO_FREQ3_TENS")
21 | local RADIO_FREQ3_ONES = get_param_handle("RADIO_FREQ3_ONES")
22 | local RADIO_SRS_TEST = get_param_handle("RADIO_SRS_TEST")
23 |
24 | local radio_chan = 0
25 | local radio_freq1 = 0
26 | local radio_freq2 = 0
27 | local radio_freq3 = 0
28 | local radio_freq3m = 0
29 | local radio_freq3c = 0
30 | local radio_draw_chan = 0
31 | local radio_draw_freq1 = 0
32 | local radio_draw_freq2 = 0
33 | local radio_draw_freq3 = 0
34 | local radio_draw_freq3m = 0
35 | local radio_draw_freq3c = 0
36 | local radio_freq_srs
37 |
38 |
39 | function radio_draw_chan(count)
40 | local tens = math.floor(count/10 + 0.02)
41 | local ones = math.floor(count%10 + 0.01)
42 | RADIO_CHAN_TENS:set(tens/10)
43 | RADIO_CHAN_ONES:set(ones/10)
44 | end
45 | function radio_draw_freq1(count)
46 | local tens = math.floor(count/10 + 0.02)
47 | local ones = math.floor(count%10 + 0.01)
48 | RADIO_FREQ1_TENS:set(tens/10)
49 | RADIO_FREQ1_ONES:set(ones/10)
50 | end
51 | function radio_draw_freq2(count)
52 | local ones = math.floor(count%10 + 0.02)
53 | RADIO_FREQ2:set(ones/10)
54 | end
55 | function radio_draw_freq3m(count)
56 | local cents = math.floor(count/100 + 0.02)
57 | local ones = math.floor(count%10 + 0.01)
58 | RADIO_FREQ3_CENTS:set(cents/10)
59 | RADIO_FREQ3_ONES:set(ones/10)
60 | end
61 | function radio_draw_freq3c(count)
62 | local tens = math.floor(count/10 + 0.02)
63 | RADIO_FREQ3_TENS:set(tens/10)
64 | end
65 |
66 | function update_radio_display()
67 | radio_draw_chan(radio_chan)
68 | radio_draw_freq1(radio_freq1)
69 | radio_draw_freq2(radio_freq2)
70 | radio_draw_freq3m(radio_freq3m)
71 | radio_draw_freq3c(radio_freq3c)
72 | end
73 | function update_radio_srs()
74 | RADIO_SRS_TEST:set(radio_freq_srs)
75 | --print_message_to_user(RADIO_SRS_TEST:get())
76 | end
77 |
78 |
79 | function post_initialize()
80 | --print_message_to_user("DEV.RADIO_CONTROL_SYSTEM",0.2)
81 | dev:performClickableAction(device_commands.CLIC_RCHAN, 0.1, false)
82 | dev:performClickableAction(device_commands.CLIC_RFREQ_1, 0.455, false)
83 | dev:performClickableAction(device_commands.CLIC_RFREQ_2, 0.6, false)
84 | dev:performClickableAction(device_commands.CLIC_RFREQ_3, 0.6, false)
85 |
86 |
87 | local birth = LockOn_Options.init_conditions.birth_place
88 | dev:performClickableAction(device_commands.CLIC_RUHF, 0.5, false)
89 | dev:performClickableAction(device_commands.CLIC_RVOL, 0.66, false)
90 | if birth=="GROUND_HOT" or birth=="AIR_HOT" then
91 |
92 |
93 |
94 | elseif birth=="GROUND_COLD" then
95 |
96 | end
97 |
98 |
99 |
100 | end
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 | function SetCommand(command,value)
114 |
115 | --print_message_to_user(tostring(command).." = "..tostring(value))
116 | if command == device_commands.CLIC_RCOMMENU and
117 | value == 1 then
118 | dispatch_action(nil,Keys.iCommandToggleCommandMenu)
119 | end
120 |
121 | if command == device_commands.CLIC_RFREQ_3 then
122 | radio_freq3 = round(radio_freq3 + 50*value)
123 | radio_freq3m = radio_freq3 % 1000
124 | radio_freq3c = radio_freq3 % 100
125 | --print_message_to_user("CLIC_RFREQ_3"..(value))
126 | end
127 | if command == device_commands.CLIC_RFREQ_2 then
128 | radio_freq2 = round(radio_freq2 + 50*value)
129 | radio_freq2 = radio_freq2 % 10
130 | --print_message_to_user(radio_freq2) --radio_freq2 Radio freq2 number, can be used to implement radios
131 | end
132 | if command == device_commands.CLIC_RFREQ_1 then
133 | radio_freq1 = round(radio_freq1 + 50*value)
134 | radio_freq1 = radio_freq1 % 100
135 | --print_message_to_user(radio_freq1) --radio_freq1 Radio freq1 number, can be used to implement radios
136 | end
137 |
138 | if command == device_commands.CLIC_RCHAN then
139 | radio_chan = round(radio_chan + 50*value)
140 | radio_chan = radio_chan % 100
141 | --radio_chan Radio channel number, can be used to implement radios
142 | end
143 | radio_freq_srs = radio_freq1*10 + radio_freq2 + radio_freq3m/1000
144 |
145 |
146 | end
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 | function update()
157 | --print_message_to_user(RADIO_SRS_TEST:get())
158 |
159 | --[[
160 | if get_cockpit_draw_argument_value(272)~=get_cockpit_draw_argument_value(272) then
161 | print_message_to_user(get_cockpit_draw_argument_value(272))
162 | end]]
163 |
164 | update_radio_display()
165 | update_radio_srs()
166 | end
167 |
168 | need_to_be_closed = false -- close lua state after initialization
169 |
170 |
171 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C With FC3/Mods/aircraft/Flaming Cliffs/Cockpit/KneeboardRight/device_init.lua:
--------------------------------------------------------------------------------
1 | dofile(LockOn_Options.script_path.."devices.lua")
2 | dofile(LockOn_Options.script_path.."supported.lua") --Call lua file to detect current aircraft
3 | dofile(LockOn_Options.common_script_path.."tools.lua")
4 |
5 | attributes = {
6 | "support_for_cws",
7 | }
8 |
9 | if supported == true then --Mod launching logic.
10 | MainPanel = {"ccMainPanel",LockOn_Options.script_path.."mainpanel_init.lua", {} }
11 | creators = {}
12 | creators[devices.CLICKABLE_GENERIC_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/clickable.lua"}
13 | creators[devices.RADIO_CONTROL_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/radio_control.lua"}
14 | creators[devices.COUNTERMEASURES_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/cmd_control.lua"}
15 | creators[devices.RADAR_CONTROL_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/radar_control.lua"}
16 | creators[devices.LIGHT_CONTROL_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/light_control.lua"}
17 | creators[devices.ELEC_CONTROL_SYSTEM] = {"avSimpleElectricSystem" ,LockOn_Options.script_path.."SYSTEMS/elec_control.lua"}
18 | --creators[devices.ENGINES_CONTROL_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/engines_control.lua"}
19 | --creators[devices.FUEL_CONTROL_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/fuel_control.lua"}
20 | creators[devices.MISC_CONTROL_SYSTEM] = {"avLuaDevice" ,LockOn_Options.script_path.."SYSTEMS/misc_control.lua"}
21 | end
22 | ---------------------------------------------
23 | dofile(LockOn_Options.common_script_path.."KNEEBOARD/declare_kneeboard_device.lua")
24 | ---------------------------------------------
25 |
26 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C With FC3/Mods/aircraft/Flaming Cliffs/Cockpit/KneeboardRight/devices.lua:
--------------------------------------------------------------------------------
1 | local count = 0
2 | local function counter()
3 | count = count + 1
4 | return count
5 | end
6 | -------DEVICE ID-------
7 | devices = {}
8 | devices["CLICKABLE_GENERIC_SYSTEM"] = counter()
9 | devices["RADIO_CONTROL_SYSTEM"] = counter()
10 | devices["COUNTERMEASURES_SYSTEM"] = counter()
11 | devices["RADAR_CONTROL_SYSTEM"] = counter()
12 | devices["LIGHT_CONTROL_SYSTEM"] = counter()
13 | devices["ELEC_CONTROL_SYSTEM"] = counter()
14 | devices["ENGINES_CONTROL_SYSTEM"] = counter()
15 | devices["FUEL_CONTROL_SYSTEM"] = counter()
16 | devices["MISC_CONTROL_SYSTEM"] = counter()
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C With FC3/Mods/aircraft/Flaming Cliffs/Cockpit/KneeboardRight/mainpanel_init.lua:
--------------------------------------------------------------------------------
1 |
2 | local aircraft = get_aircraft_type()
3 |
4 | if aircraft=="F-15C" then
5 | shape_name = "Cockpit_F-15C"
6 | end
7 |
8 | is_EDM = true
9 | new_model_format = true
10 | ambient_light = {255,255,255}
11 | ambient_color_day_texture = {72, 100, 160}
12 | ambient_color_night_texture = {40, 60 ,150}
13 | ambient_color_from_devices = {50, 50, 40}
14 | ambient_color_from_panels = {35, 25, 25}
15 |
16 | dusk_border = 0.4
17 | draw_pilot = false
18 |
19 | external_model_canopy_arg = 38
20 |
21 | use_external_views = false
22 |
23 | day_texture_set_value = 0.0
24 | night_texture_set_value = 0.1
25 |
26 | local controllers = LoRegisterPanelControls()
27 |
28 | RADIO_CHAN_TENS = CreateGauge("parameter")
29 | RADIO_CHAN_TENS.arg_number = 348
30 | RADIO_CHAN_TENS.input = {0.0, 1.0}
31 | RADIO_CHAN_TENS.output = {0.0, 1.0}
32 | RADIO_CHAN_TENS.parameter_name = "RADIO_CHAN_TENS"
33 |
34 | RADIO_CHAN_ONES = CreateGauge("parameter")
35 | RADIO_CHAN_ONES.arg_number = 349
36 | RADIO_CHAN_ONES.input = {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0} --Animation calibration.
37 | RADIO_CHAN_ONES.output = {0.4,0.5,0.6,0.7,0.8,0.9,1.0,0.1,0.2,0.3,0.39} --Animation calibration.
38 | RADIO_CHAN_ONES.parameter_name = "RADIO_CHAN_ONES"
39 |
40 | RADIO_FREQ1_TENS = CreateGauge("parameter")
41 | RADIO_FREQ1_TENS.arg_number = 350
42 | RADIO_FREQ1_TENS.input = {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
43 | RADIO_FREQ1_TENS.output = {0.8,0.9,1.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.79}
44 | RADIO_FREQ1_TENS.parameter_name = "RADIO_FREQ1_TENS"
45 |
46 | RADIO_FREQ1_ONES = CreateGauge("parameter")
47 | RADIO_FREQ1_ONES.arg_number = 351
48 | RADIO_FREQ1_ONES.input = {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
49 | RADIO_FREQ1_ONES.output = {0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.0,0.1,0.2,0.29}
50 | RADIO_FREQ1_ONES.parameter_name = "RADIO_FREQ1_ONES"
51 |
52 | RADIO_FREQ2 = CreateGauge("parameter")
53 | RADIO_FREQ2.arg_number = 352
54 | RADIO_FREQ2.input = {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
55 | RADIO_FREQ2.output = {0.4,0.5,0.6,0.7,0.8,0.9,1.0,0.1,0.2,0.3,0.39}
56 | RADIO_FREQ2.parameter_name = "RADIO_FREQ2"
57 |
58 | RADIO_FREQ3_CENTS = CreateGauge("parameter")
59 | RADIO_FREQ3_CENTS.arg_number = 353
60 | RADIO_FREQ3_CENTS.input = {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
61 | RADIO_FREQ3_CENTS.output = {0.7,0.8,0.9,0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.69}
62 | RADIO_FREQ3_CENTS.parameter_name = "RADIO_FREQ3_CENTS"
63 |
64 | RADIO_FREQ3_TENS = CreateGauge("parameter")
65 | RADIO_FREQ3_TENS.arg_number = 354
66 | RADIO_FREQ3_TENS.input = {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
67 | RADIO_FREQ3_TENS.output = {0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.0,0.1,0.2,0.29}
68 |
69 | RADIO_FREQ3_TENS.parameter_name = "RADIO_FREQ3_TENS"
70 |
71 | RADIO_FREQ3_ONES = CreateGauge("parameter")
72 | RADIO_FREQ3_ONES.arg_number = 355
73 | RADIO_FREQ3_ONES.input = {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
74 | RADIO_FREQ3_ONES.output = {0.5,0.6,0.7,0.8,0.9,0.0,0.1,0.2,0.3,0.4,0.49}
75 | RADIO_FREQ3_ONES.parameter_name = "RADIO_FREQ3_ONES"
76 |
77 | MISC_TAXI_LIGHT = CreateGauge("parameter")
78 | MISC_TAXI_LIGHT.arg_number = 428
79 | MISC_TAXI_LIGHT.input = {-1, 1}
80 | MISC_TAXI_LIGHT.output = {-1, 1}
81 | MISC_TAXI_LIGHT.parameter_name = "MISC_TAXI_LIGHT"
82 |
83 |
84 | RADAR_POWER = CreateGauge("parameter")
85 | RADAR_POWER.arg_number = 488
86 | RADAR_POWER.input = {0.0,0.5,1.0}
87 | RADAR_POWER.output = {-1,0.1,0.2}
88 | RADAR_POWER.parameter_name = "RADAR_POWER"
89 |
90 | RADAR_MODE_SEL = CreateGauge("parameter")
91 | RADAR_MODE_SEL.arg_number = 493
92 | RADAR_MODE_SEL.input = {1, 2, 3}
93 | RADAR_MODE_SEL.output = {0, 0.1, 0.2}
94 | RADAR_MODE_SEL.parameter_name = "RADAR_MODE_SEL"
95 |
96 | RADAR_SPL_MODE = CreateGauge("parameter")
97 | RADAR_SPL_MODE.arg_number = 492
98 | RADAR_SPL_MODE.input = {0, 1}
99 | RADAR_SPL_MODE.output = {-1.0, 1.0}
100 | RADAR_SPL_MODE.parameter_name = "RADAR_SPL_MODE"
101 |
102 |
103 |
104 |
105 |
106 | need_to_be_closed = false
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C With FC3/Mods/aircraft/Flaming Cliffs/Cockpit/KneeboardRight/supported.lua:
--------------------------------------------------------------------------------
1 | local aircraft = get_aircraft_type()
2 | --Reading the variable
3 | if
4 |
5 | aircraft =="F-15C" then
6 |
7 |
8 | supported = true --The mod will start
9 | else
10 | supported = false --The mod will not start
11 | end
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/F-15C/Library/F-15C With FC3/Mods/aircraft/Flaming Cliffs/Liveries/Cockpit_F-15C/default/description.lua:
--------------------------------------------------------------------------------
1 | livery =
2 | {
3 |
4 | {"F-15C_Mirrors", 0 ,"mirrors",true};--mirrors texture replacement with runtime rendered one
5 | }
6 |
--------------------------------------------------------------------------------
/DATA/Open Mod Manager/Redk0d Clickable F-15C.omc:
--------------------------------------------------------------------------------
1 |
2 |
3 | 324fd06d-9001-4556-ba85-d1bbe87bae6d
4 | Redk0d Clickable F-15C
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Help_Pictures/A10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Help_Pictures/A10.jpg
--------------------------------------------------------------------------------
/Help_Pictures/F15.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Help_Pictures/F15.jpg
--------------------------------------------------------------------------------
/Help_Pictures/MiG29.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Help_Pictures/MiG29.jpg
--------------------------------------------------------------------------------
/Help_Pictures/SU-27.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Help_Pictures/SU-27.jpg
--------------------------------------------------------------------------------
/Help_Pictures/SU-33.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Help_Pictures/SU-33.jpg
--------------------------------------------------------------------------------
/Help_Pictures/SU25.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Help_Pictures/SU25.jpg
--------------------------------------------------------------------------------
/Help_Pictures/SU25T.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Help_Pictures/SU25T.jpg
--------------------------------------------------------------------------------
/INSTALL.md:
--------------------------------------------------------------------------------
1 | # RedK0d Clickable
2 | A partially clickable mod for the FC3 Planes
3 |
4 | # INSTALLATION
5 |
6 | Unzip the contents of the archive in your "Saved Games\DCS\Mods\tech\" directory.
7 |
8 | Then launch the game.
9 | You can manage the activation of the module in the options.
10 | Lalt+C to click
11 | Please report any issues in the dedicated section on Discord or Github.
12 |
13 | Concerning the F-15C it is a little more complex:
14 | Step 1: Download and Install Open Mod Manager Available here: https://github.com/sedenion/OpenModMan/releases
15 | Step 2: Open the Redk0d Clickable F-15C.omc file contained in CLICKABLE-FC3(version)\DATA\Open Mod Manager
16 | Step 3: Click on "Edit"
17 | Step 4: Click on "Target Destination Folder"
18 | Step 5: Enter your DCS installation directory
19 | Step 6: Click Apply
20 | Step 7: Depending if you have Standalone F-15C or FC3 highlight "F-15C Standalone" or "F-15C With FC3" and click "Install" or "Unistall" if you want to install or uninstall.
21 | Step 8: Fly
--------------------------------------------------------------------------------
/Options/options.dlg:
--------------------------------------------------------------------------------
1 | dialog = {
2 | ["children"] = {
3 | ["containerPlugin"] = {
4 | ["children"] = {
5 | ["nameLabel"] = {
6 | ["params"] = {
7 | ["angle"] = 0,
8 | ["bounds"] = {
9 | ["h"] = 75,
10 | ["w"] = 320,
11 | ["x"] = 300,
12 | ["y"] = 60,
13 | },
14 | ["enabled"] = true,
15 | ["pivotPoint"] = {
16 | ["x"] = 0,
17 | ["y"] = 0,
18 | },
19 | ["text"] = "RedK0d Clickable",
20 | ["tooltip"] = "",
21 | ["visible"] = true,
22 | ["zindex"] = 0,
23 | },
24 | ["skin"] = {
25 | ["params"] = {
26 | ["name"] = "staticOptionsTitleSkin",
27 | },
28 | },
29 | ["type"] = "Static",
30 | },
31 | ["Su27_enabledCheckbox"] = {
32 | ["params"] = {
33 | ["bounds"] = {
34 | ["h"] = 24,
35 | ["w"] = 75,
36 | ["x"] = 100,
37 | ["y"] = 150,
38 | },
39 | ["enabled"] = true,
40 | ["state"] = true,
41 | ["tabOrder"] = 0,
42 | ["text"] = "Su-27",
43 | ["tooltip"] = "",
44 | ["visible"] = true,
45 | ["zindex"] = 0,
46 | },
47 | ["skin"] = {
48 | ["params"] = {
49 | ["name"] = "checkBoxSkin_options",
50 | },
51 | },
52 | ["type"] = "CheckBox",
53 | },
54 | ["J11a_enabledCheckbox"] = {
55 | ["params"] = {
56 | ["bounds"] = {
57 | ["h"] = 24,
58 | ["w"] = 75,
59 | ["x"] = 100,
60 | ["y"] = 180,
61 | },
62 | ["enabled"] = true,
63 | ["state"] = true,
64 | ["tabOrder"] = 0,
65 | ["text"] = "J-11A",
66 | ["tooltip"] = "",
67 | ["visible"] = true,
68 | ["zindex"] = 0,
69 | },
70 | ["skin"] = {
71 | ["params"] = {
72 | ["name"] = "checkBoxSkin_options",
73 | },
74 | },
75 | ["type"] = "CheckBox",
76 | },
77 | ["Su33_enabledCheckbox"] = {
78 | ["params"] = {
79 | ["bounds"] = {
80 | ["h"] = 24,
81 | ["w"] = 75,
82 | ["x"] = 100,
83 | ["y"] = 210,
84 | },
85 | ["enabled"] = true,
86 | ["state"] = true,
87 | ["tabOrder"] = 0,
88 | ["text"] = "Su-33",
89 | ["tooltip"] = "",
90 | ["visible"] = true,
91 | ["zindex"] = 0,
92 | },
93 | ["skin"] = {
94 | ["params"] = {
95 | ["name"] = "checkBoxSkin_options",
96 | },
97 | },
98 | ["type"] = "CheckBox",
99 | },
100 | ["Su25t_enabledCheckbox"] = {
101 | ["params"] = {
102 | ["bounds"] = {
103 | ["h"] = 24,
104 | ["w"] = 75,
105 | ["x"] = 100,
106 | ["y"] = 240,
107 | },
108 | ["enabled"] = true,
109 | ["state"] = true,
110 | ["tabOrder"] = 0,
111 | ["text"] = "Su-25T",
112 | ["tooltip"] = "",
113 | ["visible"] = true,
114 | ["zindex"] = 0,
115 | },
116 | ["skin"] = {
117 | ["params"] = {
118 | ["name"] = "checkBoxSkin_options",
119 | },
120 | },
121 | ["type"] = "CheckBox",
122 | },
123 | ["Su25_enabledCheckbox"] = {
124 | ["params"] = {
125 | ["bounds"] = {
126 | ["h"] = 24,
127 | ["w"] = 75,
128 | ["x"] = 100,
129 | ["y"] = 270,
130 | },
131 | ["enabled"] = true,
132 | ["state"] = true,
133 | ["tabOrder"] = 0,
134 | ["text"] = "Su-25",
135 | ["tooltip"] = "",
136 | ["visible"] = true,
137 | ["zindex"] = 0,
138 | },
139 | ["skin"] = {
140 | ["params"] = {
141 | ["name"] = "checkBoxSkin_options",
142 | },
143 | },
144 | ["type"] = "CheckBox",
145 | },
146 | ["Mig29a_enabledCheckbox"] = {
147 | ["params"] = {
148 | ["bounds"] = {
149 | ["h"] = 24,
150 | ["w"] = 75,
151 | ["x"] = 100,
152 | ["y"] = 300,
153 | },
154 | ["enabled"] = true,
155 | ["state"] = true,
156 | ["tabOrder"] = 0,
157 | ["text"] = "MIG-29A",
158 | ["tooltip"] = "",
159 | ["visible"] = true,
160 | ["zindex"] = 0,
161 | },
162 | ["skin"] = {
163 | ["params"] = {
164 | ["name"] = "checkBoxSkin_options",
165 | },
166 | },
167 | ["type"] = "CheckBox",
168 | },
169 | ["Mig29g_enabledCheckbox"] = {
170 | ["params"] = {
171 | ["bounds"] = {
172 | ["h"] = 24,
173 | ["w"] = 75,
174 | ["x"] = 100,
175 | ["y"] = 330,
176 | },
177 | ["enabled"] = true,
178 | ["state"] = true,
179 | ["tabOrder"] = 0,
180 | ["text"] = "MIG-29G",
181 | ["tooltip"] = "",
182 | ["visible"] = true,
183 | ["zindex"] = 0,
184 | },
185 | ["skin"] = {
186 | ["params"] = {
187 | ["name"] = "checkBoxSkin_options",
188 | },
189 | },
190 | ["type"] = "CheckBox",
191 | },
192 | ["Mig29s_enabledCheckbox"] = {
193 | ["params"] = {
194 | ["bounds"] = {
195 | ["h"] = 24,
196 | ["w"] = 75,
197 | ["x"] = 100,
198 | ["y"] = 360,
199 | },
200 | ["enabled"] = true,
201 | ["state"] = true,
202 | ["tabOrder"] = 0,
203 | ["text"] = "MIG-29S",
204 | ["tooltip"] = "",
205 | ["visible"] = true,
206 | ["zindex"] = 0,
207 | },
208 | ["skin"] = {
209 | ["params"] = {
210 | ["name"] = "checkBoxSkin_options",
211 | },
212 | },
213 | ["type"] = "CheckBox",
214 | },
215 | ["A10a_enabledCheckbox"] = {
216 | ["params"] = {
217 | ["bounds"] = {
218 | ["h"] = 24,
219 | ["w"] = 75,
220 | ["x"] = 100,
221 | ["y"] = 390,
222 | },
223 | ["enabled"] = true,
224 | ["state"] = true,
225 | ["tabOrder"] = 0,
226 | ["text"] = "A-10A",
227 | ["tooltip"] = "",
228 | ["visible"] = true,
229 | ["zindex"] = 0,
230 | },
231 | ["skin"] = {
232 | ["params"] = {
233 | ["name"] = "checkBoxSkin_options",
234 | },
235 | },
236 | ["type"] = "CheckBox",
237 | },
238 | ["F15c_enabledCheckbox"] = {
239 | ["params"] = {
240 | ["bounds"] = {
241 | ["h"] = 24,
242 | ["w"] = 75,
243 | ["x"] = 100,
244 | ["y"] = 420,
245 | },
246 | ["enabled"] = true,
247 | ["state"] = true,
248 | ["tabOrder"] = 0,
249 | ["text"] = "F-15C",
250 | ["tooltip"] = "",
251 | ["visible"] = true,
252 | ["zindex"] = 0,
253 | },
254 | ["skin"] = {
255 | ["params"] = {
256 | ["name"] = "checkBoxSkin_options",
257 | },
258 | },
259 | ["type"] = "CheckBox",
260 | },
261 | --[[["F15c_extended"] = {
262 | ["params"] = {
263 | ["bounds"] = {
264 | ["h"] = 24,
265 | ["w"] = 200,
266 | ["x"] = 200,
267 | ["y"] = 420,
268 | },
269 | ["enabled"] = true,
270 | ["text"] = "$Extended",
271 | ["tooltip"] = "",
272 | ["visible"] = true,
273 | ["zindex"] = 0
274 | },
275 | ["skin"] = {
276 | ["params"] = {
277 | ["name"] = "staticOptionsCaptionSkin"
278 | }
279 | },
280 | ["type"] = "Static",
281 | },
282 | ["F15c_extendedComboList"] = {
283 | ["params"] = {
284 | ["bounds"] = {
285 | ["h"] = 24,
286 | ["w"] = 75,
287 | ["x"] = 400,
288 | ["y"] = 420
289 | },
290 | ["enabled"] = true,
291 | ["tabOrder"] = 0,
292 | ["text"] = "Item1",
293 | ["tooltip"] = "",
294 | ["visible"] = true,
295 | ["zindex"] = 0
296 | },
297 | ["skin"] = {
298 | ["params"] = {
299 | ["name"] = "comboListSkin_options",
300 | },
301 | },
302 | ["type"] = "ComboList",
303 | },
304 | ["btnIntegrityCheckNo"] = {
305 | ["params"] = {
306 | ["bounds"] = {
307 | ["h"] = 30,
308 | ["w"] = 50,
309 | ["x"] = 625,
310 | ["y"] = 415,
311 | },
312 | ["enabled"] = true,
313 | ["tabOrder"] = 0,
314 | ["text"] = "",
315 | ["visible"] = true,
316 | ["tooltip"] = "",
317 | },
318 | ["skin"] = {
319 | ["params"] = {
320 | ["name"] = "staticSkin",
321 | },
322 | ["states"] = {
323 | ["released"] = {
324 | [1] = {
325 | ["picture"] = {
326 | ["color"] = "0xffffffff",
327 | ["file"] = "dxgui\\skins\\skinme\\images\\buttons\\red icon - pressed.png",
328 | ["horzAlign"] = {
329 | ["type"] = "middle",
330 | },
331 | ["userTexSampler"] = 1,
332 | ["vertAlign"] = {
333 | ["type"] = "middle",
334 | },
335 | },
336 | },
337 | },
338 | },
339 | },
340 | ["type"] = "Static",
341 | },
342 | ["btnIntegrityCheckYes"] = {
343 | ["params"] = {
344 | ["bounds"] = {
345 | ["h"] = 30,
346 | ["w"] = 50,
347 | ["x"] = 550,
348 | ["y"] = 415,
349 | },
350 | ["enabled"] = true,
351 | ["tabOrder"] = 0,
352 | ["text"] = "",
353 | ["visible"] = true,
354 | ["tooltip"] = "",
355 | },
356 | ["skin"] = {
357 | ["params"] = {
358 | ["name"] = "staticSkin",
359 | },
360 | ["states"] = {
361 | ["released"] = {
362 | [1] = {
363 | ["picture"] = {
364 | ["color"] = "0xffffffff",
365 | ["file"] = "dxgui\\skins\\skinme\\images\\buttons\\Green icon - hover.png",
366 | ["horzAlign"] = {
367 | ["type"] = "middle",
368 | },
369 | ["userTexSampler"] = 1,
370 | ["vertAlign"] = {
371 | ["type"] = "middle",
372 | },
373 | },
374 | },
375 | },
376 | },
377 | },
378 | ["type"] = "Static",
379 |
380 | },
381 | ["btnWarning"] = {
382 | ["params"] = {
383 | ["bounds"] = {
384 | ["h"] = 30,
385 | ["w"] = 50,
386 | ["x"] = 500,
387 | ["y"] = 415,
388 | },
389 | ["enabled"] = true,
390 | ["tabOrder"] = 0,
391 | ["text"] = "",
392 | ["visible"] = true,
393 | ["tooltip"] = "",
394 | },
395 | ["skin"] = {
396 | ["params"] = {
397 | ["name"] = "staticSkin",
398 | },
399 | ["states"] = {
400 | ["released"] = {
401 | [1] = {
402 | ["picture"] = {
403 | ["color"] = "0xffffffff",
404 | ["file"] = "dxgui\\skins\\skinME\\images\\Icons\\32x32\\warning.ico",
405 | ["horzAlign"] = {
406 | ["type"] = "middle",
407 | },
408 | ["userTexSampler"] = 1,
409 | ["vertAlign"] = {
410 | ["type"] = "middle",
411 | },
412 | },
413 | },
414 | },
415 | },
416 | },
417 | ["type"] = "Static",
418 |
419 | },
420 | ["ArrowRight"] = {
421 | ["params"] = {
422 | ["bounds"] = {
423 | ["h"] = 30,
424 | ["w"] = 50,
425 | ["x"] = 585,
426 | ["y"] = 415,
427 | },
428 | ["enabled"] = true,
429 | ["tabOrder"] = 0,
430 | ["text"] = "",
431 | ["visible"] = true,
432 | ["tooltip"] = "",
433 | },
434 | ["skin"] = {
435 | ["params"] = {
436 | ["name"] = "staticSkin",
437 | },
438 | ["states"] = {
439 | ["released"] = {
440 | [1] = {
441 | ["picture"] = {
442 | ["color"] = "0xffffffff",
443 | ["file"] = "dxgui\\skins\\skinME\\images\\Buttons\\arrows\\right.png",
444 | ["horzAlign"] = {
445 | ["type"] = "middle",
446 | },
447 | ["userTexSampler"] = 1,
448 | ["vertAlign"] = {
449 | ["type"] = "middle",
450 | },
451 | },
452 | },
453 | },
454 | },
455 | },
456 | ["type"] = "Static",
457 |
458 | },]]
459 | },
460 | ["params"] = {
461 | ["bounds"] = {
462 | ["h"] = 600,
463 | ["w"] = 974,
464 | ["x"] = 0,
465 | ["y"] = 0,
466 | },
467 | ["enabled"] = true,
468 | ["layout"] = {
469 | },
470 | ["text"] = "",
471 | ["tooltip"] = "",
472 | ["visible"] = true,
473 | ["zindex"] = 2,
474 | },
475 | ["skin"] = {
476 | ["params"] = {
477 | ["name"] = "panelSkin",
478 | },
479 | },
480 | ["type"] = "Panel",
481 | },
482 | },
483 | ["params"] = {
484 | ["bounds"] = {
485 | ["h"] = 851,
486 | ["w"] = 1135,
487 | ["x"] = 0,
488 | ["y"] = 0,
489 | },
490 | ["clipResizeCursor"] = false,
491 | ["draggable"] = true,
492 | ["enabled"] = true,
493 | ["hasCursor"] = true,
494 | ["layout"] = {
495 | },
496 | ["lockFlow"] = false,
497 | ["modal"] = false,
498 | ["offscreen"] = false,
499 | ["resizable"] = false,
500 | ["text"] = "New dialog",
501 | ["zOrder"] = 0,
502 | },
503 | ["skin"] = {
504 | ["params"] = {
505 | ["name"] = "windowSkin",
506 | },
507 | },
508 | ["type"] = "Window",
509 | }
510 |
--------------------------------------------------------------------------------
/Options/optionsData.lua:
--------------------------------------------------------------------------------
1 | cdata =
2 | {
3 | Extended = _('F-15C Use Extended Animations'),
4 | }
5 |
--------------------------------------------------------------------------------
/Options/optionsDb.lua:
--------------------------------------------------------------------------------
1 | local DbOption = require('Options.DbOption')
2 | local oms = require('optionsModsScripts')
3 | local optionsEditor = require('optionsEditor')
4 |
5 |
6 | function script_path()
7 | -- remember to strip off the starting @
8 | local luafileloc = debug.getinfo(2, "S").source:sub(2)
9 | local ti, tj = string.find(luafileloc, "Options")
10 | local temploc = string.sub(luafileloc, 1, ti-1)
11 | return temploc
12 | end
13 |
14 | -- find module path
15 | local relativeloc = script_path()
16 | modulelocation = lfs.currentdir().."\\"..relativeloc
17 |
18 | local tblCPLocalList = oms.getTblCPLocalList(modulelocation)
19 |
20 |
21 |
22 | return {
23 | useit = DbOption.new():setValue(true),
24 | dontuseit = DbOption.new():setValue(false),
25 | J11a_enabled = DbOption.new():setValue(true):checkbox(),
26 | Mig29a_enabled = DbOption.new():setValue(true):checkbox(),
27 | Mig29g_enabled = DbOption.new():setValue(true):checkbox(),
28 | Mig29s_enabled = DbOption.new():setValue(true):checkbox(),
29 | Su25_enabled = DbOption.new():setValue(true):checkbox(),
30 | Su25t_enabled = DbOption.new():setValue(true):checkbox(),
31 | Su27_enabled = DbOption.new():setValue(true):checkbox(),
32 | Su33_enabled = DbOption.new():setValue(true):checkbox(),
33 | A10a_enabled = DbOption.new():setValue(true):checkbox(),
34 | F15c_enabled = DbOption.new():setValue(true):checkbox(),
35 | F15c_extended = DbOption.new():setValue(0),
36 | Version = DbOption.new():setValue(0),
37 |
38 |
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # RedK0d Clickable
2 | A partially clickable mod for the FC3 Planes
3 |
4 | Supported
5 | * Su-27
6 | * J-11A
7 | * Su-33
8 | * Su-25T
9 | * Su-25
10 | * A-10A
11 | * F-15C
12 |
13 | # INSTALLATION
14 |
15 | * __Step 1:__ Unzip the contents of the archive in your "Saved Games\DCS\Mods\tech" directory.
16 |
17 |
18 | * __Step 2:__ Launch the game.
19 | You can manage the activation of the module in the options
20 | Lalt+C to click
21 | Please report any issues in the dedicated section on Discord or Github
22 |
23 | ## Concerning the F-15C it is a little more complex:
24 |
25 | * __Step 1:__ Download and Install Open Mod Manager Available [here](https://github.com/sedenion/OpenModMan/releases)
26 | * __Step 2:__ Open the Redk0d Clickable F-15C.omc file contained in CLICKABLE-FC3(version)\DATA\Open Mod Manager
27 | * __Step 3:__ Click on "Edit"
28 | * __Step 4:__ Click on "Target Destination Folder"
29 | * __Step 5:__ Enter your DCS installation directory
30 | * __Step 6:__ Click Apply
31 | * __Step 7:__ Depending if you have Standalone F-15C or FC3 highlight "F-15C Standalone" or "F-15C With FC3" and click "Install" or "Unistall" if you want to install or uninstall.
32 | * __Step 8:__ Fly
33 |
34 | # SUPPORT US
35 | 3 ways to support us
36 |
37 | * [Our Store](https://redk0d.gumroad.com/l/fvkodo)
38 |
39 | * [Patreon](https://www.patreon.com/RedK0d)
40 |
41 | * [Paypal](https://www.paypal.com/donate/?hosted_button_id=8RA626VEJD2SC)
42 |
43 | # DISCORD
44 | Join us on [Discord](https://discord.com/invite/CrExr87dP9)
45 |
46 | # SPECIAL THANKS
47 | * __Tobsen__ (Edm Exporter for Blender)
48 | * __Grim Reapers,MatAWG and Sklang__ (YouTube content creators)
49 | * __Aether,ImAPanzer and Emerald 467__ (For Discord Management)
50 | * __CrunchZ08__ (For his information on the F-15C systems)
51 | * __Emerald 467 deadlyfishes and snowman__ (For tests and feedback)
52 | * __Zeitgeist__ (LowFidelityAircraftManual)
53 | * __denissoliveira__ (Help Images)
54 |
55 |
56 | * __And for you all__ (For your interest in this mod)
57 |
58 |
59 |
--------------------------------------------------------------------------------
/Shapes/A-10A-CLICKABLE.edm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Shapes/A-10A-CLICKABLE.edm
--------------------------------------------------------------------------------
/Shapes/F-15C-CLICKABLE.edm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Shapes/F-15C-CLICKABLE.edm
--------------------------------------------------------------------------------
/Shapes/MIG-29-CLICKABLE.edm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Shapes/MIG-29-CLICKABLE.edm
--------------------------------------------------------------------------------
/Shapes/SU-25-CLICKABLE.edm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Shapes/SU-25-CLICKABLE.edm
--------------------------------------------------------------------------------
/Shapes/SU-25T-CLICKABLE.edm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Shapes/SU-25T-CLICKABLE.edm
--------------------------------------------------------------------------------
/Shapes/SU-27-CLICKABLE.edm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Shapes/SU-27-CLICKABLE.edm
--------------------------------------------------------------------------------
/Shapes/SU-33-CLICKABLE.edm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Shapes/SU-33-CLICKABLE.edm
--------------------------------------------------------------------------------
/Skins/icon 76x76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Skins/icon 76x76.png
--------------------------------------------------------------------------------
/Skins/icon-38x38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Skins/icon-38x38.png
--------------------------------------------------------------------------------
/Skins/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Skins/icon.png
--------------------------------------------------------------------------------
/Skins/icon_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Skins/icon_active.png
--------------------------------------------------------------------------------
/Skins/icon_noactive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Skins/icon_noactive.png
--------------------------------------------------------------------------------
/Skins/icon_select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RedK0d/CLICKABLE-FC3/f1de2da0c913b24eef51f981ed76af471d96cda9/Skins/icon_select.png
--------------------------------------------------------------------------------
/entry.lua:
--------------------------------------------------------------------------------
1 | declare_plugin("RedK0d Clickable",
2 | {
3 | installed = true,
4 | dirName = current_mod_path,
5 | displayName = "RedK0d Clickable",
6 | shortName = "RedK0d Clickable",
7 | fileMenuName = "RedK0d Clickable",
8 | version = "v1.1.1e-beta",
9 | state = "installed",
10 | developerName = "RedK0d",
11 | info = "RedK0d Clickable",
12 |
13 | load_immediately = true,
14 | binaries = {},
15 | Skins =
16 | {
17 | {
18 | name = ("RedK0d Clickable"),
19 | dir = "Skins"
20 | },
21 | },
22 | Options =
23 | {
24 | {
25 | name = ("RedK0d Clickable"),
26 | nameId = "RedK0d Clickable",
27 | dir = "Options",
28 | CLSID = "{FC3 CLICKABLE}"
29 | },
30 | },
31 |
32 | })
33 |
34 |
35 | local path = current_mod_path..'/Cockpit/Scripts/'
36 | mount_vfs_texture_path (current_mod_path .. "/Textures")
37 | mount_vfs_model_path (current_mod_path .. "/Shapes")
38 |
39 |
40 |
41 |
42 | add_plugin_systems('CLICKABLE-FC3_Module','*',path,
43 | {
44 |
45 | --Alpha Implemented
46 | ["J-11A"] = {enable_options_key_for_unit = 'J11a_enabled'},
47 | ["Su-27"] = {enable_options_key_for_unit = 'Su27_enabled'},
48 | ["Su-33"] = {enable_options_key_for_unit = 'Su33_enabled'},
49 | ["Su-25T"] = {enable_options_key_for_unit = 'Su25t_enabled'},
50 | ["MiG-29A"] = {enable_options_key_for_unit = 'Mig29a_enabled'},
51 | ["MiG-29G"] = {enable_options_key_for_unit = 'Mig29g_enabled'},
52 | ["MiG-29S"] = {enable_options_key_for_unit = 'Mig29s_enabled'},
53 | ["Su-25"] = {enable_options_key_for_unit = 'Su25_enabled'},
54 | ["A-10A"] = {enable_options_key_for_unit = 'A10a_enabled'},
55 | ["F-15C"] = {enable_options_key_for_unit = 'F15c_enabled'},
56 | ["TEST"] = {enable_options_key_for_unit = 'Version'},
57 | }
58 | )
59 |
60 | plugin_done()
61 |
--------------------------------------------------------------------------------