diff --git a/maps/journey/functions.lua b/maps/journey/functions.lua index fa09e524..c031498c 100644 --- a/maps/journey/functions.lua +++ b/maps/journey/functions.lua @@ -1444,7 +1444,12 @@ function Public.dispatch_goods(journey) if journey.dispatch_beacon_position then local good = goods_to_dispatch[journey.dispatch_key] - surface.spill_item_stack({ position = journey.dispatch_beacon_position, stack = { name = good[1], count = good[2] }, enable_looted = true, allow_belts = false }) + local pod = surface.create_entity({name = 'cargo-pod-container', position = journey.dispatch_beacon_position, force = game.forces.player}) + if pod and pod.valid then + pod.insert({name = good[1], count = good[2]}) + else + surface.spill_item_stack({ position = journey.dispatch_beacon_position, stack = { name = good[1], count = good[2] }, enable_looted = true, allow_belts = false }) + end table.remove(journey.goods_to_dispatch, journey.dispatch_key) journey.dispatch_beacon = nil journey.dispatch_beacon_position = nil diff --git a/maps/journey/main.lua b/maps/journey/main.lua index 3515b190..76f482b2 100644 --- a/maps/journey/main.lua +++ b/maps/journey/main.lua @@ -14,6 +14,7 @@ local Global = require 'utils.global' local Token = require 'utils.token' local Event = require 'utils.event' local Vacants = require 'modules.clear_vacant_players' +local Robolimits = require 'modules.robot_limits' local journey = { announce_capsules = true @@ -189,9 +190,11 @@ local function on_rocket_launched(event) rocket_inventory.clear() rocket_inventory.insert({name = 'space-science-pack', count = 200}) local force = event.rocket.force - force.technologies['space-science-pack'].researched = true - force.print('[technology=space-science-pack] researched.') - force.play_sound({path = 'utility/research_completed'}) + if force.technologies['space-science-pack'].researched == false then + force.technologies['space-science-pack'].researched = true + force.print('[technology=space-science-pack] researched.') + force.play_sound({path = 'utility/research_completed'}) + end Functions.draw_gui(journey) end @@ -251,6 +254,9 @@ local function on_init() game.permissions.get_group('Default').set_allows_action(defines.input_action.set_rocket_silo_send_to_orbit_automated_mode, false) Vacants.init(1, true) + Robolimits.set_construction_robot_limit(1000) + Robolimits.set_logistic_robot_limit(1000) + Robolimits.set_roboport_limit(100) Functions.hard_reset(journey) end diff --git a/modules/thirst.lua b/modules/thirst.lua index 3a4b26ad..810b0ba1 100644 --- a/modules/thirst.lua +++ b/modules/thirst.lua @@ -14,7 +14,8 @@ local this = { gleba = 0.6, vulcanus = 3, aquilo = 0.8, - fulgora = 1.5 + fulgora = 1.5, + platform = 0 } } @@ -69,7 +70,7 @@ local function update_hydration_meter(player) end local function local_modifier(surface) - local planet_name = surface.planet and surface.planet.name or 'custom' + local planet_name = (surface.platform and 'platform') or (surface.planet and surface.planet.name) or 'custom' local modifier = this.planet_thirstiness[planet_name] or this.planet_thirstiness['custom'] return modifier end