Skip to content
This repository was archived by the owner on Aug 28, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions maps/journey/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ function Public.dispatch_goods(journey)
local good = goods_to_dispatch[journey.dispatch_key]
surface.spill_item_stack(journey.dispatch_beacon_position, {name = good[1], count = good[2]}, true, nil, false)
table.remove(journey.goods_to_dispatch, journey.dispatch_key)
game.forces.player.add_chart_tag(surface, {icon = {type = 'item', name = good[1]}, position = journey.dispatch_beacon_position, text = "" .. good[2] .. "x"})
journey.dispatch_beacon = nil
journey.dispatch_beacon_position = nil
journey.dispatch_key = nil
Expand All @@ -682,6 +683,9 @@ function Public.dispatch_goods(journey)
position = surface.find_non_colliding_position("rocket-silo", position, 32, 1)
if not position then return end

local radius=10
game.forces.player.chart(surface, {lefttop = {x = position.x-radius, y = position.y-radius}, rightbottom = {x = position.x+radius, y = position.y+radius}})

journey.dispatch_beacon = surface.create_entity({name = "stone-wall", position = position, force = "neutral"})
journey.dispatch_beacon.minable = false
journey.dispatch_beacon_position = {x = position.x, y = position.y}
Expand Down