diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 0000000..7f5d6bd --- /dev/null +++ b/changelog.txt @@ -0,0 +1,6 @@ +--------------------------------------------------------------------------------------------------- +Version: 0.1.0 +Date: 19. 2. 2021 + Features: + - Removes entity construction of belts, undergrounds and splitters + - Makes robots cheaper and the technology is researched from the beginning \ No newline at end of file diff --git a/control.lua b/control.lua new file mode 100644 index 0000000..8c2095c --- /dev/null +++ b/control.lua @@ -0,0 +1,8 @@ +script.on_init(function () + for index, force in pairs(game.forces) do + game.forces[index].technologies["construction-robotics"].researched = true + game.forces[index].technologies["logistic-robotics"].researched = true + game.forces[index].technologies["logistic-system"].researched = true + game.forces[index].technologies["power-armor"].researched = true + end +end) \ No newline at end of file diff --git a/data-final-fixes.lua b/data-final-fixes.lua new file mode 100644 index 0000000..58389f4 --- /dev/null +++ b/data-final-fixes.lua @@ -0,0 +1,30 @@ +for index, item in pairs(data.raw.item) do + if item.subgroup == "belt" then + local beltList = {"transport-belt", "underground-belt", "splitter"} + for i, catname in pairs(beltList) do + for i, it in pairs(data.raw[catname]) do + if it.name == item.place_result then + if type(it.localised_name) == "table" then + item.localised_name = it.localised_name + else if (it.localised_name) then + item.localised_name = { it.localised_name } + else + item.localised_name = { "entity-name." ..it.name } + end + end + end + end + item.place_result = nil + data.raw.item[index] = item + end +end +end +for index, item in pairs(data.raw["transport-belt"]) do + data.raw["transport-belt"][index].next_upgrade = nil +end +for index, item in pairs(data.raw["underground-belt"]) do + data.raw["underground-belt"][index].next_upgrade = nil +end +for index, item in pairs(data.raw["splitter"]) do + data.raw["splitter"][index].next_upgrade = nil +end \ No newline at end of file diff --git a/data-updates.lua b/data-updates.lua new file mode 100644 index 0000000..0192c92 --- /dev/null +++ b/data-updates.lua @@ -0,0 +1,45 @@ +local function enableRecipes(name) + local r = data.raw["recipe"][name] + if r then + if r.expensive == nil and r.normal == nil then + r.enabled = true + return + end + if r.expensive then + r.expensive.enabled = true + end + if r.normal then + r.normal.enabled = true + end + end +end + +enableRecipes("roboport") +enableRecipes("construction-robot") +enableRecipes("logistic-chest-passive-provider") +enableRecipes("logistic-chest-storage") + +local robotRecipe = { + {"iron-plate", 1}, + {"iron-gear-wheel", 1}, + {"electronic-circuit", 1}, +} + +local chestRecipe = { + {"iron-plate", 3}, + {"electronic-circuit", 1}, +} + +data.raw.recipe["construction-robot"].ingredients = robotRecipe +data.raw.recipe["logistic-robot"].ingredients = robotRecipe +data.raw.recipe["roboport"].ingredients = { + {"iron-plate", 25}, + {"iron-gear-wheel", 10}, + {"electronic-circuit", 10} +} + +data.raw.recipe["logistic-chest-passive-provider"].ingredients = chestRecipe +data.raw.recipe["logistic-chest-storage"].ingredients = chestRecipe +data.raw.recipe["logistic-chest-active-provider"].ingredients = chestRecipe +data.raw.recipe["logistic-chest-requester"].ingredients = chestRecipe +data.raw.recipe["logistic-chest-buffer"].ingredients = chestRecipe \ No newline at end of file diff --git a/data.lua b/data.lua new file mode 100644 index 0000000..a4cc9f9 --- /dev/null +++ b/data.lua @@ -0,0 +1,98 @@ +data:extend({ + --early logistics slots + { + type = "technology", + name = "early-character-logistic-slots", + icon_size = 128, + icon = "__base__/graphics/technology/logistic-robotics.png", + effects = + { + { + type = "character-logistic-requests", + modifier = true + }, + + }, + unit = { + count = 20, + ingredients = + { + {"automation-science-pack", 1}, + }, + time = 15 + }, + order = "c-k-d", + }, + --early trash slots + { + type = "technology", + name = "early-character-logistic-trash-slots", + icon_size = 128, + icon = "__base__/graphics/technology/logistic-robotics.png", + effects = + { + { + type = "character-logistic-trash-slots", + modifier = 6 + }, + }, + unit = { + count = 20, + ingredients = + { + {"automation-science-pack", 1}, + }, + time = 15 + }, + order = "c-k-d", + }, + --early worker speed + { + type = "technology", + name = "early-worker-robots-speed", + icon_size = 128, + icon = "__base__/graphics/technology/worker-robots-speed.png", + effects = + { + { + type = "worker-robot-speed", + modifier = 0.45 + }, + + }, + unit = { + count = 100, + ingredients = + { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + }, + time = 30 + }, + order = "c-k-d", + }, + --early worker cargo capacity + { + type = "technology", + name = "early-worker-robots-storage", + icon_size = 128, + icon = "__base__/graphics/technology/worker-robots-storage.png", + effects = + { + { + type = "worker-robot-storage", + modifier = 3 + }, + }, + unit = { + count = 250, + ingredients = + { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + }, + time = 30 + }, + order = "c-k-d", + }, +}) \ No newline at end of file diff --git a/info.json b/info.json new file mode 100644 index 0000000..de6a129 --- /dev/null +++ b/info.json @@ -0,0 +1,11 @@ +{ + "name": "no-belts", + "version": "0.1.0", + "title": "No Belts", + "author": "oof2win2", + "description": "Disables the ability to place belts. Instead, you are able to use logistic robots for all of your needs", + "dependencies": [ + "base >= 1.0.0" + ], + "factorio_version": "1.1" +} \ No newline at end of file diff --git a/locale/en/config.cfg b/locale/en/config.cfg new file mode 100644 index 0000000..bf9fe7e --- /dev/null +++ b/locale/en/config.cfg @@ -0,0 +1,13 @@ +[technology-name] +flying=Advanced flight +robotics=Advanced robotics +early-character-logistic-slots=Basic character logistic slots +early-character-logistic-trash-slots=Basic character logistic trash slots +early-worker-robots-storage=Basic worker robot cargo size +early-worker-robots-speed=Basic worker robot speed + +[technology-description] +early-character-logistic-slots=Allows you to request items from the logistic network. The items will be delivered by logistic robots. +early-character-logistic-trash-slots=Allows you to send unwanted items to the logistic network. The items will be taken away by logistic robots. +early-worker-robots-storage=Increases the number of items that logistic and construction robots can carry at once. +early-worker-robots-speed=Increases the flying speed of logistic and construction robots. \ No newline at end of file