Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add paramtype2s for 4 horizontal rotations and 64 colors #11431

Merged
merged 4 commits into from
Sep 16, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix 4dir color not working for falling node
  • Loading branch information
Wuzzy2 committed Sep 8, 2022
commit 233f3258651c6155e056ef4749f5ba3dcf7da186
5 changes: 4 additions & 1 deletion builtin/game/item_s.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ end

function core.is_colored_paramtype(ptype)
return (ptype == "color") or (ptype == "colorfacedir") or
(ptype == "colorwallmounted") or (ptype == "colordegrotate")
(ptype == "color4dir") or (ptype == "colorwallmounted") or
(ptype == "colordegrotate")
end

function core.strip_param2_color(param2, paramtype2)
Expand All @@ -166,6 +167,8 @@ function core.strip_param2_color(param2, paramtype2)
end
if paramtype2 == "colorfacedir" then
param2 = math.floor(param2 / 32) * 32
elseif paramtype2 == "color4dir" then
param2 = math.floor(param2 / 4) * 4
elseif paramtype2 == "colorwallmounted" then
param2 = math.floor(param2 / 8) * 8
elseif paramtype2 == "colordegrotate" then
Expand Down