mirror of
https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git
synced 2024-12-12 10:13:58 +02:00
Remove dupe entries in example config and fix bug in vanilla spawn selection logic.
This commit is contained in:
parent
b7bfadf784
commit
cd82b7facf
@ -374,17 +374,6 @@ RESPAWN_COOLDOWN_TICKS = TICKS_PER_MINUTE * RESPAWN_COOLDOWN_IN_MINUTES
|
||||
MIN_ONLINE_TIME_IN_MINUTES = 15
|
||||
MIN_ONLINE_TIME = TICKS_PER_MINUTE * MIN_ONLINE_TIME_IN_MINUTES
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- ANTI-Griefing stuff ( I don't personally maintain this as I don't care for it.)
|
||||
-- These things were added from other people's requests/changes.
|
||||
-- It is very very basic only, nothing fancy.
|
||||
--------------------------------------------------------------------------------
|
||||
-- Enable this to disable some basic things like friendly fire, deconstructing from map view, etc.
|
||||
ENABLE_ANTI_GRIEFING = true
|
||||
|
||||
-- Makes blueprint ghosts dissapear if they have been placed longer than this
|
||||
GHOST_TIME_TO_LIVE = 15 * TICKS_PER_MINUTE -- set to 0 for infinite ghost life
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Frontier Rocket Silo Options
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -619,7 +619,6 @@ function CreateVanillaSpawns(count, spacing)
|
||||
|
||||
-- Need to know how much to offset the grid.
|
||||
local sqrt_half = math.floor((sqrt_count-1)/2)
|
||||
log("sqrt_half " .. sqrt_half)
|
||||
|
||||
if (sqrt_count < 1) then
|
||||
log("CreateVanillaSpawns less than 1!!")
|
||||
@ -678,7 +677,7 @@ function FindUnusedVanillaSpawn(surface, target_distance)
|
||||
local new_distance = math.abs(math.sqrt((v.x^2) + (v.y^2)) - target_distance)
|
||||
if (new_distance < best_distance) then
|
||||
best_key = k
|
||||
best_distance = math.sqrt((v.x^2) + (v.y^2))
|
||||
best_distance = new_distance
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user