You've already forked ComfyFactorio
mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-11-06 08:56:27 +02:00
0.17 compatibility things
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
server_commands = require 'utils.server'
|
||||
require "utils.server_commands"
|
||||
require "utils.utils"
|
||||
--require "utils.corpse_util" --disable for hunger games
|
||||
require "utils.corpse_util" --disable for hunger games
|
||||
require "chatbot"
|
||||
require "commands"
|
||||
require "session_tracker"
|
||||
@@ -9,8 +9,8 @@ require "antigrief"
|
||||
require "antigrief_admin_panel"
|
||||
require "group"
|
||||
require "player_list"
|
||||
require "poll"
|
||||
--require "score"
|
||||
require "poll_old"
|
||||
require "score"
|
||||
|
||||
---- enable modules here ----
|
||||
--require "maps.tools.cheat_mode"
|
||||
@@ -32,7 +32,7 @@ require "poll"
|
||||
-----------------------------
|
||||
|
||||
---- enable maps here ----
|
||||
--require "maps.biter_battles"
|
||||
require "maps.biter_battles"
|
||||
--require "maps.cave_miner"
|
||||
--require "maps.labyrinth"
|
||||
--require "maps.spooky_forest"
|
||||
|
||||
@@ -112,7 +112,7 @@ local function show_mvps(player)
|
||||
if player.gui.left["mvps"] then return end
|
||||
local frame = player.gui.left.add({type = "frame", name = "mvps", direction = "vertical"})
|
||||
local l = frame.add({type = "label", caption = "MVPs - North:"})
|
||||
l.style.font = "default-frame"
|
||||
l.style.font = "default-listbox"
|
||||
l.style.font_color = {r = 0.55, g = 0.55, b = 0.99}
|
||||
|
||||
local t = frame.add({type = "table", column_count = 2})
|
||||
@@ -158,7 +158,7 @@ local function show_mvps(player)
|
||||
end
|
||||
|
||||
local l = frame.add({type = "label", caption = "MVPs - South:"})
|
||||
l.style.font = "default-frame"
|
||||
l.style.font = "default-listbox"
|
||||
l.style.font_color = {r = 0.99, g = 0.33, b = 0.33}
|
||||
|
||||
local t = frame.add({type = "table", column_count = 2})
|
||||
@@ -207,7 +207,7 @@ local function create_biter_battle_menu(player)
|
||||
if global.rocket_silo_destroyed then
|
||||
local frame = player.gui.left.add { type = "frame", name = "victory_popup", direction = "vertical" }
|
||||
local l = frame.add { type = "label", caption = global.rocket_silo_destroyed , single_line = false, name = "victory_caption" }
|
||||
l.style.font = "default-frame"
|
||||
l.style.font = "default-listbox"
|
||||
l.style.font_color = { r=0.98, g=0.66, b=0.22}
|
||||
l.style.top_padding = 10
|
||||
l.style.left_padding = 20
|
||||
@@ -307,7 +307,7 @@ local function create_biter_battle_menu(player)
|
||||
l.style.font_color = color
|
||||
end
|
||||
local b = frame.add { type = "button", name = "join_north_button", caption = c }
|
||||
b.style.font = "default-frame"
|
||||
b.style.font = "default-listbox"
|
||||
b.style.font_color = font_color
|
||||
b.style.minimal_width = 320
|
||||
frame.add { type = "label", caption = "--------------------------------------------------"}
|
||||
@@ -377,7 +377,7 @@ local function create_biter_battle_menu(player)
|
||||
l.style.font_color = color
|
||||
end
|
||||
local b = frame.add { type = "button", name = "join_south_button", caption = c }
|
||||
b.style.font = "default-frame"
|
||||
b.style.font = "default-listbox"
|
||||
b.style.font_color = font_color
|
||||
b.style.minimal_width = 320
|
||||
end
|
||||
@@ -548,10 +548,10 @@ local function on_player_joined_game(event)
|
||||
--game.forces[name].technologies["flamethrower-damage-1"].enabled = false
|
||||
--game.forces[name].technologies["flamethrower-damage-2"].enabled = false
|
||||
--game.forces[name].technologies["flamethrower-damage-3"].enabled = false
|
||||
game.forces[name].technologies["flamethrower-damage-4"].enabled = false
|
||||
game.forces[name].technologies["flamethrower-damage-5"].enabled = false
|
||||
game.forces[name].technologies["flamethrower-damage-6"].enabled = false
|
||||
game.forces[name].technologies["flamethrower-damage-7"].enabled = false
|
||||
--game.forces[name].technologies["flamethrower-damage-4"].enabled = false
|
||||
--game.forces[name].technologies["flamethrower-damage-5"].enabled = false
|
||||
--game.forces[name].technologies["flamethrower-damage-6"].enabled = false
|
||||
--game.forces[name].technologies["flamethrower-damage-7"].enabled = false
|
||||
game.forces[name].technologies["atomic-bomb"].enabled = false
|
||||
|
||||
global.team_nerf[name] = 0
|
||||
|
||||
@@ -675,7 +675,7 @@ local function refresh_market_offers()
|
||||
{price = {}, offer = {type = 'nothing', effect_description = str4}},
|
||||
{price = {}, offer = {type = 'nothing', effect_description = str5}},
|
||||
{price = {{"coin", 5}}, offer = {type = 'give-item', item = "raw-fish", count = 1}},
|
||||
{price = {{"coin", 1}}, offer = {type = 'give-item', item = 'raw-wood', count = 8}},
|
||||
--{price = {{"coin", 1}}, offer = {type = 'give-item', item = 'raw-wood', count = 8}},
|
||||
{price = {{"coin", 8}}, offer = {type = 'give-item', item = 'grenade', count = 1}},
|
||||
{price = {{"coin", 32}}, offer = {type = 'give-item', item = 'cluster-grenade', count = 1}},
|
||||
{price = {{"coin", 1}}, offer = {type = 'give-item', item = 'land-mine', count = 1}},
|
||||
@@ -952,10 +952,10 @@ local function on_player_joined_game(event)
|
||||
["crude-oil"] = {frequency = "very-high", size = "very-big", richness = "normal"},
|
||||
["trees"] = {frequency = "normal", size = "normal", richness = "normal"},
|
||||
["enemy-base"] = {frequency = "none", size = "none", richness = "none"},
|
||||
["grass"] = {frequency = "normal", size = "normal", richness = "normal"},
|
||||
["sand"] = {frequency = "normal", size = "normal", richness = "normal"},
|
||||
["desert"] = {frequency = "normal", size = "normal", richness = "normal"},
|
||||
["dirt"] = {frequency = "normal", size = "normal", richness = "normal"}
|
||||
--["grass"] = {frequency = "normal", size = "normal", richness = "normal"},
|
||||
--["sand"] = {frequency = "normal", size = "normal", richness = "normal"},
|
||||
--["desert"] = {frequency = "normal", size = "normal", richness = "normal"},
|
||||
--["dirt"] = {frequency = "normal", size = "normal", richness = "normal"}
|
||||
}
|
||||
game.create_surface("fish_defender", map_gen_settings)
|
||||
local surface = game.surfaces["fish_defender"]
|
||||
@@ -972,10 +972,10 @@ local function on_player_joined_game(event)
|
||||
--game.forces["player"].technologies["flamethrower-damage-1"].enabled = false
|
||||
--game.forces["player"].technologies["flamethrower-damage-2"].enabled = false
|
||||
--game.forces["player"].technologies["flamethrower-damage-3"].enabled = false
|
||||
game.forces["player"].technologies["flamethrower-damage-4"].enabled = false
|
||||
game.forces["player"].technologies["flamethrower-damage-5"].enabled = false
|
||||
game.forces["player"].technologies["flamethrower-damage-6"].enabled = false
|
||||
game.forces["player"].technologies["flamethrower-damage-7"].enabled = false
|
||||
--game.forces["player"].technologies["flamethrower-damage-4"].enabled = false
|
||||
--game.forces["player"].technologies["flamethrower-damage-5"].enabled = false
|
||||
--game.forces["player"].technologies["flamethrower-damage-6"].enabled = false
|
||||
--game.forces["player"].technologies["flamethrower-damage-7"].enabled = false
|
||||
--game.forces["player"].technologies["gun-turret-damage-1"].enabled = false
|
||||
--game.forces["player"].technologies["gun-turret-damage-2"].enabled = false
|
||||
--game.forces["player"].technologies["gun-turret-damage-3"].enabled = false
|
||||
@@ -1005,7 +1005,7 @@ local function on_player_joined_game(event)
|
||||
|
||||
if player.online_time < 1 then
|
||||
player.insert({name = "pistol", count = 1})
|
||||
player.insert({name = "iron-axe", count = 1})
|
||||
--player.insert({name = "iron-axe", count = 1})
|
||||
player.insert({name = "raw-fish", count = 3})
|
||||
player.insert({name = "firearm-magazine", count = 16})
|
||||
player.insert({name = "iron-plate", count = 32})
|
||||
|
||||
@@ -30,7 +30,7 @@ local function create_map_intro(player)
|
||||
|
||||
local tt = t.add {type = "table", column_count = 3}
|
||||
local l = tt.add {type = "label", caption = main_caption}
|
||||
l.style.font = "default-frame"
|
||||
l.style.font = "default-listbox"
|
||||
l.style.font_color = {r=0.11, g=0.8, b=0.44}
|
||||
l.style.top_padding = 6
|
||||
l.style.bottom_padding = 6
|
||||
|
||||
@@ -23,7 +23,7 @@ local function create_map_intro(player)
|
||||
|
||||
local tt = t.add {type = "table", column_count = 3}
|
||||
local l = tt.add {type = "label", caption = main_caption}
|
||||
l.style.font = "default-frame"
|
||||
l.style.font = "default-listbox"
|
||||
l.style.font_color = {r=0.6, g=0.3, b=0.99}
|
||||
l.style.top_padding = 6
|
||||
l.style.bottom_padding = 6
|
||||
|
||||
@@ -80,14 +80,14 @@ local function secret_shop(pos, surface)
|
||||
{price = {{"coin", math_random(80,160)}}, offer = {type = 'give-item', item = 'productivity-module'}},
|
||||
{price = {{"coin", math_random(80,160)}}, offer = {type = 'give-item', item = 'speed-module'}},
|
||||
|
||||
{price = {{"coin", math_random(5,10)}}, offer = {type = 'give-item', item = 'raw-wood', count = 50}},
|
||||
{price = {{"coin", math_random(5,10)}}, offer = {type = 'give-item', item = 'wood', count = 50}},
|
||||
{price = {{"coin", math_random(5,10)}}, offer = {type = 'give-item', item = 'iron-ore', count = 50}},
|
||||
{price = {{"coin", math_random(5,10)}}, offer = {type = 'give-item', item = 'copper-ore', count = 50}},
|
||||
{price = {{"coin", math_random(5,10)}}, offer = {type = 'give-item', item = 'stone', count = 50}},
|
||||
{price = {{"coin", math_random(5,10)}}, offer = {type = 'give-item', item = 'coal', count = 50}},
|
||||
{price = {{"coin", math_random(8,16)}}, offer = {type = 'give-item', item = 'uranium-ore', count = 50}},
|
||||
|
||||
{price = {{'raw-wood', math_random(10,12)}}, offer = {type = 'give-item', item = "coin"}},
|
||||
{price = {{'wood', math_random(10,12)}}, offer = {type = 'give-item', item = "coin"}},
|
||||
{price = {{'iron-ore', math_random(10,12)}}, offer = {type = 'give-item', item = "coin"}},
|
||||
{price = {{'copper-ore', math_random(10,12)}}, offer = {type = 'give-item', item = "coin"}},
|
||||
{price = {{'stone', math_random(10,12)}}, offer = {type = 'give-item', item = "coin"}},
|
||||
@@ -121,10 +121,10 @@ local function on_player_joined_game(event)
|
||||
["crude-oil"] = {frequency = "none", size = "none", richness = "none"},
|
||||
["trees"] = {frequency = "normal", size = "normal", richness = "normal"},
|
||||
["enemy-base"] = {frequency = "none", size = "none", richness = "none"},
|
||||
["grass"] = {frequency = "none", size = "none", richness = "none"},
|
||||
["sand"] = {frequency = "none", size = "none", richness = "none"},
|
||||
["desert"] = {frequency = "none", size = "none", richness = "none"},
|
||||
["dirt"] = {frequency = "normal", size = "normal", richness = "normal"}
|
||||
--["grass"] = {frequency = "none", size = "none", richness = "none"},
|
||||
--["sand"] = {frequency = "none", size = "none", richness = "none"},
|
||||
--["desert"] = {frequency = "none", size = "none", richness = "none"},
|
||||
--["dirt"] = {frequency = "normal", size = "normal", richness = "normal"}
|
||||
}
|
||||
game.create_surface("mountain_fortress", map_gen_settings)
|
||||
local surface = game.surfaces["mountain_fortress"]
|
||||
@@ -151,7 +151,7 @@ local function on_player_joined_game(event)
|
||||
|
||||
if player.online_time < 1 then
|
||||
player.insert({name = "pistol", count = 1})
|
||||
player.insert({name = "iron-axe", count = 1})
|
||||
-- player.insert({name = "iron-axe", count = 1})
|
||||
player.insert({name = "raw-fish", count = 3})
|
||||
player.insert({name = "firearm-magazine", count = 16})
|
||||
player.insert({name = "iron-plate", count = 32})
|
||||
|
||||
@@ -20,7 +20,7 @@ local function create_map_intro(player)
|
||||
|
||||
local tt = t.add {type = "table", column_count = 3}
|
||||
local l = tt.add {type = "label", caption = main_caption}
|
||||
l.style.font = "default-frame"
|
||||
l.style.font = "default-listbox"
|
||||
l.style.font_color = {r=0.85, g=0.0, b=0.25}
|
||||
l.style.top_padding = 6
|
||||
l.style.bottom_padding = 6
|
||||
|
||||
@@ -89,7 +89,7 @@ local function get_rank(player)
|
||||
local m = (player.online_time + t) / 3600
|
||||
|
||||
local ranks = {
|
||||
"item/iron-axe","item/burner-mining-drill","item/burner-inserter","item/stone-furnace","item/light-armor","item/steam-engine",
|
||||
"item/wood","item/burner-mining-drill","item/burner-inserter","item/stone-furnace","item/light-armor","item/steam-engine",
|
||||
"item/inserter", "item/transport-belt", "item/underground-belt", "item/splitter","item/assembling-machine-1","item/long-handed-inserter","item/electronic-circuit","item/electric-mining-drill",
|
||||
"item/heavy-armor","item/steel-furnace","item/steel-axe","item/gun-turret","item/fast-transport-belt", "item/fast-underground-belt", "item/fast-splitter","item/assembling-machine-2","item/fast-inserter","item/radar","item/filter-inserter",
|
||||
"item/defender-capsule","item/pumpjack","item/chemical-plant","item/solar-panel","item/advanced-circuit","item/modular-armor","item/accumulator", "item/construction-robot",
|
||||
@@ -244,12 +244,12 @@ local function player_list_show(player, sort_by)
|
||||
label.style.maximal_width = 35
|
||||
|
||||
local label = t.add { type = "label", name = "player_list_panel_header_1", caption = tostring(#game.connected_players) }
|
||||
label.style.font = "default-frame"
|
||||
label.style.font = "default-listbox"
|
||||
label.style.font_color = { r=0.10, g=0.70, b=0.10}
|
||||
label.style.bottom_padding = 3
|
||||
label.style.minimal_width = 36
|
||||
label.style.maximal_width = 36
|
||||
label.style.align = "right"
|
||||
--label.style.align = "right"
|
||||
|
||||
local str = ""
|
||||
if sort_by == "name_asc" then str = symbol_asc .. " " end
|
||||
@@ -262,12 +262,12 @@ local function player_list_show(player, sort_by)
|
||||
|
||||
local tt = t.add({ type = "table", column_count = 5 })
|
||||
local label = tt.add { type = "label", name = "player_list_panel_header_2", caption = str }
|
||||
label.style.font = "default-listbox"
|
||||
label.style.font = "default-bold"
|
||||
label.style.font_color = { r=0.98, g=0.66, b=0.22}
|
||||
|
||||
if #game.connected_players ~= #game.players then
|
||||
local label = tt.add { type = "label", caption = "/" }
|
||||
label.style.font = "default-listbox"
|
||||
label.style.font = "default-bold"
|
||||
label.style.font_color = { r=0.98, g=0.66, b=0.22}
|
||||
local label = tt.add { type = "label", caption = tostring(#game.players - #game.connected_players) }
|
||||
label.style.font = "default-bold"
|
||||
|
||||
@@ -68,7 +68,7 @@ local function show_score(player)
|
||||
local str = "0"
|
||||
if score.rocket_launches then str = tostring(score.rocket_launches) end
|
||||
local l = t.add { type = "label", caption = str}
|
||||
l.style.font = "default-frame"
|
||||
l.style.font = "default-listbox"
|
||||
l.style.font_color = { r=0.9, g=0.9, b=0.9}
|
||||
l.style.minimal_width = 123
|
||||
|
||||
@@ -78,7 +78,7 @@ local function show_score(player)
|
||||
l.style.minimal_width = 100
|
||||
|
||||
local l = t.add { type = "label", caption = tostring(get_total_biter_killcount(player.force))}
|
||||
l.style.font = "default-frame"
|
||||
l.style.font = "default-listbox"
|
||||
l.style.font_color = { r=0.9, g=0.9, b=0.9}
|
||||
l.style.minimal_width = 145
|
||||
|
||||
|
||||
Reference in New Issue
Block a user