mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2024-12-30 23:17:53 +02:00
15 lines
555 B
Lua
15 lines
555 B
Lua
-- rocket launch always yields space science -- by mewmew
|
|
|
|
local Event = require 'utils.event'
|
|
|
|
local function on_rocket_launched(event)
|
|
local rocket_inventory = event.rocket.get_inventory(defines.inventory.rocket)
|
|
if rocket_inventory.get_item_count('satellite') > 0 then
|
|
return
|
|
end
|
|
local rocket_silo_inventory = event.rocket_silo.get_inventory(defines.inventory.rocket_silo_result)
|
|
rocket_silo_inventory.insert({name = 'space-science-pack', count = 1000})
|
|
end
|
|
|
|
Event.add(defines.events.on_rocket_launched, on_rocket_launched)
|