mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-02-15 13:53:09 +02:00
Merge pull request #318 from blubFisch/develop-blub
Cleanup and re-import resource balance
This commit is contained in:
commit
08dea44480
@ -269,6 +269,7 @@ function Public.near_another_town(force_name, position, surface, radius)
|
||||
if entity_force_name ~= nil then
|
||||
if entity_force_name ~= force_name then
|
||||
if blacklist_entity_types[e.type] ~= true then
|
||||
-- find another solution to log, since this fills the logfile.
|
||||
--log('XDB prevent_entity, e.type:' .. e.type)
|
||||
fail = true
|
||||
break
|
||||
|
@ -1,7 +1,6 @@
|
||||
require 'modules.custom_death_messages'
|
||||
require 'modules.flashlight_toggle_button'
|
||||
require 'modules.global_chat_toggle'
|
||||
require 'modules.scrap_towny_ffa.worms_create_oil_patches'
|
||||
require 'modules.biters_yield_coins'
|
||||
require 'maps.scrap_towny_ffa.reset'
|
||||
require 'maps.scrap_towny_ffa.mining'
|
||||
@ -12,6 +11,7 @@ require 'maps.scrap_towny_ffa.market'
|
||||
require 'maps.scrap_towny_ffa.slots'
|
||||
require 'maps.scrap_towny_ffa.wreckage_yields_scrap'
|
||||
require 'maps.scrap_towny_ffa.rocks_yield_ore_veins'
|
||||
require 'maps.scrap_towny_ffa.worms_create_oil_patches'
|
||||
require 'maps.scrap_towny_ffa.spawners_contain_biters'
|
||||
require 'maps.scrap_towny_ffa.explosives_are_explosive'
|
||||
require 'maps.scrap_towny_ffa.fluids_are_explosive'
|
||||
|
@ -116,7 +116,7 @@ local function set_offers(town_center)
|
||||
special_offers[2] = {{}, 'Maximum Backpack upgrades reached!'}
|
||||
end
|
||||
if town_center.upgrades.mining_prod + 1 <= 10 then
|
||||
special_offers[3] = {{{'coin', (town_center.upgrades.mining_prod + 1) * 1000}}, 'Upgrade Mining Productivity +10%'}
|
||||
special_offers[3] = {{{'coin', (town_center.upgrades.mining_prod + 1) * 1000}}, 'Upgrade Mining Productivity +10% (Drills, Pumps, Scrap)'}
|
||||
else
|
||||
special_offers[3] = {{}, 'Maximum Productivity upgrades reached!'}
|
||||
end
|
||||
|
@ -81,14 +81,14 @@ function Public.initialize()
|
||||
local mgs = surface.map_gen_settings
|
||||
mgs.default_enable_all_autoplace_controls = true -- don't mess with this!
|
||||
mgs.autoplace_controls = {
|
||||
coal = {frequency = 'none', size = 1, richness = 'normal'},
|
||||
stone = {frequency = 'none', size = 1, richness = 'normal'},
|
||||
['copper-ore'] = {frequency = 'none', size = 1, richness = 'normal'},
|
||||
['iron-ore'] = {frequency = 'none', size = 1, richness = 'normal'},
|
||||
['uranium-ore'] = {frequency = 'none', size = 1, richness = 'normal'},
|
||||
['crude-oil'] = {frequency = 'very-low', size = 'very-small', richness = 'normal'},
|
||||
trees = {frequency = 2, size = 'normal', richness = 'normal'},
|
||||
['enemy-base'] = {frequency = 'very-high', size = 2, richness = 'normal'}
|
||||
coal = {frequency = 2, size = 0.1, richness = 0.2},
|
||||
stone = {frequency = 2, size = 0.1, richness = 0.2},
|
||||
['copper-ore'] = {frequency = 5, size = 0.1, richness = 0.2},
|
||||
['iron-ore'] = {frequency = 5, size = 0.1, richness = 0.2},
|
||||
['uranium-ore'] = {frequency = 1, size = 0.1, richness = 0.2},
|
||||
['crude-oil'] = {frequency = 5, size = 0.05, richness = 0.5},
|
||||
trees = {frequency = 2, size = 1, richness = 1},
|
||||
['enemy-base'] = {frequency = 2, size = 2, richness = 1}
|
||||
}
|
||||
mgs.autoplace_settings = {
|
||||
entity = {
|
||||
|
@ -42,7 +42,7 @@ local function set_raffle()
|
||||
end
|
||||
|
||||
local function get_amount()
|
||||
return math_random(100, 1000)
|
||||
return math_random(20, 200)
|
||||
end
|
||||
|
||||
local function draw_chain(surface, count, ore, ore_entities, ore_positions)
|
||||
@ -193,7 +193,7 @@ local function on_player_mined_entity(event)
|
||||
if not valid_entities[event.entity.name] then
|
||||
return
|
||||
end
|
||||
if math_random(1, rocks_yield_ore_veins.chance) ~= 1 then
|
||||
if math_random(1, rocks_yield_ore_veins.chance) ~= 1 and not ScenarioTable.get('testing_mode') then
|
||||
return
|
||||
end
|
||||
ore_vein(event)
|
||||
|
@ -828,8 +828,8 @@ local function kill_force(force_name, cause)
|
||||
game.print('>> ' .. town_name .. ' has fallen to ' .. killer_town_center.town_name .. '!', {255, 255, 0})
|
||||
end
|
||||
else
|
||||
Server.to_discord_embed(town_name .. ' has fallen!')
|
||||
game.print('>> ' .. town_name .. ' has fallen!', {255, 255, 0})
|
||||
Server.to_discord_embed(town_name .. ' has fallen to the biters!')
|
||||
game.print('>> ' .. town_name .. ' has fallen to the biters!', {255, 255, 0})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -141,7 +141,8 @@ local function on_player_mined_entity(event)
|
||||
|
||||
local scrap = scrap_raffle[math.random(1, size_of_scrap_raffle)]
|
||||
|
||||
local amount_bonus = (game.forces.enemy.evolution_factor * 2) + (game.forces.player.mining_drill_productivity_bonus * 2)
|
||||
local scrap_amount_modifier = 3
|
||||
local amount_bonus = scrap_amount_modifier * (game.forces.enemy.evolution_factor * 2) + (game.forces.player.mining_drill_productivity_bonus * 2)
|
||||
local amount
|
||||
if entity_loot_amounts[scrap] <= 0 then
|
||||
amount = math.abs(entity_loot_amounts[scrap])
|
||||
|
Loading…
x
Reference in New Issue
Block a user