Avorion
十分な評価がありません
Fixed resource asteroid respawn
   
アワード
お気に入り
お気に入り
お気に入りから削除
Mods: Mod
ファイルサイズ
投稿日
更新日
22.008 KB
2020年10月17日 8時38分
2021年8月21日 15時06分
2 項目の変更履歴 ( 表示 )

サブスクライブしてダウンロード
Fixed resource asteroid respawn

解説
Fixes vanilla avorion bug that counted wreckages as 'rich asteroids' when deciding whether to respawn asteroid field or not. (Microwreckages pumped this amount by large amounts as each one counted as an rich asteroid, causing the script to not fire often enough).
13 件のコメント
Xeo 2022年10月18日 14時29分 
I looked at the code for this mod vs the base file, it looks like it's still needed.
Cosmicpixels 2022年9月16日 2時46分 
Is this still a problem?
Simple Giant 2022年9月13日 10時34分 
Is this still a problem?
LumberingTroll 2021年9月7日 14時31分 
How did this not get fixed in 2.0...
Caellion  [作成者] 2021年7月2日 9時59分 
Tbh, I am waiting for 2.0, if they don't fix it by themselves by then I will drop a line to them
FuryoftheStars 2021年7月1日 15時45分 
Caellion, if you're still playing, you can also use the in-game "Report a bug" feature and just describe which file and line. I've done it like this a few times myself.
_DrunkenGibberish_ 2021年2月16日 20時27分 
@Caellion

I do not know about a pull-request page however there is a forum that is linked in the top right of the Avorion.net page.

The forums themselves can be found at forum.avorion.net

Hope that helps!
Caellion  [作成者] 2021年2月10日 7時43分 
@_DrunkenGibberish_

Do you know anyplace I could fill a pullrequest ar a real bug report?
I don't even see any forum link on official website...
_DrunkenGibberish_ 2021年2月9日 17時02分 
Maybe you could submit this to the Devs as a bug fix? Coding is hard enough with small projects but something as big as Avorion with only a small team and things start to slip by.

This could help them by saving them the work time needed to develop a fix and instead they only need to implement it!
Caellion  [作成者] 2020年11月22日 6時47分 
well, all that my fix really does is replace this:

local richAsteroids = sector:getNumEntitiesByComponent(ComponentType.MineableMaterial)

with this:

local richAsteroids = 0
local asteroids = {sector:getEntitiesByComponent(ComponentType.MineableMaterial)}

for i, asteroid in ipairs(asteroids) do
if asteroid.isAsteroid then
richAsteroids = richAsteroids + 1
end
end

Because sector:getNumEntitiesByComponent(ComponentType.MineableMaterial) can (and will) also count wreckages as they have MinableMaterial Component.
My fix just also checks if the thing returned by component search is actually an asteroid.


And yep, it indeed is a stupid kind of bug, probably stemming from the thing that game did not have minable wrecks in very early development and then dev forgot that this script uses this method.