From 98a74c63dc2e284e40354443191f44f4e6e4b81c Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Tue, 20 Sep 2022 08:59:49 -0700 Subject: [PATCH] fixed colour offset bug and refactored hex values --- .../core/entities/pos_marker.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/worldeditadditions_core/core/entities/pos_marker.lua b/worldeditadditions_core/core/entities/pos_marker.lua index eafec2f..d1e9478 100644 --- a/worldeditadditions_core/core/entities/pos_marker.lua +++ b/worldeditadditions_core/core/entities/pos_marker.lua @@ -68,14 +68,14 @@ end local number_colours = { "#FF0000", - "#FF8800", - "#FFFF00", - "#88FF00", + "#ff6800", + "#FFD700", + "#CCFF00", "#00FF00", - "#00FF88", + "#00FFAA", "#00FFFF", "#0088FF", - "#0000FF", + "#5058FF", "#8800ff", "#FF00ff", "#FF0088" @@ -93,7 +93,7 @@ local function set_number(entity, display_number) texture_name = texture_name.."^worldeditadditions_r"..number_right..".png" print("DEBUG:set_number number_left", number_left, "number_right", number_right) - local colour_id = (display_number % 12) + 1 -- Lua starts from 1, not 0 :-/ + local colour_id = ((display_number - 1) % 12) + 1 -- Lua starts from 1, not 0 :-/ texture_name = "("..texture_name..")^[colorize:"..number_colours[colour_id]..":255" end if #texture_name > 0 then @@ -118,4 +118,4 @@ anchor = EventEmitter.new({ set_number = set_number }) -return anchor \ No newline at end of file +return anchor