Fix wooden rails

This commit is contained in:
Simon Brodtmann 2025-09-05 08:35:33 +02:00
parent 551bbf5ac2
commit 7905b45347
40 changed files with 1520 additions and 358 deletions

View file

@ -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!)
---------------------------------------------------------------------------------------------------

View file

@ -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" }

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -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",

View file

@ -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

View file

@ -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
}

View file

@ -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 } },
@ -433,6 +501,41 @@ data:extend({
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
{
type = "furnace",
@ -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
}
}
},
})

View file

@ -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

View file

@ -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},
}
}
}
})

View file

@ -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/"
@ -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 } },
@ -167,6 +167,39 @@ 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 } },
@ -241,6 +274,41 @@ function big_accumulator_picture(tint, repeat_count)
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 = {
@ -330,6 +398,40 @@ function big_accumulator_picture(tint, repeat_count)
},
},
--- 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
{
@ -443,7 +545,7 @@ function big_accumulator_picture(tint, repeat_count)
flags = { "placeable-neutral", "player-creation" },
minable = { hardness = 0.2, mining_time = 1, result = "bi-solar-boiler" },
max_health = 400,
corpse = "small-remnants",
corpse = "bi-solar-boiler-remnant",
vehicle_impact_sound = sounds.generic_impact,
mode = "output-to-separate-pipe",
resistances = {
@ -616,5 +718,40 @@ function big_accumulator_picture(tint, repeat_count)
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
}
}
},
})
end

View file

@ -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,
}
}
},
})

View file

@ -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
}
}
},
})

View file

@ -1,14 +1,11 @@
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 = {}
@ -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",
@ -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",

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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