mirror of
https://github.com/veden/Rampant.git
synced 2025-03-17 20:58:35 +02:00
adding random generator based on rampant seed and map seed
This commit is contained in:
parent
b733b2a21d
commit
8bbcca3dc4
@ -392,7 +392,6 @@ function upgrade.attempt(universe)
|
||||
universe.attackWaveUpperBound = 0
|
||||
universe.unitRefundAmount = 0
|
||||
universe.regroupIndex = 1
|
||||
universe.randomGenerator = game.create_random_generator(settings.startup["rampant--enemySeed"].value+1024)
|
||||
|
||||
game.map_settings.path_finder.min_steps_to_check_path_find_termination =
|
||||
constants.PATH_FINDER_MIN_STEPS_TO_CHECK_PATH
|
||||
@ -450,9 +449,12 @@ function upgrade.attempt(universe)
|
||||
global.version = 122
|
||||
|
||||
addCommandSet(universe)
|
||||
universe.randomGenerator = nil
|
||||
universe.random = game.create_random_generator(settings.startup["rampant--enemySeed"].value+game.map_gen_settings.seed)
|
||||
if (universe.maps) then
|
||||
local tick = game.tick
|
||||
for _,map in pairs(universe.maps) do
|
||||
map.random = universe.random
|
||||
map.pendingUpgrades = {}
|
||||
map.sentAggressiveGroups = 0
|
||||
map.maxAggressiveGroups = 1
|
||||
|
@ -373,6 +373,8 @@ local function prepMap(surface)
|
||||
map.temperamentScore = 0
|
||||
map.stateTick = 0
|
||||
|
||||
map.random = universe.random
|
||||
|
||||
-- queue all current chunks that wont be generated during play
|
||||
local tick = game.tick
|
||||
for chunk in surface.get_chunks() do
|
||||
|
Loading…
x
Reference in New Issue
Block a user