Skip to content

Commit

Permalink
Fix hud_replace_builtin type determination
Browse files Browse the repository at this point in the history
  • Loading branch information
cx384 committed Dec 25, 2023
1 parent 2fd1e30 commit 41a9e8d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions builtin/game/statbars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ end

function core.hud_replace_builtin(hud_name, definition)
if type(definition) ~= "table" or
(definition.hud_elem_type ~= "statbar" and
definition.type ~= "statbar") then
(definition.type or definition.hud_elem_type) ~= "statbar" then
return false
end

Expand Down

0 comments on commit 41a9e8d

Please sign in to comment.