Spaceblock


Seablock but without the sea, and you make a rocket by duplicating resources instead of from water. Build your own space station / satellite / orbital rocket launchpad / factory thing

Overhaul
3 years ago
0.17 - 1.1
12.2K

b Productivity reset bug

7 months ago

http://www.admalledd.com/dl/prv/img/screenshots/Screenshot_20230925_181730.png

The mod Spaceblock (0.3.9) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event spaceblock::on_gui_closed (ID 89)
Item stack count has to be a positive integer.
stack traceback:
[C]: in function 'remove'
spaceblock/control.lua:104: in function '?'
spaceblock/lib/lib_control_cache.lua:151: in function 'call_ents'
spaceblock/lib/lib_control_cache.lua:415: in function 'y'
spaceblock/lib/lib_control.lua:284: in function <spaceblock/lib/lib_control.lua:284>

Reproduction:

  1. Have a assembler (or spaceblock-matter-furnace) running a duplication recipe
  2. Enter editor mode with /editor
  3. Tools-->Forces(flag)-->Edit Force-->Edit Other Properties-->mining-drill-productivity-bonus. http://www.admalledd.com/dl/prv/img/screenshots/Screenshot_20230925_182243.png
  4. Change the mining prod bonus to some higher value that is in .1 (one-tenth) increments, such as changing "0" to "0.1" or even "1.0"
  5. exit editor mode
  6. open the assembler, and close and open an assembler again to see the new productivity applies
  7. enter editor mode again
  8. reset mining prod bonus back to what it should be such as "0"
  9. exit editor mode
  10. open the assembler
  11. close the assembler. CRASH.

The issue is line 104 of control.lua:
if(dif>0)then mods.insert({name="spaceblock-mining-prod-module",count=dif}) elseif(dif<0)then mods.remove({name="spaceblock-mining-prod-module",count=dif}) end

that the mods.remove(...) call should have count=-dif to negate back into positive the module counts.

PyroFire, I may have other small fixes, thoughts on posting mod onto github, gitlab, etc where I could post a PR or two? (Such as fixing the space-furnace 10% productivity being broken)

New response