Sosciencity [WIP]


Factorio: Skylines. Adds citizens to the game. Attract various castes to your city in order to progress the game.

Overhaul
8 months ago
1.1
2.83K
Manufacturing

b Blood donation threshold crash when < 10

8 months ago

My hospital does not appear to be taking blood donations, despite having 80k+ operations available and a threshold of 100 for receiving blood donations.
[I see this is fixed in master, and confirmed that 8f9a809 fixes this. Yay.]

Adding a med bay and waiting for the capacity to get to 100+, donations start happening in the med bay, and many Lack of Purple Blood Cells patients are cured and eventually we start accumulating bloodbags in the medbay. That takes a while though, so...

Adding a med bay and setting the threshold for blood donations to a value of less than 10 results in the following crash:

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

Error while running event sosciencity::on_nth_tick(10)
Item stack count has to be a positive integer.
stack traceback:
[C]: in function 'insert'
sosciencity/classes/inventories.lua:121: in function 'try_insert'
sosciencity/classes/inhabitants.lua:1685: in function 'update_blood_donations'
sosciencity/classes/inhabitants.lua:1921: in function 'updater'
sosciencity/classes/register.lua:192: in function 'on_update'
sosciencity/classes/register.lua:431: in function 'update_entities'
sosciencity/control.lua:182: in function <sosciencity/control.lua:175>

I'm guessing that threshold needs a minimum value of Biology.blood_donation_workload (currently set to 10).

8 months ago

Well, it seems 8f9a809 fixes the crash too. I should have tested that after seeing my hospital was working.

8 months ago

Yes. The fix will be included in the next release. Tomorrow, if nothing goes wrong.

New response