136 lines
5.8 KiB
Lua
136 lines
5.8 KiB
Lua
|
return function(Baseless)
|
||
|
Baseless.Make.PollutionSettings = function()
|
||
|
return {
|
||
|
enabled = Baseless.Data.bool,
|
||
|
diffusion_ratio = Baseless.Data.double,
|
||
|
min_to_diffuse = Baseless.Data.double,
|
||
|
ageing = Baseless.Data.double,
|
||
|
expected_max_per_chunk = Baseless.Data.double,
|
||
|
min_to_show_per_chunk = Baseless.Data.double,
|
||
|
min_pollution_to_damage_trees = Baseless.Data.double,
|
||
|
pollution_with_max_forest_damage = Baseless.Data.double,
|
||
|
pollution_restored_per_tree_damage = Baseless.Data.double,
|
||
|
pollution_per_tree_damage = Baseless.Data.double,
|
||
|
max_pollution_to_restore_trees = Baseless.Data.double,
|
||
|
enemy_attack_pollution_consumption_modifier = Baseless.Data.double,
|
||
|
}
|
||
|
end
|
||
|
|
||
|
Baseless.Make.StateSteeringSettings = function()
|
||
|
return {
|
||
|
radius = Baseless.Data.double,
|
||
|
separation_factor = Baseless.Data.double,
|
||
|
separation_force = Baseless.Data.double,
|
||
|
force_unit_fuzzy_goto_behavior = Baseless.Data.bool,
|
||
|
}
|
||
|
end
|
||
|
|
||
|
Baseless.Make.SteeringSettings = function()
|
||
|
return {
|
||
|
default = Baseless.Make.StateSteeringSettings(),
|
||
|
moving = Baseless.Make.StateSteeringSettings(),
|
||
|
}
|
||
|
end
|
||
|
|
||
|
Baseless.Make.EnemyEvolutionSettings = function()
|
||
|
return {
|
||
|
enabled = Baseless.Data.bool,
|
||
|
time_factor = Baseless.Data.double,
|
||
|
destroy_factor = Baseless.Data.double,
|
||
|
pollution_factor = Baseless.Data.double,
|
||
|
}
|
||
|
end
|
||
|
|
||
|
Baseless.Make.EnemyExpansionSettings = function()
|
||
|
return {
|
||
|
enabled = Baseless.Data.bool,
|
||
|
max_expansion_distance = Baseless.Data.uint32,
|
||
|
friendly_base_influence_radius = Baseless.Data.uint32,
|
||
|
enemy_building_influence_radius = Baseless.Data.uint32,
|
||
|
building_coefficient = Baseless.Data.double,
|
||
|
other_base_coefficient = Baseless.Data.double,
|
||
|
neighbouring_chunk_coefficient = Baseless.Data.double,
|
||
|
neighbouring_base_chunk_coefficient = Baseless.Data.double,
|
||
|
max_colliding_tiles_coefficient = Baseless.Data.double,
|
||
|
settler_group_min_size = Baseless.Data.uint32,
|
||
|
settler_group_max_size = Baseless.Data.uint32,
|
||
|
min_expansion_cooldown = Baseless.Data.uint32,
|
||
|
max_expansion_cooldown = Baseless.Data.uint32,
|
||
|
}
|
||
|
end
|
||
|
|
||
|
Baseless.Make.UnitGroupSettings = function()
|
||
|
return {
|
||
|
min_group_gathering_time = Baseless.Data.uint32,
|
||
|
max_group_gathering_time = Baseless.Data.uint32,
|
||
|
max_wait_time_for_late_members = Baseless.Data.uint32,
|
||
|
max_group_radius = Baseless.Data.double,
|
||
|
min_group_radius = Baseless.Data.double,
|
||
|
max_member_speedup_when_behind = Baseless.Data.double,
|
||
|
max_member_slowdown_when_ahead = Baseless.Data.double,
|
||
|
max_group_slowdown_factor = Baseless.Data.double,
|
||
|
max_group_member_fallback_factor = Baseless.Data.double,
|
||
|
member_disown_distance = Baseless.Data.double,
|
||
|
tick_tolerance_when_member_arrives = Baseless.Data.uint32,
|
||
|
max_gathering_unit_groups = Baseless.Data.uint32,
|
||
|
max_unit_group_size = Baseless.Data.uint32,
|
||
|
}
|
||
|
end
|
||
|
|
||
|
Baseless.Make.PathFinderSettings = function()
|
||
|
return {
|
||
|
fwd2bwd_ratio = Baseless.Data.fwd2bwd_ratio,
|
||
|
goal_pressure_ratio = Baseless.Data.double,
|
||
|
use_path_cache = Baseless.Data.bool,
|
||
|
max_steps_worked_per_tick = Baseless.Data.double,
|
||
|
max_work_done_per_tick = Baseless.Data.uint32,
|
||
|
short_cache_size = Baseless.Data.uint32,
|
||
|
long_cache_size = Baseless.Data.uint32,
|
||
|
short_cache_min_cacheable_distance = Baseless.Data.double,
|
||
|
short_cache_min_algo_steps_to_cache = Baseless.Data.uint32,
|
||
|
long_cache_min_cacheable_distance = Baseless.Data.double,
|
||
|
cache_max_connect_to_cache_steps_multiplier = Baseless.Data.uint32,
|
||
|
cache_accept_path_start_distance_ratio = Baseless.Data.double,
|
||
|
cache_accept_path_end_distance_ratio = Baseless.Data.double,
|
||
|
negative_cache_accept_path_start_distance_ratio = Baseless.Data.double,
|
||
|
negative_cache_accept_path_end_distance_ratio = Baseless.Data.double,
|
||
|
cache_path_start_distance_rating_multiplier = Baseless.Data.double,
|
||
|
cache_path_end_distance_rating_multiplier = Baseless.Data.double,
|
||
|
stale_enemy_with_same_destination_collision_penalty = Baseless.Data.double,
|
||
|
ignore_moving_enemy_collision_distance = Baseless.Data.double,
|
||
|
enemy_with_different_destination_collision_penalty = Baseless.Data.double,
|
||
|
general_entity_collision_penalty = Baseless.Data.double,
|
||
|
general_entity_subsequent_collision_penalty = Baseless.Data.double,
|
||
|
extended_collision_penalty = Baseless.Data.double,
|
||
|
max_clients_to_accept_any_new_request = Baseless.Data.uint32,
|
||
|
max_clients_to_accept_short_new_request = Baseless.Data.uint32,
|
||
|
direct_distance_to_consider_short_request = Baseless.Data.uint32,
|
||
|
short_request_max_steps = Baseless.Data.uint32,
|
||
|
short_request_ratio = Baseless.Data.double,
|
||
|
min_steps_to_check_path_find_termination = Baseless.Data.uint32,
|
||
|
start_to_goal_cost_multiplier_to_terminate_path_find = Baseless.Data.double,
|
||
|
overload_levels = Baseless.Data.array,
|
||
|
overload_multipliers = Baseless.Data.array,
|
||
|
negative_path_cache_delay_interval = Baseless.Data.double,
|
||
|
}
|
||
|
end
|
||
|
|
||
|
Baseless.Make.DifficultySettings = function()
|
||
|
return {
|
||
|
recipe_difficulty = defines.difficulty_settings.recipe_difficulty.normal,
|
||
|
technology_difficulty = defines.difficulty_settings.technology_difficulty.normal,
|
||
|
}
|
||
|
end
|
||
|
|
||
|
Baseless.Make.Gen("_Proto", "map-settings", {
|
||
|
pollution = Baseless.Make.PollutionSettings(),
|
||
|
steering = Baseless.Make.SteeringSettings(),
|
||
|
enemy_evolution = Baseless.Make.EnemyEvolutionSettings(),
|
||
|
enemy_expansion = Baseless.Make.EnemyExpansionSettings(),
|
||
|
unit_group = Baseless.Make.UnitGroupSettings(),
|
||
|
path_finder = Baseless.Make.PathFinderSettings(),
|
||
|
max_failed_behavior_count = Baseless.Data.uint32,
|
||
|
difficulty_settings = Baseless.Make.DifficultySettings(),
|
||
|
})
|
||
|
end
|