1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-07 13:31:40 +02:00

Compare base version

Will be removed when 1.0 is released.
This commit is contained in:
Gerkiz 2020-07-07 17:06:10 +02:00
parent 0f6917a5a7
commit 50d30c0890
2 changed files with 16 additions and 5 deletions

View File

@ -2,7 +2,6 @@ require 'utils.data_stages'
_LIFECYCLE = _STAGE.control -- Control stage
_DEBUG = false
_DUMP_ENV = false
local branch_version = '0.18.35'
require 'utils.server'
require 'utils.server_commands'
@ -154,8 +153,15 @@ local function on_player_created(event)
end
local function on_init()
local branch_version = '0.18.35'
local sub = string.sub
game.forces.player.research_queue_enabled = true
if game.active_mods.base >= branch_version then
local is_branch_18 = sub(branch_version, 3, 4)
local get_active_version = sub(game.active_mods.base, 3, 4)
is_branch_18 = is_branch_18 .. sub(branch_version, 6, 7)
get_active_version = get_active_version .. sub(game.active_mods.base, 6, 7)
if get_active_version >= is_branch_18 then
local default = game.permissions.get_group('Default')
default.set_allows_action(defines.input_action.flush_opened_entity_fluid, false)
default.set_allows_action(defines.input_action.flush_opened_entity_specific_fluid, false)

View File

@ -11,8 +11,6 @@ require 'modules.biters_yield_coins'
require 'modules.dangerous_goods'
require 'modules.custom_death_messages'
local branch_version = '0.18.35'
local Terrain = require 'maps.fish_defender.terrain'
local Unit_health_booster = require 'modules.biter_health_booster'
local Difficulty = require 'modules.difficulty_vote'
@ -1142,6 +1140,10 @@ local function on_init()
Poll.reset()
local get_score = Score.get_table()
local this = FDT.get()
local branch_version = '0.18.35'
local sub = string.sub
local is_branch_18 = sub(branch_version, 3, 4)
local get_active_version = sub(game.active_mods.base, 3, 4)
Difficulty.reset_difficulty_poll()
Difficulty.set_poll_closing_timeout = game.tick + 36000
@ -1196,7 +1198,10 @@ local function on_init()
game.map_settings.enemy_expansion.enabled = false
game.forces['player'].technologies['artillery'].researched = false
if game.active_mods.base >= branch_version then
is_branch_18 = is_branch_18 .. sub(branch_version, 6, 7)
get_active_version = get_active_version .. sub(game.active_mods.base, 6, 7)
if get_active_version >= is_branch_18 then
game.reset_time_played()
end