Skip to content

Commit

Permalink
EPLRS - give group ID only if ground
Browse files Browse the repository at this point in the history
  • Loading branch information
Applevangelist committed Oct 26, 2024
1 parent cd178d6 commit 9009616
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Moose Development/Moose/Wrapper/Controllable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -899,10 +899,14 @@ function CONTROLLABLE:CommandEPLRS( SwitchOnOff, Delay )
id = 'EPLRS',
params = {
value = SwitchOnOff,
groupId = self:GetID(),
groupId = nil,
},
}


if self:IsGround() then
CommandEPLRS.params.groupId = self:GetID()
end

if Delay and Delay > 0 then
SCHEDULER:New( nil, self.CommandEPLRS, { self, SwitchOnOff }, Delay )
else
Expand Down Expand Up @@ -1006,10 +1010,13 @@ function CONTROLLABLE:TaskEPLRS( SwitchOnOff, idx )
id = 'EPLRS',
params = {
value = SwitchOnOff,
groupId = self:GetID(),
groupId = nil,
},
}

if self:IsGround() then
CommandEPLRS.params.groupId = self:GetID()
end

return self:TaskWrappedAction( CommandEPLRS, idx or 1 )
end

Expand Down

0 comments on commit 9009616

Please sign in to comment.