1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2024-12-26 22:56:43 +02:00
fixed solar power
tweak to ore veins
blacklisted certain market price items
This commit is contained in:
MewMew 2020-10-12 14:53:10 +02:00
parent f4e0e325b1
commit ca11acb145
6 changed files with 20 additions and 6 deletions

View File

@ -96,7 +96,8 @@ Public.pickaxe_tiers = {
"Tungsten", "Tungsten",
"Corundum", "Corundum",
"Tungsten", "Tungsten",
"Diamond", "Diamond",
"Netherite",
"Penumbrite", "Penumbrite",
"Meteorite", "Meteorite",
"Crimtane", "Crimtane",

View File

@ -88,7 +88,7 @@ function Public.update_top_gui(cave_miner)
for _, player in pairs(game.connected_players) do for _, player in pairs(game.connected_players) do
local element = player.gui.top.cave_miner local element = player.gui.top.cave_miner
if element and element.valid then if element and element.valid then
element.children[1].caption = "Tier: " .. pickaxe_tiers[cave_miner.pickaxe_tier] .. " | " element.children[1].caption = "Tier " .. cave_miner.pickaxe_tier .. " - " .. pickaxe_tiers[cave_miner.pickaxe_tier] .. " | "
element.children[1].tooltip = "Mining speed " .. (1 + game.forces.player.manual_mining_speed_modifier) * 100 .. "%" element.children[1].tooltip = "Mining speed " .. (1 + game.forces.player.manual_mining_speed_modifier) * 100 .. "%"
element.children[2].caption = "Rocks broken: " .. cave_miner.rocks_broken element.children[2].caption = "Rocks broken: " .. cave_miner.rocks_broken

View File

@ -39,6 +39,7 @@ local function on_player_joined_game(event)
end end
end end
if player.online_time > 0 then return end
for name, count in pairs(Constants.starting_items) do for name, count in pairs(Constants.starting_items) do
player.insert({name = name, count = count}) player.insert({name = name, count = count})
end end
@ -125,9 +126,9 @@ local function init(cave_miner)
local surface = game.surfaces.nauvis local surface = game.surfaces.nauvis
surface.min_brightness = 0.01 surface.min_brightness = 0.01
surface.brightness_visual_weights = {0.99, 0.99, 0.99} surface.brightness_visual_weights = {0.99, 0.99, 0.99}
surface.daytime = 0.42 surface.daytime = 0.43
surface.freeze_daytime = true surface.freeze_daytime = true
surface.solar_power_multiplier = 999 surface.solar_power_multiplier = 5
cave_miner.reveal_queue = {} cave_miner.reveal_queue = {}
cave_miner.rocks_broken = 0 cave_miner.rocks_broken = 0
@ -206,6 +207,9 @@ local function on_init()
game.map_settings.enemy_evolution.destroy_factor = 0 game.map_settings.enemy_evolution.destroy_factor = 0
game.map_settings.enemy_evolution.pollution_factor = 0 game.map_settings.enemy_evolution.pollution_factor = 0
game.map_settings.enemy_evolution.time_factor = 0 game.map_settings.enemy_evolution.time_factor = 0
global.rocks_yield_ore_veins.amount_modifier = 0.25
global.rocks_yield_ore_veins.chance = 756
end end
Event.on_init(on_init) Event.on_init(on_init)

View File

@ -6,6 +6,13 @@ local LootRaffle = require "functions.loot_raffle"
local loot_blacklist = { local loot_blacklist = {
["landfill"] = true, ["landfill"] = true,
["loader"] = true,
["fast-loader"] = true,
["express-loader"] = true,
["wood"] = true,
["raw-fish"] = true,
["discharge-defense-remote"] = true,
["railgun-dart"] = true,
} }
function Public.refresh_offers(market, cave_miner) function Public.refresh_offers(market, cave_miner)

View File

@ -36,7 +36,7 @@ function Public.roll_source_surface()
}, },
} }
local surface = game.create_surface("cave_miner_source", map_gen_settings) local surface = game.create_surface("cave_miner_source", map_gen_settings)
surface.request_to_generate_chunks({x = 0, y = 0}, 2) surface.request_to_generate_chunks({x = 0, y = 0}, 1)
surface.force_generate_chunk_requests() surface.force_generate_chunk_requests()
end end

View File

@ -54,7 +54,8 @@ local function set_raffle()
end end
local function get_amount(position) local function get_amount(position)
local distance_to_center = math.sqrt(position.x^2 + position.y^2) * 4 + 1500 local distance_to_center = math.sqrt(position.x^2 + position.y^2) * 2 + 1500
distance_to_center = distance_to_center * global.rocks_yield_ore_veins.amount_modifier
local m = (75 + math_random(0, 50)) * 0.01 local m = (75 + math_random(0, 50)) * 0.01
return distance_to_center * m return distance_to_center * m
end end
@ -154,6 +155,7 @@ local function on_init()
global.rocks_yield_ore_veins.raffle = {} global.rocks_yield_ore_veins.raffle = {}
global.rocks_yield_ore_veins.mixed_ores = {} global.rocks_yield_ore_veins.mixed_ores = {}
global.rocks_yield_ore_veins.chance = 768 global.rocks_yield_ore_veins.chance = 768
global.rocks_yield_ore_veins.amount_modifier = 1
set_raffle() set_raffle()
end end