migration and new lamp
Posted: Thu Sep 12, 2013 11:55 am
I'm currenly trying to add new lamp to mod and it to work in current game I have added migration.
migration code.
recipe does migrate to tech effects, but is not craftable for player. Tech was researched before adding and migrating new recipe.
Trying to reset via console does not seems help. I have tried these.Recipe is usable in new game.
Also about this lamp that I try to add in game. I had idea of warning light that works when there is powershortage so I added buffer capacity of 1250. Rest is same as small lamp, but consumes lot less energy (0.05 per tick) and has red light with smaller radius.
Problem is it does not seem to get any buffer and the alert icon is flashing constantly even when powered.
ps. Why I remember using getenergy() for entities, but nowadays most of them returns nil. Like laser turret and it has buffer capacity too.
migration code.
Code: Select all
game.player.force.resetrecipes()
game.player.force.resettechnologies()
Trying to reset via console does not seems help. I have tried these.
Code: Select all
game.player.force.reset()
game.player.force.recipes["red-lamp"].reload()
Also about this lamp that I try to add in game. I had idea of warning light that works when there is powershortage so I added buffer capacity of 1250. Rest is same as small lamp, but consumes lot less energy (0.05 per tick) and has red light with smaller radius.
Problem is it does not seem to get any buffer and the alert icon is flashing constantly even when powered.
ps. Why I remember using getenergy() for entities, but nowadays most of them returns nil. Like laser turret and it has buffer capacity too.