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

correct decoratives

This commit is contained in:
danielmartin0 2024-10-01 21:24:09 +01:00 committed by Gerkiz
parent ddfe6207f3
commit 2b2a05c263
15 changed files with 2132 additions and 2110 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1099,13 +1099,20 @@ function Public.default_map_gen_settings(width, height, seed)
['default_enable_all_autoplace_controls'] = true,
['autoplace_settings'] = {
['entity'] = { treat_missing_as_default = false },
['tile'] = { treat_missing_as_default = true },
['decorative'] = { treat_missing_as_default = true },
['tile'] = { treat_missing_as_default = false },
['decorative'] = prototypes.space_location.nauvis.map_gen_settings.autoplace_settings.decorative,
},
['peaceful_mode'] = true,
['property_expression_names'] = {},
}
-- TODO: Remove this code if Wube fixes this 'bug'
for _, decorative in pairs(prototypes.decorative) do
if not map_gen_settings.autoplace_settings.decorative.settings[decorative.name] then
map_gen_settings.autoplace_settings.decorative.settings[decorative.name] = { frequency = 'none' }
end
end
return map_gen_settings
end

View File

@ -1059,7 +1059,7 @@ function Public.reset_crew_and_enemy_force(id)
-- crew_force.technologies['efficiency-module-2'].enabled = false
-- crew_force.technologies['efficiency-module-3'].enabled = false
-- crew_force.technologies['automation-3'].enabled = false
-- crew_force.technologies['rocket-silo'].enabled = false
-- crew_force.technologies['rocket-silo'].enabled = false --Probably need to disable this tech if we're playing on space age
-- crew_force.technologies['space-scienkce-pack'].enabled = false
-- crew_force.technologies['mining-productivity-3'].enabled = false
-- crew_force.technologies['logistics-3'].enabled = true

View File

