mirror of
https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git
synced 2025-03-03 14:42:27 +02:00
Added a resource shape configuration option (square/circle)
This commit is contained in:
parent
ee7d491a54
commit
d90d3a9451
12
config.lua
12
config.lua
@ -5,15 +5,15 @@
|
||||
-- Messages
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
-- WELCOME_MSG = "[INSERT SERVER OWNER MSG HERE!]"
|
||||
WELCOME_MSG = "Welcome to Oarc's official server! Follow @_Oarc_ for server updates."
|
||||
WELCOME_MSG = "[INSERT SERVER OWNER MSG HERE!]"
|
||||
-- WELCOME_MSG = "Welcome to Oarc's official server! Follow @_Oarc_ for server updates."
|
||||
GAME_MODE_MSG = "In the current game mode, a satellite must be launched from an existing far away rocket silo to win!"
|
||||
-- GAME_MODE_MSG = "The current game mode is just basic vanilla!"
|
||||
MODULES_ENABLED = "Mods Enabled: Separate Spawns, RSO, Gravestone Chests, Long-Reach"
|
||||
-- MODULES_ENABLED = "Mods Enabled: Gravestone-Chests"
|
||||
|
||||
-- WELCOME_MSG_TITLE = "[INSERT SERVER OWNER MSG HERE!]"
|
||||
WELCOME_MSG_TITLE = "Welcome to Oarc's Server"
|
||||
WELCOME_MSG_TITLE = "[INSERT SERVER OWNER MSG HERE!]"
|
||||
-- WELCOME_MSG_TITLE = "Welcome to Oarc's Server"
|
||||
WELCOME_MSG1 = "Rules: Be polite. Ask before changing other players's stuff. Have fun!"
|
||||
WELCOME_MSG2 = "This server is running a custom scenario that changes spawn locations."
|
||||
|
||||
@ -87,6 +87,10 @@ START_STONE_AMOUNT = 1500
|
||||
START_COAL_AMOUNT = 1500
|
||||
START_OIL_AMOUNT = 30000
|
||||
|
||||
-- Stat resource shape
|
||||
-- If this is true, it will be a circle
|
||||
-- If false, it will be a square
|
||||
ENABLE_RESOURCE_SHAPE_CIRCLE = true
|
||||
|
||||
-- Start resource position and size
|
||||
-- Position is relative to player starting location
|
||||
|
@ -284,7 +284,7 @@ function GenerateStartingResources(player)
|
||||
local midPoint = math.floor(START_RESOURCE_STONE_SIZE/2)
|
||||
for y=0, START_RESOURCE_STONE_SIZE do
|
||||
for x=0, START_RESOURCE_STONE_SIZE do
|
||||
if ((x-midPoint)^2 + (y-midPoint)^2 < midPoint^2) then
|
||||
if (((x-midPoint)^2 + (y-midPoint)^2 < midPoint^2) or not ENABLE_RESOURCE_SHAPE_CIRCLE) then
|
||||
surface.create_entity({name="stone", amount=START_STONE_AMOUNT,
|
||||
position={stonePos.x+x, stonePos.y+y}})
|
||||
end
|
||||
@ -294,7 +294,7 @@ function GenerateStartingResources(player)
|
||||
local midPoint = math.floor(START_RESOURCE_COAL_SIZE/2)
|
||||
for y=0, START_RESOURCE_COAL_SIZE do
|
||||
for x=0, START_RESOURCE_COAL_SIZE do
|
||||
if ((x-midPoint)^2 + (y-midPoint)^2 < midPoint^2) then
|
||||
if (((x-midPoint)^2 + (y-midPoint)^2 < midPoint^2) or not ENABLE_RESOURCE_SHAPE_CIRCLE) then
|
||||
surface.create_entity({name="coal", amount=START_COAL_AMOUNT,
|
||||
position={coalPos.x+x, coalPos.y+y}})
|
||||
end
|
||||
@ -304,7 +304,7 @@ function GenerateStartingResources(player)
|
||||
local midPoint = math.floor(START_RESOURCE_COPPER_SIZE/2)
|
||||
for y=0, START_RESOURCE_COPPER_SIZE do
|
||||
for x=0, START_RESOURCE_COPPER_SIZE do
|
||||
if ((x-midPoint)^2 + (y-midPoint)^2 < midPoint^2) then
|
||||
if (((x-midPoint)^2 + (y-midPoint)^2 < midPoint^2) or not ENABLE_RESOURCE_SHAPE_CIRCLE) then
|
||||
surface.create_entity({name="copper-ore", amount=START_COPPER_AMOUNT,
|
||||
position={copperOrePos.x+x, copperOrePos.y+y}})
|
||||
end
|
||||
@ -314,7 +314,7 @@ function GenerateStartingResources(player)
|
||||
local midPoint = math.floor(START_RESOURCE_IRON_SIZE/2)
|
||||
for y=0, START_RESOURCE_IRON_SIZE do
|
||||
for x=0, START_RESOURCE_IRON_SIZE do
|
||||
if ((x-midPoint)^2 + (y-midPoint)^2 < midPoint^2) then
|
||||
if (((x-midPoint)^2 + (y-midPoint)^2 < midPoint^2) or not ENABLE_RESOURCE_SHAPE_CIRCLE) then
|
||||
surface.create_entity({name="iron-ore", amount=START_IRON_AMOUNT,
|
||||
position={ironOrePos.x+x, ironOrePos.y+y}})
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user