From d90025cac369163091b7f247eca5879a1cd34a15 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Mon, 14 Apr 2025 20:02:40 +0200 Subject: Changes newlines to Unix style --- von-newmann-2/control.lua | 734 ++++++++++++++++---------------- von-newmann-2/data.lua | 24 +- von-newmann-2/prototypes/energy-pad.lua | 102 ++--- von-newmann-2/prototypes/entities.lua | 140 +++--- von-newmann-2/prototypes/item.lua | 178 ++++---- von-newmann-2/prototypes/recipe.lua | 222 +++++----- von-newmann-2/prototypes/tech.lua | 146 +++---- 7 files changed, 773 insertions(+), 773 deletions(-) diff --git a/von-newmann-2/control.lua b/von-newmann-2/control.lua index 0bd741d..3b67c34 100644 --- a/von-newmann-2/control.lua +++ b/von-newmann-2/control.lua @@ -1,367 +1,367 @@ -local util = require("util") -local crash_site = require("crash-site") -local mod_enabled = 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 get_table_size(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 - }) - - 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} - 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 get_table_size(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 clear_inventory() - if not mod_enabled 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_name = "NO_INVENTORY" - - local group = player.permission_group or game.permissions.create_group(group_name) - 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.craft, false) - group.set_allows_action(defines.input_action.cursor_split, false) - group.set_allows_action(defines.input_action.cursor_transfer, false) - group.set_allows_action(defines.input_action.drop_item, 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.inventory_split, false) - group.set_allows_action(defines.input_action.inventory_transfer, false) - group.set_allows_action(defines.input_action.stack_split, false) - group.set_allows_action(defines.input_action.stack_transfer, false) - group.name = group_name - group.add_player(player) - - 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() - - clear_inventory() - local area = {{center.x + 10, center.y + 15}, {center.x - 10, center.y - 15}} - clear_area(area, surface) - create_roboport(center, surface, player) -end - -local function on_player_changed_position(event) - -- Inspired by Brave New OARC. - -- This prevents exploration of non-visible areas of the map. - -- Player needs to install radars in order to explore. - - local player = game.players[event.player_index] - local chunk_size = 32 - - if prev_pos[event.player_index] == nil then - prev_pos[event.player_index] = player.position - end - - --print("x:", player.position.x, "y:", player.position.y, "prev_x:", prev_pos[event.player_index].x, "prev_y:", prev_pos[event.player_index].y) - - local pred_dim = function(pos, prev_pos) - local delta = pos - prev_pos - - if delta > 0 then - return pos + chunk_size * 2 - elseif delta < 0 then - return pos - chunk_size * 2 - end - - return pos - end - - local pred_x = pred_dim(player.position.x, prev_pos[event.player_index].x) - local pred_y = pred_dim(player.position.y, prev_pos[event.player_index].y) - - --print("pred_x:", pred_x, "pred_y:", pred_y) - - local get_player_surface = function() - if player.character then - return player.character.surface - else - return player.surface - end - end - - local to_chunk_coord = function(coord) - return math.floor(coord / chunk_size) - end - - if not player.force.is_chunk_visible(get_player_surface(), {to_chunk_coord(pred_x), to_chunk_coord(pred_y)}) then - -- teleport player to (possibly modified) prev_pos - player.teleport(prev_pos[event.player_index]) - player.print("Fog of War limit! Drop a radar to extend your reach.", {sound=defines.print_sound.never}) - end - - -- Teleport back to 0,0 if current position is not visible. - -- This prevents the player from getting stuck in case a radar is disabled or destroyed. - if not player.force.is_chunk_visible(get_player_surface(), {to_chunk_coord(player.position.x), to_chunk_coord(player.position.y)}) then - player.teleport({0, 0}) - player.print("Inside Fog of War! Was radar disabled or destroyed?") -- do play sound here - end - - -- save new player position - prev_pos[event.player_index] = player.position -end - -script.on_init(function () - if not remote.interfaces.freeplay then - mod_enabled = false - return - end - - prev_pos = {} - - remote.call("freeplay", "set_disable_crashsite", true) - script.on_event(defines.events.on_player_created, on_player_created) - script.on_event(defines.events.on_player_changed_position, on_player_changed_position) - - -- I can't prevent a player with a 'nil' character to pick up items from belts or the ground. - -- The following just empties the inventory in case an item is picked. - -- It's highly recommended to disable the 'F' shorcut in 'Settings -> Controls' when playing with this mod. - -- Hopefully in the future I'll find a better way to do this. - script.on_event(defines.events.on_picked_up_item, function(event) clear_inventory() end) - script.on_configuration_changed(clear_inventory) -end) +local util = require("util") +local crash_site = require("crash-site") +local mod_enabled = 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 get_table_size(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 + }) + + 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} + 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 get_table_size(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 clear_inventory() + if not mod_enabled 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_name = "NO_INVENTORY" + + local group = player.permission_group or game.permissions.create_group(group_name) + 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.craft, false) + group.set_allows_action(defines.input_action.cursor_split, false) + group.set_allows_action(defines.input_action.cursor_transfer, false) + group.set_allows_action(defines.input_action.drop_item, 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.inventory_split, false) + group.set_allows_action(defines.input_action.inventory_transfer, false) + group.set_allows_action(defines.input_action.stack_split, false) + group.set_allows_action(defines.input_action.stack_transfer, false) + group.name = group_name + group.add_player(player) + + 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() + + clear_inventory() + local area = {{center.x + 10, center.y + 15}, {center.x - 10, center.y - 15}} + clear_area(area, surface) + create_roboport(center, surface, player) +end + +local function on_player_changed_position(event) + -- Inspired by Brave New OARC. + -- This prevents exploration of non-visible areas of the map. + -- Player needs to install radars in order to explore. + + local player = game.players[event.player_index] + local chunk_size = 32 + + if prev_pos[event.player_index] == nil then + prev_pos[event.player_index] = player.position + end + + --print("x:", player.position.x, "y:", player.position.y, "prev_x:", prev_pos[event.player_index].x, "prev_y:", prev_pos[event.player_index].y) + + local pred_dim = function(pos, prev_pos) + local delta = pos - prev_pos + + if delta > 0 then + return pos + chunk_size * 2 + elseif delta < 0 then + return pos - chunk_size * 2 + end + + return pos + end + + local pred_x = pred_dim(player.position.x, prev_pos[event.player_index].x) + local pred_y = pred_dim(player.position.y, prev_pos[event.player_index].y) + + --print("pred_x:", pred_x, "pred_y:", pred_y) + + local get_player_surface = function() + if player.character then + return player.character.surface + else + return player.surface + end + end + + local to_chunk_coord = function(coord) + return math.floor(coord / chunk_size) + end + + if not player.force.is_chunk_visible(get_player_surface(), {to_chunk_coord(pred_x), to_chunk_coord(pred_y)}) then + -- teleport player to (possibly modified) prev_pos + player.teleport(prev_pos[event.player_index]) + player.print("Fog of War limit! Drop a radar to extend your reach.", {sound=defines.print_sound.never}) + end + + -- Teleport back to 0,0 if current position is not visible. + -- This prevents the player from getting stuck in case a radar is disabled or destroyed. + if not player.force.is_chunk_visible(get_player_surface(), {to_chunk_coord(player.position.x), to_chunk_coord(player.position.y)}) then + player.teleport({0, 0}) + player.print("Inside Fog of War! Was radar disabled or destroyed?") -- do play sound here + end + + -- save new player position + prev_pos[event.player_index] = player.position +end + +script.on_init(function () + if not remote.interfaces.freeplay then + mod_enabled = false + return + end + + prev_pos = {} + + remote.call("freeplay", "set_disable_crashsite", true) + script.on_event(defines.events.on_player_created, on_player_created) + script.on_event(defines.events.on_player_changed_position, on_player_changed_position) + + -- I can't prevent a player with a 'nil' character to pick up items from belts or the ground. + -- The following just empties the inventory in case an item is picked. + -- It's highly recommended to disable the 'F' shorcut in 'Settings -> Controls' when playing with this mod. + -- Hopefully in the future I'll find a better way to do this. + script.on_event(defines.events.on_picked_up_item, function(event) clear_inventory() end) + script.on_configuration_changed(clear_inventory) +end) diff --git a/von-newmann-2/data.lua b/von-newmann-2/data.lua index c3c357c..e1709cb 100644 --- a/von-newmann-2/data.lua +++ b/von-newmann-2/data.lua @@ -1,12 +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 +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/prototypes/energy-pad.lua b/von-newmann-2/prototypes/energy-pad.lua index 4c79661..0ac1147 100644 --- a/von-newmann-2/prototypes/energy-pad.lua +++ b/von-newmann-2/prototypes/energy-pad.lua @@ -1,51 +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 -}) +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 index 9620ce7..19ee05b 100644 --- a/von-newmann-2/prototypes/entities.lua +++ b/von-newmann-2/prototypes/entities.lua @@ -1,70 +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 -} +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 index b0eeb68..e31f3a0 100644 --- a/von-newmann-2/prototypes/item.lua +++ b/von-newmann-2/prototypes/item.lua @@ -1,89 +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 - }, -} +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 index ea09378..130793c 100644 --- a/von-newmann-2/prototypes/recipe.lua +++ b/von-newmann-2/prototypes/recipe.lua @@ -1,111 +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}} - }, -} +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 index 47ce701..3df6d39 100644 --- a/von-newmann-2/prototypes/tech.lua +++ b/von-newmann-2/prototypes/tech.lua @@ -1,73 +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" - }, -} +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" + }, +} -- cgit v1.2.1