mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'origin/master' into develop
# Conflicts: # Moose Development/Moose/Wrapper/Client.lua
This commit is contained in:
commit
bb3675ad11
@ -1083,9 +1083,9 @@ function EVENT:onEvent( Event )
|
|||||||
|
|
||||||
if Event.initiator then
|
if Event.initiator then
|
||||||
|
|
||||||
Event.IniObjectCategory = Event.initiator:getCategory()
|
Event.IniObjectCategory = Object.getCategory(Event.initiator) --Event.initiator:getCategory()
|
||||||
|
|
||||||
if Event.IniObjectCategory == Object.Category.STATIC then
|
if Event.IniObjectCategory == Object.Category.STATIC then
|
||||||
---
|
---
|
||||||
-- Static
|
-- Static
|
||||||
---
|
---
|
||||||
@ -1122,9 +1122,8 @@ function EVENT:onEvent( Event )
|
|||||||
if Unit then
|
if Unit then
|
||||||
Event.IniObjectCategory = Object.Category.UNIT
|
Event.IniObjectCategory = Object.Category.UNIT
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
if Event.IniObjectCategory == Object.Category.UNIT then
|
elseif Event.IniObjectCategory == Object.Category.UNIT then
|
||||||
---
|
---
|
||||||
-- Unit
|
-- Unit
|
||||||
---
|
---
|
||||||
@ -1158,9 +1157,8 @@ function EVENT:onEvent( Event )
|
|||||||
Event.IniCoalition = Event.IniDCSUnit:getCoalition()
|
Event.IniCoalition = Event.IniDCSUnit:getCoalition()
|
||||||
Event.IniTypeName = Event.IniDCSUnit:getTypeName()
|
Event.IniTypeName = Event.IniDCSUnit:getTypeName()
|
||||||
Event.IniCategory = Event.IniDCSUnit:getDesc().category
|
Event.IniCategory = Event.IniDCSUnit:getDesc().category
|
||||||
end
|
|
||||||
|
|
||||||
if Event.IniObjectCategory == Object.Category.CARGO then
|
elseif Event.IniObjectCategory == Object.Category.CARGO then
|
||||||
---
|
---
|
||||||
-- Cargo
|
-- Cargo
|
||||||
---
|
---
|
||||||
@ -1171,9 +1169,8 @@ function EVENT:onEvent( Event )
|
|||||||
Event.IniCoalition = Event.IniDCSUnit:getCoalition()
|
Event.IniCoalition = Event.IniDCSUnit:getCoalition()
|
||||||
Event.IniCategory = Event.IniDCSUnit:getDesc().category
|
Event.IniCategory = Event.IniDCSUnit:getDesc().category
|
||||||
Event.IniTypeName = Event.IniDCSUnit:getTypeName()
|
Event.IniTypeName = Event.IniDCSUnit:getTypeName()
|
||||||
end
|
|
||||||
|
|
||||||
if Event.IniObjectCategory == Object.Category.SCENERY then
|
elseif Event.IniObjectCategory == Object.Category.SCENERY then
|
||||||
---
|
---
|
||||||
-- Scenery
|
-- Scenery
|
||||||
---
|
---
|
||||||
@ -1183,9 +1180,8 @@ function EVENT:onEvent( Event )
|
|||||||
Event.IniUnit = SCENERY:Register( Event.IniDCSUnitName, Event.initiator )
|
Event.IniUnit = SCENERY:Register( Event.IniDCSUnitName, Event.initiator )
|
||||||
Event.IniCategory = Event.IniDCSUnit:getDesc().category
|
Event.IniCategory = Event.IniDCSUnit:getDesc().category
|
||||||
Event.IniTypeName = Event.initiator:isExist() and Event.IniDCSUnit:getTypeName() or "SCENERY"
|
Event.IniTypeName = Event.initiator:isExist() and Event.IniDCSUnit:getTypeName() or "SCENERY"
|
||||||
end
|
|
||||||
|
|
||||||
if Event.IniObjectCategory == Object.Category.BASE then
|
elseif Event.IniObjectCategory == Object.Category.BASE then
|
||||||
---
|
---
|
||||||
-- Base Object
|
-- Base Object
|
||||||
---
|
---
|
||||||
@ -1212,9 +1208,12 @@ function EVENT:onEvent( Event )
|
|||||||
---
|
---
|
||||||
|
|
||||||
-- Target category.
|
-- Target category.
|
||||||
Event.TgtObjectCategory = Event.target:getCategory()
|
Event.TgtObjectCategory = Object.getCategory(Event.target) --Event.target:getCategory()
|
||||||
|
|
||||||
if Event.TgtObjectCategory == Object.Category.UNIT then
|
if Event.TgtObjectCategory == Object.Category.UNIT then
|
||||||
|
---
|
||||||
|
-- UNIT
|
||||||
|
---
|
||||||
Event.TgtDCSUnit = Event.target
|
Event.TgtDCSUnit = Event.target
|
||||||
Event.TgtDCSGroup = Event.TgtDCSUnit:getGroup()
|
Event.TgtDCSGroup = Event.TgtDCSUnit:getGroup()
|
||||||
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
|
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
|
||||||
@ -1238,10 +1237,11 @@ function EVENT:onEvent( Event )
|
|||||||
Event.TgtCoalition = Event.TgtDCSUnit:getCoalition()
|
Event.TgtCoalition = Event.TgtDCSUnit:getCoalition()
|
||||||
Event.TgtCategory = Event.TgtDCSUnit:getDesc().category
|
Event.TgtCategory = Event.TgtDCSUnit:getDesc().category
|
||||||
Event.TgtTypeName = Event.TgtDCSUnit:getTypeName()
|
Event.TgtTypeName = Event.TgtDCSUnit:getTypeName()
|
||||||
end
|
|
||||||
|
|
||||||
if Event.TgtObjectCategory == Object.Category.STATIC then
|
elseif Event.TgtObjectCategory == Object.Category.STATIC then
|
||||||
-- get base data
|
---
|
||||||
|
-- STATIC
|
||||||
|
---
|
||||||
Event.TgtDCSUnit = Event.target
|
Event.TgtDCSUnit = Event.target
|
||||||
if Event.target:isExist() and Event.id ~= 33 then -- leave out ejected seat object
|
if Event.target:isExist() and Event.id ~= 33 then -- leave out ejected seat object
|
||||||
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
|
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
|
||||||
@ -1268,9 +1268,11 @@ function EVENT:onEvent( Event )
|
|||||||
Event.TgtTypeName = "Static"
|
Event.TgtTypeName = "Static"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
if Event.TgtObjectCategory == Object.Category.SCENERY then
|
elseif Event.TgtObjectCategory == Object.Category.SCENERY then
|
||||||
|
---
|
||||||
|
-- SCENERY
|
||||||
|
---
|
||||||
Event.TgtDCSUnit = Event.target
|
Event.TgtDCSUnit = Event.target
|
||||||
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
|
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
|
||||||
Event.TgtUnitName = Event.TgtDCSUnitName
|
Event.TgtUnitName = Event.TgtDCSUnitName
|
||||||
|
|||||||
@ -585,7 +585,7 @@ function CLIENT:GetUCID()
|
|||||||
return net.get_player_info(tonumber(PID), 'ucid')
|
return net.get_player_info(tonumber(PID), 'ucid')
|
||||||
end
|
end
|
||||||
|
|
||||||
--- [Multi-Player Server] Return a table of attributes for a given CLIENT. If optional attribute is present, only that value is returned.
|
--- [Multi-Player Server] Return a table of attributes from CLIENT. If optional attribute is present, only that value is returned.
|
||||||
-- @param #CLIENT self
|
-- @param #CLIENT self
|
||||||
-- @param #string Attribute (Optional) The attribute to obtain. List see below.
|
-- @param #string Attribute (Optional) The attribute to obtain. List see below.
|
||||||
-- @return #table PlayerInfo or nil if it cannot be found
|
-- @return #table PlayerInfo or nil if it cannot be found
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user