From 9e163491a56ff4fb8eadc7dd22142c4ee539f24d Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Mon, 14 Apr 2025 07:56:28 -0700 Subject: Adds README and build/install scripts (linux only) --- .gitignore | 1 + LICENSE | 21 -- README.md | 9 + build.sh | 7 + changelog.txt | 0 control.lua | 308 --------------------- data.lua | 12 - .../construction-robot-reflection.png | Bin 231 -> 0 bytes .../construction-robot-shadow.png | Bin 25931 -> 0 bytes .../construction-robot-working.png | Bin 193605 -> 0 bytes .../construction-robot/construction-robot.png | Bin 231204 -> 0 bytes graphics/entity/iron-active-provider-chest.png | Bin 11556 -> 0 bytes graphics/entity/iron-buffer-chest.png | Bin 26169 -> 0 bytes graphics/entity/iron-chest.png | Bin 10749 -> 0 bytes graphics/entity/iron-passive-provider-chest.png | Bin 26153 -> 0 bytes graphics/entity/iron-requester-chest.png | Bin 26081 -> 0 bytes graphics/entity/iron-storage-chest.png | Bin 26207 -> 0 bytes .../logistic-robot/logistic-robot-shadow.png | Bin 35156 -> 0 bytes graphics/entity/logistic-robot/logistic-robot.png | Bin 433640 -> 0 bytes graphics/items/construction-robot.png | Bin 26256 -> 0 bytes graphics/items/inventory-blocker.png | Bin 5917 -> 0 bytes graphics/items/iron-active-provider-chest.png | Bin 12892 -> 0 bytes graphics/items/iron-buffer-chest.png | Bin 11899 -> 0 bytes graphics/items/iron-chest.png | Bin 12063 -> 0 bytes graphics/items/iron-passive-provider-chest.png | Bin 27424 -> 0 bytes graphics/items/iron-requester-chest.png | Bin 27295 -> 0 bytes graphics/items/iron-storage-chest.png | Bin 27432 -> 0 bytes graphics/items/logistic-robot.png | Bin 24641 -> 0 bytes graphics/technology/logistic-system-early.png | Bin 152092 -> 0 bytes graphics/technology/logistic-system.png | Bin 151206 -> 0 bytes info.json | 18 -- install.sh | 5 + locale/en/locale.cfg | 25 -- locale/ru/locale.cfg | 36 --- prototypes/energy-pad.lua | 51 ---- prototypes/entities.lua | 70 ----- prototypes/item.lua | 89 ------ prototypes/recipe.lua | 111 -------- prototypes/tech.lua | 73 ----- thumbnail.png | Bin 4580775 -> 0 bytes von-newmann-2/LICENSE | 21 ++ von-newmann-2/changelog.txt | 0 von-newmann-2/control.lua | 308 +++++++++++++++++++++ von-newmann-2/data.lua | 12 + .../construction-robot-reflection.png | Bin 0 -> 231 bytes .../construction-robot-shadow.png | Bin 0 -> 25931 bytes .../construction-robot-working.png | Bin 0 -> 193605 bytes .../construction-robot/construction-robot.png | Bin 0 -> 231204 bytes .../graphics/entity/iron-active-provider-chest.png | Bin 0 -> 11556 bytes .../graphics/entity/iron-buffer-chest.png | Bin 0 -> 26169 bytes von-newmann-2/graphics/entity/iron-chest.png | Bin 0 -> 10749 bytes .../entity/iron-passive-provider-chest.png | Bin 0 -> 26153 bytes .../graphics/entity/iron-requester-chest.png | Bin 0 -> 26081 bytes .../graphics/entity/iron-storage-chest.png | Bin 0 -> 26207 bytes .../logistic-robot/logistic-robot-shadow.png | Bin 0 -> 35156 bytes .../entity/logistic-robot/logistic-robot.png | Bin 0 -> 433640 bytes .../graphics/items/construction-robot.png | Bin 0 -> 26256 bytes von-newmann-2/graphics/items/inventory-blocker.png | Bin 0 -> 5917 bytes .../graphics/items/iron-active-provider-chest.png | Bin 0 -> 12892 bytes von-newmann-2/graphics/items/iron-buffer-chest.png | Bin 0 -> 11899 bytes von-newmann-2/graphics/items/iron-chest.png | Bin 0 -> 12063 bytes .../graphics/items/iron-passive-provider-chest.png | Bin 0 -> 27424 bytes .../graphics/items/iron-requester-chest.png | Bin 0 -> 27295 bytes .../graphics/items/iron-storage-chest.png | Bin 0 -> 27432 bytes von-newmann-2/graphics/items/logistic-robot.png | Bin 0 -> 24641 bytes .../graphics/technology/logistic-system-early.png | Bin 0 -> 152092 bytes .../graphics/technology/logistic-system.png | Bin 0 -> 151206 bytes von-newmann-2/info.json | 18 ++ von-newmann-2/locale/en/locale.cfg | 25 ++ von-newmann-2/locale/ru/locale.cfg | 36 +++ von-newmann-2/prototypes/energy-pad.lua | 51 ++++ von-newmann-2/prototypes/entities.lua | 70 +++++ von-newmann-2/prototypes/item.lua | 89 ++++++ von-newmann-2/prototypes/recipe.lua | 111 ++++++++ von-newmann-2/prototypes/tech.lua | 73 +++++ von-newmann-2/thumbnail.png | Bin 0 -> 4580775 bytes 76 files changed, 836 insertions(+), 814 deletions(-) create mode 100644 .gitignore delete mode 100644 LICENSE create mode 100644 README.md create mode 100755 build.sh delete mode 100644 changelog.txt delete mode 100644 control.lua delete mode 100644 data.lua delete mode 100644 graphics/entity/construction-robot/construction-robot-reflection.png delete mode 100644 graphics/entity/construction-robot/construction-robot-shadow.png delete mode 100644 graphics/entity/construction-robot/construction-robot-working.png delete mode 100644 graphics/entity/construction-robot/construction-robot.png delete mode 100644 graphics/entity/iron-active-provider-chest.png delete mode 100644 graphics/entity/iron-buffer-chest.png delete mode 100644 graphics/entity/iron-chest.png delete mode 100644 graphics/entity/iron-passive-provider-chest.png delete mode 100644 graphics/entity/iron-requester-chest.png delete mode 100644 graphics/entity/iron-storage-chest.png delete mode 100644 graphics/entity/logistic-robot/logistic-robot-shadow.png delete mode 100644 graphics/entity/logistic-robot/logistic-robot.png delete mode 100644 graphics/items/construction-robot.png delete mode 100644 graphics/items/inventory-blocker.png delete mode 100644 graphics/items/iron-active-provider-chest.png delete mode 100644 graphics/items/iron-buffer-chest.png delete mode 100644 graphics/items/iron-chest.png delete mode 100644 graphics/items/iron-passive-provider-chest.png delete mode 100644 graphics/items/iron-requester-chest.png delete mode 100644 graphics/items/iron-storage-chest.png delete mode 100644 graphics/items/logistic-robot.png delete mode 100644 graphics/technology/logistic-system-early.png delete mode 100644 graphics/technology/logistic-system.png delete mode 100644 info.json create mode 100755 install.sh delete mode 100644 locale/en/locale.cfg delete mode 100644 locale/ru/locale.cfg delete mode 100644 prototypes/energy-pad.lua delete mode 100644 prototypes/entities.lua delete mode 100644 prototypes/item.lua delete mode 100644 prototypes/recipe.lua delete mode 100644 prototypes/tech.lua delete mode 100644 thumbnail.png create mode 100644 von-newmann-2/LICENSE create mode 100644 von-newmann-2/changelog.txt create mode 100644 von-newmann-2/control.lua create mode 100644 von-newmann-2/data.lua create mode 100644 von-newmann-2/graphics/entity/construction-robot/construction-robot-reflection.png create mode 100644 von-newmann-2/graphics/entity/construction-robot/construction-robot-shadow.png create mode 100644 von-newmann-2/graphics/entity/construction-robot/construction-robot-working.png create mode 100644 von-newmann-2/graphics/entity/construction-robot/construction-robot.png create mode 100644 von-newmann-2/graphics/entity/iron-active-provider-chest.png create mode 100644 von-newmann-2/graphics/entity/iron-buffer-chest.png create mode 100644 von-newmann-2/graphics/entity/iron-chest.png create mode 100644 von-newmann-2/graphics/entity/iron-passive-provider-chest.png create mode 100644 von-newmann-2/graphics/entity/iron-requester-chest.png create mode 100644 von-newmann-2/graphics/entity/iron-storage-chest.png create mode 100644 von-newmann-2/graphics/entity/logistic-robot/logistic-robot-shadow.png create mode 100644 von-newmann-2/graphics/entity/logistic-robot/logistic-robot.png create mode 100644 von-newmann-2/graphics/items/construction-robot.png create mode 100644 von-newmann-2/graphics/items/inventory-blocker.png create mode 100644 von-newmann-2/graphics/items/iron-active-provider-chest.png create mode 100644 von-newmann-2/graphics/items/iron-buffer-chest.png create mode 100644 von-newmann-2/graphics/items/iron-chest.png create mode 100644 von-newmann-2/graphics/items/iron-passive-provider-chest.png create mode 100644 von-newmann-2/graphics/items/iron-requester-chest.png create mode 100644 von-newmann-2/graphics/items/iron-storage-chest.png create mode 100644 von-newmann-2/graphics/items/logistic-robot.png create mode 100644 von-newmann-2/graphics/technology/logistic-system-early.png create mode 100644 von-newmann-2/graphics/technology/logistic-system.png create mode 100644 von-newmann-2/info.json create mode 100644 von-newmann-2/locale/en/locale.cfg create mode 100644 von-newmann-2/locale/ru/locale.cfg create mode 100644 von-newmann-2/prototypes/energy-pad.lua create mode 100644 von-newmann-2/prototypes/entities.lua create mode 100644 von-newmann-2/prototypes/item.lua create mode 100644 von-newmann-2/prototypes/recipe.lua create mode 100644 von-newmann-2/prototypes/tech.lua create mode 100644 von-newmann-2/thumbnail.png diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c4c4ffc --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.zip diff --git a/LICENSE b/LICENSE deleted file mode 100644 index bfdf56c..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Krypt0nC0R3 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE 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 OR COPYRIGHT HOLDERS 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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..09a8109 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# Von Newmann 2 + +My first attempt at modding factorio. + +- Inspired by [Von Newmann](https://mods.factorio.com/mod/vonNeumann). +- Forked from [Robot Start 2](https://mods.factorio.com/mod/robot-start-2?from=search) by [Krypt0n\_C0R3](https://mods.factorio.com/user/Krypt0n_C0R3) (most credit goes to him). +- Other elements stolen from [Brave New OARC](https://mods.factorio.com/mod/brave-new-oarc). + +I will expand this README later. :) diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..ac1c3c2 --- /dev/null +++ b/build.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +mod_name=von-newmann-2 +mod_version=1.0.0 + +rm -fv ${mod_name}_*.zip +zip -r ${mod_name}_${mod_version}.zip ${mod_name} diff --git a/changelog.txt b/changelog.txt deleted file mode 100644 index e69de29..0000000 diff --git a/control.lua b/control.lua deleted file mode 100644 index 27e1190..0000000 --- a/control.lua +++ /dev/null @@ -1,308 +0,0 @@ -local util = require("util") -local crash_site = require("crash-site") -local modEnabled = true - -local entities = { - {"substation", {y = 0.5,x = -0.5}, {}}, - {"accumulator", {y = -1.5,x = -0.5}, {}}, - {"accumulator", {y = -1.5,x = 1.5}, {}}, - {"accumulator", {y = 0.5,x = 1.5}, {}}, - {"iron-storage-chest", {y = -2,x = 3}, { - items = { - {"roboport", 5}, - {"repair-turret", 15}, - {"electric-mining-drill", 10}, - {"transport-belt", 100}, - {"big-electric-pole", 10}, - {"small-electric-pole", 20}, - {"power-switch", 5}, - {"iron-active-provider-chest", 10}, - {"iron-buffer-chest", 20}, - {"iron-passive-provider-chest", 50}, - {"iron-requester-chest", 50}, - {"iron-storage-chest", 50}, - {"inserter", 50}, - {"stone-furnace", 50} - } - }}, - {"iron-storage-chest", {y = -2,x = 4}, {}}, - {"iron-storage-chest", {y = -2,x = 5}, {}}, - {"roboport", {y = -0.5,x = -3.5}, { - items = { - {"early-construction-robot", 20}, - {"early-logistic-robot", 10}, - {"repair-pack", 50} - } - }}, - {"assembling-machine-1", {y = 0,x = 4}, {}}, - {"inserter", {y = -1,x = 6}, {dir = "west"}}, - {"inserter", {y = 1,x = 6}, {dir = "east"}}, - {"iron-passive-provider-chest", {y = -1,x = 7}, {}}, - {"iron-requester-chest", {y = 1,x = 7}, {}}, - {"solar-panel", {y = 3,x = 6}, {}}, - {"solar-panel", {y = 3,x = 3}, {}}, - {"solar-panel", {y = 3,x = 0}, {}}, - {"solar-panel", {y = 3,x = -3}, {}}, - {"solar-panel", {y = 3,x = -6}, {}}, - {"solar-panel", {y = 6,x = 6}, {}}, - {"solar-panel", {y = 6,x = 3}, {}}, - {"solar-panel", {y = 6,x = 0}, {}}, - {"solar-panel", {y = 6,x = -3}, {}}, - {"solar-panel", {y = 6,x = -6}, {}}, - {"solar-panel", {y = 9,x = 6}, {}}, - {"solar-panel", {y = 9,x = 3}, {}}, - {"solar-panel", {y = 9,x = 0}, {}}, - {"solar-panel", {y = 9,x = -3}, {}}, - {"solar-panel", {y = 9,x = -6}, {}}, - {"solar-panel", {y = -4,x = 6}, {}}, - {"solar-panel", {y = -4,x = 3}, {}}, - {"solar-panel", {y = -4,x = 0}, {}}, - {"solar-panel", {y = -4,x = -3}, {}}, - {"solar-panel", {y = -4,x = -6}, {}}, - {"solar-panel", {y = -7,x = 6}, {}}, - {"solar-panel", {y = -7,x = 3}, {}}, - {"solar-panel", {y = -7,x = 0}, {}}, - {"solar-panel", {y = -7,x = -3}, {}}, - {"solar-panel", {y = -7,x = -6}, {}}, - {"accumulator", {y = 0.5,x = -6.5}, {}}, - {"accumulator", {y = -1.5,x = -6.5}, {}} -} - -local entities_landing_pad = { - {"roboport", {y = -6.5,x = 2.5}, { - items = { - {"construction-robot", 10} - } - }}, - {"storage-chest", {y = -5,x = 5}, {}}, - {"substation", {y = -3.5,x = 4.5}, {}}, -} - -local function spawn_entity(entity_name, relative_position, center, surface, extra_options, force) - local recipe - - if extra_options.recipe then - if not game.recipe_prototypes[extra_options.recipe] then - util.debugprint("recipe " .. extra_options.recipe .. " does not exist") - else - recipe = extra_options.recipe - end - end - - local e = surface.create_entity { - name = entity_name, - position = {center.x + relative_position.x, center.y + relative_position.y}, - direction = defines.direction[extra_options.dir] or defines.direction.north, - force = force, - raise_built = true, - create_build_effect_smoke = true, - recipe = recipe - } - - if extra_options.items then - local items = {} - - for _, v in pairs(extra_options.items) do - local name = v[1] or v.name - local count = v[2] or v.count - - if count and count > 0 then - items[name] = count - end - end - - util.insert_safe(e, items) - end - - return e -end - -function getTableSize(t) - local count = 0 - - for _, _ in pairs(t) do - count = count + 1 - end - - return count -end - -function create_power_source(entity) - local powerInterface = entity.surface.create_entity({ - name = "clp-electric-source", - position = entity.position, - force = entity.force, - snap_to_grid = false, - raise_built = false - }) - - if(true) then - local hi = spawn_entity("clp-heat-interface",{y=-3,x=2},entity.position,entity.surface,{},entity.force) - local hp = spawn_entity("clp-heat-pipe",{y=-4,x=2},entity.position,entity.surface,{},entity.force) - hi.set_heat_setting{temperature = 31, mode = "at-least"} - storage.heat_intefaces[entity.unit_number] = {hi,hp} - end - - storage.power_interfaces[entity.unit_number] = powerInterface -end - -function destroy_power_source(entity) - local powerInterface = storage.power_interfaces[entity.unit_number] - - if powerInterface ~= nil then - powerInterface.destroy({ - raise_destroy = false - }) - storage.power_interfaces[entity.unit_number] = nil - end - - local heatInterface = storage.heat_intefaces[entity.unit_number] - - if heatInterface ~= nil then - heatInterface[1].destroy({ - raise_destroy = false - }) - heatInterface[2].destroy({ - raise_destroy = false - }) - storage.heat_intefaces[entity.unit_number] = nil - end -end - -local function clear_area(area, surface) - for _, entity in pairs(surface.find_entities_filtered({ area = area, invert = true })) do - if (entity.valid) then - entity.destroy({ - do_cliff_correction = false, - raise_destroy = false - }) - end - end - - return true -end - -function on_deconstruction(event) - local inventory = event.entity.get_inventory(defines.inventory.cargo_unit) or event.entity.get_inventory(defines.inventory.chest) - - if (inventory == nil) then - do return end - end - - local content = inventory.get_contents() - - if (content == nil) then - do return end - end - - if (inventory.get_item_count("cargo-landing-pad") >= 1 and getTableSize(event.entity.surface.find_entities_filtered({name="cargo-landing-pad"})) == 0) then - inventory.remove({name="cargo-landing-pad",count=1}) - content = inventory.get_contents() - inventory.clear() - local position = event.entity.position - local surface = event.entity.surface - local force = event.entity.force - local area = {{position.x - 5, position.y - 5}, {position.x + 5, position.y + 5}} - local chart = {{position.x - 50, position.y - 50}, {position.x + 50, position.y + 50}} - event.entity.destroy() - force.chart(surface,chart) - clear_area(area,surface) - local clp = spawn_entity("cargo-landing-pad",{x=0,y=0},position,surface,{items=content},force) - - for _, v in pairs(entities_landing_pad) do - local name = v[1] - local pos = v[2] - local extra = v[3] - spawn_entity(name, pos, clp.position, surface, extra, force) - end - end -end - -local function create_roboport(center, surface, player) - for _, v in pairs(entities) do - local name = v[1] - local pos = v[2] - local extra = v[3] - local entity = spawn_entity(name, pos, center, surface, extra, player.force) - end -end - -local function updateInventory() - if not modEnabled then - return - end - - for _, pl in pairs(game.players) do - local player = game.get_player(pl.name) - local inventory = player.get_main_inventory() - inventory.clear() - end -end - -local function on_player_created(event) - -- vars the freeplay.lua snippit had - local crashed_ship_items = remote.call("freeplay", "get_ship_items") - local crashed_debris_items = remote.call("freeplay", "get_debris_items") - - local player = game.get_player(event.player_index) - local character = player.character - - local group = player.permission_group or game.permissions.create_group("NO_INVENTORY") - group.set_allows_action(defines.input_action.craft,false) - --group.set_allows_action(defines.input_action.destroy_item,false) - --group.set_allows_action(defines.input_action.destroy_opened_item,false) - group.set_allows_action(defines.input_action.drop_item,false) - group.set_allows_action(defines.input_action.inventory_transfer,false) - group.set_allows_action(defines.input_action.inventory_split,false) - group.set_allows_action(defines.input_action.cursor_transfer,false) - group.set_allows_action(defines.input_action.cursor_split,false) - group.set_allows_action(defines.input_action.fast_entity_split,false) - group.set_allows_action(defines.input_action.fast_entity_transfer,false) - group.set_allows_action(defines.input_action.stack_split,false) - group.set_allows_action(defines.input_action.stack_transfer,false) - --group.set_allows_action(defines.input_action.use_item,false) - group.set_allows_action(defines.input_action.begin_mining,false) - group.set_allows_action(defines.input_action.begin_mining_terrain,false) - --group.set_allows_action(defines.input_action.smart_pipette,false) - group.name = "NO_INVENTORY" - group.add_player(player) - --player.print(player.permission_group.allows_action(defines.input_action.inventory_transfer)) - - --player.get_main_inventory().resize(0) - - local center = player.character.position - player.character = nil - - if character then - character.destroy() - end - - -- our settings - local disable_crashsite = true - local skip_cutscene = true - - -- add a crash site - local surface = player.surface - -- surface.daytime = 0.7 - crash_site.create_crash_site(surface, {-20, -13}, util.copy(crashed_ship_items), util.copy(crashed_debris_items)) - util.remove_safe(player, crashed_ship_items) - util.remove_safe(player, crashed_debris_items) - -- player.get_main_inventory().sort_and_merge() - - updateInventory() - local area = {{center.x + 10, center.y + 15}, {center.x - 10, center.y - 15}} - clear_area(area, surface) - create_roboport(center, surface, player) -end - -script.on_init(function () - if not remote.interfaces.freeplay then - modEnabled = false - return - end - - remote.call("freeplay", "set_disable_crashsite", true) - script.on_event(defines.events.on_player_created, on_player_created) - - script.on_configuration_changed(updateInventory) -end) diff --git a/data.lua b/data.lua deleted file mode 100644 index c3c357c..0000000 --- a/data.lua +++ /dev/null @@ -1,12 +0,0 @@ -require("prototypes.tech") -require("prototypes.recipe") -require("prototypes.entities") -require("prototypes.item") - -if data.raw.technology["steel-axe"] then - data.raw.technology["steel-axe"] = null -end - -if(mods["space-age"]) then - require("prototypes.energy-pad") -end diff --git a/graphics/entity/construction-robot/construction-robot-reflection.png b/graphics/entity/construction-robot/construction-robot-reflection.png deleted file mode 100644 index 18e5bc5..0000000 Binary files a/graphics/entity/construction-robot/construction-robot-reflection.png and /dev/null differ diff --git a/graphics/entity/construction-robot/construction-robot-shadow.png b/graphics/entity/construction-robot/construction-robot-shadow.png deleted file mode 100644 index 5645739..0000000 Binary files a/graphics/entity/construction-robot/construction-robot-shadow.png and /dev/null differ diff --git a/graphics/entity/construction-robot/construction-robot-working.png b/graphics/entity/construction-robot/construction-robot-working.png deleted file mode 100644 index c565f6a..0000000 Binary files a/graphics/entity/construction-robot/construction-robot-working.png and /dev/null differ diff --git a/graphics/entity/construction-robot/construction-robot.png b/graphics/entity/construction-robot/construction-robot.png deleted file mode 100644 index 14cc719..0000000 Binary files a/graphics/entity/construction-robot/construction-robot.png and /dev/null differ diff --git a/graphics/entity/iron-active-provider-chest.png b/graphics/entity/iron-active-provider-chest.png deleted file mode 100644 index fd48814..0000000 Binary files a/graphics/entity/iron-active-provider-chest.png and /dev/null differ diff --git a/graphics/entity/iron-buffer-chest.png b/graphics/entity/iron-buffer-chest.png deleted file mode 100644 index e3cf10a..0000000 Binary files a/graphics/entity/iron-buffer-chest.png and /dev/null differ diff --git a/graphics/entity/iron-chest.png b/graphics/entity/iron-chest.png deleted file mode 100644 index 917d181..0000000 Binary files a/graphics/entity/iron-chest.png and /dev/null differ diff --git a/graphics/entity/iron-passive-provider-chest.png b/graphics/entity/iron-passive-provider-chest.png deleted file mode 100644 index c19a894..0000000 Binary files a/graphics/entity/iron-passive-provider-chest.png and /dev/null differ diff --git a/graphics/entity/iron-requester-chest.png b/graphics/entity/iron-requester-chest.png deleted file mode 100644 index 893f041..0000000 Binary files a/graphics/entity/iron-requester-chest.png and /dev/null differ diff --git a/graphics/entity/iron-storage-chest.png b/graphics/entity/iron-storage-chest.png deleted file mode 100644 index a1fe5da..0000000 Binary files a/graphics/entity/iron-storage-chest.png and /dev/null differ diff --git a/graphics/entity/logistic-robot/logistic-robot-shadow.png b/graphics/entity/logistic-robot/logistic-robot-shadow.png deleted file mode 100644 index 3f71cc6..0000000 Binary files a/graphics/entity/logistic-robot/logistic-robot-shadow.png and /dev/null differ diff --git a/graphics/entity/logistic-robot/logistic-robot.png b/graphics/entity/logistic-robot/logistic-robot.png deleted file mode 100644 index 0532783..0000000 Binary files a/graphics/entity/logistic-robot/logistic-robot.png and /dev/null differ diff --git a/graphics/items/construction-robot.png b/graphics/items/construction-robot.png deleted file mode 100644 index 7e84d1e..0000000 Binary files a/graphics/items/construction-robot.png and /dev/null differ diff --git a/graphics/items/inventory-blocker.png b/graphics/items/inventory-blocker.png deleted file mode 100644 index 3666527..0000000 Binary files a/graphics/items/inventory-blocker.png and /dev/null differ diff --git a/graphics/items/iron-active-provider-chest.png b/graphics/items/iron-active-provider-chest.png deleted file mode 100644 index 74cf049..0000000 Binary files a/graphics/items/iron-active-provider-chest.png and /dev/null differ diff --git a/graphics/items/iron-buffer-chest.png b/graphics/items/iron-buffer-chest.png deleted file mode 100644 index f7856bf..0000000 Binary files a/graphics/items/iron-buffer-chest.png and /dev/null differ diff --git a/graphics/items/iron-chest.png b/graphics/items/iron-chest.png deleted file mode 100644 index e29d9d2..0000000 Binary files a/graphics/items/iron-chest.png and /dev/null differ diff --git a/graphics/items/iron-passive-provider-chest.png b/graphics/items/iron-passive-provider-chest.png deleted file mode 100644 index d5ffc88..0000000 Binary files a/graphics/items/iron-passive-provider-chest.png and /dev/null differ diff --git a/graphics/items/iron-requester-chest.png b/graphics/items/iron-requester-chest.png deleted file mode 100644 index 19b740a..0000000 Binary files a/graphics/items/iron-requester-chest.png and /dev/null differ diff --git a/graphics/items/iron-storage-chest.png b/graphics/items/iron-storage-chest.png deleted file mode 100644 index 7c45e01..0000000 Binary files a/graphics/items/iron-storage-chest.png and /dev/null differ diff --git a/graphics/items/logistic-robot.png b/graphics/items/logistic-robot.png deleted file mode 100644 index 35aa9d5..0000000 Binary files a/graphics/items/logistic-robot.png and /dev/null differ diff --git a/graphics/technology/logistic-system-early.png b/graphics/technology/logistic-system-early.png deleted file mode 100644 index 1ea41e9..0000000 Binary files a/graphics/technology/logistic-system-early.png and /dev/null differ diff --git a/graphics/technology/logistic-system.png b/graphics/technology/logistic-system.png deleted file mode 100644 index ee8d3f8..0000000 Binary files a/graphics/technology/logistic-system.png and /dev/null differ diff --git a/info.json b/info.json deleted file mode 100644 index 93d4ab5..0000000 --- a/info.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "von-newmann-2", - "version": "1.0.0", - "factorio_version": "2.0", - "title": "Von Newmann 2", - "author": "Paul Oliver", - "contact": "contact@pauloliver.dev", - "homepage": "", - "description": "Fork of robot-start-2 by Krypt0n_C0R3. Replaces your character with a roboport.", - "dependencies": [ - "base", - "Repair_Turret", - "! ElectroTurret", - "! quality", - "! ShockTurret", - "! space-age" - ] -} diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..d0df008 --- /dev/null +++ b/install.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +mod_name=von-newmann-2 + +cp -v ${mod_name}_*.zip ${HOME}/.factorio/mods diff --git a/locale/en/locale.cfg b/locale/en/locale.cfg deleted file mode 100644 index 17d46e3..0000000 --- a/locale/en/locale.cfg +++ /dev/null @@ -1,25 +0,0 @@ -[item-name] -iron-active-provider-chest=Iron active provider chest -iron-buffer-chest=Iron buffer chest -iron-passive-provider-chest=Iron passive provider chest -iron-requester-chest=Iron requester chest -iron-storage-chest=Iron storage chest -early-logistic-robot=Simply logistic robot -early-construction-robot=Simply construction robot -inventory-blocker=Inventory is locked - -[entity-name] -iron-active-provider-chest=Iron active provider chest -iron-buffer-chest=Iron buffer chest -iron-passive-provider-chest=Iron passive provider chest -iron-requester-chest=Iron requester chest -iron-storage-chest=Iron storage chest -early-logistic-robot=Simply logistic robot -early-construction-robot=Simply construction robot -inventory-blocker=Inventory is locked - -[technology-name] -early-logistic=Simply logistics - -[technology-description] -early-logistic=Unlocks access to a simple logistics network and provides access to simple logistics network chests \ No newline at end of file diff --git a/locale/ru/locale.cfg b/locale/ru/locale.cfg deleted file mode 100644 index 597dac4..0000000 --- a/locale/ru/locale.cfg +++ /dev/null @@ -1,36 +0,0 @@ -repair-turret=Ремонтная турель -repair-turret-description=Чинит союзные сооружения в радиусе.\nСкорость ремонта: [font=default][color=1, 0.74, 0.40] 55/с[/color][/font]\nРадиус: [font=default][color=1, 0.74, 0.40]25[/color][/font] -repair-turret-power=Мощность ремотной турели -repair-turret-power-description=Мощность ремотной турели: +100% -repair-turret-efficiency=Эффективность ремотной турели -repair-turret-efficiency-description=Эффективность ремотной турели: +25% -repair-turret-construction=Строительное улучшение ремотной турели -repair-turret-construction-description=Позволяет ремотной турели сооружать "призраки" используя предметы из логистической сети. -repair-turret-deconstruction-description=Позволяет ремотной турели деконструировать сооружения, возвращая предметы в логистическую сеть. - - -[item-name] -iron-active-provider-chest=Железный сундук активного снабжения -iron-buffer-chest=Железный буфферный сундук -iron-passive-provider-chest=Железный сундук пассивного снабжения -iron-requester-chest=Железный сундук запроса -iron-storage-chest=Железный сундук хранения -early-logistic-robot=Простой транспортный дрон -early-construction-robot=Простой строительный дрон -inventory-blocker=Инвентарь заблокирован - -[entity-name] -iron-active-provider-chest=Железный сундук активного снабжения -iron-buffer-chest=Железный буфферный сундук -iron-passive-provider-chest=Железный сундук пассивного снабжения -iron-requester-chest=Железный сундук запроса -iron-storage-chest=Железный сундук хранения -early-logistic-robot=Простой транспортный дрон -early-construction-robot=Простой строительный дрон -inventory-blocker=Инвентарь заблокирован - -[technology-name] -early-logistic=Простая логистика - -[technology-description] -early-logistic=Открывает доступ к простой логистической сети и предоставляет доступ к простым сундукам логистической сети \ No newline at end of file diff --git a/prototypes/energy-pad.lua b/prototypes/energy-pad.lua deleted file mode 100644 index 4c79661..0000000 --- a/prototypes/energy-pad.lua +++ /dev/null @@ -1,51 +0,0 @@ -local portable_nuclear_reactor = data.raw["generator-equipment"]["fission-reactor-equipment"] -local clp = data.raw["cargo-landing-pad"]["cargo-landing-pad"] -local energy_source = util.table.deepcopy(data.raw["electric-energy-interface"]["hidden-electric-energy-interface"]) - -energy_source.name = "clp-electric-source" -energy_source.localised_name = {"entity-name.cargo-landing-pad"} -energy_source.icon = clp.icon -energy_source.energy_source = { - type = "electric", - buffer_capacity = "5MJ", - usage_priority = "tertiary" -} -energy_source.energy_production = portable_nuclear_reactor.power -energy_source.collision_box = clp.collision_box -energy_source.selection_box = clp.selection_box - - -local clp_recipe = util.table.deepcopy(data.raw["recipe"]["cargo-landing-pad"]) -clp_recipe.ingredients = -{ - {type = "item", name = "concrete", amount = 250}, - {type = "item", name = "processing-unit", amount = 35}, - {type = "item", name = "steel-plate", amount = 80}, - {type = "item", name = "accumulator", amount = 1}, - {type = "item", name = "fission-reactor-equipment", amount = 1}, - {type = "item", name = "construction-robot", amount = 10} -} - - -local thermal_pad = util.table.deepcopy(data.raw["heat-interface"]["heat-interface"]) -thermal_pad.minable = nil -thermal_pad.gui_mode = "none" -thermal_pad.heat_buffer.default_temperature = 15 -thermal_pad.heat_buffer.max_temperature = 31 -thermal_pad.heat_buffer.min_working_temperature = 30 -thermal_pad.flags = {"placeable-neutral", "player-creation", "not-deconstructable"} -thermal_pad.name = "clp-heat-interface" - ---entity.set_heat_setting{temperature = 1000, mode = "exactly"} - -local heat_pipe = util.table.deepcopy(data.raw["heat-pipe"]["heat-pipe"]) -heat_pipe.name = "clp-heat-pipe" -heat_pipe.flags = {"placeable-neutral", "player-creation", "not-deconstructable"} -heat_pipe.minable = nil - -data:extend({ - energy_source, - clp_recipe, - heat_pipe, - thermal_pad -}) diff --git a/prototypes/entities.lua b/prototypes/entities.lua deleted file mode 100644 index 9620ce7..0000000 --- a/prototypes/entities.lua +++ /dev/null @@ -1,70 +0,0 @@ -require ("util") - -local iron_chest = data.raw["container"]["iron-chest"] -local ipsc = util.table.deepcopy(data.raw["logistic-container"]["passive-provider-chest"]) -local ibc = util.table.deepcopy(data.raw["logistic-container"]["buffer-chest"]) -local iasc = util.table.deepcopy(data.raw["logistic-container"]["active-provider-chest"]) -local isc = util.table.deepcopy(data.raw["logistic-container"]["storage-chest"]) -local irc = util.table.deepcopy(data.raw["logistic-container"]["requester-chest"]) - -local chests = {ipsc,ibc,iasc,irc,isc} - -for _, chest in ipairs(chests) do - chest.name = "iron-"..chest.name - chest.icon = "__von-newmann-2__/graphics/items/"..chest.name..".png" - chest.corpse = iron_chest.corpse - chest.max_health = iron_chest.max_health - chest.minable = {mining_time = 0.1, result = chest.name} - chest.dying_explosion = iron_chest.dying_explosion - chest.resistances = iron_chest.resistances - chest.open_sound = iron_chest.open_sound - chest.close_sound = iron_chest.close_sound - chest.inventory_size = iron_chest.inventory_size - chest.animation = nil - chest.picture = util.table.deepcopy(iron_chest.picture) - chest.picture.layers[1].filename = "__von-newmann-2__/graphics/entity/"..chest.name..".png" -end - -local early_l_bot = util.table.deepcopy(data.raw["logistic-robot"]["logistic-robot"]) -local early_c_bot = util.table.deepcopy(data.raw["construction-robot"]["construction-robot"]) - -local bots = {early_c_bot,early_l_bot} - -for _, bot in ipairs(bots) do - bot.icon = "__von-newmann-2__/graphics/items/"..bot.name..".png" - bot.name = "early-"..bot.name - bot.minable = {mining_time = 0.1, result = bot.name} - bot.resistances = - { - { - type = "fire", - percent = 100 - } - } - bot.max_health = 50 - bot.speed = 0.04 - bot.max_energy = "0.75MJ" - bot.energy_per_move = "2.5kJ" - bot.idle.filename = bot.idle.filename:gsub("base","von-newmann-2") - bot.in_motion.filename = bot.in_motion.filename:gsub("base","von-newmann-2") - bot.shadow_idle.filename = bot.shadow_idle.filename:gsub("base","von-newmann-2") - bot.shadow_in_motion.filename = bot.shadow_in_motion.filename:gsub("base","von-newmann-2") -end - -early_c_bot.working.filename = early_c_bot.working.filename:gsub("base","von-newmann-2") -early_c_bot.shadow_working.filename = early_c_bot.shadow_working.filename:gsub("base","von-newmann-2") - -early_l_bot.idle_with_cargo.filename = early_l_bot.idle_with_cargo.filename:gsub("base","von-newmann-2") -early_l_bot.in_motion_with_cargo.filename = early_l_bot.in_motion_with_cargo.filename:gsub("base","von-newmann-2") -early_l_bot.shadow_idle_with_cargo.filename = early_l_bot.shadow_idle_with_cargo.filename:gsub("base","von-newmann-2") -early_l_bot.shadow_in_motion_with_cargo.filename = early_l_bot.shadow_in_motion_with_cargo.filename:gsub("base","von-newmann-2") - -data:extend{ - ipsc, - ibc, - iasc, - isc, - irc, - early_c_bot, - early_l_bot -} diff --git a/prototypes/item.lua b/prototypes/item.lua deleted file mode 100644 index b0eeb68..0000000 --- a/prototypes/item.lua +++ /dev/null @@ -1,89 +0,0 @@ -data:extend{ - { - type = "item", - name = "iron-active-provider-chest", - icon = "__von-newmann-2__/graphics/items/iron-active-provider-chest.png", - icon_size = 64, - icon_mipmaps = 4, - subgroup = "storage", - order = "a[items]-b[iron-active-provider-chest]", - place_result = "iron-active-provider-chest", - stack_size = 50 - }, - { - type = "item", - name = "iron-buffer-chest", - icon = "__von-newmann-2__/graphics/items/iron-buffer-chest.png", - icon_size = 64, - icon_mipmaps = 4, - subgroup = "storage", - order = "a[items]-b[iron-buffer-chest]", - place_result = "iron-buffer-chest", - stack_size = 50 - }, - { - type = "item", - name = "iron-passive-provider-chest", - icon = "__von-newmann-2__/graphics/items/iron-passive-provider-chest.png", - icon_size = 64, - icon_mipmaps = 4, - subgroup = "storage", - order = "a[items]-b[iron-passive-provider-chest]", - place_result = "iron-passive-provider-chest", - stack_size = 50 - }, - { - type = "item", - name = "iron-requester-chest", - icon = "__von-newmann-2__/graphics/items/iron-requester-chest.png", - icon_size = 64, - icon_mipmaps = 4, - subgroup = "storage", - order = "a[items]-b[iron-requester-chest]", - place_result = "iron-requester-chest", - stack_size = 50 - }, - { - type = "item", - name = "iron-storage-chest", - icon = "__von-newmann-2__/graphics/items/iron-storage-chest.png", - icon_size = 64, - icon_mipmaps = 4, - subgroup = "storage", - order = "a[items]-b[iron-storage-chest]", - place_result = "iron-storage-chest", - stack_size = 50 - }, - { - type = "item", - name = "early-logistic-robot", - icon = "__von-newmann-2__/graphics/items/logistic-robot.png", - icon_size = 64, - icon_mipmaps = 4, - subgroup = "logistic-network", - order = "a[robot]-b[early-logistic-robot]", - place_result = "early-logistic-robot", - stack_size = 50 - }, - { - type = "item", - name = "early-construction-robot", - icon = "__von-newmann-2__/graphics/items/construction-robot.png", - icon_size = 64, - icon_mipmaps = 4, - subgroup = "logistic-network", - order = "a[robot]-b[early-construction-robot]", - place_result = "early-construction-robot", - stack_size = 50 - }, - { - type = "item", - name = "inventory-blocker", - icon = "__von-newmann-2__/graphics/items/inventory-blocker.png", - icon_size = 64, - icon_mipmaps = 4, - subgroup = "logistic-network", - order = "a[robot]-b[early-construction-robot]", - stack_size = 1 - }, -} diff --git a/prototypes/recipe.lua b/prototypes/recipe.lua deleted file mode 100644 index ea09378..0000000 --- a/prototypes/recipe.lua +++ /dev/null @@ -1,111 +0,0 @@ -data:extend{ - { - type = "recipe", - name = "iron-active-provider-chest", - auto_recycle = false, - enabled = false, - ingredients = - { - {type = "item", name = "electronic-circuit", amount = 5}, - {type = "item", name = "iron-chest", amount = 1} - }, - allow_productivity = false, - allow_quality = false, - energy_required = 15, - results = {{type = "item", name = "iron-active-provider-chest", amount = 1}} - }, - { - type = "recipe", - name = "iron-buffer-chest", - auto_recycle = false, - enabled = false, - ingredients = - { - {type = "item", name = "electronic-circuit", amount = 5}, - {type = "item", name = "iron-chest", amount = 1} - }, - allow_productivity = false, - allow_quality = false, - energy_required = 15, - results = {{type = "item", name = "iron-buffer-chest", amount = 1}} - }, - { - type = "recipe", - name = "iron-passive-provider-chest", - auto_recycle = false, - enabled = false, - ingredients = - { - {type = "item", name = "electronic-circuit", amount = 5}, - {type = "item", name = "iron-chest", amount = 1} - }, - allow_productivity = false, - allow_quality = false, - energy_required = 15, - results = {{type = "item", name = "iron-passive-provider-chest", amount = 1}} - }, - { - type = "recipe", - name = "iron-requester-chest", - auto_recycle = false, - enabled = false, - ingredients = - { - {type = "item", name = "electronic-circuit", amount = 5}, - {type = "item", name = "iron-chest", amount = 1} - }, - allow_productivity = false, - allow_quality = false, - energy_required = 15, - results = {{type = "item", name = "iron-requester-chest", amount = 1}} - }, - { - type = "recipe", - name = "iron-storage-chest", - auto_recycle = false, - enabled = false, - ingredients = - { - {type = "item", name = "electronic-circuit", amount = 5}, - {type = "item", name = "iron-chest", amount = 1} - }, - allow_productivity = false, - allow_quality = false, - energy_required = 15, - results = {{type = "item", name = "iron-storage-chest", amount = 1}} - }, - { - type = "recipe", - name = "early-logistic-robot", - auto_recycle = false, - enabled = false, - ingredients = - { - {type = "item", name = "electronic-circuit", amount = 5}, - {type = "item", name = "iron-gear-wheel", amount = 12}, - {type = "item", name = "copper-cable", amount = 3}, - {type = "item", name = "iron-plate", amount = 18}, - }, - allow_productivity = false, - allow_quality = false, - energy_required = 8, - results = {{type = "item", name = "early-logistic-robot", amount = 1}} - }, - { - type = "recipe", - name = "early-construction-robot", - auto_recycle = false, - enabled = false, - ingredients = - { - {type = "item", name = "electronic-circuit", amount = 5}, - {type = "item", name = "iron-gear-wheel", amount = 12}, - {type = "item", name = "copper-cable", amount = 3}, - {type = "item", name = "iron-plate", amount = 18}, - }, - allow_productivity = false, - allow_quality = false, - energy_required = 8, - results = {{type = "item", name = "early-construction-robot", amount = 1}} - }, -} diff --git a/prototypes/tech.lua b/prototypes/tech.lua deleted file mode 100644 index 47ce701..0000000 --- a/prototypes/tech.lua +++ /dev/null @@ -1,73 +0,0 @@ -data.raw.technology["logistic-system"].icon = "__von-newmann-2__/graphics/technology/logistic-system.png" ---[[data.raw.technology["logistic-robotics"].effects = -{ - { - type = "unlock-recipe", - recipe = "roboport" - }, - { - type = "unlock-recipe", - recipe = "logistic-chest-passive-provider" - }, - { - type = "unlock-recipe", - recipe = "logistic-chest-storage" - }, - { - type = "unlock-recipe", - recipe = "logistic-robot" - } -}]]-- - -data:extend{ - { - type = "technology", - name = "early-logistic", - icon_size = 256, icon_mipmaps = 4, - icon = "__von-newmann-2__/graphics/technology/logistic-system-early.png", - effects = - { - { - type = "unlock-recipe", - recipe = "iron-active-provider-chest" - }, - { - type = "unlock-recipe", - recipe = "iron-buffer-chest" - }, - { - type = "unlock-recipe", - recipe = "iron-passive-provider-chest" - }, - { - type = "unlock-recipe", - recipe = "iron-requester-chest" - }, - { - type = "unlock-recipe", - recipe = "iron-storage-chest" - }, - { - type = "unlock-recipe", - recipe = "early-logistic-robot" - }, - { - type = "unlock-recipe", - recipe = "early-construction-robot" - }, - }, - prerequisites = {"logistic-science-pack"}, - unit = - { - count = 100*1, - ingredients = - { - {"automation-science-pack", 1}, - {"logistic-science-pack",5} - }, - time = 30 - }, - upgrade = false, - order = "e-l-a" - }, -} diff --git a/thumbnail.png b/thumbnail.png deleted file mode 100644 index 71669ab..0000000 Binary files a/thumbnail.png and /dev/null differ diff --git a/von-newmann-2/LICENSE b/von-newmann-2/LICENSE new file mode 100644 index 0000000..bfdf56c --- /dev/null +++ b/von-newmann-2/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Krypt0nC0R3 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE 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 OR COPYRIGHT HOLDERS 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. diff --git a/von-newmann-2/changelog.txt b/von-newmann-2/changelog.txt new file mode 100644 index 0000000..e69de29 diff --git a/von-newmann-2/control.lua b/von-newmann-2/control.lua new file mode 100644 index 0000000..27e1190 --- /dev/null +++ b/von-newmann-2/control.lua @@ -0,0 +1,308 @@ +local util = require("util") +local crash_site = require("crash-site") +local modEnabled = true + +local entities = { + {"substation", {y = 0.5,x = -0.5}, {}}, + {"accumulator", {y = -1.5,x = -0.5}, {}}, + {"accumulator", {y = -1.5,x = 1.5}, {}}, + {"accumulator", {y = 0.5,x = 1.5}, {}}, + {"iron-storage-chest", {y = -2,x = 3}, { + items = { + {"roboport", 5}, + {"repair-turret", 15}, + {"electric-mining-drill", 10}, + {"transport-belt", 100}, + {"big-electric-pole", 10}, + {"small-electric-pole", 20}, + {"power-switch", 5}, + {"iron-active-provider-chest", 10}, + {"iron-buffer-chest", 20}, + {"iron-passive-provider-chest", 50}, + {"iron-requester-chest", 50}, + {"iron-storage-chest", 50}, + {"inserter", 50}, + {"stone-furnace", 50} + } + }}, + {"iron-storage-chest", {y = -2,x = 4}, {}}, + {"iron-storage-chest", {y = -2,x = 5}, {}}, + {"roboport", {y = -0.5,x = -3.5}, { + items = { + {"early-construction-robot", 20}, + {"early-logistic-robot", 10}, + {"repair-pack", 50} + } + }}, + {"assembling-machine-1", {y = 0,x = 4}, {}}, + {"inserter", {y = -1,x = 6}, {dir = "west"}}, + {"inserter", {y = 1,x = 6}, {dir = "east"}}, + {"iron-passive-provider-chest", {y = -1,x = 7}, {}}, + {"iron-requester-chest", {y = 1,x = 7}, {}}, + {"solar-panel", {y = 3,x = 6}, {}}, + {"solar-panel", {y = 3,x = 3}, {}}, + {"solar-panel", {y = 3,x = 0}, {}}, + {"solar-panel", {y = 3,x = -3}, {}}, + {"solar-panel", {y = 3,x = -6}, {}}, + {"solar-panel", {y = 6,x = 6}, {}}, + {"solar-panel", {y = 6,x = 3}, {}}, + {"solar-panel", {y = 6,x = 0}, {}}, + {"solar-panel", {y = 6,x = -3}, {}}, + {"solar-panel", {y = 6,x = -6}, {}}, + {"solar-panel", {y = 9,x = 6}, {}}, + {"solar-panel", {y = 9,x = 3}, {}}, + {"solar-panel", {y = 9,x = 0}, {}}, + {"solar-panel", {y = 9,x = -3}, {}}, + {"solar-panel", {y = 9,x = -6}, {}}, + {"solar-panel", {y = -4,x = 6}, {}}, + {"solar-panel", {y = -4,x = 3}, {}}, + {"solar-panel", {y = -4,x = 0}, {}}, + {"solar-panel", {y = -4,x = -3}, {}}, + {"solar-panel", {y = -4,x = -6}, {}}, + {"solar-panel", {y = -7,x = 6}, {}}, + {"solar-panel", {y = -7,x = 3}, {}}, + {"solar-panel", {y = -7,x = 0}, {}}, + {"solar-panel", {y = -7,x = -3}, {}}, + {"solar-panel", {y = -7,x = -6}, {}}, + {"accumulator", {y = 0.5,x = -6.5}, {}}, + {"accumulator", {y = -1.5,x = -6.5}, {}} +} + +local entities_landing_pad = { + {"roboport", {y = -6.5,x = 2.5}, { + items = { + {"construction-robot", 10} + } + }}, + {"storage-chest", {y = -5,x = 5}, {}}, + {"substation", {y = -3.5,x = 4.5}, {}}, +} + +local function spawn_entity(entity_name, relative_position, center, surface, extra_options, force) + local recipe + + if extra_options.recipe then + if not game.recipe_prototypes[extra_options.recipe] then + util.debugprint("recipe " .. extra_options.recipe .. " does not exist") + else + recipe = extra_options.recipe + end + end + + local e = surface.create_entity { + name = entity_name, + position = {center.x + relative_position.x, center.y + relative_position.y}, + direction = defines.direction[extra_options.dir] or defines.direction.north, + force = force, + raise_built = true, + create_build_effect_smoke = true, + recipe = recipe + } + + if extra_options.items then + local items = {} + + for _, v in pairs(extra_options.items) do + local name = v[1] or v.name + local count = v[2] or v.count + + if count and count > 0 then + items[name] = count + end + end + + util.insert_safe(e, items) + end + + return e +end + +function getTableSize(t) + local count = 0 + + for _, _ in pairs(t) do + count = count + 1 + end + + return count +end + +function create_power_source(entity) + local powerInterface = entity.surface.create_entity({ + name = "clp-electric-source", + position = entity.position, + force = entity.force, + snap_to_grid = false, + raise_built = false + }) + + if(true) then + local hi = spawn_entity("clp-heat-interface",{y=-3,x=2},entity.position,entity.surface,{},entity.force) + local hp = spawn_entity("clp-heat-pipe",{y=-4,x=2},entity.position,entity.surface,{},entity.force) + hi.set_heat_setting{temperature = 31, mode = "at-least"} + storage.heat_intefaces[entity.unit_number] = {hi,hp} + end + + storage.power_interfaces[entity.unit_number] = powerInterface +end + +function destroy_power_source(entity) + local powerInterface = storage.power_interfaces[entity.unit_number] + + if powerInterface ~= nil then + powerInterface.destroy({ + raise_destroy = false + }) + storage.power_interfaces[entity.unit_number] = nil + end + + local heatInterface = storage.heat_intefaces[entity.unit_number] + + if heatInterface ~= nil then + heatInterface[1].destroy({ + raise_destroy = false + }) + heatInterface[2].destroy({ + raise_destroy = false + }) + storage.heat_intefaces[entity.unit_number] = nil + end +end + +local function clear_area(area, surface) + for _, entity in pairs(surface.find_entities_filtered({ area = area, invert = true })) do + if (entity.valid) then + entity.destroy({ + do_cliff_correction = false, + raise_destroy = false + }) + end + end + + return true +end + +function on_deconstruction(event) + local inventory = event.entity.get_inventory(defines.inventory.cargo_unit) or event.entity.get_inventory(defines.inventory.chest) + + if (inventory == nil) then + do return end + end + + local content = inventory.get_contents() + + if (content == nil) then + do return end + end + + if (inventory.get_item_count("cargo-landing-pad") >= 1 and getTableSize(event.entity.surface.find_entities_filtered({name="cargo-landing-pad"})) == 0) then + inventory.remove({name="cargo-landing-pad",count=1}) + content = inventory.get_contents() + inventory.clear() + local position = event.entity.position + local surface = event.entity.surface + local force = event.entity.force + local area = {{position.x - 5, position.y - 5}, {position.x + 5, position.y + 5}} + local chart = {{position.x - 50, position.y - 50}, {position.x + 50, position.y + 50}} + event.entity.destroy() + force.chart(surface,chart) + clear_area(area,surface) + local clp = spawn_entity("cargo-landing-pad",{x=0,y=0},position,surface,{items=content},force) + + for _, v in pairs(entities_landing_pad) do + local name = v[1] + local pos = v[2] + local extra = v[3] + spawn_entity(name, pos, clp.position, surface, extra, force) + end + end +end + +local function create_roboport(center, surface, player) + for _, v in pairs(entities) do + local name = v[1] + local pos = v[2] + local extra = v[3] + local entity = spawn_entity(name, pos, center, surface, extra, player.force) + end +end + +local function updateInventory() + if not modEnabled then + return + end + + for _, pl in pairs(game.players) do + local player = game.get_player(pl.name) + local inventory = player.get_main_inventory() + inventory.clear() + end +end + +local function on_player_created(event) + -- vars the freeplay.lua snippit had + local crashed_ship_items = remote.call("freeplay", "get_ship_items") + local crashed_debris_items = remote.call("freeplay", "get_debris_items") + + local player = game.get_player(event.player_index) + local character = player.character + + local group = player.permission_group or game.permissions.create_group("NO_INVENTORY") + group.set_allows_action(defines.input_action.craft,false) + --group.set_allows_action(defines.input_action.destroy_item,false) + --group.set_allows_action(defines.input_action.destroy_opened_item,false) + group.set_allows_action(defines.input_action.drop_item,false) + group.set_allows_action(defines.input_action.inventory_transfer,false) + group.set_allows_action(defines.input_action.inventory_split,false) + group.set_allows_action(defines.input_action.cursor_transfer,false) + group.set_allows_action(defines.input_action.cursor_split,false) + group.set_allows_action(defines.input_action.fast_entity_split,false) + group.set_allows_action(defines.input_action.fast_entity_transfer,false) + group.set_allows_action(defines.input_action.stack_split,false) + group.set_allows_action(defines.input_action.stack_transfer,false) + --group.set_allows_action(defines.input_action.use_item,false) + group.set_allows_action(defines.input_action.begin_mining,false) + group.set_allows_action(defines.input_action.begin_mining_terrain,false) + --group.set_allows_action(defines.input_action.smart_pipette,false) + group.name = "NO_INVENTORY" + group.add_player(player) + --player.print(player.permission_group.allows_action(defines.input_action.inventory_transfer)) + + --player.get_main_inventory().resize(0) + + local center = player.character.position + player.character = nil + + if character then + character.destroy() + end + + -- our settings + local disable_crashsite = true + local skip_cutscene = true + + -- add a crash site + local surface = player.surface + -- surface.daytime = 0.7 + crash_site.create_crash_site(surface, {-20, -13}, util.copy(crashed_ship_items), util.copy(crashed_debris_items)) + util.remove_safe(player, crashed_ship_items) + util.remove_safe(player, crashed_debris_items) + -- player.get_main_inventory().sort_and_merge() + + updateInventory() + local area = {{center.x + 10, center.y + 15}, {center.x - 10, center.y - 15}} + clear_area(area, surface) + create_roboport(center, surface, player) +end + +script.on_init(function () + if not remote.interfaces.freeplay then + modEnabled = false + return + end + + remote.call("freeplay", "set_disable_crashsite", true) + script.on_event(defines.events.on_player_created, on_player_created) + + script.on_configuration_changed(updateInventory) +end) diff --git a/von-newmann-2/data.lua b/von-newmann-2/data.lua new file mode 100644 index 0000000..c3c357c --- /dev/null +++ b/von-newmann-2/data.lua @@ -0,0 +1,12 @@ +require("prototypes.tech") +require("prototypes.recipe") +require("prototypes.entities") +require("prototypes.item") + +if data.raw.technology["steel-axe"] then + data.raw.technology["steel-axe"] = null +end + +if(mods["space-age"]) then + require("prototypes.energy-pad") +end diff --git a/von-newmann-2/graphics/entity/construction-robot/construction-robot-reflection.png b/von-newmann-2/graphics/entity/construction-robot/construction-robot-reflection.png new file mode 100644 index 0000000..18e5bc5 Binary files /dev/null and b/von-newmann-2/graphics/entity/construction-robot/construction-robot-reflection.png differ diff --git a/von-newmann-2/graphics/entity/construction-robot/construction-robot-shadow.png b/von-newmann-2/graphics/entity/construction-robot/construction-robot-shadow.png new file mode 100644 index 0000000..5645739 Binary files /dev/null and b/von-newmann-2/graphics/entity/construction-robot/construction-robot-shadow.png differ diff --git a/von-newmann-2/graphics/entity/construction-robot/construction-robot-working.png b/von-newmann-2/graphics/entity/construction-robot/construction-robot-working.png new file mode 100644 index 0000000..c565f6a Binary files /dev/null and b/von-newmann-2/graphics/entity/construction-robot/construction-robot-working.png differ diff --git a/von-newmann-2/graphics/entity/construction-robot/construction-robot.png b/von-newmann-2/graphics/entity/construction-robot/construction-robot.png new file mode 100644 index 0000000..14cc719 Binary files /dev/null and b/von-newmann-2/graphics/entity/construction-robot/construction-robot.png differ diff --git a/von-newmann-2/graphics/entity/iron-active-provider-chest.png b/von-newmann-2/graphics/entity/iron-active-provider-chest.png new file mode 100644 index 0000000..fd48814 Binary files /dev/null and b/von-newmann-2/graphics/entity/iron-active-provider-chest.png differ diff --git a/von-newmann-2/graphics/entity/iron-buffer-chest.png b/von-newmann-2/graphics/entity/iron-buffer-chest.png new file mode 100644 index 0000000..e3cf10a Binary files /dev/null and b/von-newmann-2/graphics/entity/iron-buffer-chest.png differ diff --git a/von-newmann-2/graphics/entity/iron-chest.png b/von-newmann-2/graphics/entity/iron-chest.png new file mode 100644 index 0000000..917d181 Binary files /dev/null and b/von-newmann-2/graphics/entity/iron-chest.png differ diff --git a/von-newmann-2/graphics/entity/iron-passive-provider-chest.png b/von-newmann-2/graphics/entity/iron-passive-provider-chest.png new file mode 100644 index 0000000..c19a894 Binary files /dev/null and b/von-newmann-2/graphics/entity/iron-passive-provider-chest.png differ diff --git a/von-newmann-2/graphics/entity/iron-requester-chest.png b/von-newmann-2/graphics/entity/iron-requester-chest.png new file mode 100644 index 0000000..893f041 Binary files /dev/null and b/von-newmann-2/graphics/entity/iron-requester-chest.png differ diff --git a/von-newmann-2/graphics/entity/iron-storage-chest.png b/von-newmann-2/graphics/entity/iron-storage-chest.png new file mode 100644 index 0000000..a1fe5da Binary files /dev/null and b/von-newmann-2/graphics/entity/iron-storage-chest.png differ diff --git a/von-newmann-2/graphics/entity/logistic-robot/logistic-robot-shadow.png b/von-newmann-2/graphics/entity/logistic-robot/logistic-robot-shadow.png new file mode 100644 index 0000000..3f71cc6 Binary files /dev/null and b/von-newmann-2/graphics/entity/logistic-robot/logistic-robot-shadow.png differ diff --git a/von-newmann-2/graphics/entity/logistic-robot/logistic-robot.png b/von-newmann-2/graphics/entity/logistic-robot/logistic-robot.png new file mode 100644 index 0000000..0532783 Binary files /dev/null and b/von-newmann-2/graphics/entity/logistic-robot/logistic-robot.png differ diff --git a/von-newmann-2/graphics/items/construction-robot.png b/von-newmann-2/graphics/items/construction-robot.png new file mode 100644 index 0000000..7e84d1e Binary files /dev/null and b/von-newmann-2/graphics/items/construction-robot.png differ diff --git a/von-newmann-2/graphics/items/inventory-blocker.png b/von-newmann-2/graphics/items/inventory-blocker.png new file mode 100644 index 0000000..3666527 Binary files /dev/null and b/von-newmann-2/graphics/items/inventory-blocker.png differ diff --git a/von-newmann-2/graphics/items/iron-active-provider-chest.png b/von-newmann-2/graphics/items/iron-active-provider-chest.png new file mode 100644 index 0000000..74cf049 Binary files /dev/null and b/von-newmann-2/graphics/items/iron-active-provider-chest.png differ diff --git a/von-newmann-2/graphics/items/iron-buffer-chest.png b/von-newmann-2/graphics/items/iron-buffer-chest.png new file mode 100644 index 0000000..f7856bf Binary files /dev/null and b/von-newmann-2/graphics/items/iron-buffer-chest.png differ diff --git a/von-newmann-2/graphics/items/iron-chest.png b/von-newmann-2/graphics/items/iron-chest.png new file mode 100644 index 0000000..e29d9d2 Binary files /dev/null and b/von-newmann-2/graphics/items/iron-chest.png differ diff --git a/von-newmann-2/graphics/items/iron-passive-provider-chest.png b/von-newmann-2/graphics/items/iron-passive-provider-chest.png new file mode 100644 index 0000000..d5ffc88 Binary files /dev/null and b/von-newmann-2/graphics/items/iron-passive-provider-chest.png differ diff --git a/von-newmann-2/graphics/items/iron-requester-chest.png b/von-newmann-2/graphics/items/iron-requester-chest.png new file mode 100644 index 0000000..19b740a Binary files /dev/null and b/von-newmann-2/graphics/items/iron-requester-chest.png differ diff --git a/von-newmann-2/graphics/items/iron-storage-chest.png b/von-newmann-2/graphics/items/iron-storage-chest.png new file mode 100644 index 0000000..7c45e01 Binary files /dev/null and b/von-newmann-2/graphics/items/iron-storage-chest.png differ diff --git a/von-newmann-2/graphics/items/logistic-robot.png b/von-newmann-2/graphics/items/logistic-robot.png new file mode 100644 index 0000000..35aa9d5 Binary files /dev/null and b/von-newmann-2/graphics/items/logistic-robot.png differ diff --git a/von-newmann-2/graphics/technology/logistic-system-early.png b/von-newmann-2/graphics/technology/logistic-system-early.png new file mode 100644 index 0000000..1ea41e9 Binary files /dev/null and b/von-newmann-2/graphics/technology/logistic-system-early.png differ diff --git a/von-newmann-2/graphics/technology/logistic-system.png b/von-newmann-2/graphics/technology/logistic-system.png new file mode 100644 index 0000000..ee8d3f8 Binary files /dev/null and b/von-newmann-2/graphics/technology/logistic-system.png differ diff --git a/von-newmann-2/info.json b/von-newmann-2/info.json new file mode 100644 index 0000000..93d4ab5 --- /dev/null +++ b/von-newmann-2/info.json @@ -0,0 +1,18 @@ +{ + "name": "von-newmann-2", + "version": "1.0.0", + "factorio_version": "2.0", + "title": "Von Newmann 2", + "author": "Paul Oliver", + "contact": "contact@pauloliver.dev", + "homepage": "", + "description": "Fork of robot-start-2 by Krypt0n_C0R3. Replaces your character with a roboport.", + "dependencies": [ + "base", + "Repair_Turret", + "! ElectroTurret", + "! quality", + "! ShockTurret", + "! space-age" + ] +} diff --git a/von-newmann-2/locale/en/locale.cfg b/von-newmann-2/locale/en/locale.cfg new file mode 100644 index 0000000..17d46e3 --- /dev/null +++ b/von-newmann-2/locale/en/locale.cfg @@ -0,0 +1,25 @@ +[item-name] +iron-active-provider-chest=Iron active provider chest +iron-buffer-chest=Iron buffer chest +iron-passive-provider-chest=Iron passive provider chest +iron-requester-chest=Iron requester chest +iron-storage-chest=Iron storage chest +early-logistic-robot=Simply logistic robot +early-construction-robot=Simply construction robot +inventory-blocker=Inventory is locked + +[entity-name] +iron-active-provider-chest=Iron active provider chest +iron-buffer-chest=Iron buffer chest +iron-passive-provider-chest=Iron passive provider chest +iron-requester-chest=Iron requester chest +iron-storage-chest=Iron storage chest +early-logistic-robot=Simply logistic robot +early-construction-robot=Simply construction robot +inventory-blocker=Inventory is locked + +[technology-name] +early-logistic=Simply logistics + +[technology-description] +early-logistic=Unlocks access to a simple logistics network and provides access to simple logistics network chests \ No newline at end of file diff --git a/von-newmann-2/locale/ru/locale.cfg b/von-newmann-2/locale/ru/locale.cfg new file mode 100644 index 0000000..597dac4 --- /dev/null +++ b/von-newmann-2/locale/ru/locale.cfg @@ -0,0 +1,36 @@ +repair-turret=Ремонтная турель +repair-turret-description=Чинит союзные сооружения в радиусе.\nСкорость ремонта: [font=default][color=1, 0.74, 0.40] 55/с[/color][/font]\nРадиус: [font=default][color=1, 0.74, 0.40]25[/color][/font] +repair-turret-power=Мощность ремотной турели +repair-turret-power-description=Мощность ремотной турели: +100% +repair-turret-efficiency=Эффективность ремотной турели +repair-turret-efficiency-description=Эффективность ремотной турели: +25% +repair-turret-construction=Строительное улучшение ремотной турели +repair-turret-construction-description=Позволяет ремотной турели сооружать "призраки" используя предметы из логистической сети. +repair-turret-deconstruction-description=Позволяет ремотной турели деконструировать сооружения, возвращая предметы в логистическую сеть. + + +[item-name] +iron-active-provider-chest=Железный сундук активного снабжения +iron-buffer-chest=Железный буфферный сундук +iron-passive-provider-chest=Железный сундук пассивного снабжения +iron-requester-chest=Железный сундук запроса +iron-storage-chest=Железный сундук хранения +early-logistic-robot=Простой транспортный дрон +early-construction-robot=Простой строительный дрон +inventory-blocker=Инвентарь заблокирован + +[entity-name] +iron-active-provider-chest=Железный сундук активного снабжения +iron-buffer-chest=Железный буфферный сундук +iron-passive-provider-chest=Железный сундук пассивного снабжения +iron-requester-chest=Железный сундук запроса +iron-storage-chest=Железный сундук хранения +early-logistic-robot=Простой транспортный дрон +early-construction-robot=Простой строительный дрон +inventory-blocker=Инвентарь заблокирован + +[technology-name] +early-logistic=Простая логистика + +[technology-description] +early-logistic=Открывает доступ к простой логистической сети и предоставляет доступ к простым сундукам логистической сети \ No newline at end of file diff --git a/von-newmann-2/prototypes/energy-pad.lua b/von-newmann-2/prototypes/energy-pad.lua new file mode 100644 index 0000000..4c79661 --- /dev/null +++ b/von-newmann-2/prototypes/energy-pad.lua @@ -0,0 +1,51 @@ +local portable_nuclear_reactor = data.raw["generator-equipment"]["fission-reactor-equipment"] +local clp = data.raw["cargo-landing-pad"]["cargo-landing-pad"] +local energy_source = util.table.deepcopy(data.raw["electric-energy-interface"]["hidden-electric-energy-interface"]) + +energy_source.name = "clp-electric-source" +energy_source.localised_name = {"entity-name.cargo-landing-pad"} +energy_source.icon = clp.icon +energy_source.energy_source = { + type = "electric", + buffer_capacity = "5MJ", + usage_priority = "tertiary" +} +energy_source.energy_production = portable_nuclear_reactor.power +energy_source.collision_box = clp.collision_box +energy_source.selection_box = clp.selection_box + + +local clp_recipe = util.table.deepcopy(data.raw["recipe"]["cargo-landing-pad"]) +clp_recipe.ingredients = +{ + {type = "item", name = "concrete", amount = 250}, + {type = "item", name = "processing-unit", amount = 35}, + {type = "item", name = "steel-plate", amount = 80}, + {type = "item", name = "accumulator", amount = 1}, + {type = "item", name = "fission-reactor-equipment", amount = 1}, + {type = "item", name = "construction-robot", amount = 10} +} + + +local thermal_pad = util.table.deepcopy(data.raw["heat-interface"]["heat-interface"]) +thermal_pad.minable = nil +thermal_pad.gui_mode = "none" +thermal_pad.heat_buffer.default_temperature = 15 +thermal_pad.heat_buffer.max_temperature = 31 +thermal_pad.heat_buffer.min_working_temperature = 30 +thermal_pad.flags = {"placeable-neutral", "player-creation", "not-deconstructable"} +thermal_pad.name = "clp-heat-interface" + +--entity.set_heat_setting{temperature = 1000, mode = "exactly"} + +local heat_pipe = util.table.deepcopy(data.raw["heat-pipe"]["heat-pipe"]) +heat_pipe.name = "clp-heat-pipe" +heat_pipe.flags = {"placeable-neutral", "player-creation", "not-deconstructable"} +heat_pipe.minable = nil + +data:extend({ + energy_source, + clp_recipe, + heat_pipe, + thermal_pad +}) diff --git a/von-newmann-2/prototypes/entities.lua b/von-newmann-2/prototypes/entities.lua new file mode 100644 index 0000000..9620ce7 --- /dev/null +++ b/von-newmann-2/prototypes/entities.lua @@ -0,0 +1,70 @@ +require ("util") + +local iron_chest = data.raw["container"]["iron-chest"] +local ipsc = util.table.deepcopy(data.raw["logistic-container"]["passive-provider-chest"]) +local ibc = util.table.deepcopy(data.raw["logistic-container"]["buffer-chest"]) +local iasc = util.table.deepcopy(data.raw["logistic-container"]["active-provider-chest"]) +local isc = util.table.deepcopy(data.raw["logistic-container"]["storage-chest"]) +local irc = util.table.deepcopy(data.raw["logistic-container"]["requester-chest"]) + +local chests = {ipsc,ibc,iasc,irc,isc} + +for _, chest in ipairs(chests) do + chest.name = "iron-"..chest.name + chest.icon = "__von-newmann-2__/graphics/items/"..chest.name..".png" + chest.corpse = iron_chest.corpse + chest.max_health = iron_chest.max_health + chest.minable = {mining_time = 0.1, result = chest.name} + chest.dying_explosion = iron_chest.dying_explosion + chest.resistances = iron_chest.resistances + chest.open_sound = iron_chest.open_sound + chest.close_sound = iron_chest.close_sound + chest.inventory_size = iron_chest.inventory_size + chest.animation = nil + chest.picture = util.table.deepcopy(iron_chest.picture) + chest.picture.layers[1].filename = "__von-newmann-2__/graphics/entity/"..chest.name..".png" +end + +local early_l_bot = util.table.deepcopy(data.raw["logistic-robot"]["logistic-robot"]) +local early_c_bot = util.table.deepcopy(data.raw["construction-robot"]["construction-robot"]) + +local bots = {early_c_bot,early_l_bot} + +for _, bot in ipairs(bots) do + bot.icon = "__von-newmann-2__/graphics/items/"..bot.name..".png" + bot.name = "early-"..bot.name + bot.minable = {mining_time = 0.1, result = bot.name} + bot.resistances = + { + { + type = "fire", + percent = 100 + } + } + bot.max_health = 50 + bot.speed = 0.04 + bot.max_energy = "0.75MJ" + bot.energy_per_move = "2.5kJ" + bot.idle.filename = bot.idle.filename:gsub("base","von-newmann-2") + bot.in_motion.filename = bot.in_motion.filename:gsub("base","von-newmann-2") + bot.shadow_idle.filename = bot.shadow_idle.filename:gsub("base","von-newmann-2") + bot.shadow_in_motion.filename = bot.shadow_in_motion.filename:gsub("base","von-newmann-2") +end + +early_c_bot.working.filename = early_c_bot.working.filename:gsub("base","von-newmann-2") +early_c_bot.shadow_working.filename = early_c_bot.shadow_working.filename:gsub("base","von-newmann-2") + +early_l_bot.idle_with_cargo.filename = early_l_bot.idle_with_cargo.filename:gsub("base","von-newmann-2") +early_l_bot.in_motion_with_cargo.filename = early_l_bot.in_motion_with_cargo.filename:gsub("base","von-newmann-2") +early_l_bot.shadow_idle_with_cargo.filename = early_l_bot.shadow_idle_with_cargo.filename:gsub("base","von-newmann-2") +early_l_bot.shadow_in_motion_with_cargo.filename = early_l_bot.shadow_in_motion_with_cargo.filename:gsub("base","von-newmann-2") + +data:extend{ + ipsc, + ibc, + iasc, + isc, + irc, + early_c_bot, + early_l_bot +} diff --git a/von-newmann-2/prototypes/item.lua b/von-newmann-2/prototypes/item.lua new file mode 100644 index 0000000..b0eeb68 --- /dev/null +++ b/von-newmann-2/prototypes/item.lua @@ -0,0 +1,89 @@ +data:extend{ + { + type = "item", + name = "iron-active-provider-chest", + icon = "__von-newmann-2__/graphics/items/iron-active-provider-chest.png", + icon_size = 64, + icon_mipmaps = 4, + subgroup = "storage", + order = "a[items]-b[iron-active-provider-chest]", + place_result = "iron-active-provider-chest", + stack_size = 50 + }, + { + type = "item", + name = "iron-buffer-chest", + icon = "__von-newmann-2__/graphics/items/iron-buffer-chest.png", + icon_size = 64, + icon_mipmaps = 4, + subgroup = "storage", + order = "a[items]-b[iron-buffer-chest]", + place_result = "iron-buffer-chest", + stack_size = 50 + }, + { + type = "item", + name = "iron-passive-provider-chest", + icon = "__von-newmann-2__/graphics/items/iron-passive-provider-chest.png", + icon_size = 64, + icon_mipmaps = 4, + subgroup = "storage", + order = "a[items]-b[iron-passive-provider-chest]", + place_result = "iron-passive-provider-chest", + stack_size = 50 + }, + { + type = "item", + name = "iron-requester-chest", + icon = "__von-newmann-2__/graphics/items/iron-requester-chest.png", + icon_size = 64, + icon_mipmaps = 4, + subgroup = "storage", + order = "a[items]-b[iron-requester-chest]", + place_result = "iron-requester-chest", + stack_size = 50 + }, + { + type = "item", + name = "iron-storage-chest", + icon = "__von-newmann-2__/graphics/items/iron-storage-chest.png", + icon_size = 64, + icon_mipmaps = 4, + subgroup = "storage", + order = "a[items]-b[iron-storage-chest]", + place_result = "iron-storage-chest", + stack_size = 50 + }, + { + type = "item", + name = "early-logistic-robot", + icon = "__von-newmann-2__/graphics/items/logistic-robot.png", + icon_size = 64, + icon_mipmaps = 4, + subgroup = "logistic-network", + order = "a[robot]-b[early-logistic-robot]", + place_result = "early-logistic-robot", + stack_size = 50 + }, + { + type = "item", + name = "early-construction-robot", + icon = "__von-newmann-2__/graphics/items/construction-robot.png", + icon_size = 64, + icon_mipmaps = 4, + subgroup = "logistic-network", + order = "a[robot]-b[early-construction-robot]", + place_result = "early-construction-robot", + stack_size = 50 + }, + { + type = "item", + name = "inventory-blocker", + icon = "__von-newmann-2__/graphics/items/inventory-blocker.png", + icon_size = 64, + icon_mipmaps = 4, + subgroup = "logistic-network", + order = "a[robot]-b[early-construction-robot]", + stack_size = 1 + }, +} diff --git a/von-newmann-2/prototypes/recipe.lua b/von-newmann-2/prototypes/recipe.lua new file mode 100644 index 0000000..ea09378 --- /dev/null +++ b/von-newmann-2/prototypes/recipe.lua @@ -0,0 +1,111 @@ +data:extend{ + { + type = "recipe", + name = "iron-active-provider-chest", + auto_recycle = false, + enabled = false, + ingredients = + { + {type = "item", name = "electronic-circuit", amount = 5}, + {type = "item", name = "iron-chest", amount = 1} + }, + allow_productivity = false, + allow_quality = false, + energy_required = 15, + results = {{type = "item", name = "iron-active-provider-chest", amount = 1}} + }, + { + type = "recipe", + name = "iron-buffer-chest", + auto_recycle = false, + enabled = false, + ingredients = + { + {type = "item", name = "electronic-circuit", amount = 5}, + {type = "item", name = "iron-chest", amount = 1} + }, + allow_productivity = false, + allow_quality = false, + energy_required = 15, + results = {{type = "item", name = "iron-buffer-chest", amount = 1}} + }, + { + type = "recipe", + name = "iron-passive-provider-chest", + auto_recycle = false, + enabled = false, + ingredients = + { + {type = "item", name = "electronic-circuit", amount = 5}, + {type = "item", name = "iron-chest", amount = 1} + }, + allow_productivity = false, + allow_quality = false, + energy_required = 15, + results = {{type = "item", name = "iron-passive-provider-chest", amount = 1}} + }, + { + type = "recipe", + name = "iron-requester-chest", + auto_recycle = false, + enabled = false, + ingredients = + { + {type = "item", name = "electronic-circuit", amount = 5}, + {type = "item", name = "iron-chest", amount = 1} + }, + allow_productivity = false, + allow_quality = false, + energy_required = 15, + results = {{type = "item", name = "iron-requester-chest", amount = 1}} + }, + { + type = "recipe", + name = "iron-storage-chest", + auto_recycle = false, + enabled = false, + ingredients = + { + {type = "item", name = "electronic-circuit", amount = 5}, + {type = "item", name = "iron-chest", amount = 1} + }, + allow_productivity = false, + allow_quality = false, + energy_required = 15, + results = {{type = "item", name = "iron-storage-chest", amount = 1}} + }, + { + type = "recipe", + name = "early-logistic-robot", + auto_recycle = false, + enabled = false, + ingredients = + { + {type = "item", name = "electronic-circuit", amount = 5}, + {type = "item", name = "iron-gear-wheel", amount = 12}, + {type = "item", name = "copper-cable", amount = 3}, + {type = "item", name = "iron-plate", amount = 18}, + }, + allow_productivity = false, + allow_quality = false, + energy_required = 8, + results = {{type = "item", name = "early-logistic-robot", amount = 1}} + }, + { + type = "recipe", + name = "early-construction-robot", + auto_recycle = false, + enabled = false, + ingredients = + { + {type = "item", name = "electronic-circuit", amount = 5}, + {type = "item", name = "iron-gear-wheel", amount = 12}, + {type = "item", name = "copper-cable", amount = 3}, + {type = "item", name = "iron-plate", amount = 18}, + }, + allow_productivity = false, + allow_quality = false, + energy_required = 8, + results = {{type = "item", name = "early-construction-robot", amount = 1}} + }, +} diff --git a/von-newmann-2/prototypes/tech.lua b/von-newmann-2/prototypes/tech.lua new file mode 100644 index 0000000..47ce701 --- /dev/null +++ b/von-newmann-2/prototypes/tech.lua @@ -0,0 +1,73 @@ +data.raw.technology["logistic-system"].icon = "__von-newmann-2__/graphics/technology/logistic-system.png" +--[[data.raw.technology["logistic-robotics"].effects = +{ + { + type = "unlock-recipe", + recipe = "roboport" + }, + { + type = "unlock-recipe", + recipe = "logistic-chest-passive-provider" + }, + { + type = "unlock-recipe", + recipe = "logistic-chest-storage" + }, + { + type = "unlock-recipe", + recipe = "logistic-robot" + } +}]]-- + +data:extend{ + { + type = "technology", + name = "early-logistic", + icon_size = 256, icon_mipmaps = 4, + icon = "__von-newmann-2__/graphics/technology/logistic-system-early.png", + effects = + { + { + type = "unlock-recipe", + recipe = "iron-active-provider-chest" + }, + { + type = "unlock-recipe", + recipe = "iron-buffer-chest" + }, + { + type = "unlock-recipe", + recipe = "iron-passive-provider-chest" + }, + { + type = "unlock-recipe", + recipe = "iron-requester-chest" + }, + { + type = "unlock-recipe", + recipe = "iron-storage-chest" + }, + { + type = "unlock-recipe", + recipe = "early-logistic-robot" + }, + { + type = "unlock-recipe", + recipe = "early-construction-robot" + }, + }, + prerequisites = {"logistic-science-pack"}, + unit = + { + count = 100*1, + ingredients = + { + {"automation-science-pack", 1}, + {"logistic-science-pack",5} + }, + time = 30 + }, + upgrade = false, + order = "e-l-a" + }, +} diff --git a/von-newmann-2/thumbnail.png b/von-newmann-2/thumbnail.png new file mode 100644 index 0000000..71669ab Binary files /dev/null and b/von-newmann-2/thumbnail.png differ -- cgit v1.2.1