Updated scoring and made it better.

Implemented also a fracitide function. Anybody committing fracitide
above 150 penalty points, gets destroyed and cannot join anymore.
This commit is contained in:
FlightControl
2016-03-18 12:45:21 +01:00
parent b222395d89
commit 8c46f7c7f2
4 changed files with 154 additions and 41 deletions

View File

@@ -46,7 +46,7 @@ function GROUP:New( DCSGroup )
end
--- Create a new GROUP from an existing DCSGroup in the mission.
--- Create a new GROUP from an existing group name.
-- @param self
-- @param GroupName The name of the DCS Group.
-- @return #GROUP self
@@ -58,12 +58,30 @@ function GROUP:NewFromName( GroupName )
if self.DCSGroup then
self.GroupName = self.DCSGroup:getName()
self.GroupID = self.DCSGroup:getID()
self.Controller = DCSGroup:getController()
self.Controller = self.DCSGroup:getController()
end
return self
end
--- Create a new GROUP from an existing DCSUnit in the mission.
-- @param self
-- @param DCSUnit The DCSUnit.
-- @return #GROUP self
function GROUP:NewFromDCSUnit( DCSUnit )
local self = BASE:Inherit( self, BASE:New() )
self:T( DCSUnit )
self.DCSGroup = DCSUnit:getGroup()
if self.DCSGroup then
self.GroupName = self.DCSGroup:getName()
self.GroupID = self.DCSGroup:getID()
self.Controller = self.DCSGroup:getController()
end
return self
end
--- Gets the DCSGroup of the GROUP.
-- @param self
-- @return #Group The DCSGroup.