Skip to content

Commit

Permalink
Fix missing defaults if settings arent used
Browse files Browse the repository at this point in the history
  • Loading branch information
NoMotion committed Dec 3, 2023
1 parent 65b8f9c commit aba324d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gamedata/scripts/modxml_dart_health_hud.script
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function collectSettings()
end

if not settings.scale then
settings.scale = DART.scale
settings.scale = DART.scale or 1
end

return settings
Expand Down
2 changes: 1 addition & 1 deletion gamedata/scripts/modxml_dart_news.script
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function parseDXMLNews(DXML)
-- log("New y " .. attrs.y - DART.hud_health_system_y)

DART.editAttributes(DXML, child, function(attrs)
local y = DART.hud_health_system_y + (factor * DART.getAspectRatio() * DART.HEALTH_HUD.scale)
local y = DART.hud_health_system_y + (factor * DART.getAspectRatio() * (DART.HEALTH_HUD.scale or 1))
if child.name == "icon_static" then
return {
x = attrs.x + DART.HUD_SAFE_ZONE,
Expand Down

0 comments on commit aba324d

Please sign in to comment.