Skip to content

Commit

Permalink
Fixed incorrect sap module categories. Resolves pyanodon/pybugreports…
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Nov 24, 2024
1 parent 7569a5f commit 52a0ac0
Show file tree
Hide file tree
Showing 11 changed files with 233 additions and 137 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Date: ????
- The guar technology has been moved from logistics science to py science pack 2.
- The guar MK02 technology has been moved from py science pack 2 to chemical science.
- Changed the recipes for seaweed module breeding. Resolves https://github.com/pyanodon/pybugreports/issues/745
- Fixed incorrect sap module categories. Resolves https://github.com/pyanodon/pybugreports/issues/734
---------------------------------------------------------------------------------------------------
Version: 3.0.25
Date: 2024-11-20
Expand Down
2 changes: 1 addition & 1 deletion data-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ data.raw.item["organics"] = nil
-- MODULE LIMITATION SETUP
----------------------------------------------------------------------------------------------------

require "prototypes.module_restrictions"
require "prototypes.module-restrictions"

----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ require "prototypes/technologies/latex"
require "prototypes/technologies/sap"
require "prototypes/technologies/basic-substrate"
require "prototypes/technologies/soil-washing"

require "prototypes/technologies/sugar"
require "prototypes/technologies/ethanol"
require "prototypes/technologies/ash-separation"
Expand Down Expand Up @@ -285,10 +286,7 @@ require "prototypes/buildings/zipir-reef-mk02"
require "prototypes/buildings/zipir-reef-mk03"
require "prototypes/buildings/zipir-reef-mk04"
require "prototypes/buildings/fawogae-plantation"
require "prototypes/buildings/sap-extractor-mk01"
require "prototypes/buildings/sap-extractor-mk02"
require "prototypes/buildings/sap-extractor-mk03"
require "prototypes/buildings/sap-extractor-mk04"
require "prototypes/buildings/sap-extractor"
require "prototypes/buildings/xyhiphoe-pool-mk01"
require "prototypes/buildings/xyhiphoe-pool-mk02"
require "prototypes/buildings/xyhiphoe-pool-mk03"
Expand Down
116 changes: 0 additions & 116 deletions prototypes/buildings/sap-extractor-mk01.lua

This file was deleted.

183 changes: 183 additions & 0 deletions prototypes/buildings/sap-extractor.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
RECIPE {
type = "recipe",
name = "sap-extractor-mk01",
energy_required = 0.5,
enabled = false,
ingredients = {
{type = "item", name = "stone-brick", amount = 30},
{type = "item", name = "soil", amount = 100},
{type = "item", name = "pipe", amount = 15},
{type = "item", name = "inserter", amount = 2},
{type = "item", name = "electronic-circuit", amount = 5},
{type = "item", name = "steam-engine", amount = 1},
{type = "item", name = "iron-plate", amount = 30},
},
results = {
{type = "item", name = "sap-extractor-mk01", amount = 1}
}
}:add_unlock("sap-mk01")

RECIPE {
type = "recipe",
name = "sap-extractor-mk02",
energy_required = 0.5,
enabled = false,
ingredients = {
{type = "item", name = "sap-extractor-mk01", amount = 1},
{type = "item", name = "treated-wood", amount = 100},
{type = "item", name = "engine-unit", amount = 2},
{type = "item", name = "duralumin", amount = 12},
{type = "item", name = "fast-inserter", amount = 2},
{type = "item", name = "advanced-circuit", amount = 15},
{type = "item", name = "steel-plate", amount = 40},
},
results = {
{type = "item", name = "sap-extractor-mk02", amount = 1}
}
}:add_unlock("botany-mk02"):add_ingredient {type = "item", name = "small-parts-02", amount = 15}

RECIPE {
type = "recipe",
name = "sap-extractor-mk03",
energy_required = 0.5,
enabled = false,
ingredients = {
{type = "item", name = "sap-extractor-mk02", amount = 1},
{type = "item", name = "nexelit-plate", amount = 100},
{type = "item", name = "molybdenum-plate", amount = 20},
{type = "item", name = "stainless-steel", amount = 50},
{type = "item", name = "electric-engine-unit", amount = 3},
{type = "item", name = "processing-unit", amount = 30},
{type = "item", name = "nichrome", amount = 40},
},
results = {
{type = "item", name = "sap-extractor-mk03", amount = 1}
}
}:add_unlock("botany-mk03"):add_ingredient {type = "item", name = "small-parts-03", amount = 50}

RECIPE {
type = "recipe",
name = "sap-extractor-mk04",
energy_required = 0.5,
enabled = false,
ingredients = {
{type = "item", name = "sap-extractor-mk03", amount = 1},
{type = "item", name = "super-steel", amount = 100},
{type = "item", name = "divertor", amount = 5},
{type = "item", name = "science-coating", amount = 20},
{type = "item", name = "control-unit", amount = 30},
{type = "item", name = "nenbit-matrix", amount = 40},
},
results = {
{type = "item", name = "sap-extractor-mk04", amount = 1}
}
}:add_unlock("botany-mk04")

local FULL_CRAFTING_SPEED = 1 -- crafting speed when full of mk01 modules

