1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-04 09:42:30 +02:00

Add market location config options

This commit is contained in:
plague006 2019-02-08 14:28:58 -05:00 committed by Matthew Heguy
parent 39ad01b3fb
commit f20e4c6247
2 changed files with 6 additions and 2 deletions

View File

@ -90,6 +90,8 @@ global.config = {
enabled = true,
-- will create a standard market on game startup
create_standard_market = true,
-- the coordinates at which the standard market will be created
standard_market_location = {x = 0, y = -5},
currency = currency,
-- defines the chance that killing an entity will drop coins and the min and max it can drop upon death

View File

@ -17,8 +17,9 @@ local pairs = pairs
local round = math.round
local random = math.random
local format = string.format
local currency = global.config.market.currency
local entity_drop_amount = global.config.market.entity_drop_amount
local market_config = global.config.market
local currency = market_config.currency
local entity_drop_amount = market_config.entity_drop_amount
-- local vars
@ -89,6 +90,7 @@ local function spawn_market(args, player)
end
local surface = RS.get_surface()
local force = game.forces.player
local maket_spawn_pos = market_config.standard_market_location
if player then -- If we have a player, this is coming from a player running the command
surface = player.surface