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

[wieldview] Orientation of Shovels are wrong/strange #154

Open
Distributed-DeadLock opened this issue Jan 21, 2025 · 3 comments
Open

[wieldview] Orientation of Shovels are wrong/strange #154

Distributed-DeadLock opened this issue Jan 21, 2025 · 3 comments

Comments

@Distributed-DeadLock
Copy link

Hi,
at least the shovels from Minetest_game/default & from Ethereal are orientated wrong,
or at least the orientation is inconsistent with the other tools.

These mods provide a transformed wield-image for shovels,
e.g. : wield_image = "default_tool_woodshovel.png^[transformR90",, (in minetest_game/mods/default/tools.lua Line 123).
As a result the shovels will be held more like a gun, alligned parallel to the arm, and not held in the hand.

I'd really like to have at least an option to change this behaviour.

Cheers

@SmallJoker
Copy link
Member

SmallJoker commented Feb 1, 2025

Affected mod: 3d_armor/wieldview

1st person view
Image

3rd person view
Image

There is no suitable digging animation that would fit the shovel. It looks incorrect in the current state and also with a 270° rotated texture. I don't think this can or should be changed without introducing a better animation.


If you'd like to compare it by yourself; here's the requested "fix":

diff --git a/wieldview/transform.lua b/wieldview/transform.lua
index 4d5133e..f609982 100644
--- a/wieldview/transform.lua
+++ b/wieldview/transform.lua
@@ -22,3 +22,9 @@ wieldview.transform = {
 	["vessels:steel_bottle"]="R270",
 }
 
+for name, def in pairs(core.registered_tools) do
+	if (def.groups.shovel or 0) > 0 then
+		wieldview.transform[name] = "R270"
+		print("add" ,name)
+	end
+end

@Distributed-DeadLock
Copy link
Author

I don't think this can or should be changed without introducing a better animation.

I disagree with that. I think being consistent with the positioning of the other tools is better than the current solution.
But that's just my opinion, and i think we can happily agree to to disagree here.

Thank you for the fix you posted.
If i'm not mistaken, you made wieldview global.
So, if you don't mind, i'd like to take your code and make a mini-mod out of that and publish it.

Anyway thank you very much for this great mod.

Cheers

@SmallJoker
Copy link
Member

If i'm not mistaken, you made wieldview global.

I don't know what you mean but wieldview is in the global namespace, i.e. in _G, thus adding these few lines to a separate mod to "fix up" wieldview is rather trivial.
I'd like to keep this issue open for a while in case someone would like to leave their opinion on this topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants