Skip to content

Commit

Permalink
fix: Fixed crash when loading in HR mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Aug 30, 2024
1 parent 90ad12c commit 34a6a3c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions prototypes/fish.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ local map_colors = table.deepcopy{
defines.color.darkcyan
}

local color_budget = 200
local color_budget = 255
for _, color in pairs(map_colors) do
local sum = color.r + color.g + color.b
color.r = color.r / sum * color_budget
Expand Down Expand Up @@ -53,7 +53,7 @@ for i, v in pairs(fish) do
icon_mipmaps = nil,
flags = {'placeable-neutral', 'placeable-off-grid', 'not-repairable', 'breaths-air'},
max_health = data.raw.fish['fish'].max_health,
map_color = h2o.color_combine(map_colors[tonumber(i)], data.raw.tile['deepwater'].map_color, 0.5),
map_color = map_colors[tonumber(i)],
order = 'b-b-a',
subgroup = 'creatures',
healing_per_tick = data.raw.fish['fish'].healing_per_tick,
Expand Down
2 changes: 1 addition & 1 deletion prototypes/hydro-plant.lua
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ if not mods['Krastorio2'] then
frame_count = 1,
direction_count = 1,
hr_version = {
filename = path .. 'big-random-pipes-remnant.png',
filename = path .. 'hr-big-random-pipes-remnant.png',
line_length = 1,
width = 500,
height = 500,
Expand Down
2 changes: 1 addition & 1 deletion scripts/map-gen/surfaces/maraxsis.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ local SPAWN_AREA = SPAWN_AREA
local SPAWN_AREA_4 = SPAWN_AREA + 4

function h2o.elevation_bonus(distance_from_0_0)
return (1 - distance_from_0_0 / SPAWN_AREA) ^ 0.75
return (1 - distance_from_0_0 / SPAWN_AREA)
end

local function elevation(surface, x, y)
Expand Down

0 comments on commit 34a6a3c

Please sign in to comment.