Skip to content

Commit

Permalink
why not make this thing craftable V2
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Aug 31, 2023
1 parent c07e862 commit 20b0bd3
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 63 deletions.
4 changes: 4 additions & 0 deletions data-updates.lua
Original file line number Diff line number Diff line change
@@ -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")

Expand Down
2 changes: 1 addition & 1 deletion locale/en/locale.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
120 changes: 58 additions & 62 deletions prototypes/logo.lua
Original file line number Diff line number Diff line change
@@ -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
},
},
}
}
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
},
},
}}
28 changes: 28 additions & 0 deletions prototypes/updates/pyindustry-updates.lua
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 20b0bd3

Please sign in to comment.