Skip to content

Commit

Permalink
Add transport belt capacity techs if the DLC is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Oct 18, 2024
1 parent 67c4330 commit 800a062
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ end

require "prototypes/updates/base-updates"
require "prototypes/updates/entity-updates"
require "prototypes/technologies/stacking-belts"

ITEM("automation-science-pack", "tool"):set("icon", "__pycoalprocessinggraphics__/graphics/icons/science-pack-1.png")
ITEM("automation-science-pack", "tool"):set("icon_size", 64)
Expand Down Expand Up @@ -219,7 +220,6 @@ RECIPE("beacon-mk01")
:add_ingredient {"stainless-steel", 10}:remove_ingredient {"steel-plate"}
:add_ingredient {"tower-mk02", 1}


if register_cache_file ~= nil then
register_cache_file({"pycoalprocessing"}, "__pycoalprocessing__/cached-configs/pycoalprocessing.lua")
end
4 changes: 2 additions & 2 deletions locale/en/locale.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ fuelrod=Fuel rod
biomass=Biomass

[technology-name]
transport-belt-capacity=Transport belt capacity
coal-processing=Coal processing
methanol-processing=Methanol processing
cooling-tower=Cooling tower
Expand Down Expand Up @@ -89,11 +90,10 @@ rare-earth=Give access to explore the rare-earth elements.
fine-electronics=Because high tech stuff is necessary in this planet.
crusher=Allow better yields from pre-processing ores.
automation-3=Assembling machines capable of processing fluid ingredients, with additional speed.

kevlar-mk02=Kevlar harder
syngas=Unlocks a higher-octane, multipurpose fuel synthesised from coal gas. Or is it just fake gas?

pyrrhic=Research this technology to win the game\n\n"Did you do it?"\n"Yes."\n"What did it cost?"\n"...Everything."
belt-capacity=Increase the height of layered stacks of items on transport belts.

[recipe-name]
coal-gas=Coal gas from coal
Expand Down
53 changes: 53 additions & 0 deletions prototypes/technologies/stacking-belts.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
if not feature_flags.space_travel then return end

for _, miner in pairs(data.raw["mining-drill"]) do
miner.drops_full_belt_stacks = true
end

local science_packs_that_unlock_belt_stacking = {
"py-science-pack-mk01",
"logistic-science-pack",
"py-science-pack-mk02",
"chemical-science-pack",
"py-science-pack-mk03",
"production-science-pack",
"py-science-pack-mk04",
"utility-science-pack",
}

local i = 1
for _, science in pairs(science_packs_that_unlock_belt_stacking) do
if not data.raw.technology[science] then goto continue end

local prerequisites = {science}
if i > 1 then
prerequisites = {"transport-belt-capacity-" .. (i - 1)}
end

local tech = {
type = "technology",
name = "transport-belt-capacity-" .. i,
localised_description = {"technology-description.belt-capacity"},
icons = util.technology_icon_constant_stack_size("__pycoalprocessinggraphics__/graphics/technology/transport-belt-capacity.png"),
effects = {
{
type = "belt-stack-size-bonus",
modifier = 1
}
},
prerequisites = prerequisites,
unit = {
count = 2000,
ingredients =
{
{science, 1}
},
time = 60
},
upgrade = true
}

data:extend{tech}

::continue::
end

0 comments on commit 800a062

Please sign in to comment.