From 1d8d96050140b8b371bf79866275e24f2e477660 Mon Sep 17 00:00:00 2001 From: Qatavin <108201496+Qatavin@users.noreply.github.com> Date: Fri, 5 Jan 2024 01:52:43 -0800 Subject: [PATCH] Squeak through+se crash fix (#152) * Add require for new file * New file for SE new chests Moves the brass and titanium chest prototypes from the data-updates stage to the data stage in order to prevent a crash related to the Squeak Through mod. * Remove chest prototypes * Update se-stage-1.lua * Update data.lua * Updating changelog #152 --------- Co-authored-by: KiwiHawk <59639+KiwiHawk@users.noreply.github.com> --- boblogistics/changelog.txt | 1 + boblogistics/data.lua | 2 + boblogistics/prototypes/se-stage-1.lua | 146 +++++++++++++++++++++++++ boblogistics/prototypes/se-updates.lua | 142 ------------------------ 4 files changed, 149 insertions(+), 142 deletions(-) create mode 100644 boblogistics/prototypes/se-stage-1.lua diff --git a/boblogistics/changelog.txt b/boblogistics/changelog.txt index 7f1ee382..74484eb4 100644 --- a/boblogistics/changelog.txt +++ b/boblogistics/changelog.txt @@ -2,6 +2,7 @@ Version: 1.2.1 Date: ??? Bugfixes: + - Fixed crash with Space Exploration and Squeak through #152 - Fixed log file warnings with AAI Loaders when Transport Belt Overhaul setting is disabled #158 --------------------------------------------------------------------------------------------------- Version: 1.2.0 diff --git a/boblogistics/data.lua b/boblogistics/data.lua index 50c33127..7a7e9c93 100644 --- a/boblogistics/data.lua +++ b/boblogistics/data.lua @@ -62,3 +62,5 @@ require("prototypes.chests") require("prototypes.repair-pack") require("prototypes.aai-loaders") + +require("prototypes.se-stage-1") diff --git a/boblogistics/prototypes/se-stage-1.lua b/boblogistics/prototypes/se-stage-1.lua new file mode 100644 index 00000000..e68f06bb --- /dev/null +++ b/boblogistics/prototypes/se-stage-1.lua @@ -0,0 +1,146 @@ +if mods["space-exploration"] then + +data:extend({ + + { + name = "brass-chest", + localised_name = { "item-name.heavy-chest" }, + type = "item", + icon = "__boblogistics__/graphics/icons/brass-chest.png", + icon_size = 32, + subgroup = "logistic-chests-2", + order = "b[storage]-1-g[brass-chest]", + stack_size = 50, + place_result = "brass-chest", + }, + + { + name = "titanium-chest", + localised_name = { "item-name.reinforced-chest" }, + type = "item", + icon = "__boblogistics__/graphics/icons/titanium-chest.png", + icon_size = 64, + subgroup = "logistic-chests-3", + order = "b[storage]-1-m[titanium-chest]", + stack_size = 50, + place_result = "titanium-chest", + }, + + { + type = "container", + name = "brass-chest", + localised_name = { "item-name.heavy-chest" }, + icon = "__boblogistics__/graphics/icons/brass-chest.png", + icon_size = 32, + flags = { "placeable-neutral", "player-creation" }, + minable = { mining_time = 1, result = "brass-chest" }, + max_health = 500, + corpse = "small-remnants", + open_sound = { filename = "__base__/sound/metallic-chest-open.ogg", volume = 0.65 }, + close_sound = { filename = "__base__/sound/metallic-chest-close.ogg", volume = 0.7 }, + resistances = { + { + type = "fire", + percent = 80, + }, + { + type = "impact", + percent = 70, + }, + }, + collision_box = { { -0.35, -0.35 }, { 0.35, 0.35 } }, + selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } }, + fast_replaceable_group = "container", + next_upgrade = "titanium-chest", + inventory_size = 64, + vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 }, + picture = { + filename = "__boblogistics__/graphics/entity/chest/brass-chest.png", + priority = "extra-high", + width = 46, + height = 32, + shift = { 0.21875, 0 }, + }, + circuit_wire_connection_point = circuit_connector_definitions["chest"].points, + circuit_connector_sprites = circuit_connector_definitions["chest"].sprites, + circuit_wire_max_distance = default_circuit_wire_max_distance, + }, + + { + type = "container", + name = "titanium-chest", + localised_name = { "item-name.reinforced-chest" }, + icon = "__boblogistics__/graphics/icons/titanium-chest.png", + icon_size = 64, + flags = { "placeable-neutral", "player-creation" }, + minable = { mining_time = 1, result = "titanium-chest" }, + max_health = 650, + corpse = "small-remnants", + open_sound = { filename = "__base__/sound/metallic-chest-open.ogg", volume = 0.65 }, + close_sound = { filename = "__base__/sound/metallic-chest-close.ogg", volume = 0.7 }, + resistances = { + { + type = "fire", + percent = 90, + }, + { + type = "impact", + percent = 90, + }, + }, + collision_box = { { -0.35, -0.35 }, { 0.35, 0.35 } }, + selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } }, + fast_replaceable_group = "container", + inventory_size = 80, + vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 }, + picture = { + layers = { + { + filename = "__boblogistics__/graphics/entity/chest/hr-titanium-chest.png", + priority = "extra-high", + width = 66, + height = 86, + shift = util.by_pixel(0, -3), + scale = 0.5, + }, + { + filename = "__boblogistics__/graphics/entity/chest/hr-titanium-chest-shadow.png", + priority = "extra-high", + width = 116, + height = 48, + shift = util.by_pixel(14, 6), + draw_as_shadow = true, + scale = 0.5, + }, + }, + }, + circuit_wire_connection_point = circuit_connector_definitions["chest"].points, + circuit_connector_sprites = circuit_connector_definitions["chest"].sprites, + circuit_wire_max_distance = default_circuit_wire_max_distance, + }, + + { + type = "recipe", + name = "brass-chest", + enabled = false, + ingredients = { + { "steel-chest", 1 }, + { "se-heavy-girder", 4 }, + }, + result = "brass-chest", + }, + + { + type = "recipe", + name = "titanium-chest", + enabled = false, + ingredients = { + { "brass-chest", 1 }, + { "se-heavy-composite", 1 }, + }, + result = "titanium-chest", + }, + +}) + +end diff --git a/boblogistics/prototypes/se-updates.lua b/boblogistics/prototypes/se-updates.lua index 12186ba4..3139aa64 100644 --- a/boblogistics/prototypes/se-updates.lua +++ b/boblogistics/prototypes/se-updates.lua @@ -35,148 +35,6 @@ data.raw["item-subgroup"]["logistic-chests-3"].order = "a1[container-1]-b" data.raw.item["se-linked-container"].subgroup = "container-6" -data:extend({ - - { - name = "brass-chest", - localised_name = { "item-name.heavy-chest" }, - type = "item", - icon = "__boblogistics__/graphics/icons/brass-chest.png", - icon_size = 32, - subgroup = "logistic-chests-2", - order = "b[storage]-1-g[brass-chest]", - stack_size = 50, - place_result = "brass-chest", - }, - - { - name = "titanium-chest", - localised_name = { "item-name.reinforced-chest" }, - type = "item", - icon = "__boblogistics__/graphics/icons/titanium-chest.png", - icon_size = 64, - subgroup = "logistic-chests-3", - order = "b[storage]-1-m[titanium-chest]", - stack_size = 50, - place_result = "titanium-chest", - }, - - { - type = "container", - name = "brass-chest", - localised_name = { "item-name.heavy-chest" }, - icon = "__boblogistics__/graphics/icons/brass-chest.png", - icon_size = 32, - flags = { "placeable-neutral", "player-creation" }, - minable = { mining_time = 1, result = "brass-chest" }, - max_health = 500, - corpse = "small-remnants", - open_sound = { filename = "__base__/sound/metallic-chest-open.ogg", volume = 0.65 }, - close_sound = { filename = "__base__/sound/metallic-chest-close.ogg", volume = 0.7 }, - resistances = { - { - type = "fire", - percent = 80, - }, - { - type = "impact", - percent = 70, - }, - }, - collision_box = { { -0.35, -0.35 }, { 0.35, 0.35 } }, - selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } }, - fast_replaceable_group = "container", - next_upgrade = "titanium-chest", - inventory_size = 64, - vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 }, - picture = { - filename = "__boblogistics__/graphics/entity/chest/brass-chest.png", - priority = "extra-high", - width = 46, - height = 32, - shift = { 0.21875, 0 }, - }, - circuit_wire_connection_point = circuit_connector_definitions["chest"].points, - circuit_connector_sprites = circuit_connector_definitions["chest"].sprites, - circuit_wire_max_distance = default_circuit_wire_max_distance, - }, - - { - type = "container", - name = "titanium-chest", - localised_name = { "item-name.reinforced-chest" }, - icon = "__boblogistics__/graphics/icons/titanium-chest.png", - icon_size = 64, - flags = { "placeable-neutral", "player-creation" }, - minable = { mining_time = 1, result = "titanium-chest" }, - max_health = 650, - corpse = "small-remnants", - open_sound = { filename = "__base__/sound/metallic-chest-open.ogg", volume = 0.65 }, - close_sound = { filename = "__base__/sound/metallic-chest-close.ogg", volume = 0.7 }, - resistances = { - { - type = "fire", - percent = 90, - }, - { - type = "impact", - percent = 90, - }, - }, - collision_box = { { -0.35, -0.35 }, { 0.35, 0.35 } }, - selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } }, - fast_replaceable_group = "container", - inventory_size = 80, - vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 }, - picture = { - layers = { - { - filename = "__boblogistics__/graphics/entity/chest/hr-titanium-chest.png", - priority = "extra-high", - width = 66, - height = 86, - shift = util.by_pixel(0, -3), - scale = 0.5, - }, - { - filename = "__boblogistics__/graphics/entity/chest/hr-titanium-chest-shadow.png", - priority = "extra-high", - width = 116, - height = 48, - shift = util.by_pixel(14, 6), - draw_as_shadow = true, - scale = 0.5, - }, - }, - }, - circuit_wire_connection_point = circuit_connector_definitions["chest"].points, - circuit_connector_sprites = circuit_connector_definitions["chest"].sprites, - circuit_wire_max_distance = default_circuit_wire_max_distance, - }, - - { - type = "recipe", - name = "brass-chest", - enabled = false, - ingredients = { - { "steel-chest", 1 }, - { "se-heavy-girder", 4 }, - }, - result = "brass-chest", - }, - - { - type = "recipe", - name = "titanium-chest", - enabled = false, - ingredients = { - { "brass-chest", 1 }, - { "se-heavy-composite", 1 }, - }, - result = "titanium-chest", - }, -}) - data.raw.container["steel-chest"].next_upgrade = "brass-chest" data.raw.item["logistic-chest-passive-provider-2"].order = "b[storage]-1-h[passive-provider]"