Skip to content

Commit

Permalink
upgrade gfx for aluminium tile
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Aug 28, 2023
1 parent 9b60282 commit 6085bf5
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 31 deletions.
2 changes: 2 additions & 0 deletions data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,5 @@ end
require("prototypes/buildings/burner")
require("prototypes/buildings/sinkhole")
require("prototypes/buildings/gas-vent")

require("prototypes/tiles/functions")
Binary file modified graphics/icons/py-aluminium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/tiles/py-aluminium/hr-py-aluminium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/tiles/py-aluminium/py-aluminium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
132 changes: 132 additions & 0 deletions prototypes/tiles/functions.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
_G.dirt_out_of_map_transition = make_generic_transition_template(
nil,
default_transition_group_id,
out_of_map_transition_group_id,
'__base__/graphics/terrain/out-of-map-transition/dirt-out-of-map-transition.png',
'__base__/graphics/terrain/out-of-map-transition/hr-dirt-out-of-map-transition.png',
{
inner_corner_tall = true,
inner_corner_count = 3,
outer_corner_count = 3,
side_count = 3,
u_transition_count = 1,
o_transition_count = 0,
base = init_transition_between_transition_common_options()
},
false,
true,
true
)

function _G.water_transition_template_with_effect(to_tiles, normal_res_transition, high_res_transition, options)
return make_generic_transition_template(to_tiles, water_transition_group_id, nil, normal_res_transition, high_res_transition, options, true, false, true)
end

function _G.add_material_background(tile, filename, filename_hr, count)
count = count or 4
tile.variants = {
main = {
{
count = 1,
picture = '__base__/graphics/terrain/water-wube/concrete-dummy.png',
size = 1
},
{
count = 1,
picture = '__base__/graphics/terrain/water-wube/concrete-dummy.png',
probability = 1,
size = 2
},
{
count = 1,
picture = '__base__/graphics/terrain/water-wube/concrete-dummy.png',
probability = 1,
size = 4
},
},
material_background = {
picture = filename,
count = count,
hr_version = {
picture = filename_hr,
scale = 0.5,
count = count
}
},
inner_corner = {
picture = '__pyindustry__/graphics/tiles/py-asphalt/concrete-inner-corner.png',
count = 8
},
outer_corner = {
picture = '__pyindustry__/graphics/tiles/py-asphalt/concrete-outer-corner.png',
count = 8
},
side = {
picture = '__pyindustry__/graphics/tiles/py-asphalt/concrete-side.png',
count = 8
},
u_transition = {
picture = '__pyindustry__/graphics/tiles/py-asphalt/concrete-u.png',
count = 8
},
o_transition = {
picture = '__pyindustry__/graphics/tiles/py-asphalt/concrete-o.png',
count = 1
}
}
tile.transitions_between_transitions = {
make_generic_transition_template(
nil,
default_transition_group_id,
water_transition_group_id,
'__base__/graphics/terrain/water-transitions/dry-dirt-transition.png',
'__base__/graphics/terrain/water-transitions/hr-dry-dirt-transition.png',
{
effect_map = base_tile_transition_effect_maps.water_dirt_to_land,
o_transition_tall = false,
inner_corner_count = 3,
outer_corner_count = 3,
side_count = 3,
u_transition_count = 1,
o_transition_count = 0,
base = { water_patch = patch_for_inner_corner_of_transition_between_transition, }
},
true,
false,
true
),
dirt_out_of_map_transition,
generic_transition_between_transitions_template(
water_transition_group_id,
out_of_map_transition_group_id,
'__base__/graphics/terrain/out-of-map-transition/dry-dirt-shore-out-of-map-transition.png',
'__base__/graphics/terrain/out-of-map-transition/hr-dry-dirt-shore-out-of-map-transition.png',
{
effect_map = base_tile_transition_effect_maps.water_dirt_to_out_of_map,
o_transition_tall = false,
inner_corner_count = 3,
outer_corner_count = 3,
side_count = 3,
u_transition_count = 1,
o_transition_count = 0,
base = init_transition_between_transition_water_out_of_map_options()
}
),
}
tile.transitions = {
water_transition_template_with_effect(
water_tile_type_names,
'__base__/graphics/terrain/water-transitions/dry-dirt.png',
'__base__/graphics/terrain/water-transitions/hr-dry-dirt.png',
{
effect_map = base_tile_transition_effect_maps.water_dirt,
o_transition_tall = false,
u_transition_count = 2,
o_transition_count = 4,
side_count = 8,
outer_corner_count = 8,
inner_corner_count = 8
}
),
}
end
40 changes: 9 additions & 31 deletions prototypes/tiles/py-aluminium.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ITEM {
type = "item",
name = "py-aluminium",
icon = "__pyindustry__/graphics/icons/py-aluminium.png",
icon_size = 32,
icon_size = 64,
flags = {},
subgroup = "py-tiles",
order = "a-aluminium-oxide",
Expand All @@ -34,36 +34,7 @@ ENTITY {
collision_mask = {"ground-tile"},
walking_speed_modifier = 3.5,
decorative_removal_probability = 1,
layer = 61,
variants = {
main = {
{
picture = "__pyindustry__/graphics/tiles/py-aluminium/py-aluminium.png",
count = 1,
size = 1
}
},
inner_corner = {
picture = "__pyindustry__/graphics/tiles/py-asphalt/concrete-inner-corner.png",
count = 8
},
outer_corner = {
picture = "__pyindustry__/graphics/tiles/py-asphalt/concrete-outer-corner.png",
count = 8
},
side = {
picture = "__pyindustry__/graphics/tiles/py-asphalt/concrete-side.png",
count = 8
},
u_transition = {
picture = "__pyindustry__/graphics/tiles/py-asphalt/concrete-u.png",
count = 8
},
o_transition = {
picture = "__pyindustry__/graphics/tiles/py-asphalt/concrete-o.png",
count = 1
}
},
layer = 58,
walking_sound = {
{
filename = "__pyindustry__/sounds/iron1-01.ogg",
Expand All @@ -86,3 +57,10 @@ ENTITY {
pollution_absorption_per_second = 0,
vehicle_friction_modifier = 0.6
}

add_material_background(
data.raw.tile['py-aluminium'],
'__pyindustry__/graphics/tiles/py-aluminium/py-aluminium.png',
'__pyindustry__/graphics/tiles/py-aluminium/hr-py-aluminium.png',
4
)

0 comments on commit 6085bf5

Please sign in to comment.