From 20b0bd3fd814b2dc56585fe9db49942d85f0b79e Mon Sep 17 00:00:00 2001 From: notnotmelon Date: Thu, 31 Aug 2023 15:18:00 -0500 Subject: [PATCH] why not make this thing craftable V2 --- data-updates.lua | 4 + locale/en/locale.cfg | 2 +- prototypes/logo.lua | 120 +++++++++++----------- prototypes/updates/pyindustry-updates.lua | 28 +++++ 4 files changed, 91 insertions(+), 63 deletions(-) create mode 100644 prototypes/updates/pyindustry-updates.lua diff --git a/data-updates.lua b/data-updates.lua index 90130f27..adbb4c9f 100644 --- a/data-updates.lua +++ b/data-updates.lua @@ -1,6 +1,10 @@ require("__stdlib__/stdlib/data/data").Util.create_data_globals() local FUN = require("prototypes/functions/functions") +if mods.pyindustry then + require('prototypes/updates/pyindustry-updates') +end + require('prototypes/updates/base-updates') require("prototypes/updates/entity-updates") diff --git a/locale/en/locale.cfg b/locale/en/locale.cfg index 3b31401c..d797d0b6 100644 --- a/locale/en/locale.cfg +++ b/locale/en/locale.cfg @@ -638,7 +638,7 @@ assembling-machine-2=Burner assembling machine MK 02 assembling-machine-3=Burner assembling machine MK 03 new-beacon=Beacon AM:__1__ FM:__2__ new-beacon-mk01=Diet beacon AM:__1__ FM:__2__ -py-logo-15tiles=Pyanodon logo 15 tiles +py-logo-15tiles=Logo [entity-description] tailings-pond=Tailings pond stores liquids and causes lots of pollution by venting gases. You may need a pump to take out the fluids. diff --git a/prototypes/logo.lua b/prototypes/logo.lua index d8e16e84..50b9c1b8 100644 --- a/prototypes/logo.lua +++ b/prototypes/logo.lua @@ -1,62 +1,58 @@ -data:extend -{ - { - type = "container", - name = "py-logo-15tiles", - icon = "__base__/graphics/icons/factorio-logo-16tiles.png", - icon_size = 64, icon_mipmaps = 4, - flags = {"placeable-neutral", "player-creation", "hidden"}, - minable = {mining_time = 0.1}, - max_health = 666, - collision_box = {{-7.5+0.15, -1.5+0.15}, {7.5-0.15, 1.5-0.15}}, - selection_box = {{-7.5, -1.5}, {7.5, 1.5}}, - inventory_size = 1, - picture = - { - filename = "__pycoalprocessinggraphics__/graphics/entity/logo/py-logo.png", - priority = "extra-high", - width = 1000, - height = 298, - shift = util.by_pixel(0, 0), - scale = 0.5 - }, - resistances = - { - { - type = "fire", - decrease = 0, - percent = 100 - }, - { - type = "physical", - decrease = 0, - percent = 100 - }, - { - type = "impact", - decrease = 0, - percent = 0 - }, - { - type = "explosion", - decrease = 0, - percent = 100 - }, - { - type = "acid", - decrease = 0, - percent = 100 - }, - { - type = "laser", - decrease = 0, - percent = 100 - }, - { - type = "electric", - decrease = 0, - percent = 100 - }, - }, - } -} \ No newline at end of file +data:extend{{ + type = 'container', + name = 'py-logo-15tiles', + icon = '__pycoalprocessinggraphics__/graphics/icons/py-logo-15tiles.png', + icon_size = 64, + flags = {'placeable-neutral', 'player-creation', 'hidden'}, + minable = {mining_time = 0.5}, + max_health = 666, + inventory_type = 'with_filters_and_bar', + collision_box = {{-7.5+0.15, -1.5+0.15}, {7.5-0.15, 1.5-0.15}}, + selection_box = {{-7.5, -1.5}, {7.5, 1.5}}, + inventory_size = 1, + picture = { + filename = '__pycoalprocessinggraphics__/graphics/entity/logo/py-logo.png', + priority = 'extra-high', + width = 1000, + height = 298, + shift = util.by_pixel(0, 0), + scale = 0.5 + }, + resistances = { + { + type = 'fire', + decrease = 0, + percent = 100 + }, + { + type = 'physical', + decrease = 0, + percent = 100 + }, + { + type = 'impact', + decrease = 0, + percent = 0 + }, + { + type = 'explosion', + decrease = 0, + percent = 100 + }, + { + type = 'acid', + decrease = 0, + percent = 100 + }, + { + type = 'laser', + decrease = 0, + percent = 100 + }, + { + type = 'electric', + decrease = 0, + percent = 100 + }, + }, +}} \ No newline at end of file diff --git a/prototypes/updates/pyindustry-updates.lua b/prototypes/updates/pyindustry-updates.lua new file mode 100644 index 00000000..ac2260b1 --- /dev/null +++ b/prototypes/updates/pyindustry-updates.lua @@ -0,0 +1,28 @@ +ITEM { + name = 'py-logo-15tiles', + type = 'item', + stack_size = 10, + icon = '__pycoalprocessinggraphics__/graphics/icons/py-logo-15tiles.png', + icon_size = 64, icon_mipmaps = 4, + place_result = 'py-logo-15tiles', + flags = {}, + subgroup = 'py-walls', + order = 'zz' +} + +RECIPE { + type = 'recipe', + name = 'py-logo-15tiles', + energy_required = 0.5, + enabled = false, + ingredients = { + {type = 'item', name = 'py-iron-oxide', amount = 45}, + {type = 'item', name = 'iron-chest', amount = 1}, + }, + category = 'crafting-with-fluid', + results = { + {'py-logo-15tiles', 1} + } +}:add_unlock('py-asphalt-mk03'):add_ingredient{type = 'fluid', name = 'flue-gas', amount = 200}:add_ingredient{type = 'item', name = 'small-parts-01', amount = 10} + +data.raw['container']['py-logo-15tiles'].minable.result = 'py-logo-15tiles' \ No newline at end of file