Jump to content

[solved]Half-Broken Sector


Laserzwei

Recommended Posts

While testing my Carrier command mod's salvagers, I got a wreckage which is not registered in the Sector's entity list:

Wz2AceR.jpg

It was a station and through fighter-salvaging it broke apart, leaving lots of other wreckages and this particular one.

I tried finding it via:

 

local sector = Sector()
sector:getEntitiesByType(EntityType.Wreckage)
sector:getEntitiesByType(EntityType.None)
sector:getEntitiesByType(EntityType.Ship)
sector:getEntitiesByType(EntityType.Station)
sector:getEntitiesByType(EntityType.Asteroid)
sector:getEntitiesByType(EntityType.Anomaly)
sector:getEntitiesByType(EntityType.Unknown)
sector:getEntitiesByType(EntityType.Other)

sector:getEntitiesByComponent(ComponentType.MineableMaterial)

sector:getEntities() and see for every entity:getMineableResources()

None of these returned an entity with an approximate amount of Avorion.

 

The wreckage can be target and attacked manually and will yield resources, break further apart in proper entities, but will always leave an unregistered entity(=smaller wreckage)

 

Whole save:

https://drive.google.com/open?id=19a7RhypM1H8-v--qMX3ba2Kcto9Xx37q

Sector:  0:-1

 

The existance of this half-functioning wreckage seems to point at a broken registering mechanic in sectors. So I thought you might want to have a deeper look at it  :)

Link to comment
Share on other sites

  • Boxelware Team

Registration works just fine, your issue must be something else.

 

If you press F3 you can see the id of the wreckage when you select it in the bottom right info box. I tried it out and the id of the wreckage is

c3681435-a115-43d4-b96c-8f5eaa39ca89

 

When you run the command

/run for _, w in pairs({Sector():getEntitiesByType(EntityType.Wreckage)}) do; print(w.id.string); end

 

Then it prints out this entity as well, so registration works just fine (btw: if it didn't you wouldn't even see the entity and it wouldn't be destructible etc). What do you mean with "an appropriate amount of Avorion" anyways? How did you read out the amount of Avorion?

Link to comment
Share on other sites

Registration works just fine, your issue must be something else.

 

If you press F3 you can see the id of the wreckage when you select it in the bottom right info box. I tried it out and the id of the wreckage is

c3681435-a115-43d4-b96c-8f5eaa39ca89

Is very useful, but the rest of the overlay is ... distracting

 

When you run the command

/run for _, w in pairs({Sector():getEntitiesByType(EntityType.Wreckage)}) do; print(w.id.string); end

 

Then it prints out this entity as well, so registration works just fine (btw: if it didn't you wouldn't even see the entity and it wouldn't be destructible etc). What do you mean with "an appropriate amount of Avorion" anyways? How did you read out the amount of Avorion?

 

I used

 

local resource = wreckage:getMineableResources()

and it returns a list of resources. In this specific example it would return {3, 1,275,966}, but since I only put it in single variable it would read out as just 3 (Iron), which lead me to the wrong conclusion that the 1,2M Avorion wreckage was not part of the entity-list.

 

So all in all I derped hard and sectors do work as intended

 

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...