@ -7,7 +7,7 @@ Public.display_names = { { 'pirates.location_displayname_cave_1' } }
Public.terraingen_frame_width = 640
Public.terraingen_frame_height = 640
Public.static_params_default = {
default_decoratives = true,
decorative_settings = prototypes.space_location.nauvis.map_gen_settings.autoplace_settings.decorative.settings,
base_starting_treasure = 1000,
base_starting_rock_material = 800,
base_starting_wood = 1200,

View File

@ -12,10 +12,10 @@ Public.terraingen_frame_width = 325
Public.terraingen_frame_height = 325
Public.static_params_default = {
starting_time_of_day = 0,
decorative_settings = prototypes.space_location.nauvis.map_gen_settings.autoplace_settings.decorative.settings,
daynightcycletype = 1,
boat_extra_distance_from_shore = 0,
-- boat_extra_distance_from_shore = 0.1 * Common.boat_default_starting_distance_from_shore,
default_decoratives = true,
base_starting_treasure = 2000,
base_starting_rock_material = 800,
base_starting_wood = 2400,

View File

@ -17,7 +17,7 @@ Public.terraingen_frame_height = 896
Public.static_params_default = {
starting_time_of_day = 0,
daynightcycletype = 1,
default_decoratives = true,
decorative_settings = prototypes.space_location.nauvis.map_gen_settings.autoplace_settings.decorative.settings,
base_starting_treasure = 1000,
base_starting_rock_material = 800,
base_starting_wood = 1200,

View File

@ -13,7 +13,7 @@ Public.terraingen_frame_height = 896
Public.static_params_default = {
starting_time_of_day = 0,
daynightcycletype = 1,
default_decoratives = true,
decorative_settings = prototypes.space_location.nauvis.map_gen_settings.autoplace_settings.decorative.settings,
base_starting_treasure = 1000,
base_starting_rock_material = 800,
base_starting_wood = 1200,

View File

@ -19,7 +19,8 @@ Public.static_params_default = {
base_starting_rock_material = 1200,
base_starting_wood = 800,
base_starting_treasure_maps = 1,
default_decoratives = false,
decorative_settings = prototypes.space_location.nauvis.map_gen_settings.autoplace_settings.decorative.settings,
-- decorative_settings = prototypes.space_location.fulgora.map_gen_settings.autoplace_settings.decorative.settings,
}
function Public.base_ores() --here, just for the gui:

View File

@ -16,7 +16,7 @@ Public.terraingen_frame_height = 700
Public.static_params_default = {
starting_time_of_day = 0,
daynightcycletype = 1,
default_decoratives = true,
decorative_settings = prototypes.space_location.nauvis.map_gen_settings.autoplace_settings.decorative.settings,
base_starting_treasure = 0,
base_starting_rock_material = 8600,
base_starting_wood = 600,

View File

@ -79,15 +79,16 @@ function Public.terrain(args)
if noises.mood(p) < 0.1 then
local rng = Math.random()
if rng < 0.0004 then
args.entities[#args.entities + 1] = { name = 'medium-remnants', position = args.p }
args.entities[#args.entities + 1] = { name = 'tesla-turret-remnants', position = args.p }
elseif rng < 0.0007 then
args.entities[#args.entities + 1] = { name = 'spidertron-remnants', position = args.p }
elseif rng < 0.001 then
args.entities[#args.entities + 1] = { name = 'medium-ship-wreck', position = args.p }
args.entities[#args.entities + 1] =
{ name = 'crash-site-spaceship-wreck-medium-1', position = args.p }
elseif rng < 0.0013 then
args.specials[#args.specials + 1] = { name = 'big-ship-wreck-2', position = args.p }
args.specials[#args.specials + 1] = { name = 'crash-site-spaceship-wreck-big-2', position = args.p }
elseif rng < 0.0014 then
args.specials[#args.specials + 1] = { name = 'big-ship-wreck-1', position = args.p }
args.specials[#args.specials + 1] = { name = 'crash-site-spaceship-wreck-big-1', position = args.p }
end
end
end

View File

@ -11,7 +11,7 @@ Public.display_names = { { 'pirates.location_displayname_standard_1' } }
Public.terraingen_frame_width = 896
Public.terraingen_frame_height = 896
Public.static_params_default = {
default_decoratives = true,
decorative_settings = prototypes.space_location.nauvis.map_gen_settings.autoplace_settings.decorative.settings,
base_starting_treasure = 1000,
base_starting_rock_material = 800,
base_starting_wood = 1200,

View File

@ -11,7 +11,7 @@ Public.display_names = { { 'pirates.location_displayname_standard_variant_1' } }
Public.terraingen_frame_width = 896
Public.terraingen_frame_height = 896
Public.static_params_default = {
default_decoratives = true,
decorative_settings = prototypes.space_location.nauvis.map_gen_settings.autoplace_settings.decorative.settings,
base_starting_treasure = 1000,
base_starting_rock_material = 800,
base_starting_wood = 1200,

View File

@ -14,7 +14,7 @@ Public.static_params_default = {
starting_time_of_day = 0.26,
daynightcycletype = 1,
brightness_visual_weights = { 0, 0, 0 },
default_decoratives = true,
decorative_settings = prototypes.space_location.nauvis.map_gen_settings.autoplace_settings.decorative.settings,
base_starting_treasure = 1000,
base_starting_rock_material = 800,
base_starting_wood = 1200,

View File

@ -15,7 +15,8 @@ Public.static_params_default = {
daynightcycletype = 4,
min_brightness = 0.05,
brightness_visual_weights = { 1, 1, 1 }, --almost pitch black
default_decoratives = false,
decorative_settings = prototypes.space_location.nauvis.map_gen_settings.autoplace_settings.decorative.settings,
-- decorative_settings = prototypes.space_location.vulcanus.map_gen_settings.autoplace_settings.decorative.settings,
base_starting_rock_material = 800,
}

View File

@ -765,7 +765,16 @@ function Public.create_surface(destination)
--todo: put into static_params
mgs.autoplace_settings.decorative.treat_missing_as_default = destination.static_params.default_decoratives
if destination.static_params.decorative_settings ~= nil then
mgs.autoplace_settings.decorative = { settings = destination.static_params.decorative_settings }
end
-- TODO: Remove this code if Wube fixes this 'bug'
for _, decorative in pairs(prototypes.decorative) do
if not mgs.autoplace_settings.decorative.settings[decorative.name] then
mgs.autoplace_settings.decorative.settings[decorative.name] = { frequency = 'none' }
end
end
local surface = game.create_surface(surface_name, mgs)