[bug?] water_reflection doesn't show on resources
Posted: Tue Nov 23, 2021 1:07 pm
In the base game, no resource uses water_reflection, but modded ones could (specifically, offshore oil in Cargo Ships)
I can confirm the property is filled, but doesn't apply to the surface.


my code just in case:
I tried changing the collision_mask to {'object-layer'}, tried having variation count = 4, repeat count = 4, searching for all of them on the map...
Resource has the property listed in the wiki
https://wiki.factorio.com/Prototype/ResourceEntity
I can confirm the property is filled, but doesn't apply to the surface.


my code just in case:
Code: Select all
local deep_oil = table.deepcopy(data.raw["resource"]["crude-oil"])
deep_oil.name = "deep_oil"
deep_oil.infinite_depletion_amount = 40
deep_oil.autoplace = nil
deep_oil.collision_mask = {'object-layer'}
deep_oil.stages = {
sheet = {
filename = "__cargo-ships__/graphics/entity/crude-oil/water-crude-oil.png",
priority = "extra-high",
width = 74,
height = 60,
frame_count = 4,
variation_count = 1,
shift = util.by_pixel(0, -2),
hr_version =
{
filename = "__cargo-ships__/graphics/entity/crude-oil/hr-water-crude-oil.png",
priority = "extra-high",
width = 148,
height = 120,
frame_count = 4,
variation_count = 1,
shift = util.by_pixel(0, -2),
scale = 0.5
}
}
}
deep_oil.water_reflection = {
pictures = {
sheet = {
filename = "__cargo-ships__/graphics/entity/crude-oil/hr-water-crude-oil-water-reflection.png",
width = 22,
height = 24,
--shift = util.by_pixel(0, 5),
variation_count = 1,
repeat_count = 4,
scale = 5,
}
},
rotate = false,
orientation_to_variation = false
}
data:extend({deep_oil})
Resource has the property listed in the wiki
https://wiki.factorio.com/Prototype/ResourceEntity