From cd267b1ed52605c64233cac1cdd35438472c678c Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Wed, 22 Mar 2017 21:28:57 +0100 Subject: [PATCH] Cleaned conditions with nil in RADIO --- Moose Development/Moose/Core/Radio.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index bb4daccf8..38735de28 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -100,7 +100,7 @@ function RADIO:New(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 return self end @@ -117,8 +117,8 @@ function RADIO:SetFileName(FileName) self:F2(FileName) if type(FileName) == "string" then - if FileName:find(".ogg") ~= nil or FileName:find(".wav") ~= nil then - if FileName:find("l10n/DEFAULT/") == nil then + if FileName:find(".ogg") or FileName:find(".wav") then + if not FileName:find("l10n/DEFAULT/") then FileName = "l10n/DEFAULT/" .. FileName end self.FileName = FileName