Skip to content

Commit

Permalink
Fix for nil drone on login
Browse files Browse the repository at this point in the history
  • Loading branch information
dirtyredz committed Sep 17, 2017
1 parent 2aa83ed commit 94d5493
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Binary file modified MoveUI v1.1.0.zip
Binary file not shown.
16 changes: 14 additions & 2 deletions mods/MoveUI/scripts/player/ScrapyardLicenses.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ function ScrapyardLicenses.onPreRenderHud()
--get the licenses
local player = Player()
local playerShip = Entity(player.craftIndex)
local ShipFaction = playerShip.factionIndex

local ShipFaction
if playerShip then
ShipFaction = playerShip.factionIndex
else
ShipFaction = player.index
end

ScrapyardLicenses.GetFactionValues(ShipFaction)
ScrapyardLicenses.sync()
Expand Down Expand Up @@ -119,7 +125,13 @@ end
function ScrapyardLicenses.onSectorEntered(playerIndex,x,y)
local player = Player()
local playerShip = Entity(player.craftIndex)
local ShipFaction = playerShip.factionIndex

local ShipFaction
if playerShip then
ShipFaction = playerShip.factionIndex
else
ShipFaction = player.index
end

ScrapyardLicenses.GetFactionValues(ShipFaction)
ScrapyardLicenses.sync()
Expand Down

0 comments on commit 94d5493

Please sign in to comment.