diff options
Diffstat (limited to 'builtin/game')
-rw-r--r-- | builtin/game/item.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin/game/item.lua b/builtin/game/item.lua index b68177c22..17746e9a8 100644 --- a/builtin/game/item.lua +++ b/builtin/game/item.lua @@ -157,7 +157,7 @@ end function core.is_colored_paramtype(ptype) return (ptype == "color") or (ptype == "colorfacedir") or - (ptype == "colorwallmounted") + (ptype == "colorwallmounted") or (ptype == "colordegrotate") end function core.strip_param2_color(param2, paramtype2) @@ -168,6 +168,8 @@ function core.strip_param2_color(param2, paramtype2) param2 = math.floor(param2 / 32) * 32 elseif paramtype2 == "colorwallmounted" then param2 = math.floor(param2 / 8) * 8 + elseif paramtype2 == "colordegrotate" then + param2 = math.floor(param2 / 32) * 32 end -- paramtype2 == "color" requires no modification. return param2 @@ -345,6 +347,8 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2, color_divisor = 8 elseif def.paramtype2 == "colorfacedir" then color_divisor = 32 + elseif def.paramtype2 == "colordegrotate" then + color_divisor = 32 end if color_divisor then local color = math.floor(metatable.palette_index / color_divisor) |