The error message implies you want these reported to help improve error messages.
I'll raise a separate post to see if anyone can advise on how to do this properly.
The game 16.12 errors when starting the map editor.
The offending code I added to a mod lua file to cause the unhandled exception was:
Code: Select all
water_tile_type_names = { "water", "deepwater", "water-green", "deepwater-green",[b] "driedwater"[/b] }
function water_transition_template(to_tiles, normal_res_transition, high_res_transition, options)
local function make_transition_variation(src_x, src_y, cnt_, line_len_, is_tall)
return
{
picture = normal_res_transition,
count = cnt_,
line_length = line_len_,
x = src_x,
y = src_y,
tall = is_tall,
hr_version=
{
picture = high_res_transition,
count = cnt_,
line_length = line_len_,
x = 2 * src_x,
y = 2 * (src_y or 0),
tall = is_tall,
scale = 0.5,
}
}
end
local t = options.base or {}
t.to_tiles = to_tiles
local default_count = options.count or 16
for k,y in pairs({inner_corner = 0, outer_corner = 288, side = 576, u_transition = 864, o_transition = 1152}) do
local count = options[k .. "_count"] or default_count
if count > 0 and type(y) == "number" then
local line_length = options[k .. "_line_length"] or count
local is_tall = true
if (options[k .. "_tall"] == false) then
is_tall = false
end
t[k] = make_transition_variation(0, y, count, line_length, is_tall)
t[k .. "_background"] = make_transition_variation(544, y, count, line_length, is_tall)
t[k .. "_mask"] = make_transition_variation(1088, y, count, line_length)
end
end
return t
end
data.raw["tile"]["grass-1"].transitions.water_transition_template = water_transition_template
(
water_tile_type_names,
"__base__/graphics/terrain/water-transitions/grass.png",
"__base__/graphics/terrain/water-transitions/hr-grass.png",
{
o_transition_tall = false,
u_transition_count = 4,
o_transition_count = 8,
base =
{
side_weights = { 1, 1, 1, 1, 0.25, 0.25, 1, 1, 1, 1, 0.125, 0.25, 1, 1, 1, 1 }
}
}
)
data:extend(
{
{
name = "driedwater",
type = "tile",
collision_mask =
{
"water-tile",
"resource-layer",
"item-layer",
"player-layer",
"doodad-layer"
},
draw_in_water_layer = true,
layer = 0,
variants =
{
main =
{
{
picture = "__MuppetWaterUsage__/graphics/driedwater/driedwater1.png",
count = 8,
size = 1,
hr_version = {
picture = "__MuppetWaterUsage__/graphics/driedwater/hr-driedwater1.png",
count = 8,
scale = 0.5,
size = 1
}
},
{
picture = "__MuppetWaterUsage__/graphics/driedwater/driedwater2.png",
count = 8,
size = 2,
hr_version = {
picture = "__MuppetWaterUsage__/graphics/driedwater/hr-driedwater2.png",
count = 8,
scale = 0.5,
size = 2
}
},
{
picture = "__MuppetWaterUsage__/graphics/driedwater/driedwater4.png",
count = 6,
size = 4,
hr_version = {
picture = "__MuppetWaterUsage__/graphics/driedwater/hr-driedwater4.png",
count = 8,
scale = 0.5,
size = 4
}
}
},
inner_corner =
{
picture = "__MuppetWaterUsage__/graphics/driedwater/driedwater-inner-corner.png",
count = 6,
hr_version = {
picture = "__MuppetWaterUsage__/graphics/driedwater/hr-driedwater-inner-corner.png",
count = 6,
scale = 0.5
}
},
outer_corner =
{
picture = "__MuppetWaterUsage__/graphics/driedwater/driedwater-outer-corner.png",
count = 6,
hr_version = {
picture = "__MuppetWaterUsage__/graphics/driedwater/hr-driedwater-outer-corner.png",
count = 6,
scale = 0.5
}
},
side =
{
picture = "__MuppetWaterUsage__/graphics/driedwater/driedwater-side.png",
count = 8,
hr_version = {
picture = "__MuppetWaterUsage__/graphics/driedwater/hr-driedwater-side.png",
count = 8,
scale = 0.5
}
}
},
allowed_neighbors = { "water" },
map_color={r=38, g=64, b=73},
ageing=0.0006
}
}
)