diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..73c5516 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +charset = utf-8 +trim_trailing_whitespace = false +insert_final_newline = false \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..73e8c49 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +.gitignore export-ignore +.gitattributes export-ignore + +* text=auto +* text eol=lf + +*.png binary +*.jpg binary +*.ogg binary \ No newline at end of file diff --git a/.gitignore b/.gitignore index 6fd0a37..8976197 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ luac.out *.x86_64 *.hex +.vscode/ diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..0da1ad4 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,1597 @@ +------------------------------------------------------------------------------- +--[LICENSE]-- +------------------------------------------------------------------------------- +-- .luacheckrc +-- This file is free and unencumbered software released into the public domain. +-- +-- Anyone is free to copy, modify, publish, use, compile, sell, or +-- distribute this file, either in source code form or as a compiled +-- binary, for any purpose, commercial or non-commercial, and by any +-- means. +-- +-- In jurisdictions that recognize copyright laws, the author or authors +-- of this file dedicate any and all copyright interest in the +-- software to the public domain. We make this dedication for the benefit +-- of the public at large and to the detriment of our heirs and +-- successors. We intend this dedication to be an overt act of +-- relinquishment in perpetuity of all present and future rights to this +-- software under copyright law. +-- +-- THE FILE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +-- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +-- IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +-- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +-- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +-- OTHER DEALINGS IN THE SOFTWARE. +-- +-- For more information, please refer to +-- ]] + +-- Current Factorio Version 0.17.0, luacheck version 0.23.0 + +------------------------------------------------------------------------------- +--[Set Defaults]-- +------------------------------------------------------------------------------- +local LINE_LENGTH = false -- It is 2017 limits on length are a waste +local IGNORE = {'21./%w+_$', '21./^_%w+$', '213/[ijk]', '213/index', '213/key'} +local NOT_GLOBALS = {'coroutine', 'io', 'socket', 'dofile', 'loadfile'} -- These globals are not available to the factorio API + +local STD_CONTROL = 'lua52c+factorio+factorio_control+stdlib+factorio_defines' +local STD_DATA = 'lua52c+factorio+factorio_data+stdlib+stdlib_data+factorio_defines' +local STD_LOVE = 'luajit+love+love_extra+stdlib+stdlib_data' + +-- In a perfect world these would be STD_DATA and STD_CONTROL (mostly) +local STD_BASE_DATA = 'lua52c+factorio+factorio_data+factorio_defines+factorio_base_data' +local STD_BASE_CONTROL = 'lua52c+factorio+factorio_control+factorio_defines+factorio_base_control' + +------------------------------------------------------------------------------- +--[Assume Factorio Control stage as default]-- +------------------------------------------------------------------------------- +std = STD_CONTROL +max_line_length = LINE_LENGTH + +not_globals = NOT_GLOBALS +ignore = IGNORE +quiet = 1 -- pass -q option +max_cyclomatic_complexity = 75 +codes = true + +--List of files and directories to exclude +exclude_files = { + --Ignore special folders + '**/.*/*', --Ignore if path starts with . + '**/stdlib/vendor/', + '**/*WIP/', + + --Ignore development mods + '**/combat-tester/', + '**/test-maker/', + '**/trailer/', + + --Ignore love Includes + '**/love/includes/' +} + +------------------------------------------------------------------------------- +--[Mod Prototypes]-- +------------------------------------------------------------------------------- +--Set default prototype files +files['**/data.lua'].std = STD_DATA +files['**/data-updates.lua'].std = STD_DATA +files['**/data-final-fixes.lua'].std = STD_DATA +files['**/settings.lua'].std = STD_DATA +files['**/settings-updates.lua'].std = STD_DATA +files['**/settings-final-fixes.lua'].std = STD_DATA +files['**/prototypes/'].std = STD_DATA +files['**/settings/'].std = STD_DATA +files['**/love/'] = {std = STD_LOVE, globals = {'coroutine', 'io', 'socket', 'dofile', 'loadfile'}} + +------------------------------------------------------------------------------- +--[Base]-- +------------------------------------------------------------------------------- +--Find and replace ignores *.cfg, migrations, *.txt, control.lua, *.json, trailer, scenarios, campaigns, *.glsl + +local base_scenarios = { + std = STD_BASE_CONTROL .. '+factorio_base_scenarios+factorio_base_story', + --ignore = {'212/event', '111', '112', '113', '211', '212', '213', '311', '411', '412', '421', '422', '423', '431', '432', '512'} + ignore = {'...'} +} +files['**/base/scenarios/'] = base_scenarios +files['**/base/tutorials/'] = base_scenarios +files['**/base/campaigns/'] = base_scenarios +files['**/wip-scenario/'] = base_scenarios + +files['**/base/migrations/'] = {std = STD_BASE_CONTROL} + +files['**/core/lualib/'] = {std = STD_BASE_CONTROL} +files['**/core/lualib/util.lua'] = {globals = {'util', 'table'}, ignore = {'432/object'}} +files['**/core/lualib/silo-script.lua'] = {globals = {'silo_script'}, ignore = {'4../player'}} +files['**/core/lualib/production-score.lua'] = {globals = {'production_score', 'get_price_recursive'}, ignore = {'4../player'}} +files['**/core/lualib/story*'] = {std = '+factorio_base_story', ignore = {'42./k', '42./filter'}} +files['**/core/lualib/mod-gui.lua'] = {globals = {'mod_gui'}} +files['**/core/lualib/camera.lua'] = {globals = {'camera'}} +files['**/core/lualib/builder.lua'] = {globals = {'Builder', 'builder', 'action', 'down', 'right'}} + +files['**/core/lualib/bonus-gui-ordering/'] = {std = STD_BASE_DATA} +files['**/core/lualib/dataloader.lua'] = {globals = {'data'}} +files['**/core/lualib/circuit-connector-*'] = {std = STD_BASE_DATA..'+factorio_circuit_connector_generated'} +files['**/core/lualib/bonus-gui-ordering.lua'] = {globals = {'bonus_gui_ordering'}} + +files['**/base/prototypes/'] = {std = STD_BASE_DATA} +files['**/core/prototypes/'] = {std = STD_BASE_DATA} +files['**/core/prototypes/noise-programs.lua'] = {ignore = {'212/x', '212/y', '212/tile', '212/map'}} + +--(( stdlib ))-- +local stdlib_control = { + std = 'lua52c+factorio+factorio_control+stdlib+factorio_defines', + max_line_length = LINE_LENGTH +} + +local stdlib_data = { + std = 'lua52c+factorio+factorio_data+stdlib+factorio_defines', + max_line_length = LINE_LENGTH +} + +-- Assume control stage for stdlib +files['**/stdlib/'] = stdlib_control + +-- Assume generic content for stdlib utils +files['**/stdlib/utils/**'].std = 'lua52c+stdlib' + +-- STDLIB data files +files['**/stdlib/data/'] = stdlib_data + +-- STDLIB Busted Spec +files['**/spec/**'] = { + globals = {'serpent', 'log', 'SLOG', 'RESET'}, + std = 'lua52c+busted+factorio_defines+factorio_control+stdlib' +} --)) + +--(( Factorio ))-- +stds.factorio = { + --Set the read only variables + read_globals = { + -- @log@: Gives writing access to Factorio's logger instance. + "log", + -- @serpent@: Lua serializer and pretty printer. (https://github.com/pkulchenko/serpent) + "serpent", + -- @table_size@: Returns the number of elements inside an LUA table + "table_size", + util = { + fields = { + "by_pixel", "distance", "findfirstentity", "positiontostr", "formattime", "moveposition", "oppositedirection", + "ismoduleavailable", "multiplystripes", "format_number", "increment", "color", "conditional_return", + "add_shift", "merge", "premul_color", "encode", "decode", "insert_safe", + table = { + fields = { + "compare", "deepcopy" + }, + }, + }, + }, + table = { + fields = { + "compare", "deepcopy" + }, + }, + }, +} + +stds.factorio_control = { + read_globals = { + + -- @commands@: + commands = { + fields = { + "add_command", "commands", "game_commands", "remove_command" + }, + }, + + -- @settings@: + settings = { + fields = { + "get_player_settings", + startup = {read_only = false, other_fields = true}, + global = {read_only = false, other_fields = true}, + player = {read_only = false, other_fields = true}, + }, + }, + + -- @script@: Provides an interface for registering event handlers. + -- (http://lua-api.factorio.com/latest/LuaBootstrap.html) + script = { + fields = { + "on_event", "on_nth_tick", "on_configuration_changed", "on_init", "on_load", "generate_event_name", + "raise_event", "get_event_handler", "mod_name", "get_event_order" + }, + other_fields = false, + }, + + -- @remote@: Allows inter-mod communication by providing a repository of interfaces that is shared by all mods. + -- (http://lua-api.factorio.com/latest/LuaRemote.html) + remote = { + fields = { + interfaces = {read_only = false, other_fields = true}, + "add_interface", "remove_interface", "call" + }, + read_only = true, + other_fields = false, + }, + + rcon = { + fields = {'print'} + }, + + rendering = { + other_fields = false, + read_only = true, + fields = { + 'draw_animation', + 'draw_line', + 'draw_text', + 'draw_circle', + 'draw_rectangle', + 'draw_arc', + 'draw_polygon', + 'draw_sprite', + 'draw_light', + 'destroy', + 'is_font_valid', + 'is_valid', + 'get_all_ids', + 'clear', + 'get_type', + 'get_surface', + 'get_time_to_live', + 'set_time_to_live', + 'get_forces', + 'set_forces', + 'get_players', + 'set_players', + 'get_color', + 'set_color', + 'get_width', + 'set_width', + 'get_from', + 'set_from', + 'get_to', + 'set_to', + 'get_gap_amount', + 'set_gap_amount', + 'get_gap_length', + 'set_gap_length', + 'get_target', + 'set_target', + 'get_orientation', + 'set_orientation', + 'get_scale', + 'set_scale', + 'get_text', + 'set_text', + 'get_font', + 'set_font', + 'get_alignment', + 'set_alignment', + 'get_scale_with_zoom', + 'set_scale_with_zoom', + 'get_filled', + 'set_filled', + 'get_radius', + 'set_radius', + 'get_left_top', + 'set_left_top', + 'get_right_bottom', + 'set_right_bottom', + 'get_max_radius', + 'set_max_radius', + 'get_min_radius', + 'set_min_radius', + 'get_start_angle', + 'set_start_angle', + 'get_angle', + 'set_angle', + 'get_vertices', + 'set_vertices', + 'get_sprite', + 'set_sprite', + 'get_x_scale', + 'set_x_scale', + 'get_y_scale', + 'set_y_scale', + 'get_render_layer', + 'set_render_layer', + 'get_orientation_target', + 'set_orientation_target', + 'get_oriented_offset', + 'set_oriented_offset', + 'get_intensity', + 'set_intensity', + 'get_minimum_darkness', + 'set_minimum_darkness' + } + }, + + -- @game@: Main object through which most of the API is accessed. + -- It is, however, not available inside handlers registered with @script.on_load@. + -- (http://lua-api.factorio.com/latest/LuaGameScript.html) + game ={ + other_fields = false, + read_only = false, + fields = { + "auto_save", + "ban_player", + "check_consistency", + "check_prototype_translations", + "count_pipe_groups", + "create_force", + "create_profiler", + "create_random_generator", + "get_surface", + "create_surface", + "delete_surface", + "desync_players", + "direction_to_string", + "disable_replay", + "disable_tips_and_tricks", + "draw_resource_selection", + "force_crc", + "get_active_entities_count", + "get_entity_by_tag", + "get_map_exchange_string", + "get_player", + "help", + "is_demo", + "is_multiplayer", + "is_valid_sound_path", + "json_to_table", + "kick_player", + "merge_forces", + "mute_player", + "play_sound", + "print", + "print_stack_size", + "purge_player", + "regenerate_entity", + "reload_mods", + "reload_script", + "remove_offline_players", + "remove_path", + "save_atlas", + "server_save", + "set_game_state", + "show_message_dialog", + "table_to_json", + "take_screenshot", + "take_technology_screenshot", + "unban_player", + "unmute_player", + "write_file", + "get_filtered_entity_prototypes", + "get_filtered_item_prototypes", + "get_filtered_equipment_prototypes", + "get_filtered_mod_setting_prototypes", + "get_filtered_achievement_prototypes", + + active_mods = {read_only = true, other_fields = true}, + ammo_category_prototypes = {read_only = true, other_fields = true}, + autoplace_control_prototypes = {read_only = true, other_fields = true}, + backer_names = {read_only = true, other_fields = true}, + connected_players = {read_only = true, other_fields = true}, + custom_input_prototypes = {read_only = true, other_fields = true}, + damage_prototypes = {read_only = true, other_fields = true}, + decorative_prototypes = {read_only = true, other_fields = true}, + default_map_gen_settings = {read_only = true, other_fields = true}, + difficulty = {read_only = true, other_fields = true}, + difficulty_settings = {read_only = true, other_fields = true}, + enemy_has_vision_on_land_mines = {read_only = false, other_fields = false}, + entity_prototypes = {read_only = true, other_fields = true}, + equipment_grid_prototypes = {read_only = true, other_fields = true}, + equipment_prototypes = {read_only = true, other_fields = true}, + finished = {read_only = true, other_fields = true}, + fluid_prototypes = {read_only = true, other_fields = true}, + forces = {read_only = true, other_fields = true}, + item_prototypes = {read_only = true, other_fields = true}, + map_settings = {read_only = true, other_fields = true}, + mod_setting_prototypes = {read_only = true, other_fields = true}, + noise_layer_prototypes = {read_only = true, other_fields = true}, + permissions = {read_only = true, other_fields = true}, + player = {read_only = true, other_fields = true}, + players = {read_only = true, other_fields = true}, + recipe_prototypes = {read_only = true, other_fields = true}, + speed = {read_only = false, other_fields = false}, + styles = {read_only = true, other_fields = true}, + surfaces = {read_only = true, other_fields = true}, + technology_prototypes = {read_only = true, other_fields = true}, + tick = {read_only = true, other_fields = true}, + tick_paused = {read_only = false, other_fields = false}, + ticks_played = {read_only = true, other_fields = true}, + ticks_to_run = {read_only = false, other_fields = false}, + tile_prototypes = {read_only = true, other_fields = true}, + virtual_signal_prototypes = {read_only = true, other_fields = true}, + pollution_statistics = {read_only = true, other_fields = true} + }, + }, + }, + + globals = { + -- @global@: The global dictionary, useful for storing data persistent across a save-load cycle. + -- Writing access is given to the mod-id field (for mod-wise saved data). + -- (http://lua-api.factorio.com/latest/Global.html) + "global", + + -- @MOD@: Keep it organized, use this variable for anything that "NEEDS" to be global for some reason. + "MOD" + }, +} + +stds.factorio_data = { + + read_globals = { + data = { + fields = { + raw = { + other_fields = true, + read_only = false + }, + "extend", "is_demo" + }, + }, + + settings = { + fields = { + "startup", "global", "player", + }, + }, + + --Popular mods + angelsmods = { + other_fields = true + }, + + bobmods = { + other_fields = true + }, + + mods = { + other_fields = true + } + } +} --)) + +--(( Factorio Globals are bad mkay ))-- +stds.factorio_base_control = { + read_globals = {"silo_script", "mod_gui", "camera"} +} + +stds.factorio_base_scenarios = { + globals = { + "check_automate_science_packs_advice", "check_research_hints", "check_supplies", "manage_attacks", "all_dead", + "on_win", "difficulty_number", "init_attack_data", "handle_attacks", "count_items_in_container", "progress", "scanned", + "check_light", "check_machine_gun", "level", "story_table", + + "tightspot_prices", "tightspot_make_offer", "tightspot_init", "tightspot_get_required_balance", + "tightspot_init_level", "tightspot_init_spending_frame", "tightspot_init_progress_frame", "tightspot_update_progress", "tightspot_update_spending", + "tightspot_get_missing_to_win", "tightspot_sell_back", "tightspot_start_level", "tightspot_show_level_description", "tightspot_update_speed_label", + "map_ignore", "tightspot_check_level", "land_price", + + "transport_belt_madness_init", "transport_belt_madness_init_level", "transport_belt_madness_create_chests", "transport_belt_madness_fill_chests", + "transport_belt_madness_start_level", "map_ignore", "map_clear", "map_load", "map_save", "transport_belt_madness_show_level_description", + "transport_belt_madness_check_level", "transport_belt_madness_next_level", "transport_belt_madness_clear_level", "transport_belt_madness_contains_next_level", + + "restricted", "check_built_items", "result", "disable_combat_technologies", "apply_character_modifiers", "apply_combat_modifiers", "apply_balance", + "load_config", "starting_area_constant", "create_next_surface", "end_round", "prepare_next_round", "silo_died","choose_joining_gui", + "destroy_joining_guis", "create_random_join_gui", "create_auto_assign_gui", "create_pick_join_gui", "create_config_gui", "make_config_table", "default", + "make_team_gui", "make_team_gui_config", "add_team_button_press", "trash_team_button_press", "remove_team_from_team_table", "add_team_to_team_table", + "set_teams_from_gui", "on_team_button_press", "make_color_dropdown", "create_balance_option", "create_disable_frame", "disable_frame", "parse_disabled_items", + "set_balance_settings", "config_confirm", "parse_config_from_gui", "get_color", "roll_starting_area", "delete_roll_surfaces", "auto_assign", + "destroy_config_for_all", "prepare_map", "set_evolution_factor", "update_players_on_team_count", "random_join", "init_player_gui", + "destroy_player_gui", "objective_button_press", "admin_button_press", "admin_frame_button_press", "diplomacy_button_press", "update_diplomacy_frame", + "diplomacy_frame_button_press", "team_changed_diplomacy", "diplomacy_check_press", "get_stance", "give_inventory", "setup_teams", "disable_items_for_all", + "set_random_team", "set_diplomacy", "create_spawn_positions", "set_spawn_position", "set_team_together_spawns", "chart_starting_area_for_force_spawns", + "check_starting_area_chunks_are_generated", "check_player_color", "check_round_start", "clear_starting_area_enemies", "check_no_rush_end", "check_no_rush_players", + "finish_setup", "chart_area_for_force", "setup_start_area_copy", "update_copy_progress", "update_progress_bar", "copy_paste_starting_area_tiles", + "copy_paste_starting_area_entities", "create_silo_for_force", "setup_research", "on_chunk_generated", "get_distance_to_nearest_spawn", + "create_wall_for_force", "fpn", "give_items", "create_item_frame", "create_technologies_frame", "create_cheat_frame", "create_day_frame", + "time_modifier", "points_per_second_start", "points_per_second_level_subtract", "levels", "update_info", "get_time_left", "update_time_left", + "on_joined", "make_frame", "update_frame", "update_table", "calculate_task_item_multiplayer", "setup_config", "select_from_probability_table", + "select_inventory", "select_equipment", "select_challange_type", "save_round_statistics", "start_challenge", "create_teams", "set_areas", + "decide_player_team", "set_teams", "refresh_leaderboard", "set_player", "generate_technology_list", "generate_research_task","setup_unlocks", + "check_technology_progress", "generate_production_task", "generate_shopping_list_task", "set_gui_flow_table", "create_visibility_button", + "check_item_lists", "update_task_gui", "check_end_of_round", "end_round_gui_update", "try_to_check_victory", "update_gui", "check_start_round", + "check_start_set_areas", "check_start_setting_entities", "check_set_areas", "check_clear_areas", "check_chests", "check_chests_shopping_list", + "check_chests_production", "check_input_chests", "fill_input_chests", "check_victory", "shopping_task_finished", "calculate_force_points", + "update_research_task_table", "update_production_task_table", "update_shopping_list_task_table", "create_joined_game_gui", "pre_ending_round", + "player_ending_prompt", "update_end_timer", "update_begin_timer", "team_finished", "save_points_list", "give_force_players_points", + "update_winners_list", "set_spectator", "set_character", "give_starting_inventory", "give_equipment", "shuffle_table", "format_time", + "spairs", "fill_leaderboard", "create_grid", "simple_entities", "save_map_data", "clear_map", "create_tiles", "recreate_entities", + "map_sets", "give_points", "init_forces", "init_globals", "init_unit_settings", "check_next_wave", "next_wave", "calculate_wave_power", + "wave_end", "make_next_spawn_tick", "check_spawn_units", "get_wave_units", "spawn_units", "randomize_ore", "set_command", "command_straglers", + "unit_config", "make_next_wave_tick", "time_to_next_wave", "time_to_wave_end", "rocket_died", "unit_died", "get_bounty_price", "setup_waypoints", + "insert_items", "give_starting_equipment", "give_spawn_equipment", "next_round_button_visible", "gui_init", "create_wave_frame", "create_money_frame", + "create_upgrade_gui", "update_upgrade_listing", "upgrade_research", "get_upgrades", "get_money", "update_connected_players", "update_round_number", + "set_research", "set_recipes", "check_deconstruction", "check_blueprint_placement", "loop_entities", "experiment_items", + "setup", "story_gui_click", "clear_surface", "add_run_trains_button", "puzzle_condition", "basic_signals", + "loop_trains", "Y_offset", "ghosts_1", "ghosts_2", "required_path", "through_wall_path", "count", "check_built_real_rail", + "current_ghosts_count", "other", "rails", "set_rails", "straight_section", "late_entities", "entities", "stop", + "get_spawn_coordinate", + + --tutorials + "intermission", "create_entities_on_tick", "on_player_created", "required_count", "non_player_entities", "clear_rails", + "chest", "damage", "furnace", "init_prototypes", "build_infi_table", "junk", "update_player_tags", "time_left", "team_production", + "create_task_frame", "create_visibilty_buttons", "update_leaderboard", "in_in_area" + } +} + +stds.factorio_base_data = { + globals = { + --Style + "make_cursor_box", "make_full_cursor_box", + "default_container_padding", "default_orange_color", "default_light_orange_color", "warning_red_color", + "achievement_green_color", "achievement_tan_color", "orangebuttongraphcialset", "bluebuttongraphcialset", + "bonus_gui_ordering", "trivial_smoke", "technology_slot_base_width", "technology_slot_base_height", "default_frame_font_vertical_compensation", + + --Belts + "transport_belt_connector_frame_sprites", "transport_belt_circuit_wire_connection_point", "transport_belt_circuit_wire_max_distance", + "transport_belt_circuit_connector_sprites", "ending_patch_prototype", "basic_belt_horizontal", "basic_belt_vertical", + "basic_belt_ending_top", "basic_belt_ending_bottom", "basic_belt_ending_side", "basic_belt_starting_top", "basic_belt_starting_bottom", + "basic_belt_starting_side", "fast_belt_horizontal", "fast_belt_vertical", "fast_belt_ending_top", "fast_belt_ending_bottom", + "fast_belt_ending_side", "fast_belt_starting_top", "fast_belt_starting_bottom", "fast_belt_starting_side", "express_belt_horizontal", + "express_belt_vertical", "express_belt_ending_top", "express_belt_ending_bottom", "express_belt_ending_side", "express_belt_starting_top", + "express_belt_starting_bottom", "express_belt_starting_side", + + --Circuit Connectors + "circuit_connector_definitions", "default_circuit_wire_max_distance", "inserter_circuit_wire_max_distance", + "universal_connector_template", "belt_connector_template", "belt_frame_connector_template", "inserter_connector_template", + + --Inserter Circuit Connectors + "inserter_circuit_wire_max_distance", "inserter_default_stack_control_input_signal", + + --Sounds/beams + "make_heavy_gunshot_sounds", "make_light_gunshot_sounds", "make_laser_sounds", + + --Gun/Laser + "gun_turret_extension", "gun_turret_extension_shadow", "gun_turret_extension_mask", "gun_turret_attack", + "laser_turret_extension", "laser_turret_extension_shadow", "laser_turret_extension_mask", + + --Pipes + "pipecoverspictures", "pipepictures", "assembler2pipepictures", "assembler3pipepictures", "make_heat_pipe_pictures", + + --Combinators + "generate_arithmetic_combinator", "generate_decider_combinator", "generate_constant_combinator", + + --Rail + "destroyed_rail_pictures", "rail_pictures", "rail_pictures_internal", "standard_train_wheels", "drive_over_tie", + "rolling_stock_back_light", "rolling_stock_stand_by_light", + + --Enemies + "make_enemy_autoplace", "make_enemy_spawner_autoplace", "make_enemy_worm_autoplace", + "make_spitter_attack_animation", "make_spitter_run_animation", "make_spitter_dying_animation", + "make_spitter_attack_parameters", "make_spitter_roars", "make_spitter_dying_sounds", + "make_spawner_idle_animation", "make_spawner_die_animation", + "make_biter_run_animation", "make_biter_attack_animation", "make_biter_die_animation", + "make_biter_roars", "make_biter_dying_sounds", "make_biter_calls", + "make_worm_roars", "make_worm_dying_sounds", "make_worm_folded_animation", "make_worm_preparing_animation", + "make_worm_prepared_animation", "make_worm_attack_animation", "make_worm_die_animation", + + --Other + "tile_variations_template", "make_water_autoplace_settings", + "make_unit_melee_ammo_type", "make_trivial_smoke", "make_4way_animation_from_spritesheet", "flying_robot_sounds", + "productivitymodulelimitation", "crash_trigger", "capsule_smoke", "make_beam", "playeranimations", + "make_blood_tint", "make_shadow_tint", + + --tiles + "water_transition_template", "make_water_transition_template", "water_autoplace_settings", "water_tile_type_names", + "patch_for_inner_corner_of_transition_between_transition", + } +} + +stds.factorio_base_story = { + globals = { + "story_init_helpers", "story_update_table", "story_init", "story_update", "story_on_tick", "story_add_update", + "story_remove_update", "story_jump_to", "story_elapsed", "story_elapsed_check", "story_show_message_dialog", + "set_goal", "player_set_goal", "on_player_joined", "flash_goal", "set_info", "player_set_info", "export_entities", + "list", "recreate_entities", "entity_to_connect", "limit_camera", "find_gui_recursive", "enable_entity_export", + "add_button", "on_gui_click", "set_continue_button_style", "add_message_log", "story_add_message_log", + "player_add_message_log", "message_log_frame", "message_log_scrollpane", "message_log_close_button", + "message_log_table", "toggle_message_log_button", "toggle_objective_button", "message_log_init", + "add_gui_recursive", "add_toggle_message_log_button", "add_toggle_objective_button", "mod_gui", + "flash_message_log_button", "flash_message_log_on_tick", "story_gui_click", "story_points_by_name", "story_branches", + "player", "surface", "deconstruct_on_tick", "recreate_entities_on_tick", "flying_congrats", "story_table" + } +} + +stds.factorio_circuit_connector_generated = { + globals = { + 'default_circuit_wire_max_distance', 'circuit_connector_definitions', 'universal_connector_template', + 'belt_connector_template', 'belt_frame_connector_template', 'inserter_connector_template', 'inserter_connector_template', + 'inserter_circuit_wire_max_distance', 'inserter_default_stack_control_input_signal', 'transport_belt_connector_frame_sprites', + 'transport_belt_circuit_wire_max_distance', + } +} --)) + +--(( STDLIB ))-- +stds.stdlib = { + read_globals = { + }, + globals = { + "STDLIB", + "prequire", "rawtostring", "traceback", "inspect", "serpent", "inline_if", "install", "log", + "concat", + "GAME", "AREA", "POSITION", "TILE", "SURFACE", "CHUNK", "COLOR", "ENTITY", "INVENTORY", + "RESOURCE", "CONFIG", "LOGGER", "QUEUE", "EVENT", "GUI", "PLAYER", "FORCE", + "MATH", "STRING", "TABLE", + } +} + +stds.stdlib_control = { +} + +stds.stdlib_data = { + globals = { + 'DATA', 'RECIPE', 'ITEM', 'FLUID', 'ENTITY', 'TECHNOLOGY', 'CATEGORY' + } +} --)) + +--(( FACTORIO DEFINES ))-- +stds.factorio_defines = { + read_globals = { + defines = { + fields = { + alert_type = { + fields = { + 'custom', + 'entity_destroyed', + 'entity_under_attack', + 'no_material_for_construction', + 'no_storage', + 'not_enough_construction_robots', + 'not_enough_repair_packs', + 'train_out_of_fuel', + 'turret_fire', + 'fluid_mixing' + } + }, + behavior_result = { + fields = { + 'deleted', + 'fail', + 'in_progress', + 'success' + } + }, + build_check_type = { + fields = { + 'ghost_place', + 'ghost_revive', + 'manual', + 'script' + } + }, + chain_signal_state = { + fields = { + 'all_open', + 'none', + 'none_open', + 'partially_open' + } + }, + chunk_generated_status = { + fields = { + 'basic_tiles', + 'corrected_tiles', + 'custom_tiles', + 'entities', + 'nothing', + 'tiles' + } + }, + circuit_condition_index = { + fields = { + 'arithmetic_combinator', + 'constant_combinator', + 'decider_combinator', + 'inserter_circuit', + 'inserter_logistic', + 'lamp', + 'offshore_pump', + 'pump' + } + }, + circuit_connector_id = { + fields = { + 'accumulator', + 'combinator_input', + 'combinator_output', + 'constant_combinator', + 'container', + 'electric_pole', + 'inserter', + 'lamp', + 'offshore_pump', + 'programmable_speaker', + 'pump', + 'rail_chain_signal', + 'rail_signal', + 'roboport', + 'storage_tank', + 'wall' + } + }, + command = { + fields = { + 'attack', + 'attack_area', + 'build_base', + 'compound', + 'flee', + 'go_to_location', + 'group', + 'stop', + 'wander' + } + }, + compound_command = { + fields = { + 'logical_and', + 'logical_or', + 'return_last' + } + }, + control_behavior = { + fields = { + inserter = { + fields = { + circuit_mode_of_operation = { + fields = { + 'enable_disable', + 'none', + 'read_hand_contents', + 'set_filters', + 'set_stack_size' + } + }, + hand_read_mode = { + fields = { + 'hold', + 'pulse' + } + } + } + }, + lamp = { + fields = { + circuit_mode_of_operation = { + fields = { + 'use_colors' + } + } + } + }, + logistic_container = { + fields = { + circuit_mode_of_operation = { + fields = { + 'send_contents', + 'set_requests' + } + } + } + }, + mining_drill = { + fields = { + resource_read_mode = { + fields = { + 'entire_patch', + 'this_miner' + } + } + } + }, + roboport = { + fields = { + circuit_mode_of_operation = { + fields = { + 'read_logistics', + 'read_robot_stats' + } + } + } + }, + train_stop = { + fields = { + circuit_mode_of_operation = { + fields = { + 'enable_disable', + 'read_from_train', + 'read_stopped_train', + 'send_to_train' + } + } + } + }, + transport_belt = { + fields = { + content_read_mode = { + fields = { + 'hold', + 'pulse' + } + } + } + }, + type = { + fields = { + 'accumulator', + 'arithmetic_combinator', + 'constant_combinator', + 'container', + 'decider_combinator', + 'generic_on_off', + 'inserter', + 'lamp', + 'logistic_container', + 'mining_drill', + 'programmable_speaker', + 'rail_chain_signal', + 'rail_signal', + 'roboport', + 'storage_tank', + 'train_stop', + 'transport_belt', + 'wall' + } + } + } + }, + controllers = { + fields = { + 'character', + 'cutscene', + 'editor', + 'ghost', + 'god', + 'spectator' + } + }, + deconstruction_item = { + fields = { + entity_filter_mode = { + fields = { + 'blacklist', + 'whitelist' + } + }, + tile_filter_mode = { + fields = { + 'blacklist', + 'whitelist' + } + }, + tile_selection_mode = { + fields = { + 'always', + 'never', + 'normal', + 'only' + } + } + } + }, + difficulty = { + fields = { + 'easy', + 'hard', + 'normal' + } + }, + difficulty_settings = { + fields = { + recipe_difficulty = { + fields = { + 'expensive', + 'normal' + } + }, + technology_difficulty = { + fields = { + 'expensive', + 'normal' + } + } + } + }, + direction = { + fields = { + 'east', + 'north', + 'northeast', + 'northwest', + 'south', + 'southeast', + 'southwest', + 'west' + } + }, + distraction = { + fields = { + 'by_anything', + 'by_damage', + 'by_enemy', + 'none' + } + }, + entity_status = { + fields = { + 'working', + 'no_power', + 'no_fuel', + 'no_recipe', + 'no_input_fluid', + 'no_research_in_progress', + 'no_minable_resources', + 'low_input_fluid', + 'low_power', + 'disabled_by_control_behavior', + 'disabled_by_script', + 'fluid_ingredient_shortage', + 'fluid_production_overload', + 'item_ingredient_shortage', + 'item_production_overload', + 'marked_for_deconstruction', + 'missing_required_fluid', + 'missing_science_packs', + 'waiting_for_source_items', + 'waiting_for_space_in_destination', + } + }, + render_mode = { + fields = { + 'game', + 'chart', + 'chart_zoomed_in' + } + }, + events = { + fields = { + 'on_ai_command_completed', + 'on_area_cloned', + 'on_biter_base_built', + 'on_built_entity', + 'on_cancelled_deconstruction', + 'on_cancelled_upgrade', + 'on_character_corpse_expired', + 'on_chart_tag_added', + 'on_chart_tag_modified', + 'on_chart_tag_removed', + 'on_chunk_charted', + 'on_chunk_deleted', + 'on_chunk_generated', + 'on_combat_robot_expired', + 'on_console_chat', + 'on_console_command', + 'on_cutscene_waypoint_reached', + 'on_difficulty_settings_changed', + 'on_entity_cloned', + 'on_entity_damaged', + 'on_entity_died', + 'on_entity_renamed', + 'on_entity_settings_pasted', + 'on_entity_spawned', + 'on_force_created', + 'on_forces_merged', + 'on_forces_merging', + 'on_game_created_from_scenario', + 'on_gui_checked_state_changed', + 'on_gui_click', + 'on_gui_closed', + 'on_gui_confirmed', + 'on_gui_elem_changed', + 'on_gui_location_changed', + 'on_gui_opened', + 'on_gui_selected_tab_changed', + 'on_gui_selection_state_changed', + 'on_gui_switch_state_changed', + 'on_gui_text_changed', + 'on_gui_value_changed', + 'on_land_mine_armed', + 'on_lua_shortcut', + 'on_marked_for_deconstruction', + 'on_marked_for_upgrade', + 'on_market_item_purchased', + 'on_mod_item_opened', + 'on_picked_up_item', + 'on_player_alt_selected_area', + 'on_player_ammo_inventory_changed', + 'on_player_armor_inventory_changed', + 'on_player_banned', + 'on_player_built_tile', + 'on_player_cancelled_crafting', + 'on_player_changed_force', + 'on_player_changed_position', + 'on_player_changed_surface', + 'on_player_cheat_mode_disabled', + 'on_player_cheat_mode_enabled', + 'on_player_configured_blueprint', + 'on_player_crafted_item', + 'on_player_created', + 'on_player_cursor_stack_changed', + 'on_player_deconstructed_area', + 'on_player_demoted', + 'on_player_died', + 'on_player_display_resolution_changed', + 'on_player_display_scale_changed', + 'on_player_driving_changed_state', + 'on_player_dropped_item', + 'on_player_fast_transferred', + 'on_player_gun_inventory_changed', + 'on_player_joined_game', + 'on_player_kicked', + 'on_player_left_game', + 'on_player_main_inventory_changed', + 'on_player_mined_entity', + 'on_player_mined_item', + 'on_player_mined_tile', + 'on_player_muted', + 'on_player_pipette', + 'on_player_placed_equipment', + 'on_player_promoted', + 'on_player_removed', + 'on_player_removed_equipment', + 'on_player_repaired_entity', + 'on_player_respawned', + 'on_player_rotated_entity', + 'on_player_selected_area', + 'on_player_setup_blueprint', + 'on_player_toggled_alt_mode', + 'on_player_toggled_map_editor', + 'on_player_tool_inventory_changed', + 'on_player_trash_inventory_changed', + 'on_player_unbanned', + 'on_player_unmuted', + 'on_player_used_capsule', + 'on_post_entity_died', + 'on_pre_chunk_deleted', + 'on_pre_entity_settings_pasted', + 'on_pre_ghost_deconstructed', + 'on_pre_player_crafted_item', + 'on_pre_player_died', + 'on_pre_player_left_game', + 'on_pre_player_mined_item', + 'on_pre_player_removed', + 'on_pre_robot_exploded_cliff', + 'on_pre_surface_cleared', + 'on_pre_surface_deleted', + 'on_put_item', + 'on_research_finished', + 'on_research_started', + 'on_resource_depleted', + 'on_robot_built_entity', + 'on_robot_built_tile', + 'on_robot_exploded_cliff', + 'on_robot_mined', + 'on_robot_mined_entity', + 'on_robot_mined_tile', + 'on_robot_pre_mined', + 'on_rocket_launch_ordered', + 'on_rocket_launched', + 'on_runtime_mod_setting_changed', + 'on_script_path_request_finished', + 'on_sector_scanned', + 'on_selected_entity_changed', + 'on_surface_cleared', + 'on_surface_created', + 'on_surface_deleted', + 'on_surface_imported', + 'on_surface_renamed', + 'on_technology_effects_reset', + 'on_tick', + 'on_train_changed_state', + 'on_train_created', + 'on_train_schedule_changed', + 'on_trigger_created_entity', + 'on_trigger_fired_artillery', + 'on_unit_added_to_group', + 'on_unit_group_created', + 'on_unit_removed_from_group', + 'script_raised_built', + 'script_raised_destroy', + 'script_raised_revive' + } + }, + flow_precision_index = { + fields = { + 'fifty_hours', + 'one_hour', + 'one_minute', + 'one_second', + 'one_thousand_hours', + 'ten_hours', + 'ten_minutes', + 'two_hundred_fifty_hours' + } + }, + group_state = { + fields = { + 'attacking_distraction', + 'attacking_target', + 'finished', + 'gathering', + 'moving' + } + }, + gui_type = { + fields = { + 'achievement', + 'blueprint_library', + 'bonus', + 'controller', + 'custom', + 'entity', + 'equipment', + 'item', + 'kills', + 'logistic', + 'none', + 'other_player', + 'permissions', + 'player_management', + 'production', + 'research', + 'server_management', + 'trains', + 'tutorials' + } + }, + input_action = { + fields = { + 'activate_copy', + 'activate_cut', + 'activate_paste', + 'add_permission_group', + 'add_train_station', + 'admin_action', + 'alt_select_area', + 'alt_select_blueprint_entities', + 'alternative_copy', + 'begin_mining', + 'begin_mining_terrain', + 'build_item', + 'build_rail', + 'build_terrain', + 'cancel_craft', + 'cancel_deconstruct', + 'cancel_new_blueprint', + 'cancel_research', + 'cancel_upgrade', + 'change_active_item_group_for_crafting', + 'change_active_item_group_for_filters', + 'change_active_quick_bar', + 'change_arithmetic_combinator_parameters', + 'change_blueprint_book_record_label', + 'change_decider_combinator_parameters', + 'change_item_label', + 'change_multiplayer_config', + 'change_picking_state', + 'change_programmable_speaker_alert_parameters', + 'change_programmable_speaker_circuit_parameters', + 'change_programmable_speaker_parameters', + 'change_riding_state', + 'change_shooting_state', + 'change_single_blueprint_record_label', + 'change_train_stop_station', + 'change_train_wait_condition', + 'change_train_wait_condition_data', + 'clean_cursor_stack', + 'clear_selected_blueprint', + 'clear_selected_deconstruction_item', + 'clear_selected_upgrade_item', + 'connect_rolling_stock', + 'copy', + 'copy_entity_settings', + 'craft', + 'create_blueprint_like', + 'cursor_split', + 'cursor_transfer', + 'custom_input', + 'cycle_blueprint_book_backwards', + 'cycle_blueprint_book_forwards', + 'deconstruct', + 'delete_blueprint_library', + 'delete_blueprint_record', + 'delete_custom_tag', + 'delete_permission_group', + 'destroy_opened_item', + 'disconnect_rolling_stock', + 'drag_train_schedule', + 'drag_train_wait_condition', + 'drop_blueprint_record', + 'drop_item', + 'drop_to_blueprint_book', + 'edit_custom_tag', + 'edit_permission_group', + 'export_blueprint', + 'fast_entity_split', + 'fast_entity_transfer', + 'go_to_train_station', + 'grab_blueprint_record', + 'gui_checked_state_changed', + 'gui_click', + 'gui_confirmed', + 'gui_elem_changed', + 'gui_location_changed', + 'gui_selected_tab_changed', + 'gui_selection_state_changed', + 'gui_switch_state_changed', + 'gui_text_changed', + 'gui_value_changed', + 'import_blueprint', + 'import_blueprint_string', + 'import_permissions_string', + 'inventory_split', + 'inventory_transfer', + 'launch_rocket', + 'map_editor_action', + 'market_offer', + 'mod_settings_changed', + 'open_achievements_gui', + 'open_blueprint_library_gui', + 'open_blueprint_record', + 'open_bonus_gui', + 'open_character_gui', + 'open_equipment', + 'open_gui', + 'open_item', + 'open_kills_gui', + 'open_logistic_gui', + 'open_mod_item', + 'open_production_gui', + 'open_technology_gui', + 'open_train_gui', + 'open_train_station_gui', + 'open_trains_gui', + 'open_tutorials_gui', + 'paste_entity_settings', + 'place_equipment', + 'quick_bar_pick_slot', + 'quick_bar_set_selected_page', + 'quick_bar_set_slot', + 'remove_cables', + 'remove_train_station', + 'reset_assembling_machine', + 'rotate_entity', + 'select_area', + 'select_blueprint_entities', + 'select_entity_slot', + 'select_item', + 'select_mapper_slot', + 'select_next_valid_gun', + 'select_tile_slot', + 'set_auto_launch_rocket', + 'set_autosort_inventory', + 'set_behavior_mode', + 'set_car_weapons_control', + 'set_circuit_condition', + 'set_circuit_mode_of_operation', + 'set_deconstruction_item_tile_selection_mode', + 'set_deconstruction_item_trees_and_rocks_only', + 'set_entity_color', + 'set_entity_energy_property', + 'set_filter', + 'set_heat_interface_mode', + 'set_heat_interface_temperature', + 'set_infinity_container_filter_item', + 'set_infinity_container_remove_unfiltered_items', + 'set_infinity_pipe_filter', + 'set_inserter_max_stack_size', + 'set_inventory_bar', + 'set_logistic_filter_item', + 'set_logistic_filter_signal', + 'set_logistic_trash_filter_item', + 'set_request_from_buffers', + 'set_research_finished_stops_game', + 'set_signal', + 'set_single_blueprint_record_icon', + 'set_splitter_priority', + 'set_train_stopped', + 'setup_assembling_machine', + 'setup_blueprint', + 'setup_single_blueprint_record', + 'smart_pipette', + 'stack_split', + 'stack_transfer', + 'start_repair', + 'start_research', + 'start_walking', + 'switch_connect_to_logistic_network', + 'switch_constant_combinator_state', + 'switch_inserter_filter_mode_state', + 'switch_power_switch_state', + 'switch_to_rename_stop_gui', + 'take_equipment', + 'toggle_deconstruction_item_entity_filter_mode', + 'toggle_deconstruction_item_tile_filter_mode', + 'toggle_driving', + 'toggle_enable_vehicle_logistics_while_moving', + 'toggle_equipment_movement_bonus', + 'toggle_map_editor', + 'toggle_personal_roboport', + 'toggle_show_entity_info', + 'undo', + 'upgrade', + 'upgrade_opened_blueprint', + 'use_artillery_remote', + 'use_item', + 'wire_dragging', + 'write_to_console' + } + }, + inventory = { + fields = { + 'artillery_turret_ammo', + 'artillery_wagon_ammo', + 'assembling_machine_input', + 'assembling_machine_modules', + 'assembling_machine_output', + 'beacon_modules', + 'burnt_result', + 'car_ammo', + 'car_trunk', + 'cargo_wagon', + 'character_corpse', + 'chest', + 'editor_main', + 'editor_guns', + 'editor_ammo', + 'editor_armor', + 'fuel', + 'furnace_modules', + 'furnace_result', + 'furnace_source', + 'god_main', + 'item_main', + 'lab_input', + 'lab_modules', + 'mining_drill_modules', + 'character_ammo', + 'character_armor', + 'character_guns', + 'character_main', + 'character_trash', + 'character_vehicle', + 'roboport_material', + 'roboport_robot', + 'robot_cargo', + 'robot_repair', + 'rocket', + 'rocket_silo_result', + 'rocket_silo_rocket', + 'turret_ammo' + } + }, + logistic_member_index = { + fields = { + 'character_provider', + 'character_requester', + 'character_storage', + 'generic_on_off_behavior', + 'logistic_container', + 'vehicle_storage' + } + }, + logistic_mode = { + fields = { + 'active_provider', + 'buffer', + 'none', + 'passive_provider', + 'requester', + 'storage' + } + }, + mouse_button_type = { + fields = { + 'left', + 'middle', + 'none', + 'right' + } + }, + rail_connection_direction = { + fields = { + 'left', + 'none', + 'right', + 'straight' + } + }, + rail_direction = { + fields = { + 'back', + 'front' + } + }, + riding = { + fields = { + acceleration = { + fields = { + 'accelerating', + 'braking', + 'nothing', + 'reversing' + } + }, + direction = { + fields = { + 'left', + 'right', + 'straight' + } + } + } + }, + shooting = { + fields = { + 'not_shooting', + 'shooting_enemies', + 'shooting_selected' + } + }, + signal_state = { + fields = { + 'closed', + 'open', + 'reserved', + 'reserved_by_circuit_network' + } + }, + train_state = { + fields = { + 'arrive_signal', + 'arrive_station', + 'manual_control', + 'manual_control_stop', + 'no_path', + 'no_schedule', + 'on_the_path', + 'path_lost', + 'wait_signal', + 'wait_station' + } + }, + transport_line = { + fields = { + 'left_line', + 'left_split_line', + 'left_underground_line', + 'right_line', + 'right_split_line', + 'right_underground_line', + 'secondary_left_line', + 'secondary_left_split_line', + 'secondary_right_line', + 'secondary_right_split_line' + } + }, + wire_connection_id = { + fields = { + 'electric_pole', + 'power_switch_left', + 'power_switch_right' + } + }, + wire_type = { + fields = { + 'copper', + 'green', + 'red' + } + }, + -- Defines additional modules + color = { + other_fields = true + }, + anticolor = { + other_fields = true + }, + lightcolor = { + other_fields = true + }, + time = { + fields = { + 'second', + 'minute', + 'hour', + 'day', + 'week', + 'month', + 'year' + } + } + } + } + } +}--)) + +stds.love_extra = { + read_globals = { + love = { + fields = { + arg = { + fields = { + 'parseGameArguments', 'parseOption', 'getLow', 'optionIndices', 'options' + } + } + } + } + }, + globals = { + --'coroutine', 'io', 'socket', 'dofile', 'loadfile', + love = { + fields = { + 'handlers' + } + } + } +} + +--[[ Options + "ignore", "std", "globals", "unused_args", "self", "compat", "global", "unused", "redefined", + "unused_secondaries", "allow_defined", "allow_defined_top", "module", + "read_globals", "new_globals", "new_read_globals", "enable", "only", "not_globals", + "max_line_length", "max_code_line_length", "max_string_line_length", "max_comment_line_length", + "max_cyclomatic_complexity" +--]] + +--[[ Warnings list + -- 011 A syntax error. + -- 021 An invalid inline option. + -- 022 An unpaired inline push directive. + -- 023 An unpaired inline pop directive. + -- 111 Setting an undefined global variable. + -- 112 Mutating an undefined global variable. + -- 113 Accessing an undefined global variable. + -- 121 Setting a read-only global variable. + -- 122 Setting a read-only field of a global variable. + -- 131 Unused implicitly defined global variable. + -- 142 Setting an undefined field of a global variable. + -- 143 Accessing an undefined field of a global variable. + -- 211 Unused local variable. + -- 212 Unused argument. + -- 213 Unused loop variable. + -- 221 Local variable is accessed but never set. + -- 231 Local variable is set but never accessed. + -- 232 An argument is set but never accessed. + -- 233 Loop variable is set but never accessed. + -- 241 Local variable is mutated but never accessed. + -- 311 Value assigned to a local variable is unused. + -- 312 Value of an argument is unused. + -- 313 Value of a loop variable is unused. + -- 314 Value of a field in a table literal is unused. + -- 321 Accessing uninitialized local variable. + -- 331 Value assigned to a local variable is mutated but never accessed. + -- 341 Mutating uninitialized local variable. + -- 411 Redefining a local variable. + -- 412 Redefining an argument. + -- 413 Redefining a loop variable. + -- 421 Shadowing a local variable. + -- 422 Shadowing an argument. + -- 423 Shadowing a loop variable. + -- 431 Shadowing an upvalue. + -- 432 Shadowing an upvalue argument. + -- 433 Shadowing an upvalue loop variable. + -- 511 Unreachable code. + -- 512 Loop can be executed at most once. + -- 521 Unused label. + -- 531 Left-hand side of an assignment is too short. + -- 532 Left-hand side of an assignment is too long. + -- 541 An empty do end block. + -- 542 An empty if branch. + -- 551 An empty statement. + -- 611 A line consists of nothing but whitespace. + -- 612 A line contains trailing whitespace. + -- 613 Trailing whitespace in a string. + -- 614 Trailing whitespace in a comment. + -- 621 Inconsistent indentation (SPACE followed by TAB). + -- 631 Line is too long. +--]] \ No newline at end of file diff --git a/LICENSE b/LICENSE index 670154e..7e451ef 100644 --- a/LICENSE +++ b/LICENSE @@ -1,116 +1,407 @@ -CC0 1.0 Universal - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator and -subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for the -purpose of contributing to a commons of creative, cultural and scientific -works ("Commons") that the public can reliably and without fear of later -claims of infringement build upon, modify, incorporate in other works, reuse -and redistribute as freely as possible in any form whatsoever and for any -purposes, including without limitation commercial purposes. These owners may -contribute to the Commons to promote the ideal of a free culture and the -further production of creative, cultural and scientific works, or to gain -reputation or greater distribution for their Work in part through the use and -efforts of others. - -For these and/or other purposes and motivations, and without any expectation -of additional consideration or compensation, the person associating CC0 with a -Work (the "Affirmer"), to the extent that he or she is an owner of Copyright -and Related Rights in the Work, voluntarily elects to apply CC0 to the Work -and publicly distribute the Work under its terms, with knowledge of his or her -Copyright and Related Rights in the Work and the meaning and intended legal -effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not limited -to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, communicate, - and translate a Work; - - ii. moral rights retained by the original author(s) and/or performer(s); - - iii. publicity and privacy rights pertaining to a person's image or likeness - depicted in a Work; - - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - - v. rights protecting the extraction, dissemination, use and reuse of data in - a Work; - - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation thereof, - including any amended or successor version of such directive); and - - vii. other similar, equivalent or corresponding rights throughout the world - based on applicable law or treaty, and any national implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention of, -applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and -unconditionally waives, abandons, and surrenders all of Affirmer's Copyright -and Related Rights and associated claims and causes of action, whether now -known or unknown (including existing as well as future claims and causes of -action), in the Work (i) in all territories worldwide, (ii) for the maximum -duration provided by applicable law or treaty (including future time -extensions), (iii) in any current or future medium and for any number of -copies, and (iv) for any purpose whatsoever, including without limitation -commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes -the Waiver for the benefit of each member of the public at large and to the -detriment of Affirmer's heirs and successors, fully intending that such Waiver -shall not be subject to revocation, rescission, cancellation, termination, or -any other legal or equitable action to disrupt the quiet enjoyment of the Work -by the public as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason be -judged legally invalid or ineffective under applicable law, then the Waiver -shall be preserved to the maximum extent permitted taking into account -Affirmer's express Statement of Purpose. In addition, to the extent the Waiver -is so judged Affirmer hereby grants to each affected person a royalty-free, -non transferable, non sublicensable, non exclusive, irrevocable and -unconditional license to exercise Affirmer's Copyright and Related Rights in -the Work (i) in all territories worldwide, (ii) for the maximum duration -provided by applicable law or treaty (including future time extensions), (iii) -in any current or future medium and for any number of copies, and (iv) for any -purpose whatsoever, including without limitation commercial, advertising or -promotional purposes (the "License"). The License shall be deemed effective as -of the date CC0 was applied by Affirmer to the Work. Should any part of the -License for any reason be judged legally invalid or ineffective under -applicable law, such partial invalidity or ineffectiveness shall not -invalidate the remainder of the License, and in such case Affirmer hereby -affirms that he or she will not (i) exercise any of his or her remaining -Copyright and Related Rights in the Work or (ii) assert any associated claims -and causes of action with respect to the Work, in either case contrary to -Affirmer's express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - - b. Affirmer offers the Work as-is and makes no representations or warranties - of any kind concerning the Work, express, implied, statutory or otherwise, - including without limitation warranties of title, merchantability, fitness - for a particular purpose, non infringement, or the absence of latent or - other defects, accuracy, or the present or absence of errors, whether or not - discoverable, all to the greatest extent permissible under applicable law. - - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without limitation - any person's Copyright and Related Rights in the Work. Further, Affirmer - disclaims responsibility for obtaining any necessary consents, permissions - or other rights required for any use of the Work. - - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to this - CC0 or use of the Work. - -For more information, please see - +Attribution-NonCommercial 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-NonCommercial 4.0 International Public +License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-NonCommercial 4.0 International Public License ("Public +License"). To the extent this Public License may be interpreted as a +contract, You are granted the Licensed Rights in consideration of Your +acceptance of these terms and conditions, and the Licensor grants You +such rights in consideration of benefits the Licensor receives from +making the Licensed Material available under these terms and +conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + d. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + e. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + f. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + g. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + h. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + i. NonCommercial means not primarily intended for or directed towards + commercial advantage or monetary compensation. For purposes of + this Public License, the exchange of the Licensed Material for + other material subject to Copyright and Similar Rights by digital + file-sharing or similar means is NonCommercial provided there is + no payment of monetary compensation in connection with the + exchange. + + j. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + k. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + l. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part, for NonCommercial purposes only; and + + b. produce, reproduce, and Share Adapted Material for + NonCommercial purposes only. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties, including when + the Licensed Material is used other than for NonCommercial + purposes. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's + License You apply must not prevent recipients of the Adapted + Material from complying with this Public License. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database for NonCommercial purposes + only; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 0000000..e25c595 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,85 @@ +--------------------------------------------------------------------------------------------------- +Version: 1.1.0 +Date: 2020-11-24 + Changes: + - Added support for 1.1.0 + - Cloned technology icons changed from 128 to 256 + - If a mod has changed the fast_replaceable_group for the vanila entity use it +--------------------------------------------------------------------------------------------------- +Version: 1.0.2 +Date: 21. 11. 2020 + Changes : + - Updates to fast replaceable groups + +--------------------------------------------------------------------------------------------------- +Version: 1.0.1 +Date: 13. 09. 2020 + Changes : + - Updated icons so they so up correctly in update planner + +--------------------------------------------------------------------------------------------------- +Version: 1.0.0 +Date: 07. 09. 2020 + Changes : + - Updated icons to 64x64, matching vanilla +--------------------------------------------------------------------------------------------------- +Version: 0.4.2 +Date: 15. 02. 2020 + Fixes : + - Fixes substation mk3 wire length and supply area + - Fixes normal graphics with mk2/mk3 big power poles +--------------------------------------------------------------------------------------------------- +Version: 0.4.1 +Date: 31. 01. 2020 + Changes : + - General code refactor + - If a mod has set fast_replaceable_group for a technology family lets use it too + Fixes : + - Cleared icon_mipmaps warnings, until FE+ graphics are updated +--------------------------------------------------------------------------------------------------- +Version: 0.4.0 +Date: 21. 01. 2020 + Changes : + - Support 0.18 +--------------------------------------------------------------------------------------------------- +Version: 0.3.0 +Date: 30. 12. 2019 + Changes : + - Added thumbnail + - Reordered changelog.txt +--------------------------------------------------------------------------------------------------- +Version: 0.2.5 +Date: 09. 07. 2019 + Changes : + - Removing loop for setting accumulators collision box and fast replacable group. + - Breaks being able to use upgrade planner to go from vanilla accumulators to FE+ accumulators +--------------------------------------------------------------------------------------------------- +Version: 0.2.4 +Date: 07. 01. 2019 + Changes : + - Added check for bobpower and not update vanilla solar panel collision if installed, this mainly because of 0.17.53 update +--------------------------------------------------------------------------------------------------- +Version: 0.2.3 +Date: 03. 29. 2019 + Changes : + - Renamed "electric-energy-accumulators-1" to "electric-energy-accumulators" because factorio 0.17.23 changed this +--------------------------------------------------------------------------------------------------- +Version: 0.2.2 +Date: 03. 10. 2019 + Changes : + - Changing effectivity to 1 to match base game +--------------------------------------------------------------------------------------------------- +Version: 0.2.1 +Date: 03. 03. 2019 + Changes : + - Updating graphics and properties +--------------------------------------------------------------------------------------------------- +Version: 0.2.0 +Date: 03. 01. 2019 + Changes : + - Updating to work with 0.17 +--------------------------------------------------------------------------------------------------- +Version: 0.1.3 +Date: 03. 30. 2018 + Changes : + - Re-balancing science diff --git a/constant.lua b/constant.lua new file mode 100644 index 0000000..8676838 --- /dev/null +++ b/constant.lua @@ -0,0 +1,6 @@ +local Constant = {} + +Constant.green_tint = {r = 0.4, g = 0.804, b = 0.667} +Constant.blue_tint = {r = 0.690, g = 0.75, b = 1} + +return Constant diff --git a/data-updates.lua b/data-updates.lua new file mode 100644 index 0000000..c482056 --- /dev/null +++ b/data-updates.lua @@ -0,0 +1,95 @@ +-- accumulator +if not data.raw["accumulator"]["accumulator"].fast_replaceable_group then + data.raw["accumulator"]["accumulator"].fast_replaceable_group = "accumulator" + data.raw["accumulator"]["accumulator-mk2"].fast_replaceable_group = "accumulator" + data.raw["accumulator"]["accumulator-mk3"].fast_replaceable_group = "accumulator" +else + data.raw["accumulator"]["accumulator-mk2"].fast_replaceable_group = data.raw["accumulator"]["accumulator"].fast_replaceable_group + data.raw["accumulator"]["accumulator-mk3"].fast_replaceable_group = data.raw["accumulator"]["accumulator"].fast_replaceable_group +end + +if not data.raw["accumulator"]["accumulator"].next_upgrade then + data.raw["accumulator"]["accumulator"].next_upgrade = "accumulator-mk2" +end + +-- medium-electric-pole +if not data.raw["electric-pole"]["medium-electric-pole"].fast_replaceable_group then + data.raw["electric-pole"]["medium-electric-pole"].fast_replaceable_group = "medium-electric-pole" + data.raw["electric-pole"]["medium-electric-pole-mk2"].fast_replaceable_group = "medium-electric-pole" + data.raw["electric-pole"]["medium-electric-pole-mk3"].fast_replaceable_group = "medium-electric-pole" +else + data.raw["electric-pole"]["medium-electric-pole-mk2"].fast_replaceable_group = data.raw["electric-pole"]["medium-electric-pole"].fast_replaceable_group + data.raw["electric-pole"]["medium-electric-pole-mk3"].fast_replaceable_group = data.raw["electric-pole"]["medium-electric-pole"].fast_replaceable_group +end + +if not data.raw["electric-pole"]["medium-electric-pole"].next_upgrade then + data.raw["electric-pole"]["medium-electric-pole"].next_upgrade = "medium-electric-pole-mk2" +end + +-- big-electric-pole +if not data.raw["electric-pole"]["big-electric-pole"].fast_replaceable_group then + data.raw["electric-pole"]["big-electric-pole"].fast_replaceable_group = "big-electric-pole" + data.raw["electric-pole"]["big-electric-pole-mk2"].fast_replaceable_group = "big-electric-pole" + data.raw["electric-pole"]["big-electric-pole-mk3"].fast_replaceable_group = "big-electric-pole" +else + data.raw["electric-pole"]["big-electric-pole-mk2"].fast_replaceable_group = data.raw["electric-pole"]["big-electric-pole"].fast_replaceable_group + data.raw["electric-pole"]["big-electric-pole-mk3"].fast_replaceable_group = data.raw["electric-pole"]["big-electric-pole"].fast_replaceable_group +end + +if not data.raw["electric-pole"]["big-electric-pole"].next_upgrade then + data.raw["electric-pole"]["big-electric-pole"].next_upgrade = "big-electric-pole-mk2" +end + +-- substation +if not data.raw["electric-pole"]["substation"].fast_replaceable_group then + data.raw["electric-pole"]["substation"].fast_replaceable_group = "electric-pole-2x2" + data.raw["electric-pole"]["substation-mk2"].fast_replaceable_group = "electric-pole-2x2" + data.raw["electric-pole"]["substation-mk3"].fast_replaceable_group = "electric-pole-2x2" +else + data.raw["electric-pole"]["substation-mk2"].fast_replaceable_group = data.raw["electric-pole"]["substation"].fast_replaceable_group + data.raw["electric-pole"]["substation-mk3"].fast_replaceable_group = data.raw["electric-pole"]["substation"].fast_replaceable_group +end +if not data.raw["electric-pole"]["substation"].next_upgrade then + data.raw["electric-pole"]["substation"].next_upgrade = "substation-mk2" +end + +-- boiler +if not data.raw["boiler"]["boiler"].fast_replaceable_group then + data.raw["boiler"]["boiler"].fast_replaceable_group = "boiler" + data.raw["boiler"]["boiler-mk2"].fast_replaceable_group = "boiler" + data.raw["boiler"]["boiler-mk3"].fast_replaceable_group = "boiler" +else + data.raw["boiler"]["boiler-mk2"].fast_replaceable_group = data.raw["boiler"]["boiler"].fast_replaceable_group + data.raw["boiler"]["boiler-mk3"].fast_replaceable_group = data.raw["boiler"]["boiler"].fast_replaceable_group +end + +if not data.raw["boiler"]["boiler"].next_upgrade then + data.raw["boiler"]["boiler"].next_upgrade = "boiler-mk2" +end + +-- steam-engine +if not data.raw["generator"]["steam-engine"].fast_replaceable_group then + data.raw["generator"]["steam-engine"].fast_replaceable_group = "steam-engine" + data.raw["generator"]["steam-engine-mk2"].fast_replaceable_group = "steam-engine" + data.raw["generator"]["steam-engine-mk3"].fast_replaceable_group = "steam-engine" +else + data.raw["generator"]["steam-engine-mk2"].fast_replaceable_group = data.raw["generator"]["steam-engine"].fast_replaceable_group + data.raw["generator"]["steam-engine-mk3"].fast_replaceable_group = data.raw["generator"]["steam-engine"].fast_replaceable_group +end +if not data.raw["generator"]["steam-engine"].next_upgrade then + data.raw["generator"]["steam-engine"].next_upgrade = "steam-engine-mk2" +end + +-- solar-panel +if not data.raw["solar-panel"]["solar-panel"].fast_replaceable_group then + data.raw["solar-panel"]["solar-panel"].fast_replaceable_group = "solar-panel" + data.raw["solar-panel"]["solar-panel-mk2"].fast_replaceable_group = "solar-panel" + data.raw["solar-panel"]["solar-panel-mk3"].fast_replaceable_group = "solar-panel" +else + data.raw["solar-panel"]["solar-panel-mk2"].fast_replaceable_group = data.raw["solar-panel"]["solar-panel"].fast_replaceable_group + data.raw["solar-panel"]["solar-panel-mk3"].fast_replaceable_group = data.raw["solar-panel"]["solar-panel"].fast_replaceable_group +end + +if not data.raw["solar-panel"]["solar-panel"].next_upgrade then + data.raw["solar-panel"]["solar-panel"].next_upgrade = "solar-panel-mk2" +end diff --git a/data.lua b/data.lua index 9b9aec5..47ae7fb 100644 --- a/data.lua +++ b/data.lua @@ -1,16 +1,11 @@ -require("prototypes.item.item-accumulators") -require("prototypes.item.item-solar-panels") -require("prototypes.item.item-substations") -require("prototypes.item.item-power-poles") +require("prototypes.entity.__init__") + +require("prototypes.item.items") require("prototypes.recipe.recipe-accumulators") require("prototypes.recipe.recipe-solar-panels") require("prototypes.recipe.recipe-substations") require("prototypes.recipe.recipe-power-poles") - -require("prototypes.entity.entity-accumulators") -require("prototypes.entity.entity-solar-panels") -require("prototypes.entity.entity-substations") -require("prototypes.entity.entity-power-poles") +require("prototypes.recipe.recipe-generators") require("prototypes.technology.technology-electrical-engineer") diff --git a/graphics/entity/accumulator-mk2/accumulator-mk2.png b/graphics/entity/accumulator-mk2/accumulator-mk2.png new file mode 100644 index 0000000..0559098 Binary files /dev/null and b/graphics/entity/accumulator-mk2/accumulator-mk2.png differ diff --git a/graphics/entity/accumulator-mk2/hr-accumulator-mk2.png b/graphics/entity/accumulator-mk2/hr-accumulator-mk2.png new file mode 100644 index 0000000..8fde475 Binary files /dev/null and b/graphics/entity/accumulator-mk2/hr-accumulator-mk2.png differ diff --git a/graphics/entity/accumulator-mk3/accumulator-mk3.png b/graphics/entity/accumulator-mk3/accumulator-mk3.png new file mode 100644 index 0000000..9f7e75c Binary files /dev/null and b/graphics/entity/accumulator-mk3/accumulator-mk3.png differ diff --git a/graphics/entity/accumulator-mk3/hr-accumulator-mk3.png b/graphics/entity/accumulator-mk3/hr-accumulator-mk3.png new file mode 100644 index 0000000..484abaa Binary files /dev/null and b/graphics/entity/accumulator-mk3/hr-accumulator-mk3.png differ diff --git a/graphics/entity/big-electric-pole-mk2/big-electric-pole-mk2.png b/graphics/entity/big-electric-pole-mk2/big-electric-pole-mk2.png new file mode 100644 index 0000000..3aaa095 Binary files /dev/null and b/graphics/entity/big-electric-pole-mk2/big-electric-pole-mk2.png differ diff --git a/graphics/entity/big-electric-pole-mk2/hr-big-electric-pole-mk2.png b/graphics/entity/big-electric-pole-mk2/hr-big-electric-pole-mk2.png new file mode 100644 index 0000000..ad73b6b Binary files /dev/null and b/graphics/entity/big-electric-pole-mk2/hr-big-electric-pole-mk2.png differ diff --git a/graphics/entity/big-electric-pole-mk3/big-electric-pole-mk3.png b/graphics/entity/big-electric-pole-mk3/big-electric-pole-mk3.png new file mode 100644 index 0000000..9264c9b Binary files /dev/null and b/graphics/entity/big-electric-pole-mk3/big-electric-pole-mk3.png differ diff --git a/graphics/entity/big-electric-pole-mk3/hr-big-electric-pole-mk3.png b/graphics/entity/big-electric-pole-mk3/hr-big-electric-pole-mk3.png new file mode 100644 index 0000000..d93b465 Binary files /dev/null and b/graphics/entity/big-electric-pole-mk3/hr-big-electric-pole-mk3.png differ diff --git a/graphics/entity/boiler-mk2/boiler-E-idle.png b/graphics/entity/boiler-mk2/boiler-E-idle.png new file mode 100644 index 0000000..80c70e3 Binary files /dev/null and b/graphics/entity/boiler-mk2/boiler-E-idle.png differ diff --git a/graphics/entity/boiler-mk2/boiler-N-idle.png b/graphics/entity/boiler-mk2/boiler-N-idle.png new file mode 100644 index 0000000..44e9e21 Binary files /dev/null and b/graphics/entity/boiler-mk2/boiler-N-idle.png differ diff --git a/graphics/entity/boiler-mk2/boiler-S-idle.png b/graphics/entity/boiler-mk2/boiler-S-idle.png new file mode 100644 index 0000000..8bb8ccc Binary files /dev/null and b/graphics/entity/boiler-mk2/boiler-S-idle.png differ diff --git a/graphics/entity/boiler-mk2/boiler-W-idle.png b/graphics/entity/boiler-mk2/boiler-W-idle.png new file mode 100644 index 0000000..ed08afb Binary files /dev/null and b/graphics/entity/boiler-mk2/boiler-W-idle.png differ diff --git a/graphics/entity/boiler-mk2/hr-boiler-E-idle.png b/graphics/entity/boiler-mk2/hr-boiler-E-idle.png new file mode 100644 index 0000000..a915b65 Binary files /dev/null and b/graphics/entity/boiler-mk2/hr-boiler-E-idle.png differ diff --git a/graphics/entity/boiler-mk2/hr-boiler-N-idle.png b/graphics/entity/boiler-mk2/hr-boiler-N-idle.png new file mode 100644 index 0000000..7173cd6 Binary files /dev/null and b/graphics/entity/boiler-mk2/hr-boiler-N-idle.png differ diff --git a/graphics/entity/boiler-mk2/hr-boiler-S-idle.png b/graphics/entity/boiler-mk2/hr-boiler-S-idle.png new file mode 100644 index 0000000..f765b76 Binary files /dev/null and b/graphics/entity/boiler-mk2/hr-boiler-S-idle.png differ diff --git a/graphics/entity/boiler-mk2/hr-boiler-W-idle.png b/graphics/entity/boiler-mk2/hr-boiler-W-idle.png new file mode 100644 index 0000000..0c97675 Binary files /dev/null and b/graphics/entity/boiler-mk2/hr-boiler-W-idle.png differ diff --git a/graphics/entity/boiler-mk3/boiler-E-idle.png b/graphics/entity/boiler-mk3/boiler-E-idle.png new file mode 100644 index 0000000..eab55c2 Binary files /dev/null and b/graphics/entity/boiler-mk3/boiler-E-idle.png differ diff --git a/graphics/entity/boiler-mk3/boiler-N-idle.png b/graphics/entity/boiler-mk3/boiler-N-idle.png new file mode 100644 index 0000000..f0e5454 Binary files /dev/null and b/graphics/entity/boiler-mk3/boiler-N-idle.png differ diff --git a/graphics/entity/boiler-mk3/boiler-S-idle.png b/graphics/entity/boiler-mk3/boiler-S-idle.png new file mode 100644 index 0000000..a31068c Binary files /dev/null and b/graphics/entity/boiler-mk3/boiler-S-idle.png differ diff --git a/graphics/entity/boiler-mk3/boiler-W-idle.png b/graphics/entity/boiler-mk3/boiler-W-idle.png new file mode 100644 index 0000000..b6d760b Binary files /dev/null and b/graphics/entity/boiler-mk3/boiler-W-idle.png differ diff --git a/graphics/entity/boiler-mk3/hr-boiler-E-idle.png b/graphics/entity/boiler-mk3/hr-boiler-E-idle.png new file mode 100644 index 0000000..45d7c46 Binary files /dev/null and b/graphics/entity/boiler-mk3/hr-boiler-E-idle.png differ diff --git a/graphics/entity/boiler-mk3/hr-boiler-N-idle.png b/graphics/entity/boiler-mk3/hr-boiler-N-idle.png new file mode 100644 index 0000000..14da114 Binary files /dev/null and b/graphics/entity/boiler-mk3/hr-boiler-N-idle.png differ diff --git a/graphics/entity/boiler-mk3/hr-boiler-S-idle.png b/graphics/entity/boiler-mk3/hr-boiler-S-idle.png new file mode 100644 index 0000000..aef58c4 Binary files /dev/null and b/graphics/entity/boiler-mk3/hr-boiler-S-idle.png differ diff --git a/graphics/entity/boiler-mk3/hr-boiler-W-idle.png b/graphics/entity/boiler-mk3/hr-boiler-W-idle.png new file mode 100644 index 0000000..f5430f4 Binary files /dev/null and b/graphics/entity/boiler-mk3/hr-boiler-W-idle.png differ diff --git a/graphics/entity/medium-electric-pole-mk2/hr-medium-electric-pole-mk2.png b/graphics/entity/medium-electric-pole-mk2/hr-medium-electric-pole-mk2.png new file mode 100644 index 0000000..6b6dc7b Binary files /dev/null and b/graphics/entity/medium-electric-pole-mk2/hr-medium-electric-pole-mk2.png differ diff --git a/graphics/entity/medium-electric-pole-mk2/medium-electric-pole-mk2.png b/graphics/entity/medium-electric-pole-mk2/medium-electric-pole-mk2.png new file mode 100644 index 0000000..c3571b1 Binary files /dev/null and b/graphics/entity/medium-electric-pole-mk2/medium-electric-pole-mk2.png differ diff --git a/graphics/entity/medium-electric-pole-mk2/readme.md b/graphics/entity/medium-electric-pole-mk2/readme.md new file mode 100644 index 0000000..3a69cf7 --- /dev/null +++ b/graphics/entity/medium-electric-pole-mk2/readme.md @@ -0,0 +1,5 @@ +using default graphics and paint.net + +Hue 90 +Sat 100 +Lightness -30 \ No newline at end of file diff --git a/graphics/entity/medium-electric-pole-mk3/hr-medium-electric-pole-mk3.png b/graphics/entity/medium-electric-pole-mk3/hr-medium-electric-pole-mk3.png new file mode 100644 index 0000000..3769cf7 Binary files /dev/null and b/graphics/entity/medium-electric-pole-mk3/hr-medium-electric-pole-mk3.png differ diff --git a/graphics/entity/medium-electric-pole-mk3/medium-electric-pole-mk3.png b/graphics/entity/medium-electric-pole-mk3/medium-electric-pole-mk3.png new file mode 100644 index 0000000..c3765d8 Binary files /dev/null and b/graphics/entity/medium-electric-pole-mk3/medium-electric-pole-mk3.png differ diff --git a/graphics/entity/medium-electric-pole-mk3/readme.md b/graphics/entity/medium-electric-pole-mk3/readme.md new file mode 100644 index 0000000..c7a618e --- /dev/null +++ b/graphics/entity/medium-electric-pole-mk3/readme.md @@ -0,0 +1,4 @@ +using default graphics and paint.net +Hue -170 +Sat 110 +Lig -20 \ No newline at end of file diff --git a/graphics/entity/solar-panel-mk2/hr-solar-panel-mk2.png b/graphics/entity/solar-panel-mk2/hr-solar-panel-mk2.png new file mode 100644 index 0000000..8d956a7 Binary files /dev/null and b/graphics/entity/solar-panel-mk2/hr-solar-panel-mk2.png differ diff --git a/graphics/entity/solar-panel-mk2/solar-panel-mk2.png b/graphics/entity/solar-panel-mk2/solar-panel-mk2.png new file mode 100644 index 0000000..df6b886 Binary files /dev/null and b/graphics/entity/solar-panel-mk2/solar-panel-mk2.png differ diff --git a/graphics/entity/solar-panel-mk3/hr-solar-panel-mk3.png b/graphics/entity/solar-panel-mk3/hr-solar-panel-mk3.png new file mode 100644 index 0000000..9518358 Binary files /dev/null and b/graphics/entity/solar-panel-mk3/hr-solar-panel-mk3.png differ diff --git a/graphics/entity/solar-panel-mk3/solar-panel-mk3.png b/graphics/entity/solar-panel-mk3/solar-panel-mk3.png new file mode 100644 index 0000000..94172a8 Binary files /dev/null and b/graphics/entity/solar-panel-mk3/solar-panel-mk3.png differ diff --git a/graphics/entity/steam-engine-mk2/hr-steam-engine-H.png b/graphics/entity/steam-engine-mk2/hr-steam-engine-H.png new file mode 100644 index 0000000..bb6150e Binary files /dev/null and b/graphics/entity/steam-engine-mk2/hr-steam-engine-H.png differ diff --git a/graphics/entity/steam-engine-mk2/hr-steam-engine-V.png b/graphics/entity/steam-engine-mk2/hr-steam-engine-V.png new file mode 100644 index 0000000..b859dd7 Binary files /dev/null and b/graphics/entity/steam-engine-mk2/hr-steam-engine-V.png differ diff --git a/graphics/entity/steam-engine-mk2/steam-engine-H.png b/graphics/entity/steam-engine-mk2/steam-engine-H.png new file mode 100644 index 0000000..f4a610a Binary files /dev/null and b/graphics/entity/steam-engine-mk2/steam-engine-H.png differ diff --git a/graphics/entity/steam-engine-mk2/steam-engine-V.png b/graphics/entity/steam-engine-mk2/steam-engine-V.png new file mode 100644 index 0000000..44ede13 Binary files /dev/null and b/graphics/entity/steam-engine-mk2/steam-engine-V.png differ diff --git a/graphics/entity/steam-engine-mk3/hr-steam-engine-H.png b/graphics/entity/steam-engine-mk3/hr-steam-engine-H.png new file mode 100644 index 0000000..e27c530 Binary files /dev/null and b/graphics/entity/steam-engine-mk3/hr-steam-engine-H.png differ diff --git a/graphics/entity/steam-engine-mk3/hr-steam-engine-V.png b/graphics/entity/steam-engine-mk3/hr-steam-engine-V.png new file mode 100644 index 0000000..11aa01d Binary files /dev/null and b/graphics/entity/steam-engine-mk3/hr-steam-engine-V.png differ diff --git a/graphics/entity/steam-engine-mk3/steam-engine-H.png b/graphics/entity/steam-engine-mk3/steam-engine-H.png new file mode 100644 index 0000000..6fb9b0b Binary files /dev/null and b/graphics/entity/steam-engine-mk3/steam-engine-H.png differ diff --git a/graphics/entity/steam-engine-mk3/steam-engine-V.png b/graphics/entity/steam-engine-mk3/steam-engine-V.png new file mode 100644 index 0000000..b04175d Binary files /dev/null and b/graphics/entity/steam-engine-mk3/steam-engine-V.png differ diff --git a/graphics/entity/substation-mk2/hr-substation-mk2.png b/graphics/entity/substation-mk2/hr-substation-mk2.png new file mode 100644 index 0000000..b629614 Binary files /dev/null and b/graphics/entity/substation-mk2/hr-substation-mk2.png differ diff --git a/graphics/entity/substation-mk2/substation-mk2.png b/graphics/entity/substation-mk2/substation-mk2.png new file mode 100644 index 0000000..b3d98c9 Binary files /dev/null and b/graphics/entity/substation-mk2/substation-mk2.png differ diff --git a/graphics/entity/substation-mk3/hr-substation-mk3.png b/graphics/entity/substation-mk3/hr-substation-mk3.png new file mode 100644 index 0000000..dcf1a76 Binary files /dev/null and b/graphics/entity/substation-mk3/hr-substation-mk3.png differ diff --git a/graphics/entity/substation-mk3/substation-mk3.png b/graphics/entity/substation-mk3/substation-mk3.png new file mode 100644 index 0000000..494ef30 Binary files /dev/null and b/graphics/entity/substation-mk3/substation-mk3.png differ diff --git a/graphics/icons/accumulator-mk2.png b/graphics/icons/accumulator-mk2.png new file mode 100644 index 0000000..764b333 Binary files /dev/null and b/graphics/icons/accumulator-mk2.png differ diff --git a/graphics/icons/accumulator-mk3.png b/graphics/icons/accumulator-mk3.png new file mode 100644 index 0000000..1cb83fb Binary files /dev/null and b/graphics/icons/accumulator-mk3.png differ diff --git a/graphics/icons/accumulator.pdn b/graphics/icons/accumulator.pdn new file mode 100644 index 0000000..42c5ef9 Binary files /dev/null and b/graphics/icons/accumulator.pdn differ diff --git a/graphics/icons/accumulator.png b/graphics/icons/accumulator.png new file mode 100644 index 0000000..720fe8a Binary files /dev/null and b/graphics/icons/accumulator.png differ diff --git a/graphics/icons/big-electric-pole-mk2.png b/graphics/icons/big-electric-pole-mk2.png new file mode 100644 index 0000000..b0075a7 Binary files /dev/null and b/graphics/icons/big-electric-pole-mk2.png differ diff --git a/graphics/icons/big-electric-pole-mk3.png b/graphics/icons/big-electric-pole-mk3.png new file mode 100644 index 0000000..2693670 Binary files /dev/null and b/graphics/icons/big-electric-pole-mk3.png differ diff --git a/graphics/icons/big-electric-pole.pdn b/graphics/icons/big-electric-pole.pdn new file mode 100644 index 0000000..75ddd39 Binary files /dev/null and b/graphics/icons/big-electric-pole.pdn differ diff --git a/graphics/icons/big-electric-pole.png b/graphics/icons/big-electric-pole.png new file mode 100644 index 0000000..7424e78 Binary files /dev/null and b/graphics/icons/big-electric-pole.png differ diff --git a/graphics/icons/boiler-mk2.png b/graphics/icons/boiler-mk2.png new file mode 100644 index 0000000..a423a4a Binary files /dev/null and b/graphics/icons/boiler-mk2.png differ diff --git a/graphics/icons/boiler-mk3.png b/graphics/icons/boiler-mk3.png new file mode 100644 index 0000000..a3e15b2 Binary files /dev/null and b/graphics/icons/boiler-mk3.png differ diff --git a/graphics/icons/boiler.pdn b/graphics/icons/boiler.pdn new file mode 100644 index 0000000..fe1ed22 Binary files /dev/null and b/graphics/icons/boiler.pdn differ diff --git a/graphics/icons/boiler.png b/graphics/icons/boiler.png new file mode 100644 index 0000000..fc3911b Binary files /dev/null and b/graphics/icons/boiler.png differ diff --git a/graphics/icons/medium-electric-pole-mk2.png b/graphics/icons/medium-electric-pole-mk2.png new file mode 100644 index 0000000..bfd8aae Binary files /dev/null and b/graphics/icons/medium-electric-pole-mk2.png differ diff --git a/graphics/icons/medium-electric-pole-mk3.png b/graphics/icons/medium-electric-pole-mk3.png new file mode 100644 index 0000000..4525909 Binary files /dev/null and b/graphics/icons/medium-electric-pole-mk3.png differ diff --git a/graphics/icons/medium-electric-pole.pdn b/graphics/icons/medium-electric-pole.pdn new file mode 100644 index 0000000..2b6cf2b Binary files /dev/null and b/graphics/icons/medium-electric-pole.pdn differ diff --git a/graphics/icons/medium-electric-pole.png b/graphics/icons/medium-electric-pole.png new file mode 100644 index 0000000..29af2cb Binary files /dev/null and b/graphics/icons/medium-electric-pole.png differ diff --git a/graphics/icons/solar-panel-mk2.png b/graphics/icons/solar-panel-mk2.png new file mode 100644 index 0000000..f4da561 Binary files /dev/null and b/graphics/icons/solar-panel-mk2.png differ diff --git a/graphics/icons/solar-panel-mk3.png b/graphics/icons/solar-panel-mk3.png new file mode 100644 index 0000000..5ac292b Binary files /dev/null and b/graphics/icons/solar-panel-mk3.png differ diff --git a/graphics/icons/solar-panel.pdn b/graphics/icons/solar-panel.pdn new file mode 100644 index 0000000..f0d47eb Binary files /dev/null and b/graphics/icons/solar-panel.pdn differ diff --git a/graphics/icons/solar-panel.png b/graphics/icons/solar-panel.png new file mode 100644 index 0000000..99eb51a Binary files /dev/null and b/graphics/icons/solar-panel.png differ diff --git a/graphics/icons/steam-engine-mk2.png b/graphics/icons/steam-engine-mk2.png new file mode 100644 index 0000000..dbbb04e Binary files /dev/null and b/graphics/icons/steam-engine-mk2.png differ diff --git a/graphics/icons/steam-engine-mk3.png b/graphics/icons/steam-engine-mk3.png new file mode 100644 index 0000000..ce3c729 Binary files /dev/null and b/graphics/icons/steam-engine-mk3.png differ diff --git a/graphics/icons/steam-engine.pdn b/graphics/icons/steam-engine.pdn new file mode 100644 index 0000000..5381f12 Binary files /dev/null and b/graphics/icons/steam-engine.pdn differ diff --git a/graphics/icons/steam-engine.png b/graphics/icons/steam-engine.png new file mode 100644 index 0000000..1cac268 Binary files /dev/null and b/graphics/icons/steam-engine.png differ diff --git a/graphics/icons/substation-mk2.png b/graphics/icons/substation-mk2.png new file mode 100644 index 0000000..d2ae2b5 Binary files /dev/null and b/graphics/icons/substation-mk2.png differ diff --git a/graphics/icons/substation-mk3.png b/graphics/icons/substation-mk3.png new file mode 100644 index 0000000..ac66266 Binary files /dev/null and b/graphics/icons/substation-mk3.png differ diff --git a/graphics/icons/substation.pdn b/graphics/icons/substation.pdn new file mode 100644 index 0000000..8a0e5f0 Binary files /dev/null and b/graphics/icons/substation.pdn differ diff --git a/graphics/icons/substation.png b/graphics/icons/substation.png new file mode 100644 index 0000000..b7a1bec Binary files /dev/null and b/graphics/icons/substation.png differ diff --git a/graphics/old_icons/accumulator-mk2.png b/graphics/old_icons/accumulator-mk2.png new file mode 100644 index 0000000..55981a6 Binary files /dev/null and b/graphics/old_icons/accumulator-mk2.png differ diff --git a/graphics/old_icons/accumulator-mk3.png b/graphics/old_icons/accumulator-mk3.png new file mode 100644 index 0000000..d7ab460 Binary files /dev/null and b/graphics/old_icons/accumulator-mk3.png differ diff --git a/graphics/old_icons/big-electric-pole-mk2.png b/graphics/old_icons/big-electric-pole-mk2.png new file mode 100644 index 0000000..7eb10a3 Binary files /dev/null and b/graphics/old_icons/big-electric-pole-mk2.png differ diff --git a/graphics/old_icons/big-electric-pole-mk3.png b/graphics/old_icons/big-electric-pole-mk3.png new file mode 100644 index 0000000..5bbc37e Binary files /dev/null and b/graphics/old_icons/big-electric-pole-mk3.png differ diff --git a/graphics/old_icons/boiler-mk2.png b/graphics/old_icons/boiler-mk2.png new file mode 100644 index 0000000..b2b212c Binary files /dev/null and b/graphics/old_icons/boiler-mk2.png differ diff --git a/graphics/old_icons/boiler-mk3.png b/graphics/old_icons/boiler-mk3.png new file mode 100644 index 0000000..a50116c Binary files /dev/null and b/graphics/old_icons/boiler-mk3.png differ diff --git a/graphics/old_icons/medium-electric-pole-mk2.png b/graphics/old_icons/medium-electric-pole-mk2.png new file mode 100644 index 0000000..8fe47cd Binary files /dev/null and b/graphics/old_icons/medium-electric-pole-mk2.png differ diff --git a/graphics/old_icons/medium-electric-pole-mk3.png b/graphics/old_icons/medium-electric-pole-mk3.png new file mode 100644 index 0000000..1f7a13c Binary files /dev/null and b/graphics/old_icons/medium-electric-pole-mk3.png differ diff --git a/graphics/old_icons/solar-panel-mk2.png b/graphics/old_icons/solar-panel-mk2.png new file mode 100644 index 0000000..3c82d79 Binary files /dev/null and b/graphics/old_icons/solar-panel-mk2.png differ diff --git a/graphics/old_icons/solar-panel-mk3.png b/graphics/old_icons/solar-panel-mk3.png new file mode 100644 index 0000000..17388ad Binary files /dev/null and b/graphics/old_icons/solar-panel-mk3.png differ diff --git a/graphics/old_icons/steam-engine-mk2.png b/graphics/old_icons/steam-engine-mk2.png new file mode 100644 index 0000000..b8ed177 Binary files /dev/null and b/graphics/old_icons/steam-engine-mk2.png differ diff --git a/graphics/old_icons/steam-engine-mk3.png b/graphics/old_icons/steam-engine-mk3.png new file mode 100644 index 0000000..0ebd971 Binary files /dev/null and b/graphics/old_icons/steam-engine-mk3.png differ diff --git a/graphics/old_icons/substation-mk2.png b/graphics/old_icons/substation-mk2.png new file mode 100644 index 0000000..e24b0e0 Binary files /dev/null and b/graphics/old_icons/substation-mk2.png differ diff --git a/graphics/old_icons/substation-mk3.png b/graphics/old_icons/substation-mk3.png new file mode 100644 index 0000000..64fe452 Binary files /dev/null and b/graphics/old_icons/substation-mk3.png differ diff --git a/graphics/technology/electrical-engineer.png b/graphics/technology/electrical-engineer.png new file mode 100644 index 0000000..8f14b73 Binary files /dev/null and b/graphics/technology/electrical-engineer.png differ diff --git a/info.json b/info.json index 69f8437..9da0192 100644 --- a/info.json +++ b/info.json @@ -1,11 +1,15 @@ { - "name": "FactorioExtended-Power", - "version": "0.2.3", - "factorio_version": "0.14", - "date": "2016-03-4", - "title": "FactorioExtended-Power", - "author": "Nath Gamer", - "homepage": "http://www.factorioforums.com/forum/viewtopic.php?f=93&t=19836", - "description": "Extended Factorio", - "dependencies": ["base", "FactorioExtended-Core >= 0.2.3"] + "name": "FactorioExtended-Plus-Power", + "version": "1.1.0", + "factorio_version": "1.1", + "date": "2020-11-21", + "title": "FactorioExtended Plus-Power", + "author": "jimmyjon711 (Original Author: Nath Gamer)", + "contributers": "billbo99", + "homepage": "", + "description": "", + "dependencies": [ + "base >= 1.1.0", + "FactorioExtended-Plus-Core >= 1.1.0" + ] } \ No newline at end of file diff --git a/locale/en/locale.cfg b/locale/en/locale.cfg new file mode 100644 index 0000000..8b21e04 --- /dev/null +++ b/locale/en/locale.cfg @@ -0,0 +1,54 @@ +[item-name] +accumulator-mk2=Accumulator Mk2 +accumulator-mk3=Accumulator Mk3 + +solar-panel-mk2=Solar Panel Mk2 +solar-panel-mk3=Solar Panel Mk3 + +substation-mk2=Substation Mk2 +substation-mk3=Substation Mk3 + +medium-electric-pole-mk2=Medium Electric Pole Mk2 +medium-electric-pole-mk3=Medium Electric Pole Mk3 + +big-electric-pole-mk2=Big Electric Pole Mk2 +big-electric-pole-mk3=Big Electric Pole Mk3 + +steam-engine-mk3=Steam Engine Mk3 +steam-engine-mk2=Steam Engine Mk2 + +boiler-mk2=Boiler Mk2 +boiler-mk3=Boiler Mk3 + +[item-description] + +[entity-name] +accumulator-mk2=Accumulator Mk2 +accumulator-mk3=Accumulator Mk3 + +solar-panel-mk2=Solar Panel Mk2 +solar-panel-mk3=Solar Panel Mk3 + +substation-mk2=Substation Mk2 +substation-mk3=Substation Mk3 + +big-electric-pole-mk2=Big Electric Pole Mk2 +big-electric-pole-mk3=Big Electric Pole Mk3 + +medium-electric-pole-mk2=Medium Electric Pole Mk2 +medium-electric-pole-mk3=Medium Electric Pole Mk3 + +steam-engine-mk2=Steam Engine Mk2 +steam-engine-mk3=Steam Engine Mk3 + +boiler-mk2=Boiler Mk2 +boiler-mk3=Boiler Mk3 + +[technology-name] +electrical-engineer=Electrical engineer +electrical-engineer-2=Electrical engineer 2 + +electric-energy-accumulators-2=Electric energy accumulators 2 +electric-energy-accumulators-3=Electric energy accumulators 3 + +[technology-description] \ No newline at end of file diff --git a/migrations/FactorioExtended-Plus-Power_0.1.0.lua b/migrations/FactorioExtended-Plus-Power_0.1.0.lua new file mode 100644 index 0000000..dee1d19 --- /dev/null +++ b/migrations/FactorioExtended-Plus-Power_0.1.0.lua @@ -0,0 +1,15 @@ +for index, force in pairs(game.forces) do + local technologies = force.technologies + local recipes = force.recipes + + + if technologies["electrical-engineer"].researched then + technologies["solar-energy-2"].researched = true + technologies["electric-energy-accumulators-2"].researched = true + end + + if technologies["electrical-engineer-2"].researched then + technologies["solar-energy-3"].researched = true + technologies["electric-energy-accumulators-3"].researched = true + end +end \ No newline at end of file diff --git a/migrations/FactorioExtended-Power_0.2.7.json b/migrations/FactorioExtended-Power_0.2.7.json new file mode 100644 index 0000000..d98f95f --- /dev/null +++ b/migrations/FactorioExtended-Power_0.2.7.json @@ -0,0 +1,6 @@ +{ + "technology": + [ + ["electrical-engineer-1", "electrical-engineer"] + ] +} \ No newline at end of file diff --git a/prototypes/entity/__init__.lua b/prototypes/entity/__init__.lua new file mode 100644 index 0000000..9c22b5f --- /dev/null +++ b/prototypes/entity/__init__.lua @@ -0,0 +1,7 @@ +require("accumulator") +require("big-electric-pole") +require("boiler") +require("medium-electric-pole") +require("steam-engine") +require("solar-panel") +require("substation") diff --git a/prototypes/entity/accumulator.lua b/prototypes/entity/accumulator.lua new file mode 100644 index 0000000..3c71109 --- /dev/null +++ b/prototypes/entity/accumulator.lua @@ -0,0 +1,53 @@ +-- accumulator mk1 mk2 mk3 +-- max_health 150 300 450 +-- energy_source.buffer_capacity 5MJ 20MJ 80MJ +-- energy_source.input_flow_limit 300kW 1200kW 4800kW +-- energy_source.output_flow_limit 300kW 1200kW 4800kW +-- +local mk2 = table.deepcopy(data.raw["accumulator"]["accumulator"]) +mk2.name = "accumulator-mk2" +mk2.icon = "__FactorioExtended-Plus-Power__/graphics/icons/accumulator-mk2.png" +mk2.icon_size = 64 +mk2.icon_mipmaps = 4 +mk2.minable.result = mk2.name +mk2.max_health = 300 +mk2.energy_source.buffer_capacity = "20MJ" +mk2.energy_source.input_flow_limit = "1200kW" +mk2.energy_source.output_flow_limit = "1200kW" +mk2.next_upgrade = "accumulator-mk3" + +mk2.picture.layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/" .. mk2.name .. ".png" +mk2.picture.layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/hr-" .. mk2.name .. ".png" +mk2.charge_animation.layers[1].layers[1].filename = mk2.picture.layers[1].filename +mk2.charge_animation.layers[1].layers[1].tint = {r = 1, g = 1, b = 1, a = 1} +mk2.charge_animation.layers[1].layers[1].hr_version.filename = mk2.picture.layers[1].hr_version.filename +mk2.charge_animation.layers[1].layers[1].hr_version.tint = {r = 1, g = 1, b = 1, a = 1} +mk2.discharge_animation.layers[1].layers[1].filename = mk2.picture.layers[1].filename +mk2.discharge_animation.layers[1].layers[1].tint = {r = 1, g = 1, b = 1, a = 1} +mk2.discharge_animation.layers[1].layers[1].hr_version.filename = mk2.picture.layers[1].hr_version.filename +mk2.discharge_animation.layers[1].layers[1].hr_version.tint = {r = 1, g = 1, b = 1, a = 1} + +local mk3 = table.deepcopy(data.raw["accumulator"]["accumulator"]) +mk3.name = "accumulator-mk3" +mk3.icon = "__FactorioExtended-Plus-Power__/graphics/icons/accumulator-mk3.png" +mk3.icon_size = 64 +mk3.icon_mipmaps = 4 +mk3.minable.result = mk3.name +mk3.max_health = 450 +mk3.energy_source.buffer_capacity = "80MJ" +mk3.energy_source.input_flow_limit = "4800kW" +mk3.energy_source.output_flow_limit = "4800kW" +mk3.next_upgrade = nil + +mk3.picture.layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/" .. mk3.name .. ".png" +mk3.picture.layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/hr-" .. mk3.name .. ".png" +mk3.charge_animation.layers[1].layers[1].filename = mk3.picture.layers[1].filename +mk3.charge_animation.layers[1].layers[1].tint = {r = 1, g = 1, b = 1, a = 1} +mk3.charge_animation.layers[1].layers[1].hr_version.filename = mk3.picture.layers[1].hr_version.filename +mk3.charge_animation.layers[1].layers[1].hr_version.tint = {r = 1, g = 1, b = 1, a = 1} +mk3.discharge_animation.layers[1].layers[1].filename = mk3.picture.layers[1].filename +mk3.discharge_animation.layers[1].layers[1].tint = {r = 1, g = 1, b = 1, a = 1} +mk3.discharge_animation.layers[1].layers[1].hr_version.filename = mk3.picture.layers[1].hr_version.filename +mk3.discharge_animation.layers[1].layers[1].hr_version.tint = {r = 1, g = 1, b = 1, a = 1} + +data:extend({mk2, mk3}) diff --git a/prototypes/entity/big-electric-pole.lua b/prototypes/entity/big-electric-pole.lua new file mode 100644 index 0000000..8bd5a6f --- /dev/null +++ b/prototypes/entity/big-electric-pole.lua @@ -0,0 +1,42 @@ +-- big-electric-pole mk1 mk2 mk3 +-- max_health 150 200 250 +-- maximum_wire_distance 30 45 64 +-- supply_area_distance 2 2 2 +-- +local mk2 = table.deepcopy(data.raw["electric-pole"]["big-electric-pole"]) +mk2.name = "big-electric-pole-mk2" +mk2.icon = "__FactorioExtended-Plus-Power__/graphics/icons/" .. mk2.name .. ".png" +mk2.icon_size = 64 +mk2.icon_mipmaps = 4 +mk2.minable.result = mk2.name +mk2.max_health = 400 +mk2.next_upgrade = "big-electric-pole-mk3" +mk2.maximum_wire_distance = 45 +mk2.supply_area_distance = 2 +mk2.resistances = {{type = "fire", percent = 100}} + +mk2.pictures.layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/" .. mk2.name .. ".png" +mk2.pictures.layers[1].width = 74 +mk2.pictures.layers[1].height = 158 +-- mk2.pictures.layers[1].shift = util.by_pixel(0, -52) + +mk2.pictures.layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/hr-" .. mk2.name .. ".png" + +local mk3 = table.deepcopy(data.raw["electric-pole"]["big-electric-pole"]) +mk3.name = "big-electric-pole-mk3" +mk3.icon = "__FactorioExtended-Plus-Power__/graphics/icons/" .. mk3.name .. ".png" +mk3.icon_size = 64 +mk3.icon_mipmaps = 4 +mk3.minable.result = mk3.name +mk3.max_health = 250 +mk3.next_upgrade = nil +mk3.maximum_wire_distance = 64 +mk3.supply_area_distance = 2 +mk3.resistances = {{type = "fire", percent = 100}} + +mk3.pictures.layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/" .. mk3.name .. ".png" +mk3.pictures.layers[1].width = 74 +mk3.pictures.layers[1].height = 158 +mk3.pictures.layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/hr-" .. mk3.name .. ".png" + +data:extend({mk2, mk3}) diff --git a/prototypes/entity/boiler.lua b/prototypes/entity/boiler.lua new file mode 100644 index 0000000..1e2343b --- /dev/null +++ b/prototypes/entity/boiler.lua @@ -0,0 +1,40 @@ +-- boiler mk1 mk2 mk3 +-- max_health 200 400 600 +-- energy_consumption 1.8MW 3.6MW 7.2MW +-- energy_source.emissions_per_minute 30 25 20 +-- +local mk2 = table.deepcopy(data.raw["boiler"]["boiler"]) +mk2.name = "boiler-mk2" +mk2.icon = "__FactorioExtended-Plus-Power__/graphics/icons/" .. mk2.name .. ".png" +mk2.icon_size = 64 +mk2.icon_mipmaps = 4 +mk2.minable.result = mk2.name +mk2.max_health = 300 +mk2.energy_consumption = "3.6MW" +mk2.energy_source.emissions_per_minute = 25 +mk2.next_upgrade = "boiler-mk3" + +for _, direction in pairs({"north", "east", "south", "west"}) do + local short = string.upper(string.sub(direction, 1, 1)) + mk2.structure[direction].layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/boiler-" .. short .. "-idle.png" + mk2.structure[direction].layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/hr-boiler-" .. short .. "-idle.png" +end + +local mk3 = table.deepcopy(data.raw["boiler"]["boiler"]) +mk3.name = "boiler-mk3" +mk3.icon = "__FactorioExtended-Plus-Power__/graphics/icons/" .. mk3.name .. ".png" +mk3.icon_size = 64 +mk3.icon_mipmaps = 4 +mk3.minable.result = mk3.name +mk3.max_health = 600 +mk3.energy_consumption = "7.2MW" +mk3.energy_source.emissions_per_minute = 20 +mk2.next_upgrade = nil + +for _, direction in pairs({"north", "east", "south", "west"}) do + local short = string.upper(string.sub(direction, 1, 1)) + mk3.structure[direction].layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/boiler-" .. short .. "-idle.png" + mk3.structure[direction].layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/hr-boiler-" .. short .. "-idle.png" +end + +data:extend({mk2, mk3}) diff --git a/prototypes/entity/entity-accumulators.lua b/prototypes/entity/entity-accumulators.lua deleted file mode 100644 index c6f16b9..0000000 --- a/prototypes/entity/entity-accumulators.lua +++ /dev/null @@ -1,133 +0,0 @@ -data:extend( -{ - { - type = "accumulator", - name = "accumulator-mk2", - icon = "__FactorioExtended-Core__/graphics/icons/accumulator-mk2.png", - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "accumulator-mk2"}, - max_health = 150, - corpse = "medium-remnants", - collision_box = {{-0.9, -0.9}, {0.9, 0.9}}, - selection_box = {{-1, -1}, {1, 1}}, - energy_source = - { - type = "electric", - buffer_capacity = "20MJ", - usage_priority = "terciary", - input_flow_limit = "1200kW", - output_flow_limit = "1200kW" - }, - picture = - { - filename = "__FactorioExtended-Core__/graphics/entity/accumulators/accumulator-mk2.png", - priority = "extra-high", - width = 124, - height = 103, - shift = {0.7, -0.2} - }, - charge_animation = - { - filename = "__FactorioExtended-Core__/graphics/entity/accumulators/accumulator-mk2-charge-animation.png", - width = 138, - height = 135, - line_length = 8, - frame_count = 24, - shift = {0.482, -0.638}, - animation_speed = 0.5 - }, - charge_cooldown = 30, - charge_light = {intensity = 0.3, size = 7}, - discharge_animation = - { - filename = "__FactorioExtended-Core__/graphics/entity/accumulators/accumulator-mk2-discharge-animation.png", - width = 147, - height = 128, - line_length = 8, - frame_count = 24, - shift = {0.395, -0.525}, - animation_speed = 0.5 - }, - discharge_cooldown = 60, - discharge_light = {intensity = 0.7, size = 7}, - vehicle_impact_sound = { filename = "__FactorioExtended-Core__/sound/car-metal-impact.ogg", volume = 0.65 }, - working_sound = - { - sound = - { - filename = "__FactorioExtended-Core__/sound/accumulator-working.ogg", - volume = 1 - }, - idle_sound = { - filename = "__FactorioExtended-Core__/sound/accumulator-idle.ogg", - volume = 0.4 - }, - max_sounds_per_type = 5 - }, - }, - { - type = "accumulator", - name = "accumulator-mk3", - icon = "__FactorioExtended-Core__/graphics/icons/accumulator-mk3.png", - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "accumulator-mk3"}, - max_health = 600, - corpse = "medium-remnants", - collision_box = {{-0.9, -0.9}, {0.9, 0.9}}, - selection_box = {{-1, -1}, {1, 1}}, - energy_source = - { - type = "electric", - buffer_capacity = "80MJ", - usage_priority = "terciary", - input_flow_limit = "4800kW", - output_flow_limit = "4800kW" - }, - picture = - { - filename = "__FactorioExtended-Core__/graphics/entity/accumulators/accumulator-mk3.png", - priority = "extra-high", - width = 124, - height = 103, - shift = {0.7, -0.2} - }, - charge_animation = - { - filename = "__FactorioExtended-Core__/graphics/entity/accumulators/accumulator-mk3-charge-animation.png", - width = 138, - height = 135, - line_length = 8, - frame_count = 24, - shift = {0.482, -0.638}, - animation_speed = 0.5 - }, - charge_cooldown = 30, - charge_light = {intensity = 0.3, size = 7}, - discharge_animation = - { - filename = "__FactorioExtended-Core__/graphics/entity/accumulators/accumulator-mk3-discharge-animation.png", - width = 147, - height = 128, - line_length = 8, - frame_count = 24, - shift = {0.395, -0.525}, - animation_speed = 0.5 - }, - discharge_cooldown = 60, - discharge_light = {intensity = 0.7, size = 7}, - vehicle_impact_sound = { filename = "__FactorioExtended-Core__/sound/car-metal-impact.ogg", volume = 0.65 }, - working_sound = - { - sound = - { - filename = "__FactorioExtended-Core__/sound/accumulator-working.ogg", - volume = 1 - }, - idle_sound = { - filename = "__FactorioExtended-Core__/sound/accumulator-idle.ogg", - volume = 0.4 - }, - max_sounds_per_type = 5 - }, - } -}) \ No newline at end of file diff --git a/prototypes/entity/entity-power-poles.lua b/prototypes/entity/entity-power-poles.lua deleted file mode 100644 index b3e0af1..0000000 --- a/prototypes/entity/entity-power-poles.lua +++ /dev/null @@ -1,394 +0,0 @@ -data:extend( -{ - { - type = "electric-pole", - name = "big-electric-pole-mk2", - icon = "__FactorioExtended-Core__/graphics/icons/big-electric-pole-mk2.png", - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "big-electric-pole-mk2"}, - max_health = 150, - corpse = "medium-remnants", - resistances = - { - { - type = "fire", - percent = 100 - } - }, - collision_box = {{-0.7, -0.7}, {0.7, 0.7}}, - selection_box = {{-1, -1}, {1, 1}}, - drawing_box = {{-1, -3}, {1, 0.5}}, - maximum_wire_distance = 60, - supply_area_distance = 2, - vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 }, - pictures = - { - filename = "__FactorioExtended-Core__/graphics/entity/power-poles/big-electric-pole-mk2.png", - priority = "high", - width = 168, - height = 165, - direction_count = 4, - shift = {1.6, -1.1} - }, - connection_points = - { - { - shadow = - { - copper = {2.7, 0}, - green = {1.8, 0}, - red = {3.6, 0} - }, - wire = - { - copper = {0, -3.1}, - green = {-0.6,-3.1}, - red = {0.6,-3.1} - } - }, - { - shadow = - { - copper = {3.1, 0.2}, - green = {2.3, -0.3}, - red = {3.8, 0.6} - }, - wire = - { - copper = {-0.08, -3.15}, - green = {-0.55, -3.5}, - red = {0.3, -2.87} - } - }, - { - shadow = - { - copper = {2.9, 0.06}, - green = {3.0, -0.6}, - red = {3.0, 0.8} - }, - wire = - { - copper = {-0.1, -3.1}, - green = {-0.1, -3.55}, - red = {-0.1, -2.8} - } - }, - { - shadow = - { - copper = {3.1, 0.2}, - green = {3.8, -0.3}, - red = {2.35, 0.6} - }, - wire = - { - copper = {0, -3.25}, - green = {0.45, -3.55}, - red = {-0.54, -3.0} - } - } - }, - radius_visualisation_picture = - { - filename = "__base__/graphics/entity/small-electric-pole/electric-pole-radius-visualization.png", - width = 12, - height = 12, - priority = "extra-high-no-scale" - }, - }, - { - type = "electric-pole", - name = "big-electric-pole-mk3", - icon = "__FactorioExtended-Core__/graphics/icons/big-electric-pole-mk3.png", - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "big-electric-pole-mk3"}, - max_health = 150, - corpse = "medium-remnants", - resistances = - { - { - type = "fire", - percent = 100 - } - }, - collision_box = {{-0.7, -0.7}, {0.7, 0.7}}, - selection_box = {{-1, -1}, {1, 1}}, - drawing_box = {{-1, -3}, {1, 0.5}}, - maximum_wire_distance = 90, - supply_area_distance = 2, - vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 }, - pictures = - { - filename = "__FactorioExtended-Core__/graphics/entity/power-poles/big-electric-pole-mk3.png", - priority = "high", - width = 168, - height = 165, - direction_count = 4, - shift = {1.6, -1.1} - }, - connection_points = - { - { - shadow = - { - copper = {2.7, 0}, - green = {1.8, 0}, - red = {3.6, 0} - }, - wire = - { - copper = {0, -3.1}, - green = {-0.6,-3.1}, - red = {0.6,-3.1} - } - }, - { - shadow = - { - copper = {3.1, 0.2}, - green = {2.3, -0.3}, - red = {3.8, 0.6} - }, - wire = - { - copper = {-0.08, -3.15}, - green = {-0.55, -3.5}, - red = {0.3, -2.87} - } - }, - { - shadow = - { - copper = {2.9, 0.06}, - green = {3.0, -0.6}, - red = {3.0, 0.8} - }, - wire = - { - copper = {-0.1, -3.1}, - green = {-0.1, -3.55}, - red = {-0.1, -2.8} - } - }, - { - shadow = - { - copper = {3.1, 0.2}, - green = {3.8, -0.3}, - red = {2.35, 0.6} - }, - wire = - { - copper = {0, -3.25}, - green = {0.45, -3.55}, - red = {-0.54, -3.0} - } - } - }, - radius_visualisation_picture = - { - filename = "__base__/graphics/entity/small-electric-pole/electric-pole-radius-visualization.png", - width = 24, - height = 24, - priority = "extra-high-no-scale" - }, - }, - - - - { - type = "electric-pole", - name = "medium-electric-pole-mk2", - icon = "__FactorioExtended-Core__/graphics/icons/medium-electric-pole-mk2.png", - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "medium-electric-pole-mk2"}, - max_health = 100, - corpse = "small-remnants", - resistances = - { - { - type = "fire", - percent = 100 - } - }, - collision_box = {{-0.15, -0.15}, {0.15, 0.15}}, - selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, - drawing_box = {{-0.5, -2.8}, {0.5, 0.5}}, - maximum_wire_distance = 12, - supply_area_distance = 4.5, - vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 }, - pictures = - { - filename = "__FactorioExtended-Core__/graphics/entity/power-poles/medium-electric-pole-mk2.png", - priority = "high", - width = 136, - height = 122, - direction_count = 4, - shift = {1.4, -1.0} - }, - connection_points = - { - { - shadow = - { - copper = {2.55, 0.4}, - green = {2.0, 0.4}, - red = {3.05, 0.4} - }, - wire = - { - copper = {-0.03, -2.5}, - green = {-0.35,-2.5}, - red = {0.25,-2.5} - } - }, - { - shadow = - { - copper = {2.9, 0.1}, - green = {2.6, -0.15}, - red = {3.25, 0.35} - }, - wire = - { - copper = {0.05, -2.75}, - green = {-0.15, -2.9}, - red = {0.25, -2.55} - } - }, - { - shadow = - { - copper = {1.5, -0.2}, - green = {1.5, -0.55}, - red = {1.5, 0.1} - }, - wire = - { - copper = {-0.43, -2.4}, - green = {-0.43, -2.63}, - red = {-0.43, -2.2} - } - }, - { - shadow = - { - copper = {2.88, 0.2}, - green = {3.2, -0.1}, - red = {2.45, 0.4} - }, - wire = - { - copper = {0, -2.7}, - green = {0.22, -2.85}, - red = {-0.24, -2.55} - } - } - }, - radius_visualisation_picture = - { - filename = "__base__/graphics/entity/small-electric-pole/electric-pole-radius-visualization.png", - width = 12, - height = 12, - priority = "extra-high-no-scale" - }, - }, - { - type = "electric-pole", - name = "medium-electric-pole-mk3", - icon = "__FactorioExtended-Core__/graphics/icons/medium-electric-pole-mk3.png", - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "medium-electric-pole-mk3"}, - max_health = 100, - corpse = "small-remnants", - resistances = - { - { - type = "fire", - percent = 100 - } - }, - collision_box = {{-0.15, -0.15}, {0.15, 0.15}}, - selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, - drawing_box = {{-0.5, -2.8}, {0.5, 0.5}}, - maximum_wire_distance = 15, - supply_area_distance = 5.5, - vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 }, - pictures = - { - filename = "__FactorioExtended-Core__/graphics/entity/power-poles/medium-electric-pole-mk3.png", - priority = "high", - width = 136, - height = 122, - direction_count = 4, - shift = {1.4, -1.0} - }, - connection_points = - { - { - shadow = - { - copper = {2.55, 0.4}, - green = {2.0, 0.4}, - red = {3.05, 0.4} - }, - wire = - { - copper = {-0.03, -2.5}, - green = {-0.35,-2.5}, - red = {0.25,-2.5} - } - }, - { - shadow = - { - copper = {2.9, 0.1}, - green = {2.6, -0.15}, - red = {3.25, 0.35} - }, - wire = - { - copper = {0.05, -2.75}, - green = {-0.15, -2.9}, - red = {0.25, -2.55} - } - }, - { - shadow = - { - copper = {1.5, -0.2}, - green = {1.5, -0.55}, - red = {1.5, 0.1} - }, - wire = - { - copper = {-0.43, -2.4}, - green = {-0.43, -2.63}, - red = {-0.43, -2.2} - } - }, - { - shadow = - { - copper = {2.88, 0.2}, - green = {3.2, -0.1}, - red = {2.45, 0.4} - }, - wire = - { - copper = {0, -2.7}, - green = {0.22, -2.85}, - red = {-0.24, -2.55} - } - } - }, - radius_visualisation_picture = - { - filename = "__base__/graphics/entity/small-electric-pole/electric-pole-radius-visualization.png", - width = 12, - height = 12, - priority = "extra-high-no-scale" - }, - }, -}) \ No newline at end of file diff --git a/prototypes/entity/entity-solar-panels.lua b/prototypes/entity/entity-solar-panels.lua deleted file mode 100644 index e3eb398..0000000 --- a/prototypes/entity/entity-solar-panels.lua +++ /dev/null @@ -1,51 +0,0 @@ -data:extend( -{ - { - type = "solar-panel", - name = "solar-panel-mk2", - icon = "__FactorioExtended-Core__/graphics/icons/solar-panel-mk2.png", - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "solar-panel-mk2"}, - max_health = 500, - corpse = "big-remnants", - collision_box = {{-1.4, -1.4}, {1.4, 1.4}}, - selection_box = {{-1.5, -1.5}, {1.5, 1.5}}, - energy_source = - { - type = "electric", - usage_priority = "solar" - }, - picture = - { - filename = "__FactorioExtended-Core__/graphics/entity/solar-panels/solar-panel-mk2.png", - priority = "high", - width = 104, - height = 96 - }, - production = "240kW" - }, - { - type = "solar-panel", - name = "solar-panel-mk3", - icon = "__FactorioExtended-Core__/graphics/icons/solar-panel-mk3.png", - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "solar-panel-mk3"}, - max_health = 500, - corpse = "big-remnants", - collision_box = {{-1.4, -1.4}, {1.4, 1.4}}, - selection_box = {{-1.5, -1.5}, {1.5, 1.5}}, - energy_source = - { - type = "electric", - usage_priority = "solar" - }, - picture = - { - filename = "__FactorioExtended-Core__/graphics/entity/solar-panels/solar-panel-mk3.png", - priority = "high", - width = 104, - height = 96 - }, - production = "960kW" - } -}) \ No newline at end of file diff --git a/prototypes/entity/entity-substations.lua b/prototypes/entity/entity-substations.lua deleted file mode 100644 index d76545c..0000000 --- a/prototypes/entity/entity-substations.lua +++ /dev/null @@ -1,264 +0,0 @@ -data:extend({ -{ - type = "electric-pole", - name = "substation-mk2", - icon = "__FactorioExtended-Core__/graphics/icons/substation-mk2.png", - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "substation-mk2"}, - max_health = 200, - corpse = "medium-remnants", - resistances = - { - { - type = "fire", - percent = 90 - } - }, - collision_box = {{-0.9, -0.9}, {0.9, 0.9}}, - selection_box = {{-1, -1}, {1, 1}}, - drawing_box = {{-1, -1.5}, {1, 1}}, - maximum_wire_distance = 28, - supply_area_distance = 14, - pictures = - { - filename = "__FactorioExtended-Core__/graphics/entity/substations/substation-mk2.png", - priority = "high", - width = 132, - height = 144, - axially_symmetrical = false, - direction_count = 4, - shift = {0.9, -1} - }, - working_sound = - { - sound = { filename = "__base__/sound/substation.ogg" }, - apparent_volume = 1.5, - }, - connection_points = - { - { - shadow = - { - copper = {1.9, -0.6}, - green = {1.3, -0.6}, - red = {2.65, -0.6} - }, - wire = - { - copper = {-0.23, -2.65}, - green = {-0.85,-2.65}, - red = {0.35,-2.65} - } - }, - { - shadow = - { - copper = {1.9, -0.6}, - green = {1.2, -0.8}, - red = {2.5, -0.35} - }, - wire = - { - copper = {-0.26, -2.71}, - green = {-0.67,-3}, - red = {0.17,-2.47} - } - }, - { - shadow = - { - copper = {1.9, -0.6}, - green = {1.9, -0.9}, - red = {1.9, -0.3} - }, - wire = - { - copper = {-0.23, -2.7}, - green = {-0.23,-3.2}, - red = {-0.23,-2.35} - } - }, - { - shadow = - { - copper = {1.8, -0.7}, - green = {1.3, -0.6}, - red = {2.4, -1.15} - }, - wire = - { - copper = {-0.2, -2.7}, - green = {-0.62,-2.45}, - red = {0.25,-2.98} - } - } - }, - copper_wire_picture = - { - filename = "__base__/graphics/entity/small-electric-pole/copper-wire.png", - priority = "extra-high-no-scale", - width = 224, - height = 46 - }, - green_wire_picture = - { - filename = "__base__/graphics/entity/small-electric-pole/green-wire.png", - priority = "extra-high-no-scale", - width = 224, - height = 46 - }, - radius_visualisation_picture = - { - filename = "__base__/graphics/entity/small-electric-pole/electric-pole-radius-visualization.png", - width = 12, - height = 12 - }, - red_wire_picture = - { - filename = "__base__/graphics/entity/small-electric-pole/red-wire.png", - priority = "extra-high-no-scale", - width = 224, - height = 46 - }, - wire_shadow_picture = - { - filename = "__base__/graphics/entity/small-electric-pole/wire-shadow.png", - priority = "extra-high-no-scale", - width = 224, - height = 46 - }, - fast_replaceable_group = "electric-pole-2x2" -}, - - -{ - type = "electric-pole", - name = "substation-mk3", - icon = "__FactorioExtended-Core__/graphics/icons/substation-mk3.png", - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "substation-mk3"}, - max_health = 200, - corpse = "medium-remnants", - resistances = - { - { - type = "fire", - percent = 90 - } - }, - collision_box = {{-0.9, -0.9}, {0.9, 0.9}}, - selection_box = {{-1, -1}, {1, 1}}, - drawing_box = {{-1, -1.5}, {1, 1}}, - maximum_wire_distance = 42, - supply_area_distance = 21, - pictures = - { - filename = "__FactorioExtended-Core__/graphics/entity/substations/substation-mk3.png", - priority = "high", - width = 132, - height = 144, - axially_symmetrical = false, - direction_count = 4, - shift = {0.9, -1} - }, - working_sound = - { - sound = { filename = "__base__/sound/substation.ogg" }, - apparent_volume = 1.5, - }, - connection_points = - { - { - shadow = - { - copper = {1.9, -0.6}, - green = {1.3, -0.6}, - red = {2.65, -0.6} - }, - wire = - { - copper = {-0.23, -2.65}, - green = {-0.85,-2.65}, - red = {0.35,-2.65} - } - }, - { - shadow = - { - copper = {1.9, -0.6}, - green = {1.2, -0.8}, - red = {2.5, -0.35} - }, - wire = - { - copper = {-0.26, -2.71}, - green = {-0.67,-3}, - red = {0.17,-2.47} - } - }, - { - shadow = - { - copper = {1.9, -0.6}, - green = {1.9, -0.9}, - red = {1.9, -0.3} - }, - wire = - { - copper = {-0.23, -2.7}, - green = {-0.23,-3.2}, - red = {-0.23,-2.35} - } - }, - { - shadow = - { - copper = {1.8, -0.7}, - green = {1.3, -0.6}, - red = {2.4, -1.15} - }, - wire = - { - copper = {-0.2, -2.7}, - green = {-0.62,-2.45}, - red = {0.25,-2.98} - } - } - }, - copper_wire_picture = - { - filename = "__base__/graphics/entity/small-electric-pole/copper-wire.png", - priority = "extra-high-no-scale", - width = 224, - height = 46 - }, - green_wire_picture = - { - filename = "__base__/graphics/entity/small-electric-pole/green-wire.png", - priority = "extra-high-no-scale", - width = 224, - height = 46 - }, - radius_visualisation_picture = - { - filename = "__base__/graphics/entity/small-electric-pole/electric-pole-radius-visualization.png", - width = 12, - height = 12 - }, - red_wire_picture = - { - filename = "__base__/graphics/entity/small-electric-pole/red-wire.png", - priority = "extra-high-no-scale", - width = 224, - height = 46 - }, - wire_shadow_picture = - { - filename = "__base__/graphics/entity/small-electric-pole/wire-shadow.png", - priority = "extra-high-no-scale", - width = 224, - height = 46 - }, - fast_replaceable_group = "electric-pole-2x2" -} -}) \ No newline at end of file diff --git a/prototypes/entity/medium-electric-pole.lua b/prototypes/entity/medium-electric-pole.lua new file mode 100644 index 0000000..e5b3e6d --- /dev/null +++ b/prototypes/entity/medium-electric-pole.lua @@ -0,0 +1,36 @@ +-- medium-electric-pole mk1 mk2 mk3 +-- max_health 100 150 200 +-- maximum_wire_distance 9 12 15 +-- supply_area_distance 3.5 4.5 5.5 +-- +local mk2 = table.deepcopy(data.raw["electric-pole"]["medium-electric-pole"]) +mk2.name = "medium-electric-pole-mk2" +mk2.icon = "__FactorioExtended-Plus-Power__/graphics/icons/" .. mk2.name .. ".png" +mk2.icon_size = 64 +mk2.icon_mipmaps = 4 +mk2.minable.result = mk2.name +mk2.max_health = 150 +mk2.next_upgrade = "medium-electric-pole-mk3" +mk2.maximum_wire_distance = 12 +mk2.supply_area_distance = 4.5 +mk2.resistances = {{type = "fire", percent = 100}} + +mk2.pictures.layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/" .. mk2.name .. ".png" +mk2.pictures.layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/hr-" .. mk2.name .. ".png" + +local mk3 = table.deepcopy(data.raw["electric-pole"]["medium-electric-pole"]) +mk3.name = "medium-electric-pole-mk3" +mk3.icon = "__FactorioExtended-Plus-Power__/graphics/icons/" .. mk3.name .. ".png" +mk3.icon_size = 64 +mk3.icon_mipmaps = 4 +mk3.minable.result = mk3.name +mk3.max_health = 200 +mk3.next_upgrade = nil +mk3.maximum_wire_distance = 15 +mk3.supply_area_distance = 5.5 +mk3.resistances = {{type = "fire", percent = 100}} + +mk3.pictures.layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/" .. mk3.name .. ".png" +mk3.pictures.layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/hr-" .. mk3.name .. ".png" + +data:extend({mk2, mk3}) diff --git a/prototypes/entity/solar-panel.lua b/prototypes/entity/solar-panel.lua new file mode 100644 index 0000000..eea003c --- /dev/null +++ b/prototypes/entity/solar-panel.lua @@ -0,0 +1,36 @@ +-- Don't Match vanilla collision if bobpower is installed +if not mods["bobpower"] then + data.raw["solar-panel"]["solar-panel"].collision_box = {{-1.2, -1.2}, {1.2, 1.2}} +end + +-- solar-panel mk1 mk2 mk3 +-- max_health 200 400 600 +-- production 60kW 240kW +-- +local mk2 = table.deepcopy(data.raw["solar-panel"]["solar-panel"]) +mk2.name = "solar-panel-mk2" +mk2.icon = "__FactorioExtended-Plus-Power__/graphics/icons/" .. mk2.name .. ".png" +mk2.icon_size = 64 +mk2.icon_mipmaps = 4 +mk2.minable.result = mk2.name +mk2.max_health = 400 +mk2.next_upgrade = "solar-panel-mk3" +mk2.production = "240kW" + +mk2.picture.layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/" .. mk2.name .. ".png" +mk2.picture.layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/hr-" .. mk2.name .. ".png" + +local mk3 = table.deepcopy(data.raw["solar-panel"]["solar-panel"]) +mk3.name = "solar-panel-mk3" +mk3.icon = "__FactorioExtended-Plus-Power__/graphics/icons/" .. mk3.name .. ".png" +mk3.icon_size = 64 +mk3.icon_mipmaps = 4 +mk3.minable.result = mk3.name +mk3.max_health = 400 +mk3.next_upgrade = nil +mk3.production = "960kW" + +mk3.picture.layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/" .. mk3.name .. ".png" +mk3.picture.layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/hr-" .. mk3.name .. ".png" + +data:extend({mk2, mk3}) diff --git a/prototypes/entity/steam-engine.lua b/prototypes/entity/steam-engine.lua new file mode 100644 index 0000000..e5b31a2 --- /dev/null +++ b/prototypes/entity/steam-engine.lua @@ -0,0 +1,38 @@ +-- steam-engine mk1 mk2 mk3 +-- max_health 400 600 1200 +-- effectivity 1 1.5 2 +-- fluid_usage_per_tick 0.5 0.75 1 +-- +local mk2 = table.deepcopy(data.raw["generator"]["steam-engine"]) +mk2.name = "steam-engine-mk2" +mk2.icon = "__FactorioExtended-Plus-Power__/graphics/icons/" .. mk2.name .. ".png" +mk2.icon_size = 64 +mk2.icon_mipmaps = 4 +mk2.minable.result = mk2.name +mk2.max_health = 300 +mk2.next_upgrade = "steam-engine-mk3" +mk2.effectivity = 1.5 +mk2.fluid_usage_per_tick = 0.75 + +mk2.horizontal_animation.layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/steam-engine-H.png" +mk2.horizontal_animation.layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/hr-steam-engine-H.png" +mk2.vertical_animation.layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/steam-engine-V.png" +mk2.vertical_animation.layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/hr-steam-engine-V.png" + +local mk3 = table.deepcopy(data.raw["generator"]["steam-engine"]) +mk3.name = "steam-engine-mk3" +mk3.icon = "__FactorioExtended-Plus-Power__/graphics/icons/" .. mk3.name .. ".png" +mk3.icon_size = 64 +mk3.icon_mipmaps = 4 +mk3.minable.result = mk3.name +mk3.max_health = 1200 +mk3.next_upgrade = nil +mk3.effectivity = 2 +mk3.fluid_usage_per_tick = 1 + +mk3.horizontal_animation.layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/steam-engine-H.png" +mk3.horizontal_animation.layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/hr-steam-engine-H.png" +mk3.vertical_animation.layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/steam-engine-V.png" +mk3.vertical_animation.layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/hr-steam-engine-V.png" + +data:extend({mk2, mk3}) diff --git a/prototypes/entity/substation.lua b/prototypes/entity/substation.lua new file mode 100644 index 0000000..6efc97a --- /dev/null +++ b/prototypes/entity/substation.lua @@ -0,0 +1,34 @@ +-- substation mk1 mk2 mk3 +-- max_health 200 400 600 +-- maximum_wire_distance 18 28 42 +-- supply_area_distance 9 14 21 +-- +local mk2 = table.deepcopy(data.raw["electric-pole"]["substation"]) +mk2.name = "substation-mk2" +mk2.icon = "__FactorioExtended-Plus-Power__/graphics/icons/" .. mk2.name .. ".png" +mk2.icon_size = 64 +mk2.icon_mipmaps = 4 +mk2.minable.result = mk2.name +mk2.max_health = 400 +mk2.next_upgrade = "substation-mk3" +mk2.maximum_wire_distance = 28 +mk2.supply_area_distance = 14 + +mk2.pictures.layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/" .. mk2.name .. ".png" +mk2.pictures.layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk2.name .. "/hr-" .. mk2.name .. ".png" + +local mk3 = table.deepcopy(data.raw["electric-pole"]["substation"]) +mk3.name = "substation-mk3" +mk3.icon = "__FactorioExtended-Plus-Power__/graphics/icons/" .. mk3.name .. ".png" +mk3.icon_size = 64 +mk3.icon_mipmaps = 4 +mk3.minable.result = mk3.name +mk3.max_health = 600 +mk3.next_upgrade = nil +mk3.maximum_wire_distance = 42 +mk3.supply_area_distance = 21 + +mk3.pictures.layers[1].filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/" .. mk3.name .. ".png" +mk3.pictures.layers[1].hr_version.filename = "__FactorioExtended-Plus-Power__/graphics/entity/" .. mk3.name .. "/hr-" .. mk3.name .. ".png" + +data:extend({mk2, mk3}) diff --git a/prototypes/item/item-accumulators.lua b/prototypes/item/item-accumulators.lua deleted file mode 100644 index 55dfbc7..0000000 --- a/prototypes/item/item-accumulators.lua +++ /dev/null @@ -1,23 +0,0 @@ -data:extend( -{ - { - type = "item", - name = "accumulator-mk2", - icon = "__FactorioExtended-Core__/graphics/icons/accumulator-mk2.png", - flags = {"goes-to-quickbar"}, - subgroup = "fb-energy-production", - order = "a[accumulator-mk2]-c", - place_result = "accumulator-mk2", - stack_size = 50 - }, - { - type = "item", - name = "accumulator-mk3", - icon = "__FactorioExtended-Core__/graphics/icons/accumulator-mk3.png", - flags = {"goes-to-quickbar"}, - subgroup = "fb-energy-production", - order = "a[accumulator-mk3]-d", - place_result = "accumulator-mk3", - stack_size = 50 - } -}) \ No newline at end of file diff --git a/prototypes/item/item-power-poles.lua b/prototypes/item/item-power-poles.lua deleted file mode 100644 index f45d485..0000000 --- a/prototypes/item/item-power-poles.lua +++ /dev/null @@ -1,45 +0,0 @@ -data:extend( -{ - { - type = "item", - name = "big-electric-pole-mk2", - icon = "__FactorioExtended-Core__/graphics/icons/big-electric-pole-mk2.png", - flags = {"goes-to-quickbar"}, - subgroup = "fb-energy-transfer", - order = "a[big-electric-pole-mk2]-c", - place_result = "big-electric-pole-mk2", - stack_size = 50 - }, - { - type = "item", - name = "big-electric-pole-mk3", - icon = "__FactorioExtended-Core__/graphics/icons/big-electric-pole-mk3.png", - flags = {"goes-to-quickbar"}, - subgroup = "fb-energy-transfer", - order = "a[big-electric-pole-mk3]-d", - place_result = "big-electric-pole-mk3", - stack_size = 50 - }, - - - { - type = "item", - name = "medium-electric-pole-mk2", - icon = "__FactorioExtended-Core__/graphics/icons/medium-electric-pole-mk2.png", - flags = {"goes-to-quickbar"}, - subgroup = "fb-energy-transfer", - order = "a[medium-electric-pole-mk2]-a", - place_result = "medium-electric-pole-mk2", - stack_size = 50 - }, - { - type = "item", - name = "medium-electric-pole-mk3", - icon = "__FactorioExtended-Core__/graphics/icons/medium-electric-pole-mk3.png", - flags = {"goes-to-quickbar"}, - subgroup = "fb-energy-transfer", - order = "a[medium-electric-pole-mk3]-b", - place_result = "medium-electric-pole-mk3", - stack_size = 50 - }, -}) \ No newline at end of file diff --git a/prototypes/item/item-solar-panels.lua b/prototypes/item/item-solar-panels.lua deleted file mode 100644 index 43c9cd1..0000000 --- a/prototypes/item/item-solar-panels.lua +++ /dev/null @@ -1,23 +0,0 @@ -data:extend( -{ - { - type = "item", - name = "solar-panel-mk2", - icon = "__FactorioExtended-Core__/graphics/icons/solar-panel-mk2.png", - flags = {"goes-to-quickbar"}, - subgroup = "fb-energy-production", - order = "a[solar-panel-mk2]-a", - place_result = "solar-panel-mk2", - stack_size = 50 - }, - { - type = "item", - name = "solar-panel-mk3", - icon = "__FactorioExtended-Core__/graphics/icons/solar-panel-mk3.png", - flags = {"goes-to-quickbar"}, - subgroup = "fb-energy-production", - order = "a[solar-panel-mk3]-b", - place_result = "solar-panel-mk3", - stack_size = 50 - } -}) \ No newline at end of file diff --git a/prototypes/item/item-substations.lua b/prototypes/item/item-substations.lua deleted file mode 100644 index deacc1e..0000000 --- a/prototypes/item/item-substations.lua +++ /dev/null @@ -1,23 +0,0 @@ -data:extend( -{ -{ - type = "item", - name = "substation-mk2", - icon = "__FactorioExtended-Core__/graphics/icons/substation-mk2.png", - flags = {"goes-to-quickbar"}, - subgroup = "fb-energy-transfer", - order = "a[substation-mk2]-e", - place_result = "substation-mk2", - stack_size = 50 -}, -{ - type = "item", - name = "substation-mk3", - icon = "__FactorioExtended-Core__/graphics/icons/substation-mk3.png", - flags = {"goes-to-quickbar"}, - subgroup = "fb-energy-transfer", - order = "a[substation-mk3]-f", - place_result = "substation-mk3", - stack_size = 50 -} -}) \ No newline at end of file diff --git a/prototypes/item/items.lua b/prototypes/item/items.lua new file mode 100644 index 0000000..16f71e4 --- /dev/null +++ b/prototypes/item/items.lua @@ -0,0 +1,35 @@ +local Constant = require("constant") + +local function CloneWithTint(source, name, subgroup, order, tint, icon_name) + local item = table.deepcopy(data.raw.item[source]) + item.name = name + item.place_result = item.name + if icon_name ~= nil then + item.icon = string.format("__FactorioExtended-Plus-Power__/graphics/icons/%s", icon_name) + end + item.icons = {{icon = item.icon, icon_mipmaps = 4, icon_size = 64, tint = tint}} + item.subgroup = subgroup + item.order = order + data:extend({item}) +end + +local items = { + {source = "accumulator", name = "accumulator-mk2", subgroup = "fb-energy-production", order = "a[accumulator-mk2]-c", icon_name = "accumulator-mk2.png"}, + {source = "accumulator", name = "accumulator-mk3", subgroup = "fb-energy-production", order = "a[accumulator-mk3]-d", icon_name = "accumulator-mk3.png"}, + {source = "boiler", name = "boiler-mk2", subgroup = "fb-energy-production", order = "a-f-a", icon_name = "boiler-mk2.png"}, + {source = "boiler", name = "boiler-mk3", subgroup = "fb-energy-production", order = "a-f-a", icon_name = "boiler-mk3.png"}, + {source = "steam-engine", name = "steam-engine-mk2", subgroup = "fb-energy-production", order = "a-e-a", icon_name = "steam-engine-mk2.png"}, + {source = "steam-engine", name = "steam-engine-mk3", subgroup = "fb-energy-production", order = "a-e-a", icon_name = "steam-engine-mk3.png"}, + {source = "solar-panel", name = "solar-panel-mk2", subgroup = "fb-energy-production", order = "a[solar-panel-mk2]-a", icon_name = "solar-panel-mk2.png"}, + {source = "solar-panel", name = "solar-panel-mk3", subgroup = "fb-energy-production", order = "a[solar-panel-mk3]-b", icon_name = "solar-panel-mk3.png"}, + {source = "substation", name = "substation-mk2", subgroup = "fb-energy-transfer", order = "a[substation-mk2]-e", icon_name = "substation-mk2.png"}, + {source = "substation", name = "substation-mk3", subgroup = "fb-energy-transfer", order = "a[substation-mk3]-f", icon_name = "substation-mk3.png"}, + {source = "medium-electric-pole", name = "medium-electric-pole-mk2", subgroup = "fb-energy-transfer", order = "a[medium-electric-pole-mk2]-a", icon_name = "medium-electric-pole-mk2.png"}, + {source = "medium-electric-pole", name = "medium-electric-pole-mk3", subgroup = "fb-energy-transfer", order = "a[medium-electric-pole-mk3]-b", icon_name = "medium-electric-pole-mk3.png"}, + {source = "big-electric-pole", name = "big-electric-pole-mk2", subgroup = "fb-energy-transfer", order = "a[big-electric-pole-mk2]-c", icon_name = "big-electric-pole-mk2.png"}, + {source = "big-electric-pole", name = "big-electric-pole-mk3", subgroup = "fb-energy-transfer", order = "a[big-electric-pole-mk3]-d", icon_name = "big-electric-pole-mk3.png"} +} + +for _, item in pairs(items) do + CloneWithTint(item.source, item.name, item.subgroup, item.order, item.tint, item.icon_name) +end diff --git a/prototypes/recipe/recipe-accumulators.lua b/prototypes/recipe/recipe-accumulators.lua index 91f7319..0744c2a 100644 --- a/prototypes/recipe/recipe-accumulators.lua +++ b/prototypes/recipe/recipe-accumulators.lua @@ -8,7 +8,7 @@ data:extend( ingredients = { {"accumulator", 4}, - {"iron-plate", 25} + {"iron-plate", 25} }, result = "accumulator-mk2" }, @@ -20,7 +20,7 @@ data:extend( ingredients = { {"accumulator-mk2", 4}, - {"steel-plate", 25} + {"steel-plate", 25} }, result = "accumulator-mk3" } diff --git a/prototypes/recipe/recipe-generators.lua b/prototypes/recipe/recipe-generators.lua new file mode 100644 index 0000000..c27afba --- /dev/null +++ b/prototypes/recipe/recipe-generators.lua @@ -0,0 +1,55 @@ +data:extend( +{ + { + type = "recipe", + name = "steam-engine-mk2", + enabled = "false", + ingredients = + { + {"steam-engine", 2}, + {"engine-unit", 2}, + {"titanium-alloy", 15}, + {"advanced-circuit", 5} + }, + result = "steam-engine-mk2" + }, + { + type = "recipe", + name = "steam-engine-mk3", + energy_required = 1, + enabled = "false", + ingredients = + { + {"steam-engine-mk2", 2}, + {"titanium-alloy", 25}, + {"processing-unit", 5} + }, + result = "steam-engine-mk3" + }, + { + type = "recipe", + name = "boiler-mk2", + energy_required = 5, + enabled = "false", + ingredients = + { + {"boiler", 2}, + {"titanium-alloy", 15}, + {"advanced-circuit", 5} + }, + result = "boiler-mk2" + }, + { + type = "recipe", + name = "boiler-mk3", + energy_required = 8, + enabled = "false", + ingredients = + { + {"boiler-mk2", 2}, + {"titanium-alloy", 25}, + {"processing-unit", 5} + }, + result = "boiler-mk3" + } +}) \ No newline at end of file diff --git a/prototypes/recipe/recipe-power-poles.lua b/prototypes/recipe/recipe-power-poles.lua index e1f598d..2e314b3 100644 --- a/prototypes/recipe/recipe-power-poles.lua +++ b/prototypes/recipe/recipe-power-poles.lua @@ -1,34 +1,32 @@ data:extend( { { - type = "recipe", - energy_required = 0.5, - name = "big-electric-pole-mk2", - enabled = "false", - ingredients = - { - {"big-electric-pole", 1}, - {"electronic-circuit", 5} - }, - result = "big-electric-pole-mk2" + type = "recipe", + energy_required = 0.5, + name = "big-electric-pole-mk2", + enabled = "false", + ingredients = + { + {"big-electric-pole", 1}, + {"electronic-circuit", 5} + }, + result = "big-electric-pole-mk2" }, { - type = "recipe", - energy_required = 0.5, - name = "big-electric-pole-mk3", - enabled = "false", - ingredients = - { - {"big-electric-pole-mk2", 1}, - {"advanced-circuit", 5} - }, - result = "big-electric-pole-mk3" + type = "recipe", + energy_required = 0.5, + name = "big-electric-pole-mk3", + enabled = "false", + ingredients = + { + {"big-electric-pole-mk2", 1}, + {"advanced-circuit", 5} + }, + result = "big-electric-pole-mk3" }, - - { type = "recipe", - energy_required = 0.5, + energy_required = 0.5, name = "medium-electric-pole-mk2", enabled = false, ingredients = @@ -40,7 +38,7 @@ data:extend( }, { type = "recipe", - energy_required = 0.5, + energy_required = 0.5, name = "medium-electric-pole-mk3", enabled = false, ingredients = diff --git a/prototypes/recipe/recipe-substations.lua b/prototypes/recipe/recipe-substations.lua index 1b7ea7a..55ca195 100644 --- a/prototypes/recipe/recipe-substations.lua +++ b/prototypes/recipe/recipe-substations.lua @@ -7,7 +7,7 @@ data:extend( enabled = "false", ingredients = { - {"substation", 1}, + {"substation", 1}, {"advanced-circuit", 10}, {"effectivity-module", 1} }, @@ -20,8 +20,8 @@ data:extend( enabled = "false", ingredients = { - {"substation-mk2", 1}, - {"processing-unit", 10}, + {"substation-mk2", 1}, + {"processing-unit", 10}, {"effectivity-module-2", 1} }, result = "substation-mk3" diff --git a/prototypes/technology/technology-electrical-engineer.lua b/prototypes/technology/technology-electrical-engineer.lua index 4a7515d..51db7ff 100644 --- a/prototypes/technology/technology-electrical-engineer.lua +++ b/prototypes/technology/technology-electrical-engineer.lua @@ -1,88 +1,181 @@ data:extend( -{ - { - type = "technology", - name = "electrical-engineer-1", - icon = "__FactorioExtended-Core__/graphics/technology/electrical-engineer.png", - icon_size = 128, - prerequisites = {"solar-energy", "electric-energy-accumulators-1", "electric-energy-distribution-2"}, - effects = { - { - type = "unlock-recipe", - recipe = "solar-panel-mk2" - }, - { - type = "unlock-recipe", - recipe = "accumulator-mk2" - }, - { - type = "unlock-recipe", - recipe = "substation-mk2" - }, - { - type = "unlock-recipe", - recipe = "big-electric-pole-mk2" - }, - { - type = "unlock-recipe", - recipe = "medium-electric-pole-mk2" - } - }, - unit = - { - count = 300, - ingredients = - { - {"science-pack-1", 1}, - {"science-pack-2", 1}, - {"science-pack-3", 1} - }, - time = 30 - }, - order = "f-b-b-a", - }, - { - type = "technology", - name = "electrical-engineer-2", - icon = "__FactorioExtended-Core__/graphics/technology/electrical-engineer.png", - icon_size = 128, - prerequisites = {"electrical-engineer-1"}, - effects = - { - { - type = "unlock-recipe", - recipe = "solar-panel-mk3" - }, - { - type = "unlock-recipe", - recipe = "accumulator-mk3" - }, - { - type = "unlock-recipe", - recipe = "substation-mk3" - }, - { - type = "unlock-recipe", - recipe = "big-electric-pole-mk3" - }, - { - type = "unlock-recipe", - recipe = "medium-electric-pole-mk3" - } - }, - unit = - { - count = 300, - ingredients = - { - {"science-pack-1", 2}, - {"science-pack-2", 2}, - {"science-pack-3", 1} - }, - time = 60 - }, - - order = "f-b-b-b", - } -}) \ No newline at end of file + { + type = "technology", + name = "solar-energy-2", + icon_size = 256, + icon = "__base__/graphics/technology/solar-energy.png", + effects = { + { + type = "unlock-recipe", + recipe = "solar-panel-mk2" + } + }, + prerequisites = {"solar-energy", "advanced-electronics", "titanium-processing"}, + unit = { + count = 350, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1} + }, + time = 30 + }, + order = "a-h-d" + }, + { + type = "technology", + name = "solar-energy-3", + icon_size = 256, + icon = "__base__/graphics/technology/solar-energy.png", + effects = { + { + type = "unlock-recipe", + recipe = "solar-panel-mk3" + } + }, + prerequisites = {"solar-energy-2", "advanced-electronics-2"}, + unit = { + count = 350, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1}, + {"utility-science-pack", 1} + }, + time = 30 + }, + order = "a-h-e" + }, + { + type = "technology", + name = "electric-energy-accumulators-2", + icon_size = 256, + icon = "__base__/graphics/technology/electric-energy-acumulators.png", + localised_name = {"technology-name.electric-energy-accumulators-2"}, + effects = { + { + type = "unlock-recipe", + recipe = "accumulator-mk2" + } + }, + prerequisites = {"electric-energy-accumulators", "titanium-processing"}, + unit = { + count = 250, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1} + }, + time = 30 + }, + order = "c-e-b" + }, + { + type = "technology", + name = "electric-energy-accumulators-3", + icon_size = 256, + icon = "__base__/graphics/technology/electric-energy-acumulators.png", + localised_name = {"technology-name.electric-energy-accumulators-3"}, + effects = { + { + type = "unlock-recipe", + recipe = "accumulator-mk3" + } + }, + prerequisites = {"electric-energy-accumulators-2"}, + unit = { + count = 350, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1} + }, + time = 30 + }, + order = "c-e-c" + }, + { + type = "technology", + name = "electrical-engineer", + icon = "__FactorioExtended-Plus-Power__/graphics/technology/electrical-engineer.png", + icon_size = 128, + prerequisites = {"solar-energy", "electric-energy-accumulators", "electric-energy-distribution-2", "titanium-processing"}, + effects = { + { + type = "unlock-recipe", + recipe = "substation-mk2" + }, + { + type = "unlock-recipe", + recipe = "big-electric-pole-mk2" + }, + { + type = "unlock-recipe", + recipe = "medium-electric-pole-mk2" + }, + { + type = "unlock-recipe", + recipe = "steam-engine-mk2" + }, + { + type = "unlock-recipe", + recipe = "boiler-mk2" + } + }, + unit = { + count = 300, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1} + }, + time = 30 + }, + order = "f-b-b-a" + }, + { + type = "technology", + name = "electrical-engineer-2", + icon = "__FactorioExtended-Plus-Power__/graphics/technology/electrical-engineer.png", + icon_size = 128, + prerequisites = {"electrical-engineer"}, + effects = { + { + type = "unlock-recipe", + recipe = "substation-mk3" + }, + { + type = "unlock-recipe", + recipe = "big-electric-pole-mk3" + }, + { + type = "unlock-recipe", + recipe = "medium-electric-pole-mk3" + }, + { + type = "unlock-recipe", + recipe = "steam-engine-mk3" + }, + { + type = "unlock-recipe", + recipe = "boiler-mk3" + } + }, + unit = { + count = 400, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1} + }, + time = 60 + }, + order = "f-b-b-b" + } + } +) diff --git a/thumbnail.png b/thumbnail.png new file mode 100644 index 0000000..51a3c94 Binary files /dev/null and b/thumbnail.png differ