local crafting_categories_by_tier = {
{"sap-mk01"},
{"sap-mk01", "sap-mk02"},
{"sap-mk01", "sap-mk02", "sap-mk03"},
{"sap-mk01", "sap-mk02", "sap-mk03", "sap-mk04"}
}

for i = 1, 4 do
local name = "sap-extractor-mk0" .. i
local icon = "__pyalienlifegraphics__/graphics/icons//sap-extractor-mk0" .. i .. ".png"
local icon_size = 64
local MODULE_SLOTS = 2 * i

ITEM {
type = "item",
name = name,
icon = icon,
icon_size = icon_size,
flags = {},
subgroup = "py-alienlife-farm-buildings-mk0" .. i,
order = "e",
place_result = name,
stack_size = 10
}

ENTITY {
type = "assembling-machine",
name = name,
icon = icon,
icon_size = icon_size,
flags = {"placeable-neutral", "player-creation"},
minable = {mining_time = 0.5, result = name},
fast_replaceable_group = "sap-extractor",
max_health = 150 * i,
corpse = "medium-remnants",
dying_explosion = "big-explosion",
collision_box = {{-2.4, -2.4}, {2.4, 2.4}},
selection_box = {{-2.5, -2.5}, {2.5, 2.5}},
forced_symmetry = "diagonal-pos",
module_slots = MODULE_SLOTS,
allowed_effects = {"consumption", "speed", "pollution", "productivity"},
crafting_categories = crafting_categories_by_tier[i],
crafting_speed = (i == 1) and py.farm_speed(MODULE_SLOTS, FULL_CRAFTING_SPEED) or py.farm_speed_derived(MODULE_SLOTS, "sap-extractor-mk01"),
energy_source = {
type = "electric",
usage_priority = "secondary-input",
emissions_per_minute = {
pollution = -15 * i
},
},
energy_usage = (150 * i) .. "kW",
graphics_set = {
animation = {
layers = {
{
filename = "__pyalienlifegraphics2__/graphics/entity/sap-extractor/i.png",
width = 160,
height = 178,
line_length = 10,
frame_count = 100,
animation_speed = 0.3,
shift = util.by_pixel(0, -10)
},
{
filename = "__pyalienlifegraphics2__/graphics/entity/sap-extractor/i-mask.png",
width = 160,
height = 178,
line_length = 10,
frame_count = 100,
animation_speed = 0.3,
shift = util.by_pixel(0, -10),
tint = py.tints[i]
},
{
filename = "__pyalienlifegraphics2__/graphics/entity/sap-extractor/shadow.png",
width = 160,
height = 160,
line_length = 10,
frame_count = 100,
animation_speed = 0.3,
shift = util.by_pixel(5, -5),
draw_as_shadow = true,
},
}
},
},
fluid_boxes_off_when_no_fluid_recipe = true,
fluid_boxes = {
--1
{
production_type = "input",
pipe_covers = py.pipe_covers(false, true, true, true),
pipe_picture = py.pipe_pictures("assembling-machine-3", nil, {0.0, -0.88}, nil, nil),
volume = 1000,
pipe_connections = {{flow_direction = "input", position = {0.0, -2.0}, direction = defines.direction.north}},
secondary_draw_orders = {north = -1}
},
},
impact_category = "metal-large",
working_sound = {
sound = {filename = "__pyalienlifegraphics__/sounds/sap-extractor.ogg", volume = 0.6},
idle_sound = {filename = "__pyalienlifegraphics__/sounds/sap-extractor.ogg", volume = 0.3},
apparent_volume = 2.5
}
}
end
8 changes: 4 additions & 4 deletions prototypes/items/items.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6025,7 +6025,7 @@ ITEM {
{icon = "__pyalienlifegraphics2__/graphics/icons/sap-tree.png"}
},
icon_size = 64,
category = "sap",
category = "sap-mk01",
tier = 1,
flags = {},
subgroup = "py-alienlife-sap",
Expand All @@ -6042,7 +6042,7 @@ ITEM {
{icon = "__pyalienlifegraphics2__/graphics/icons/sap-tree.png"}
},
icon_size = 64,
category = "sap",
category = "sap-mk02",
tier = 2,
flags = {},
subgroup = "py-alienlife-sap",
Expand All @@ -6059,7 +6059,7 @@ ITEM {
{icon = "__pyalienlifegraphics2__/graphics/icons/sap-tree.png"}
},
icon_size = 64,
category = "sap",
category = "sap-mk03",
tier = 3,
flags = {},
subgroup = "py-alienlife-sap",
Expand All @@ -6076,7 +6076,7 @@ ITEM {
{icon = "__pyalienlifegraphics2__/graphics/icons/sap-tree.png"}
},
icon_size = 64,
category = "sap",
category = "sap-mk04",
tier = 4,
flags = {},
subgroup = "py-alienlife-sap",
Expand Down
14 changes: 13 additions & 1 deletion prototypes/module-categories.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,19 @@ data:extend
},
{
type = "module-category",
name = "sap"
name = "sap-mk01"
},
{
type = "module-category",
name = "sap-mk02"
},
{
type = "module-category",
name = "sap-mk03"
},
{
type = "module-category",
name = "sap-mk04"
},
{
type = "module-category",
Expand Down
Loading

0 comments on commit 52a0ac0

Please sign in to comment.