Jump to content

SectorGenerator.lua - incorrect check for 'resources'


Rinart73

Recommended Posts

Version: 0.22.2

 

"data/scripts/lib/SectorGenerator.lua" - Errors in following functions:

SectorGenerator:createSmallAsteroid(translation, size, resources, material)
SectorGenerator:createBigAsteroidEx(position, size, resources)

Following line:

if resources ~= 0 then

should be replaced with

if resources then

because "resources" is a boolean variable. Otherwise, even asteroids without resources will have "isObviouslyMineable = true".

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...