mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Cleaned conditions with nil in RADIO
This commit is contained in:
parent
ea3ca25c23
commit
cd267b1ed5
@ -100,7 +100,7 @@ function RADIO:New(Positionable)
|
|||||||
|
|
||||||
self:F(Positionable)
|
self:F(Positionable)
|
||||||
|
|
||||||
if Positionable:GetPointVec2() ~= nil then -- It's stupid, but the only way I found to make sure positionable is valid
|
if Positionable:GetPointVec2() then -- It's stupid, but the only way I found to make sure positionable is valid
|
||||||
self.Positionable = Positionable
|
self.Positionable = Positionable
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@ -117,8 +117,8 @@ function RADIO:SetFileName(FileName)
|
|||||||
self:F2(FileName)
|
self:F2(FileName)
|
||||||
|
|
||||||
if type(FileName) == "string" then
|
if type(FileName) == "string" then
|
||||||
if FileName:find(".ogg") ~= nil or FileName:find(".wav") ~= nil then
|
if FileName:find(".ogg") or FileName:find(".wav") then
|
||||||
if FileName:find("l10n/DEFAULT/") == nil then
|
if not FileName:find("l10n/DEFAULT/") then
|
||||||
FileName = "l10n/DEFAULT/" .. FileName
|
FileName = "l10n/DEFAULT/" .. FileName
|
||||||
end
|
end
|
||||||
self.FileName = FileName
|
self.FileName = FileName
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user