diff --git a/Bio_Industries_2/changelog.txt b/Bio_Industries_2/changelog.txt index 5f1a2e5..95b2e10 100644 --- a/Bio_Industries_2/changelog.txt +++ b/Bio_Industries_2/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 2.0.11 +Date: 04.09.2025 + Bug Fixes: + - Fixed (I hope) Wood Rail +--------------------------------------------------------------------------------------------------- Version: 2.0.10 Date: 02.09.2025 Bug Fixes: @@ -28,10 +33,10 @@ Version: 2.0.5 Date: 31.08.2025 Bug Fixes: - Fixed Wood Underground pipe graphic (TheSAguy) - - Fixed Wood Underground pipe graphic (TheSAguy) + - Fixed Prototype Artillery (TheSAguy) - Fixed Dart Turret ammo (TheSAguy) Changes: - - Updated Rail Recipe (TheSAguy) + - Updated Vanilla Rail Recipe (TheSAguy) - Added Wooden Rail (TheSAguy) - Updated some graphics (TheSAguy; BIG thanks to Snouz!) --------------------------------------------------------------------------------------------------- diff --git a/Bio_Industries_2/common.lua b/Bio_Industries_2/common.lua index 267ac21..1bd793e 100644 --- a/Bio_Industries_2/common.lua +++ b/Bio_Industries_2/common.lua @@ -55,7 +55,7 @@ return function(mod_name) end ------------------------------------------------------------------------------------ - -- Sane values for collision masks + -- Same values for collision masks -- Default: {"item-layer", "object-layer", "rail-layer", "floor-layer", "water-tile"} common.RAIL_BRIDGE_MASK = { "object-layer", "consider-tile-transitions" } diff --git a/Bio_Industries_2/data.lua b/Bio_Industries_2/data.lua index 39e0599..d785bb6 100644 --- a/Bio_Industries_2/data.lua +++ b/Bio_Industries_2/data.lua @@ -70,6 +70,7 @@ require("prototypes.Wood_Products.recipe") require("prototypes.Wood_Products.containers-entities") require("prototypes.Wood_Products.containers-item") require("prototypes.Wood_Products.containers-recipe") +require("prototypes.Wood_Products.rail") if not mods["Natural_Evolution_Buildings"] then diff --git a/Bio_Industries_2/graphics/entities/remnants/arboretum_remnant.png b/Bio_Industries_2/graphics/entities/remnants/arboretum_remnant.png new file mode 100644 index 0000000..23b29a5 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/arboretum_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/bi_large_accumulator_remnant.png b/Bio_Industries_2/graphics/entities/remnants/bi_large_accumulator_remnant.png new file mode 100644 index 0000000..0dd8bdb Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/bi_large_accumulator_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/big-wooden-pole_remnant.png b/Bio_Industries_2/graphics/entities/remnants/big-wooden-pole_remnant.png new file mode 100644 index 0000000..50c082f Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/big-wooden-pole_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/bio_cannon_remnant.png b/Bio_Industries_2/graphics/entities/remnants/bio_cannon_remnant.png index ee0cdaa..f2a9d4e 100644 Binary files a/Bio_Industries_2/graphics/entities/remnants/bio_cannon_remnant.png and b/Bio_Industries_2/graphics/entities/remnants/bio_cannon_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/bio_farm_remnant.png b/Bio_Industries_2/graphics/entities/remnants/bio_farm_remnant.png new file mode 100644 index 0000000..9d9b5f5 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/bio_farm_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/bio_garden_huge_remnant.png b/Bio_Industries_2/graphics/entities/remnants/bio_garden_huge_remnant.png new file mode 100644 index 0000000..6fe5804 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/bio_garden_huge_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/bio_garden_large_remnant.png b/Bio_Industries_2/graphics/entities/remnants/bio_garden_large_remnant.png new file mode 100644 index 0000000..fc61747 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/bio_garden_large_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/bio_garden_remnant.png b/Bio_Industries_2/graphics/entities/remnants/bio_garden_remnant.png new file mode 100644 index 0000000..29c60af Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/bio_garden_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/bio_greenhouse_remnant.png b/Bio_Industries_2/graphics/entities/remnants/bio_greenhouse_remnant.png new file mode 100644 index 0000000..8042b44 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/bio_greenhouse_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/bio_solar_boiler_remnant.png b/Bio_Industries_2/graphics/entities/remnants/bio_solar_boiler_remnant.png new file mode 100644 index 0000000..2d8c65b Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/bio_solar_boiler_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/bio_solar_farm_remnant.png b/Bio_Industries_2/graphics/entities/remnants/bio_solar_farm_remnant.png new file mode 100644 index 0000000..639a7a4 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/bio_solar_farm_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/bio_turret_remnant.png b/Bio_Industries_2/graphics/entities/remnants/bio_turret_remnant.png new file mode 100644 index 0000000..8093899 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/bio_turret_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/bioreactor_remnant.png b/Bio_Industries_2/graphics/entities/remnants/bioreactor_remnant.png new file mode 100644 index 0000000..953fe6f Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/bioreactor_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/cokery_remnant.png b/Bio_Industries_2/graphics/entities/remnants/cokery_remnant.png new file mode 100644 index 0000000..154d0c3 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/cokery_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/giga_wooden_chest_remnant.png b/Bio_Industries_2/graphics/entities/remnants/giga_wooden_chest_remnant.png new file mode 100644 index 0000000..99bc69c Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/giga_wooden_chest_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/hr_bio_cannon_remnant.png b/Bio_Industries_2/graphics/entities/remnants/hr_bio_cannon_remnant.png deleted file mode 100644 index f2a9d4e..0000000 Binary files a/Bio_Industries_2/graphics/entities/remnants/hr_bio_cannon_remnant.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/remnants/huge_wooden_chest_remnant.png b/Bio_Industries_2/graphics/entities/remnants/huge_wooden_chest_remnant.png new file mode 100644 index 0000000..9c43502 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/huge_wooden_chest_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/huge_wooden_pole_remnant.png b/Bio_Industries_2/graphics/entities/remnants/huge_wooden_pole_remnant.png new file mode 100644 index 0000000..0c3ca77 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/huge_wooden_pole_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/large_substation_remnant.png b/Bio_Industries_2/graphics/entities/remnants/large_substation_remnant.png new file mode 100644 index 0000000..56d8eb5 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/large_substation_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/large_wooden_chest_remnant.png b/Bio_Industries_2/graphics/entities/remnants/large_wooden_chest_remnant.png new file mode 100644 index 0000000..10e3602 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/large_wooden_chest_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/stone_crusher_remnant.png b/Bio_Industries_2/graphics/entities/remnants/stone_crusher_remnant.png new file mode 100644 index 0000000..eb813bd Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/stone_crusher_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/wooden_fence_remnant.png b/Bio_Industries_2/graphics/entities/remnants/wooden_fence_remnant.png new file mode 100644 index 0000000..713d3bc Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/wooden_fence_remnant.png differ diff --git a/Bio_Industries_2/graphics/entities/remnants/woodpipe_remnant.png b/Bio_Industries_2/graphics/entities/remnants/woodpipe_remnant.png new file mode 100644 index 0000000..713d3bc Binary files /dev/null and b/Bio_Industries_2/graphics/entities/remnants/woodpipe_remnant.png differ diff --git a/Bio_Industries_2/info.json b/Bio_Industries_2/info.json index 4a38118..c50efc8 100644 --- a/Bio_Industries_2/info.json +++ b/Bio_Industries_2/info.json @@ -1,6 +1,6 @@ { "name": "Bio_Industries_2", - "version": "2.0.10", + "version": "2.0.11", "factorio_version": "2.0", "title": "Bio Industries", "author": "TheSAguy - Had a few Ideas, Pi-C (Programming Genius), Snouz (Graphics Wizard), Cackling Fiend - Conversion to F2.0", diff --git a/Bio_Industries_2/locale/en/entity-name.cfg b/Bio_Industries_2/locale/en/entity-name.cfg index 76783cc..373cc46 100644 --- a/Bio_Industries_2/locale/en/entity-name.cfg +++ b/Bio_Industries_2/locale/en/entity-name.cfg @@ -34,6 +34,9 @@ bi-power-to-rail-pole=Powered rails connector bi-rail-power=Powered rails bi-rail-wood-bridge=Wooden rail bridge bi-rail-wood=Wooden rails +bi-curved-rail-a-wood=Wooden rails +bi-curved-rail-b-wood=Wooden rails +bi-half-diagonal-rail-wood=Wooden rails rail-remnants-wood-bridge=Remnants of a wooden rail bridge rail-remnants-wood=Remnants of wooden rails diff --git a/Bio_Industries_2/prototypes/Bio_Cannon/entity.lua b/Bio_Industries_2/prototypes/Bio_Cannon/entity.lua index 26eff74..0a53a8f 100644 --- a/Bio_Industries_2/prototypes/Bio_Cannon/entity.lua +++ b/Bio_Industries_2/prototypes/Bio_Cannon/entity.lua @@ -200,7 +200,7 @@ if BI.Settings.Bio_Cannon then line_length = 1, axially_symmetrical = false, shift = {0, -0.8}, - filename = REMNANTSPATH .. "hr_bio_cannon_remnant.png", + filename = REMNANTSPATH .. "bio_cannon_remnant.png", scale = 0.5 } diff --git a/Bio_Industries_2/prototypes/Bio_Farm/entities.lua b/Bio_Industries_2/prototypes/Bio_Farm/entities.lua index 3ca25d3..069bfcf 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/entities.lua @@ -1,8 +1,8 @@ local BioInd = require('common')('Bio_Industries_2') - local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/" local ENTITYPATH_BIO = BioInd.modRoot .. "/graphics/entities/" +local REMNANTSPATH = BioInd.modRoot .. "/graphics/entities/remnants/" require("prototypes.Bio_Farm.pipeConnectors") require("util") @@ -142,7 +142,6 @@ data:extend({ }, }, - ------- Bio Farm { type = "assembling-machine", @@ -158,7 +157,7 @@ data:extend({ flags = { "placeable-neutral", "placeable-player", "player-creation" }, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-farm" }, max_health = 250, - corpse = "big-remnants", + corpse = "bi-bio-farm-remnant", dying_explosion = "medium-explosion", resistances = { { type = "fire", percent = 70 } }, fluid_boxes = { @@ -246,13 +245,48 @@ data:extend({ allowed_effects = { "consumption", "speed", "productivity", "pollution" }, }, + --- Corpse + { + + type = "corpse", + name = "bi-bio-farm-remnant", + localised_name = {"entity-name.bi-bio-farm-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-4.5, -4.5}, {4.5, 4.5}}, + tile_width = 9, + tile_height = 9, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "bio_farm_remnant.png", + line_length = 1, + width = 728, + height = 800, + frame_count = 1, + direction_count = 1, + shift = {0, -1.5}, + scale = 0.5 + } + } + }, + }) data:extend({ - ------ Greenhouse + ------ Greenhouse / Nursary { type = "assembling-machine", name = "bi-bio-greenhouse", @@ -269,7 +303,7 @@ data:extend({ collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } }, selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } }, max_health = 250, - corpse = "medium-remnants", + corpse = "bi-bio-greenhouse-remnant", dying_explosion = "medium-explosion", crafting_categories = { "biofarm-mod-greenhouse" }, crafting_speed = 1, @@ -341,6 +375,40 @@ data:extend({ close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 } }, + -- corpse +{ + type = "corpse", + name = "bi-bio-greenhouse-remnant", + localised_name = {"entity-name.bi-bio-greenhouse-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-1.5, -1.5}, {1.5, 1.5}}, + tile_width = 3, + tile_height = 3, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "bio_greenhouse_remnant.png", + line_length = 1, + width = 384, + height = 384, + frame_count = 1, + direction_count = 1, + shift = {0, -0.5}, + scale = 0.5 + } + } +}, + -- COKERY { type = "assembling-machine", @@ -360,7 +428,7 @@ data:extend({ order = "a[cokery]", minable = { hardness = 0.2, mining_time = 0.5, result = "bi-cokery" }, max_health = 200, - corpse = "medium-remnants", + corpse = "bi-cokery-remnant", resistances = { { type = "fire", percent = 95 } }, collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } }, selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } }, @@ -432,6 +500,41 @@ data:extend({ crafting_speed = 2, ingredient_count = 1 }, + + --- corpse + + { + type = "corpse", + name = "bi-cokery-remnant", + localised_name = {"entity-name.bi-cokery-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-1.5, -1.5}, {1.5, 1.5}}, + tile_width = 3, + tile_height = 3, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "cokery_remnant.png", + line_length = 1, + width = 256, + height = 256, + frame_count = 1, + direction_count = 1, + shift = {0.5, -0.5}, + scale = 0.5 + } + } + }, -- STONECRUSHER { @@ -445,7 +548,7 @@ data:extend({ flags = { "placeable-neutral", "player-creation" }, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-stone-crusher" }, max_health = 100, - corpse = "medium-remnants", + corpse = "bi-stone-crusher-remnant", module_slots = 1, resistances = { { type = "fire", percent = 70 } }, working_sound = { @@ -499,6 +602,41 @@ data:extend({ allowed_effects = { "consumption", "speed", "pollution" }, }, +--- corpse + { + type = "corpse", + name = "bi-stone-crusher-remnant", + localised_name = {"entity-name.bi-stone-crusher-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-1, -1}, {1, 1}}, + tile_width = 2, + tile_height = 2, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "stone_crusher_remnant.png", + line_length = 1, + width = 130, + height = 156, + frame_count = 1, + direction_count = 1, + shift = {0, -0.2}, + scale = 0.5 + } + } + }, + + --- Seed Bomb Projectile - 1 { type = "projectile", @@ -865,7 +1003,7 @@ data:extend({ placeable_by = { item = "bi-arboretum-area", count = 1 }, -- Fixes that entity couldn't be blueprinted minable = { hardness = 0.2, mining_time = 0.5, result = "bi-arboretum-area" }, max_health = 250, - corpse = "big-remnants", + corpse = "bi-arboretum-area-remnant", dying_explosion = "medium-explosion", resistances = { { type = "fire", percent = 70 } }, fluid_boxes = { @@ -939,5 +1077,39 @@ data:extend({ close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, module_specification = {}, }, + --- Corpse + { + type = "corpse", + name = "bi-arboretum-area-remnant", + localised_name = {"entity-name.bi-arboretum-area-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-4.5, -4.5}, {4.5, 4.5}}, + tile_width = 9, + tile_height = 9, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "arboretum_remnant.png", + line_length = 1, + width = 640, + height = 640, + frame_count = 1, + direction_count = 1, + shift = {0,0}, + scale = 0.5 + } + } + }, + }) diff --git a/Bio_Industries_2/prototypes/Bio_Fuel/entities.lua b/Bio_Industries_2/prototypes/Bio_Fuel/entities.lua index 89714ab..1cb969a 100644 --- a/Bio_Industries_2/prototypes/Bio_Fuel/entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Fuel/entities.lua @@ -4,6 +4,7 @@ local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/" local ENTITYPATH = "__base__/graphics/entity/boiler/" local ENTITYPATH_BIO = BioInd.modRoot .. "/graphics/entities/" +local REMNANTSPATH = BioInd.modRoot .. "/graphics/entities/remnants/" require("util") @@ -33,7 +34,7 @@ data:extend({ flags = { "placeable-neutral", "player-creation" }, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-reactor" }, max_health = 100, - corpse = "big-remnants", + corpse = "bi-bio-reactor-remnant", fluid_boxes = { { production_type = "input", @@ -146,6 +147,42 @@ data:extend({ }, allowed_effects = { "consumption", "speed", "productivity", "pollution" }, }, + + --- corpse + + { + type = "corpse", + name = "bi-bio-reactor-remnant", + localised_name = {"entity-name.bi-bio-reactor-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-1.5, -1.5}, {1.5, 1.5}}, + tile_width = 3, + tile_height = 3, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "bioreactor_remnant.png", + line_length = 1, + width = 182, + height = 256, + frame_count = 1, + direction_count = 1, + shift = {0, -0.5}, + scale = 0.5 + } + } + }, + }) if BI.Settings.BI_Bio_Fuel then diff --git a/Bio_Industries_2/prototypes/Bio_Garden/entities.lua b/Bio_Industries_2/prototypes/Bio_Garden/entities.lua index 0c9125e..791a747 100644 --- a/Bio_Industries_2/prototypes/Bio_Garden/entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Garden/entities.lua @@ -1,8 +1,8 @@ local BioInd = require('common')('Bio_Industries_2') - local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/" local ENTITYPATH_BIO = BioInd.modRoot .. "/graphics/entities/" +local REMNANTSPATH = BioInd.modRoot .. "/graphics/entities/remnants/" require("util") @@ -24,7 +24,7 @@ data:extend({ minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-garden" }, fast_replaceable_group = "bi-bio-garden", max_health = 150, - corpse = "medium-remnants", + corpse = "bi-bio-garden-remnant", collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } }, selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } }, fluid_boxes = { @@ -84,6 +84,41 @@ data:extend({ -- won't be affected by beacons! allowed_effects = { "consumption", "speed" }, }, + ---- corpse + { + type = "corpse", + name = "bi-bio-garden-remnant", + localised_name = {"entity-name.bi-bio-garden-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-1.5, -1.5}, {1.5, 1.5}}, + tile_width = 3, + tile_height = 3, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "bio_garden_remnant.png", + line_length = 1, + width = 256, + height = 320, + frame_count = 1, + direction_count = 1, + shift = {0, -0.75}, + scale = 0.5 + } + } + }, + + ---- Bio Garden Large { @@ -101,7 +136,7 @@ data:extend({ minable = { hardness = 0.6, mining_time = 1, result = "bi-bio-garden-large" }, fast_replaceable_group = "bi-bio-garden-large", max_health = 1200, - corpse = "medium-remnants", + corpse = "bi-bio-garden-large-remnant", collision_box = {{-4.3, -4.3}, {4.3, 4.3}}, selection_box = {{-4.5, -4.5}, {4.5, 4.5}}, scale_entity_info_icon = true, @@ -189,6 +224,38 @@ data:extend({ allowed_effects = { "consumption", "speed" }, }, + { + type = "corpse", + name = "bi-bio-garden-large-remnant", + localised_name = {"entity-name.bi-bio-garden-large-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-4.5, -4.5}, {4.5, 4.5}}, + tile_width = 9, + tile_height = 9, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "bio_garden_large_remnant.png", + line_length = 1, + width = 640, + height = 704, + frame_count = 1, + direction_count = 1, + shift = {0, -0.5}, + scale = 0.5 + } + } +}, ---- Bio Garden Huge { type = "assembling-machine", @@ -205,7 +272,7 @@ data:extend({ minable = { hardness = 1.2, mining_time = 2, result = "bi-bio-garden-huge" }, fast_replaceable_group = "bi-bio-garden-huge", max_health = 2000, - corpse = "medium-remnants", + corpse = "bi-bio-garden-huge-remnant", collision_box = {{-13.3, -13.3}, {13.3, 13.3}}, selection_box = {{-13.5, -13.5}, {13.5, 13.5}}, scale_entity_info_icon = true, @@ -336,4 +403,38 @@ data:extend({ -- won't be affected by beacons! allowed_effects = { "consumption", "speed" }, }, + ---- corpse + +{ + type = "corpse", + name = "bi-bio-garden-huge-remnant", + localised_name = {"entity-name.bi-bio-garden-huge-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-13.5, -13.5}, {13.5, 13.5}}, + tile_width = 27, + tile_height = 27, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "bio_garden_huge_remnant.png", + line_length = 1, + width = 896, + height = 928, + frame_count = 1, + direction_count = 1, + shift = {0, -0.5}, + } + } +} + }) diff --git a/Bio_Industries_2/prototypes/Bio_Solar_Farm/entities.lua b/Bio_Industries_2/prototypes/Bio_Solar_Farm/entities.lua index 5d7903a..1038ecb 100644 --- a/Bio_Industries_2/prototypes/Bio_Solar_Farm/entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Solar_Farm/entities.lua @@ -4,8 +4,8 @@ require("util") local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/" -local ENTITYPATH_BIO = "__Bio_Industries_2__/graphics/entities/" - +local ENTITYPATH_BIO = BioInd.modRoot .. "/graphics/entities/" +local REMNANTSPATH = BioInd.modRoot .. "/graphics/entities/remnants/" @@ -17,39 +17,39 @@ if BI.Settings.BI_Solar_Additions then filename = "__base__/sound/walking/concrete-" .. i .. ".ogg", volume = 1.2 } -end + end -function big_accumulator_picture(tint, repeat_count) - return - { - layers = - { - { - filename = ENTITYPATH_BIO .. "bio_accumulator/bi_large_accumulator.png", - priority = "extra-high", - width = 307, - height = 362, - scale = 0.5, - repeat_count = repeat_count, - tint = tint, - shift = {0, -0.6}, - }, - { - filename = ENTITYPATH_BIO .. "bio_accumulator/bi_large_accumulator_shadow.png", - priority = "extra-high", - width = 384, - height = 272, - repeat_count = repeat_count, - shift = {1, 0}, - scale = 0.5, - draw_as_shadow = true, - } - } - } - end - - function big_accumulator_charge() + function big_accumulator_picture(tint, repeat_count) + return + { + layers = + { + { + filename = ENTITYPATH_BIO .. "bio_accumulator/bi_large_accumulator.png", + priority = "extra-high", + width = 307, + height = 362, + scale = 0.5, + repeat_count = repeat_count, + tint = tint, + shift = {0, -0.6}, + }, + { + filename = ENTITYPATH_BIO .. "bio_accumulator/bi_large_accumulator_shadow.png", + priority = "extra-high", + width = 384, + height = 272, + repeat_count = repeat_count, + shift = {1, 0}, + scale = 0.5, + draw_as_shadow = true, + } + } + } + end + + function big_accumulator_charge() return { layers = @@ -132,7 +132,7 @@ function big_accumulator_picture(tint, repeat_count) flags = { "placeable-neutral", "player-creation" }, minable = { hardness = 0.25, mining_time = 0.5, result = "bi-bio-solar-farm" }, max_health = 600, - corpse = "big-remnants", + corpse = "bi-bio-solar-farm-remnant", dying_explosion = "medium-explosion", resistances = { { type = "fire", percent = 80 } }, collision_box = { { -4.2, -4.2 }, { 4.2, 4.2 } }, @@ -166,7 +166,40 @@ function big_accumulator_picture(tint, repeat_count) }, production = "3600kW" }, - + + ---- corpse + { + type = "corpse", + name = "bi-bio-solar-farm-remnant", + localised_name = {"entity-name.bi-bio-solar-farm-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-4.5, -4.5}, {4.5, 4.5}}, + tile_width = 9, + tile_height = 9, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "bio_solar_farm_remnant.png", + line_length = 1, + width = 624, + height = 578, + frame_count = 1, + direction_count = 1, + shift = {0.3, 0}, + scale = 0.5 + } + } + }, ---- BI Accumulator { @@ -185,7 +218,7 @@ function big_accumulator_picture(tint, repeat_count) flags = { "placeable-neutral", "player-creation" }, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-accumulator" }, max_health = 500, - corpse = "big-remnants", + corpse = "bi-bio-accumulator-remnant", collision_box = { { -1.75, -1.75 }, { 1.75, 1.75 } }, selection_box = { { -2, -2 }, { 2, 2 } }, @@ -239,7 +272,42 @@ function big_accumulator_picture(tint, repeat_count) default_output_signal = {type = "virtual", name = "signal-A"}, weight = 200 * kg -}, + }, + + --- corpse + + { + type = "corpse", + name = "bi-bio-accumulator-remnant", + localised_name = {"entity-name.bi-bio-accumulator-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-2, -2}, {2, 2}}, + tile_width = 4, + tile_height = 4, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "bi_large_accumulator_remnant.png", + line_length = 1, + width = 307, + height = 362, + frame_count = 1, + direction_count = 1, + shift = {0, -0.6}, + scale = 0.5 + } + } + }, ---- Large Substation @@ -262,7 +330,7 @@ function big_accumulator_picture(tint, repeat_count) flags = { "placeable-neutral", "player-creation" }, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-large-substation" }, max_health = 600, - corpse = "big-remnants", + corpse = "bi-large-substation-remnant", dying_explosion = "big-explosion", track_coverage_during_build_by_moving = true, resistances = { @@ -329,6 +397,40 @@ function big_accumulator_picture(tint, repeat_count) priority = "extra-high-no-scale" }, }, + + --- corpse + { + type = "corpse", + name = "bi-large-substation-remnant", + localised_name = {"entity-name.bi-large-substation-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-2.5, -2.5}, {2.5, 2.5}}, + tile_width = 5, + tile_height = 5, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "large_substation_remnant.png", + line_length = 1, + width = 384, + height = 384, + frame_count = 1, + direction_count = 1, + shift = {0,0}, + scale = 0.5 + } + } + }, ---- Solar Floor / Musk Floor @@ -429,192 +531,227 @@ function big_accumulator_picture(tint, repeat_count) }, }) - data:extend({ + data:extend({ ------- Boiler for Solar Plant / Boiler -{ - type = "boiler", - name = "bi-solar-boiler", - icon = ICONPATH_E .. "bio_Solar_Boiler_Icon.png", - icon_size = 64, - icons = { - { icon = ICONPATH_E .. "bio_Solar_Boiler_Icon.png", icon_size = 64 } - }, - se_allow_in_space = true, - flags = { "placeable-neutral", "player-creation" }, - minable = { hardness = 0.2, mining_time = 1, result = "bi-solar-boiler" }, - max_health = 400, - corpse = "small-remnants", - vehicle_impact_sound = sounds.generic_impact, - mode = "output-to-separate-pipe", - resistances = { - { type = "fire", percent = 100 }, - { type = "explosion", percent = 30 }, - { type = "impact", percent = 30 } - }, - collision_box = { { -4.2, -4.2 }, { 4.2, 4.2 } }, - selection_box = { { -4.5, -4.5 }, { 4.5, 4.5 } }, - target_temperature = 235, - fluid_box = { - volume = 200, - base_level = -1, - pipe_covers = pipecoverspictures(), - pipe_connections = { - { flow_direction = "input-output", direction = defines.direction.east, position = { 4, 0 } }, - { flow_direction = "input-output", direction = defines.direction.west, position = { -4, 0 } } - }, - production_type = "input-output", - filter = "water" - }, - output_fluid_box = { - volume = 200, - base_level = 1, - pipe_covers = pipecoverspictures(), - pipe_connections = { - { flow_direction = "input-output", direction = defines.direction.south, position = { 0, 4 } }, - { flow_direction = "input-output", direction = defines.direction.north, position = { 0, -4 } } - }, - production_type = "output", - filter = "steam" - }, - energy_consumption = "1.799MW", - energy_source = { - type = "electric", - usage_priority = "primary-input", - emissions_per_minute = { pollution = -1 }, -- Negative value: pollution is absorbed! - }, - working_sound = { - sound = { filename = "__base__/sound/boiler.ogg", volume = 0.9 }, - max_sounds_per_type = 3 - }, - pictures = { - north = { - structure = { - layers = { - { - filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler.png", - priority = "high", - width = 576, - height = 576, - scale = 0.5 - }, - { - filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_shadow.png", - priority = "high", - width = 576, - height = 576, - scale = 0.5, - draw_as_shadow = true - } - } - }, - fire_glow = { - filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_light.png", - priority = "extra-high", - frame_count = 1, - width = 576, - height = 576, - scale = 0.5, - blend_mode = "additive" - } - }, + { + type = "boiler", + name = "bi-solar-boiler", + icon = ICONPATH_E .. "bio_Solar_Boiler_Icon.png", + icon_size = 64, + icons = { + { icon = ICONPATH_E .. "bio_Solar_Boiler_Icon.png", icon_size = 64 } + }, + se_allow_in_space = true, + flags = { "placeable-neutral", "player-creation" }, + minable = { hardness = 0.2, mining_time = 1, result = "bi-solar-boiler" }, + max_health = 400, + corpse = "bi-solar-boiler-remnant", + vehicle_impact_sound = sounds.generic_impact, + mode = "output-to-separate-pipe", + resistances = { + { type = "fire", percent = 100 }, + { type = "explosion", percent = 30 }, + { type = "impact", percent = 30 } + }, + collision_box = { { -4.2, -4.2 }, { 4.2, 4.2 } }, + selection_box = { { -4.5, -4.5 }, { 4.5, 4.5 } }, + target_temperature = 235, + fluid_box = { + volume = 200, + base_level = -1, + pipe_covers = pipecoverspictures(), + pipe_connections = { + { flow_direction = "input-output", direction = defines.direction.east, position = { 4, 0 } }, + { flow_direction = "input-output", direction = defines.direction.west, position = { -4, 0 } } + }, + production_type = "input-output", + filter = "water" + }, + output_fluid_box = { + volume = 200, + base_level = 1, + pipe_covers = pipecoverspictures(), + pipe_connections = { + { flow_direction = "input-output", direction = defines.direction.south, position = { 0, 4 } }, + { flow_direction = "input-output", direction = defines.direction.north, position = { 0, -4 } } + }, + production_type = "output", + filter = "steam" + }, + energy_consumption = "1.799MW", + energy_source = { + type = "electric", + usage_priority = "primary-input", + emissions_per_minute = { pollution = -1 }, -- Negative value: pollution is absorbed! + }, + working_sound = { + sound = { filename = "__base__/sound/boiler.ogg", volume = 0.9 }, + max_sounds_per_type = 3 + }, + pictures = { + north = { + structure = { + layers = { + { + filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler.png", + priority = "high", + width = 576, + height = 576, + scale = 0.5 + }, + { + filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_shadow.png", + priority = "high", + width = 576, + height = 576, + scale = 0.5, + draw_as_shadow = true + } + } + }, + fire_glow = { + filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_light.png", + priority = "extra-high", + frame_count = 1, + width = 576, + height = 576, + scale = 0.5, + blend_mode = "additive" + } + }, - east = { - structure = { - layers = { - { - filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler.png", - priority = "high", - width = 576, - height = 576, - scale = 0.5 - }, - { - filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_shadow.png", - priority = "high", - width = 576, - height = 576, - scale = 0.5, - draw_as_shadow = true - } - } - }, - fire_glow = { - filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_light.png", - priority = "extra-high", - frame_count = 1, - width = 576, - height = 576, - scale = 0.5, - blend_mode = "additive" - } - }, + east = { + structure = { + layers = { + { + filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler.png", + priority = "high", + width = 576, + height = 576, + scale = 0.5 + }, + { + filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_shadow.png", + priority = "high", + width = 576, + height = 576, + scale = 0.5, + draw_as_shadow = true + } + } + }, + fire_glow = { + filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_light.png", + priority = "extra-high", + frame_count = 1, + width = 576, + height = 576, + scale = 0.5, + blend_mode = "additive" + } + }, - south = { - structure = { - layers = { - { - filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler.png", - priority = "high", - width = 576, - height = 576, - scale = 0.5 - }, - { - filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_shadow.png", - priority = "high", - width = 576, - height = 576, - scale = 0.5, - draw_as_shadow = true - } - } - }, - fire_glow = { - filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_light.png", - priority = "extra-high", - frame_count = 1, - width = 576, - height = 576, - scale = 0.5, - blend_mode = "additive" - } - }, + south = { + structure = { + layers = { + { + filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler.png", + priority = "high", + width = 576, + height = 576, + scale = 0.5 + }, + { + filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_shadow.png", + priority = "high", + width = 576, + height = 576, + scale = 0.5, + draw_as_shadow = true + } + } + }, + fire_glow = { + filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_light.png", + priority = "extra-high", + frame_count = 1, + width = 576, + height = 576, + scale = 0.5, + blend_mode = "additive" + } + }, + + west = { + structure = { + layers = { + { + filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler.png", + priority = "high", + width = 576, + height = 576, + scale = 0.5 + }, + { + filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_shadow.png", + priority = "high", + width = 576, + height = 576, + scale = 0.5, + draw_as_shadow = true + } + } + }, + fire_glow = { + filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_light.png", + priority = "extra-high", + frame_count = 1, + width = 576, + height = 576, + scale = 0.5, + blend_mode = "additive" + } + } + }, + + fire_flicker_enabled = false, + fire_glow_flicker_enabled = false, + burning_cooldown = 20 + }, + + { + type = "corpse", + name = "bi-solar-boiler-remnant", + localised_name = {"entity-name.bi-solar-boiler-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-4.5, -4.5}, {4.5, 4.5}}, + tile_width = 9, + tile_height = 9, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "bio_solar_boiler_remnant.png", + line_length = 1, + width = 576, + height = 576, + frame_count = 1, + direction_count = 1, + shift = {0,0}, + scale = 0.5 + } + } + }, - west = { - structure = { - layers = { - { - filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler.png", - priority = "high", - width = 576, - height = 576, - scale = 0.5 - }, - { - filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_shadow.png", - priority = "high", - width = 576, - height = 576, - scale = 0.5, - draw_as_shadow = true - } - } - }, - fire_glow = { - filename = ENTITYPATH_BIO .. "bio_solar_boiler/bio_Solar_Boiler_light.png", - priority = "extra-high", - frame_count = 1, - width = 576, - height = 576, - scale = 0.5, - blend_mode = "additive" - } - } - }, - fire_flicker_enabled = false, - fire_glow_flicker_enabled = false, - burning_cooldown = 20 -}, }) end diff --git a/Bio_Industries_2/prototypes/Bio_Turret/entity.lua b/Bio_Industries_2/prototypes/Bio_Turret/entity.lua index 638a3fb..0255355 100644 --- a/Bio_Industries_2/prototypes/Bio_Turret/entity.lua +++ b/Bio_Industries_2/prototypes/Bio_Turret/entity.lua @@ -2,6 +2,7 @@ local BioInd = require('common')('Bio_Industries_2') local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ICONPATH_W = BioInd.modRoot .. "/graphics/icons/weapons/" local ENTITYPATH_BIO = "__Bio_Industries_2__/graphics/entities/" +local REMNANTSPATH = BioInd.modRoot .. "/graphics/entities/remnants/" data:extend({ --- Basic Dart @@ -241,7 +242,7 @@ data:extend({ flags = {"placeable-player", "player-creation"}, minable = {mining_time = 0.25, result = "bi-dart-turret"}, max_health = 300, - corpse = "medium-remnants", + corpse = "bi-dart-turret-remnant", collision_box = {{-0.2, -0.2 }, {0.2, 0.2}}, selection_box = {{-0.4, -0.4 }, {0.4, 0.4}}, rotation_speed = 0.05, @@ -266,17 +267,7 @@ data:extend({ cooldown = 3.6, -- cooldown = 6 -- darkfrei: means cooldown 6/60 sec or 10 shoots at second; = 60 is one shoot/sec projectile_creation_distance = 1.41, projectile_center = {-0.0625, 0.55}, - -- darkfrei: darts haven't shells :) ---[[ shell_particle = { - name = "shell-particle", - direction_deviation = 0.1, - speed = 0.15, - speed_deviation = 0.03, - center = {-0.0625, 0}, - creation_distance = -1.925, - starting_frame_speed = 0.2, - starting_frame_speed_deviation = 0.1 - }, ]] + range = 20, sound = { filename = "__Bio_Industries_2__/sound/dart-turret.ogg", @@ -287,6 +278,40 @@ data:extend({ graphics_set = {} }, + ---- corpse + + { + type = "corpse", + name = "bi-dart-turret-remnant", + localised_name = {"entity-name.bi-dart-turret-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-0.5, -0.5 }, {0.5, 0.5}}, + tile_width = 1, + tile_height = 1, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "bio_turret_remnant.png", + line_length = 1, + width = 224, + height = 160, + frame_count = 1, + direction_count = 1, + shift = {0.25, -0.25}, + scale = 0.5, + } + } + }, }) diff --git a/Bio_Industries_2/prototypes/Wood_Products/containers-entities.lua b/Bio_Industries_2/prototypes/Wood_Products/containers-entities.lua index 6ed525e..0074fa8 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/containers-entities.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/containers-entities.lua @@ -4,20 +4,17 @@ end local BioInd = require('common')('Bio_Industries_2') - BioInd.writeDebug("Creating bigger wooden chests!") - local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/" local WOODPATH = BioInd.modRoot .. "/graphics/entities/wood_products/" +local REMNANTSPATH = BioInd.modRoot .. "/graphics/entities/remnants/" local SNDPATH = "__base__/sound/" - local sounds = {} sounds.open_sound = { filename = "__base__/sound/wooden-chest-open.ogg" } sounds.close_sound = { filename = SNDPATH .. "wooden-chest-close.ogg" } - sounds.walking_sound = {} for i = 1, 11 do sounds.walking_sound[i] = { @@ -56,7 +53,7 @@ data:extend({ flags = {"placeable-neutral", "player-creation"}, minable = {mining_time = 1, result = "bi-wooden-chest-large"}, max_health = 200, - corpse = "small-remnants", + corpse = "bi-wooden-chest-large-remnant", collision_box = {{-0.7, -0.7}, {0.7, 0.7}}, selection_box = {{-1.0, -1.0}, {1.0, 1.0}}, fast_replaceable_group = "container", @@ -89,6 +86,41 @@ data:extend({ circuit_connector_sprites = circuit_connector_definitions["chest"].sprites, circuit_wire_max_distance = default_circuit_wire_max_distance }, + + --- corpse + { + type = "corpse", + name = "bi-wooden-chest-large-remnant", + localised_name = {"entity-name.bi-wooden-chest-large-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-1, -1}, {1, 1}}, + tile_width = 2, + tile_height = 2, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "large_wooden_chest_remnant.png", + line_length = 1, + width = 256, + height = 256, + frame_count = 1, + direction_count = 1, + shift = {0,0}, + scale = 0.5 + } + } + }, + }) ------- Huge Wooden Chest @@ -111,7 +143,7 @@ data:extend({ flags = {"placeable-neutral", "player-creation"}, minable = {mining_time = 1.5, result = "bi-wooden-chest-huge"}, max_health = 350, - corpse = "small-remnants", + corpse = "bi-wooden-chest-huge-remnant", collision_box = {{-1.2, -1.2}, {1.2, 1.2}}, selection_box = {{-1.5, -1.5}, {1.5, 1.5}}, fast_replaceable_group = "container", @@ -144,6 +176,41 @@ data:extend({ circuit_connector_sprites = circuit_connector_definitions["chest"].sprites, circuit_wire_max_distance = default_circuit_wire_max_distance }, + + --- corpse + { + type = "corpse", + name = "bi-wooden-chest-huge-remnant", + localised_name = {"entity-name.bi-wooden-chest-huge-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-1.5, -1.5}, {1.5, 1.5}}, + tile_width = 3, + tile_height = 3, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "huge_wooden_chest_remnant.png", + line_length = 1, + width = 336, + height = 336, + frame_count = 1, + direction_count = 1, + shift = {0,0}, + scale = 0.5 + } + } + }, + }) ------- Giga Wooden Chest @@ -166,7 +233,7 @@ data:extend({ flags = {"placeable-neutral", "player-creation"}, minable = {mining_time = 3.5, result = "bi-wooden-chest-giga"}, max_health = 350, - corpse = "big-remnants", + corpse = "bi-wooden-chest-giga-remnant", collision_box = {{-2.8, -2.8}, {2.8, 2.8}}, selection_box = {{-3, -3}, {3, 3}}, fast_replaceable_group = "container", @@ -199,4 +266,39 @@ data:extend({ circuit_connector_sprites = circuit_connector_definitions["chest"].sprites, circuit_wire_max_distance = default_circuit_wire_max_distance }, + + --- corpse + { + type = "corpse", + name = "bi-wooden-chest-giga-remnant", + localised_name = {"entity-name.bi-wooden-chest-giga-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-3, -3}, {3, 3}}, + tile_width = 6, + tile_height = 6, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "giga_wooden_chest_remnant.png", + line_length = 1, + width = 576, + height = 576, + frame_count = 1, + direction_count = 1, + shift = {0, -0}, + scale = 0.5 + } + } + }, + }) diff --git a/Bio_Industries_2/prototypes/Wood_Products/entities.lua b/Bio_Industries_2/prototypes/Wood_Products/entities.lua index c68e257..10d23af 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/entities.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/entities.lua @@ -1,24 +1,21 @@ local tile_graphics = require("__base__/prototypes/tile/tile-graphics") - local BioInd = require('common')('Bio_Industries_2') - local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/" local WOODPATH = BioInd.modRoot .. "/graphics/entities/wood_products/" - +local REMNANTSPATH = BioInd.modRoot .. "/graphics/entities/remnants/" local ENTITYPATH = "__base__/graphics/entity/" local PIPEPATH = ENTITYPATH .. "pipe/" - local SNDPATH = "__base__/sound/" local sounds = {} sounds.walking_sound = {} -for i = 1, 11 do - sounds.walking_sound[i] = { - filename = SNDPATH .. "walking/concrete-" .. i ..".ogg", - volume = 1.2 - } -end + for i = 1, 11 do + sounds.walking_sound[i] = { + filename = SNDPATH .. "walking/concrete-" .. i ..".ogg", + volume = 1.2 + } + end -- Used for Wooden Pipe Pictures pipepictures_w = function() @@ -254,7 +251,7 @@ data:extend({ flags = {"placeable-neutral", "player-creation"}, minable = {hardness = 0.2, mining_time = 0.5, result = "bi-wooden-pole-big"}, max_health = 150, - corpse = "medium-remnants", + corpse = "bi-wooden-pole-big-remnant", resistances = { { type = "fire", @@ -269,7 +266,7 @@ data:extend({ selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, drawing_box = {{-1, -6}, {1, 0.5}}, maximum_wire_distance = 24, - supply_area_distance = 1.5, -- This is the radius, so the supply area is 3x3. + supply_area_distance = 1.5, -- This is the radius, so the supply area is 3x3. pictures = { filename = WOODPATH .. "big-wooden-pole-01.png", priority = "high", @@ -322,7 +319,42 @@ data:extend({ width = 12, height = 12 }, - } + }, + + ---- corpse + { + type = "corpse", + name = "bi-wooden-pole-big-remnant", + localised_name = {"entity-name.bi-wooden-pole-big-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, + tile_width = 1, + tile_height = 1, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "big-wooden-pole_remnant.png", + line_length = 1, + width = 108, + height = 360, + frame_count = 1, + direction_count = 1, + shift = {0, -2.5}, + scale = 0.5 + } + } + }, + }) ---- Huge Wooden Pole @@ -344,7 +376,7 @@ data:extend({ flags = {"placeable-neutral", "player-creation"}, minable = {hardness = 0.2, mining_time = 0.5, result = "bi-wooden-pole-huge"}, max_health = 250, - corpse = "medium-remnants", + corpse = "bi-wooden-pole-huge-remnant", resistances = { { type = "fire", @@ -426,6 +458,41 @@ data:extend({ priority = "extra-high-no-scale" }, }, + + ---- corpse + { + type = "corpse", + name = "bi-wooden-pole-huge-remnant", + localised_name = {"entity-name.bi-wooden-pole-huge-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, + tile_width = 1, + tile_height = 1, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "huge_wooden_pole_remnant.png", + line_length = 1, + width = 128, + height = 402, + frame_count = 1, + direction_count = 1, + shift = {0, -2.76}, + scale = 0.5 + } + } +}, + }) ---- Wood Fence @@ -702,6 +769,40 @@ data:extend({ } } }, + --- corpse + { + type = "corpse", + name = "bi-wooden-fence-remnant", + localised_name = {"entity-name.bi-wooden-fence-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, + tile_width = 1, + tile_height = 1, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "wooden_fence_remnant.png", + line_length = 1, + width = 128, + height = 128, + frame_count = 1, + direction_count = 1, + shift = {0, 0}, + scale = 0.5 + } + } + }, + }) ---- Wood Pipe @@ -720,7 +821,7 @@ data:extend({ flags = {"placeable-neutral", "player-creation"}, minable = {mining_time = 0.075, result = "bi-wood-pipe"}, max_health = 100, - corpse = "small-remnants", + corpse = "bi-wood-pipe-remnant", resistances = { { type = "fire", @@ -757,6 +858,41 @@ data:extend({ horizontal_window_bounding_box = {{-0.25, -0.28125}, {0.25, 0.15625}}, vertical_window_bounding_box = {{-0.28125, -0.5}, {0.03125, 0.125}} }, + ---- corpse + { + type = "corpse", + name = "bi-wood-pipe-remnant", + localised_name = {"entity-name.bi-wood-pipe-remnant"}, + icon = "__base__/graphics/icons/remnants.png", + icon_size = 64, + icon_mipmaps = 4, + BI_add_icon = true, + flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, + subgroup = "remnants", + order = "z-z-z", + selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, + tile_width = 1, + tile_height = 1, + selectable_in_game = false, + time_before_removed = 60 * 60 * 15, -- 15 minutes + final_render_layer = "remnants", + remove_on_tile_placement = false, + animation = + { + { + filename = REMNANTSPATH .. "woodpipe_remnant.png", + line_length = 1, + width = 128, + height = 128, + frame_count = 1, + direction_count = 1, + shift = {0,0}, + scale = 0.5 + } + } +}, + + }) ---- Wood Pipe to Ground @@ -775,7 +911,7 @@ data:extend({ flags = {"placeable-neutral", "player-creation"}, minable = {mining_time = 0.075, result = "bi-wood-pipe-to-ground"}, max_health = 150, - corpse = "small-remnants", + corpse = "bi-wood-pipe-remnant", resistances = { { type = "fire", diff --git a/Bio_Industries_2/prototypes/Wood_Products/item.lua b/Bio_Industries_2/prototypes/Wood_Products/item.lua index e30c1e8..e7e3ffa 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/item.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/item.lua @@ -117,38 +117,3 @@ data:extend({ }) - if BI.Settings.BI_Game_Tweaks_Recipe then - data:extend({ - { - type = "rail-planner", - name = "bi-rail-wood", - icon = ICONPATH_E .. "rail-wood.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "rail-wood.png", - icon_size = 64, - } - }, - localised_name = {"item-name.bi-rail-wood"}, - subgroup = "train-transport", - order = "a[rail]-0[rail]", - inventory_move_sound = item_sounds.train_inventory_move, - pick_sound = item_sounds.train_inventory_pickup, - drop_sound = item_sounds.train_inventory_move, - place_result = "straight-rail", - stack_size = 100, - rails = - { - "straight-rail", - "curved-rail-a", - "curved-rail-b", - "half-diagonal-rail" - }, - manual_length_limit = 22.5 -- 2*(Curved-A) + 2*(Curved-B) + their planner penalty + margin - }, - - }) - end - - diff --git a/Bio_Industries_2/prototypes/Wood_Products/rail-pictures-wood.lua b/Bio_Industries_2/prototypes/Wood_Products/rail-pictures-wood.lua new file mode 100644 index 0000000..d9ca8e0 --- /dev/null +++ b/Bio_Industries_2/prototypes/Wood_Products/rail-pictures-wood.lua @@ -0,0 +1,275 @@ +local util = require("util") + +local wood_tint = {r = 183/255, g = 125/255, b = 62/255, a = 1} + +local ground_rail_render_layers = +{ + stone_path_lower = "rail-stone-path-lower", + stone_path = "rail-stone-path", + tie = "rail-tie", + screw = "rail-screw", + metal = "rail-metal" +} + +local rail_segment_visualisation_endings = +{ + filename = "__base__/graphics/entity/rails/rail/rail-segment-visualisations-endings.png", + priority = "extra-high", + flags = { "low-object" }, + width = 64, + height = 64, + scale = 0.5, + direction_count = 16, + frame_count = 6, + tint = wood_tint, + usage = "rail" +} + +local function make_new_rail_pictures_wood(keys, elems, max_variations) + local function make_sprite_definition_wood(filename, elem, key, variation_count) + return + { + filename = filename, + priority = elem.priority or "extra-high", + flags = elem.mipmap and { "trilinear-filtering" } or { "low-object" }, + draw_as_shadow = elem.draw_as_shadow, + allow_forced_downscale = elem.allow_forced_downscale, + width = key[3][1], + height = key[3][2], + x = key[2][1], + y = key[2][2], + scale = 0.5; + shift = util.by_pixel(key[4][1], key[4][2]), + variation_count = variation_count, + tint = wood_tint, + usage = "rail" + } + end + + local res = {} + for _ , key in ipairs(keys) do + local part = {} + local variation_count = key[5] or 1 + if max_variations then + variation_count = math.min(variation_count, max_variations) + end + if (variation_count > 0) then + for _ , elem in ipairs(elems) do + local layers = nil + local variations = variation_count; + if (elem[1] == "segment_visualisation_middle") then + variations = nil + end + if (type(elem[2]) == "table") then + layers = { layers = {} } + for _, subelem in ipairs(elem[2]) do + table.insert(layers.layers, make_sprite_definition_wood(subelem[1], subelem, key, variations)) + end + else + layers = make_sprite_definition_wood(elem[2], elem, key, variations) + end + + if (elem[1] ~= nil) then + part[elem[1]] = layers + else + part = layers + end + end + end + + res[key[1]] = part + end + return res +end + +function new_rail_pictures_wood(rail_type) + local keys + local NOT_USED_POSITION = {0, 0} + local NOT_USED_SIZE = {1, 1} + local NOT_USED_SHIFT = {0, 0} + if rail_type == "straight" then + keys = + { + {"north", { 0, 256 }, {256, 256}, {0,0}, 8}, + {"northeast", { 0, 2048 }, {384, 384}, {0,0}, 3}, + {"east", { 0, 0 }, {256, 256}, {0,0}, 8}, + {"southeast", { 0, 896 }, {384, 384}, {0,0}, 3}, + {"south", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"southwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"west", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"northwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0} + } + elseif rail_type == "half-diagonal" then + keys = + { + {"north", { 0, 1280 }, {384, 384}, {0,0}, 3}, + {"northeast", { 0, 1664 }, {384, 384}, {0,0}, 3}, + {"east", { 0, 2432 }, {384, 384}, {0,0}, 3}, + {"southeast", { 0, 512 }, {384, 384}, {0,0}, 3}, + {"south", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"southwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"west", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"northwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0} + } + elseif rail_type == "curved-a" then + keys = + { + {"north", { 2048, 3 * 512 }, {512, 512}, {0,0}, 4},-- piece 04 + {"northeast", { 2048, 12 * 512 }, {512, 512}, {0,0}, 4},-- piece 13 + {"east", { 2048, 7 * 512 }, {512, 512}, {0,0}, 4},-- piece 08 + {"southeast", { 2048, 0 * 512 }, {512, 512}, {0,0}, 4},-- piece 01 + {"south", { 2048, 11 * 512 }, {512, 512}, {0,0}, 4},-- piece 12 + {"southwest", { 2048, 4 * 512 }, {512, 512}, {0,0}, 4},-- piece 05 + {"west", { 2048, 15 * 512 }, {512, 512}, {0,0}, 4},-- piece 16 + {"northwest", { 2048, 8 * 512 }, {512, 512}, {0,0}, 4},-- piece 09 + } + elseif rail_type == "curved-b" then + keys = + { + {"north", { 2048, 2 * 512 }, {512, 512}, {0,0}, 4},-- piece 03 + {"northeast", { 2048, 13 * 512 }, {512, 512}, {0,0}, 4},-- piece 14 + {"east", { 2048, 6 * 512 }, {512, 512}, {0,0}, 4},-- piece 07 + {"southeast", { 2048, 1 * 512 }, {512, 512}, {0,0}, 4},-- piece 02 + {"south", { 2048, 10 * 512 }, {512, 512}, {0,0}, 4},-- piece 11 + {"southwest", { 2048, 5 * 512 }, {512, 512}, {0,0}, 4},-- piece 06 + {"west", { 2048, 14 * 512 }, {512, 512}, {0,0}, 4},-- piece 15 + {"northwest", { 2048, 9 * 512 }, {512, 512}, {0,0}, 4},-- piece 10 + } + end + local elems = + { + { "metals", "__base__/graphics/entity/rails/rail/rail-metals.png", mipmap = true }, + { "backplates", "__base__/graphics/entity/rails/rail/rail-backplates.png", mipmap = true }, + { "ties", "__base__/graphics/entity/rails/rail/rail-ties.png" }, + { "stone_path", "__base__/graphics/entity/rails/rail/rail-stone-path-inside.png" }, + { "stone_path_background", "__base__/graphics/entity/rails/rail/rail-stone-path.png" }, + { "segment_visualisation_middle", "__base__/graphics/entity/rails/rail/rail-segment-visualisations-middle.png" }, + } + + local res = make_new_rail_pictures_wood(keys, elems) + res["rail_endings"] = + { + sheets = + { + { + filename = "__base__/graphics/entity/rails/rail/rail-endings-background.png", + priority = "high", + flags = { "low-object" }, + width = 256, + height = 256, + scale = 0.5, + tint = wood_tint, + usage = "rail" + }, + { + filename = "__base__/graphics/entity/rails/rail/rail-endings-foreground.png", + priority = "high", + flags = { "trilinear-filtering" }, + width = 256, + height = 256, + scale = 0.5, + tint = wood_tint, + usage = "rail" + } + } + } + res["render_layers"] = ground_rail_render_layers + res["segment_visualisation_endings"] = rail_segment_visualisation_endings + return res +end + +function new_rail_remnants_pictures(rail_type) + local keys + local NOT_USED_POSITION = {0, 0} + local NOT_USED_SIZE = {1, 1} + local NOT_USED_SHIFT = {0, 0} + if rail_type == "straight" then + keys = + { + {"north", { 0, 256 }, {256, 256}, {0,0}, 8}, + {"northeast", { 0, 2048 }, {384, 384}, {0,0}, 3}, + {"east", { 0, 0 }, {256, 256}, {0,0}, 8}, + {"southeast", { 0, 896 }, {384, 384}, {0,0}, 3}, + {"south", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"southwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"west", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"northwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0} + } + elseif rail_type == "half-diagonal" then + keys = + { + {"north", { 0, 1280 }, {384, 384}, {0,0}, 3}, + {"northeast", { 0, 1664 }, {384, 384}, {0,0}, 3}, + {"east", { 0, 2432 }, {384, 384}, {0,0}, 3}, + {"southeast", { 0, 512 }, {384, 384}, {0,0}, 3}, + {"south", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"southwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"west", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"northwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0} + } + elseif rail_type == "curved-a" then + keys = + { + {"north", { 2048, 3 * 512 }, {512, 512}, {0,0}, 4},-- piece 04 + {"northeast", { 2048, 12 * 512 }, {512, 512}, {0,0}, 4},-- piece 13 + {"east", { 2048, 7 * 512 }, {512, 512}, {0,0}, 4},-- piece 08 + {"southeast", { 2048, 0 * 512 }, {512, 512}, {0,0}, 4},-- piece 01 + {"south", { 2048, 11 * 512 }, {512, 512}, {0,0}, 4},-- piece 12 + {"southwest", { 2048, 4 * 512 }, {512, 512}, {0,0}, 4},-- piece 05 + {"west", { 2048, 15 * 512 }, {512, 512}, {0,0}, 4},-- piece 16 + {"northwest", { 2048, 8 * 512 }, {512, 512}, {0,0}, 4},-- piece 09 + } + elseif rail_type == "curved-b" then + keys = + { + {"north", { 2048, 2 * 512 }, {512, 512}, {0,0}, 4},-- piece 03 + {"northeast", { 2048, 13 * 512 }, {512, 512}, {0,0}, 4},-- piece 14 + {"east", { 2048, 6 * 512 }, {512, 512}, {0,0}, 4},-- piece 07 + {"southeast", { 2048, 1 * 512 }, {512, 512}, {0,0}, 4},-- piece 02 + {"south", { 2048, 10 * 512 }, {512, 512}, {0,0}, 4},-- piece 11 + {"southwest", { 2048, 5 * 512 }, {512, 512}, {0,0}, 4},-- piece 06 + {"west", { 2048, 14 * 512 }, {512, 512}, {0,0}, 4},-- piece 15 + {"northwest", { 2048, 9 * 512 }, {512, 512}, {0,0}, 4},-- piece 10 + } + end + local elems = + { + { "metals", "__base__/graphics/entity/rails/rail/remnants/rail-remnants-metals.png", mipmap = true, allow_forced_downscale = true }, + { "backplates", "__base__/graphics/entity/rails/rail/remnants/rail-remnants-backplates.png", mipmap = true, allow_forced_downscale = true }, + { "ties", "__base__/graphics/entity/rails/rail/remnants/rail-remnants-ties.png" , allow_forced_downscale = true }, + { "stone_path", "__base__/graphics/entity/rails/rail/remnants/rail-remnants-stone-path-inside.png" , allow_forced_downscale = true }, + { "stone_path_background", "__base__/graphics/entity/rails/rail/remnants/rail-remnants-stone-path.png" , allow_forced_downscale = true } + } + + local res = make_new_rail_pictures_wood(keys, elems) + res["rail_endings"] = + { + sheets = + { + { + filename = "__base__/graphics/entity/rails/rail/rail-endings-background.png", + priority = "high", + flags = { "low-object" }, + width = 256, + height = 256, + scale = 0.5, + tint = wood_tint, + usage = "rail" + }, + { + filename = "__base__/graphics/entity/rails/rail/rail-endings-foreground.png", + priority = "high", + flags = { "trilinear-filtering" }, + width = 256, + height = 256, + scale = 0.5, + tint = wood_tint, + usage = "rail" + } + } + } + res["render_layers"] = ground_rail_render_layers + return res +end + + diff --git a/Bio_Industries_2/prototypes/Wood_Products/rail.lua b/Bio_Industries_2/prototypes/Wood_Products/rail.lua new file mode 100644 index 0000000..4f78eb2 --- /dev/null +++ b/Bio_Industries_2/prototypes/Wood_Products/rail.lua @@ -0,0 +1,253 @@ +require ("prototypes.Wood_Products.rail-pictures-wood") + +local BioInd = require('common')('Bio_Industries_2') +local ICONPATH = BioInd.modRoot .. "/graphics/icons/" +local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/" +local item_sounds = require("__base__.prototypes.item_sounds") + + +local hit_effects = require ("__base__.prototypes.entity.hit-effects") +local sounds = require("__base__.prototypes.entity.sounds") +local tile_sounds = require("__base__.prototypes.tile.tile-sounds") +local simulations = require("__base__.prototypes.factoriopedia-simulations") + + + if BI.Settings.BI_Game_Tweaks_Recipe then + + + data:extend({ + ---- ITEM + { + type = "rail-planner", + name = "bi-rail-wood", + icon = ICONPATH_E .. "rail-wood.png", + icon_size = 64, + icons = { + { + icon = ICONPATH_E .. "rail-wood.png", + icon_size = 64, + } + }, + localised_name = {"item-name.bi-rail-wood"}, + subgroup = "train-transport", + order = "a[rail]-0[rail]", + inventory_move_sound = item_sounds.train_inventory_move, + pick_sound = item_sounds.train_inventory_pickup, + drop_sound = item_sounds.train_inventory_move, + place_result = "bi-straight-rail-wood", + stack_size = 100, + rails = + { + "bi-straight-rail-wood", + "bi-curved-rail-a-wood", + "bi-curved-rail-b-wood", + "bi-half-diagonal-rail-wood" + }, + manual_length_limit = 22.5 -- 2*(Curved-A) + 2*(Curved-B) + their planner penalty + margin + }, + +---- Recipe + { + type = "recipe", + name = "bi-rail-wood-to-concrete", + icon = ICONPATH_E .. "rail-wood-to-concrete.png", + icon_size = 64, + icons = { + { + icon = ICONPATH_E .. "rail-wood-to-concrete.png", + icon_size = 64, + } + }, + enabled = false, + ingredients = + { + {type = "item", name = "bi-rail-wood", amount = 2}, + {type = "item", name = "stone-brick", amount = 6}, + + }, + results = {{type="item", name="rail", amount=2}} + }, + + + --- Entity + + { + type = "straight-rail", + name = "bi-straight-rail-wood", + order = "a[ground-rail]-a[bi-straight-rail-wood]", + icon = ICONPATH_E .. "straight-rail-wood.png", + collision_box = {{-1, -1}, {1, 1}}, -- has custommly generated box, but the prototype needs something that is used to generate building smokes + flags = {"placeable-neutral", "player-creation", "building-direction-8-way"}, + minable = {mining_time = 0.2, result = "bi-rail-wood", count = 1}, + max_health = 200, + corpse = "straight-rail-remnants", + dying_explosion = + { + name = "rail-explosion" + }, + resistances = + { + { + type = "fire", + percent = 100 + }, + { + type = "acid", + percent = 80 + } + }, + -- collision box is hardcoded for rails as to avoid unexpected changes in the way rail blocks are merged + selection_box = {{-1.7, -0.8}, {1.7, 0.8}}, + damaged_trigger_effect = hit_effects.wall(), + pictures = new_rail_pictures_wood("straight"), + placeable_by = {item = "bi-rail-wood", count = 1}, + walking_sound = tile_sounds.walking.rails, + extra_planner_goal_penalty = -4, + factoriopedia_alternative = "straight-rail" + }, + + { + type = "half-diagonal-rail", + name = "bi-half-diagonal-rail-wood", + order = "a[ground-rail]-b[bi-half-diagonal-rail-wood]", + deconstruction_alternative = "bi-straight-rail-wood", + icon = ICONPATH_E .. "curved-rail-wood.png", + collision_box = {{-0.75, -2.236}, {0.75, 2.236}}, -- has custommly generated box, but the prototype needs something that is used to generate building smokes + tile_height = 2, + extra_planner_goal_penalty = -4, + flags = {"placeable-neutral", "player-creation", "building-direction-8-way"}, + minable = {mining_time = 0.2, result = "bi-rail-wood", count = 2}, + max_health = 200, + corpse = "half-diagonal-rail-remnants", + dying_explosion = + { + { + name = "rail-explosion", + offset = {0.9, 2.2} + }, + { + name = "rail-explosion" + }, + { + name = "rail-explosion", + offset = {-1.2, -2} + } + }, + resistances = + { + { + type = "fire", + percent = 100 + }, + { + type = "acid", + percent = 80 + } + }, + -- collision box is hardcoded for rails as to avoid unexpected changes in the way rail blocks are merged + selection_box = {{-1.7, -0.8}, {1.7, 0.8}}, + damaged_trigger_effect = hit_effects.wall(), + pictures = new_rail_pictures_wood("half-diagonal"), + placeable_by = {item = "bi-rail-wood", count = 2}, + walking_sound = tile_sounds.walking.rails, + extra_planner_penalty = 0, + factoriopedia_alternative = "straight-rail" + }, + { + type = "curved-rail-a", + name = "bi-curved-rail-a-wood", + order = "a[ground-rail]-c[bi-curved-rail-a-wood]", + deconstruction_alternative = "bi-straight-rail-wood", + icon = ICONPATH_E .. "curved-rail-wood.png", + collision_box = {{-0.75, -2.516}, {0.75, 2.516}}, -- has custommly generated box, but the prototype needs something that is used to generate building smokes + flags = {"placeable-neutral", "player-creation", "building-direction-8-way"}, + minable = {mining_time = 0.2, result = "bi-rail-wood", count = 3}, + max_health = 200, + corpse = "curved-rail-a-remnants", + dying_explosion = + { + { + name = "rail-explosion", + offset = {0.9, 2.2} + }, + { + name = "rail-explosion" + }, + { + name = "rail-explosion", + offset = {-1.2, -2} + } + }, + resistances = + { + { + type = "fire", + percent = 100 + }, + { + type = "acid", + percent = 80 + } + }, + -- collision box is hardcoded for rails as to avoid unexpected changes in the way rail blocks are merged + selection_box = {{-1.7, -0.8}, {1.7, 0.8}}, + damaged_trigger_effect = hit_effects.wall(), + pictures = new_rail_pictures_wood("curved-a"), + placeable_by = {item = "bi-rail-wood", count = 3}, + walking_sound = tile_sounds.walking.rails, + extra_planner_penalty = 0.5, + deconstruction_marker_positions = rail_8shifts_vector(-0.248, -0.533), + factoriopedia_alternative = "straight-rail" + }, + { + type = "curved-rail-b", + name = "bi-curved-rail-b-wood", + order = "a[ground-rail]-d[bi-curved-rail-b-wood]", + deconstruction_alternative = "bi-straight-rail-wood", + icon = ICONPATH_E .. "curved-rail-wood.png", + collision_box = {{-0.75, -2.441}, {0.75, 2.441}}, -- has custommly generated box, but the prototype needs something that is used to generate building smokes + flags = {"placeable-neutral", "player-creation", "building-direction-8-way"}, + minable = {mining_time = 0.2, result = "bi-rail-wood", count = 3}, + max_health = 200, + corpse = "curved-rail-b-remnants", + dying_explosion = + { + { + name = "rail-explosion", + offset = {0.9, 2.2} + }, + { + name = "rail-explosion" + }, + { + name = "rail-explosion", + offset = {-1.2, -2} + } + }, + resistances = + { + { + type = "fire", + percent = 100 + }, + { + type = "acid", + percent = 80 + } + }, + -- collision box is hardcoded for rails as to avoid unexpected changes in the way rail blocks are merged + selection_box = {{-1.7, -0.8}, {1.7, 0.8}}, + damaged_trigger_effect = hit_effects.wall(), + pictures = new_rail_pictures_wood("curved-b"), + placeable_by = {item = "bi-rail-wood", count = 3}, + walking_sound = tile_sounds.walking.rails, + extra_planner_penalty = 0.5, + deconstruction_marker_positions = rail_8shifts_vector(-0.309, -0.155), + factoriopedia_alternative = "straight-rail" + }, +}) + + + end + + diff --git a/Bio_Industries_2/prototypes/Wood_Products/recipe.lua b/Bio_Industries_2/prototypes/Wood_Products/recipe.lua index c44948e..4111e31 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/recipe.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/recipe.lua @@ -160,53 +160,3 @@ data:extend({ }, }) - - if BI.Settings.BI_Game_Tweaks_Recipe then - - data:extend({ - { - type = "recipe", - name = "bi-rail-wood", - icon = ICONPATH_E .. "rail-wood.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "rail-wood.png", - icon_size = 64, - } - }, - localised_name = {"entity-name.bi-rail-wood"}, - localised_description = {"entity-description.bi-rail-wood"}, - enabled = false, - ingredients = - { - {type = "item", name = "stone-crushed", amount = 6}, - {type = "item", name = "wood", amount = 12}, - {type = "item", name = "steel-plate", amount = 2} - }, - results = {{type="item", name="rail", amount=1}} - }, - - { - type = "recipe", - name = "bi-rail-wood-to-concrete", - icon = ICONPATH_E .. "rail-wood-to-concrete.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "rail-wood-to-concrete.png", - icon_size = 64, - } - }, - enabled = false, - ingredients = - { - {type = "item", name = "bi-rail-wood", amount = 2}, - {type = "item", name = "stone-brick", amount = 6}, - - }, - results = {{type="item", name="rail", amount=2}} - }, - - }) - end \ No newline at end of file