腰疼,不写了

This commit is contained in:
2024-11-20 15:24:59 +08:00
parent 5bcfa769a5
commit f4b5852310
5 changed files with 9627 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
script_path = lfs.writedir() .. "Missions\\Scripts\\Buta\\DCS_MarkSpawner\\"
if lfs then
dofile(script_path..'Mission_Init.lua')
env.info("Script Loader: LFS available, using relative script load path: " .. script_path)
else
env.info("Script Loader: LFS not available, using default script load path: " .. script_path)
end
+15
View File
@@ -0,0 +1,15 @@
local script_list =
{
-- Load order must be correct
"mist.lua", --mist_4_5_122
"markListener.lua",
}
local function load_scripts(path, list)
for index, value in ipairs(list) do
dofile(path .. value)
end
end
load_scripts(script_path, script_list)
BIN
View File
Binary file not shown.
+70
View File
@@ -0,0 +1,70 @@
MarkLisener = {}
--[[
Event = {
id = 25/26
idx = number markId,
time = Abs time,
initiator = Unit, (only work in MP, in SP always return nil)
coalition = number coalitionId,
groupID = number groupId, (always return -1)
text = string markText,
pos = vec3
}
]]
do
function MarkLisener.showMarkItems(event)
local msg = " "
if event.id then
msg = msg..'id: '..event.id..'\n'
end
if event.idx then
msg = msg..'idx: '..event.idx..'\n'
end
if event.time then
msg = msg..'time: '..event.time..'\n'
end
if event.initiator then
msg = msg..'initiator: '..event.initiator:getName()..'\n'
end
if not event.initiator then
msg = msg..'initiator: '..'not found. \n'
end
if event.coalition then
msg = msg..'coalition: '..event.coalition..'\n'
end
if event.groupID then
msg = msg..'groupID: '..event.groupID..'\n'
end
if event.text then
msg = msg..'text: '..event.text..'\n'
end
if event.pos then
msg = msg..'pos: x='..event.pos.x..' y='..event.pos.y..' z='..event.pos.z..'\n'
end
trigger.action.outText(msg,5)
end
local ev = {}
function ev:onEvent(event)
if event.id == 25 or event.id == 26 then
end
end
world.addEventHandler(ev)
end
+9533
View File
File diff suppressed because it is too large Load Diff