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

Various bugs/typos #43

Open
axcore opened this issue Dec 13, 2022 · 3 comments
Open

Various bugs/typos #43

axcore opened this issue Dec 13, 2022 · 3 comments

Comments

@axcore
Copy link

axcore commented Dec 13, 2022

Several of these notes are aimed at someone who wants to fork the mod, or re-use its contents.

Minor bugs:

  • Several items are used in the v6 mapgen code but ignored by the v7 mapgen code. Namely: frozen shrubs, frozen flowers, frozen apples, frozen leaves
  • v7 mapgen code places dry shrubs in snowy biomes, for some reason. A simple tweak would make it place the frozen shrubs created by this mod
  • In the v7 mapgen, pine trees are generating underwater because the decoration uses defunct fields (.height_max, .height_min). Changing them to .y_max and .y_min fixes the issue
  • The mod includes a pine tree schematic that doesn't seem to be used. If the schematic is used in the future, it needs to be tweaked to add force_placement to the bottom trunk node. This assumes that the tree is generated on default:snow. The user sees a big gap between the snow and the bottom of the tree; using force_placement removes the default:snow, and therefore the gap

Minor typos:

  • In snowball.lua, the variable name just_acitvated should be just_activated
  • In mapgen.lua, WARNING! mapgen could not be identifyed! should be identified
@axcore
Copy link
Author

axcore commented Jun 28, 2024

#17 complains that the player sometimes gets stuck mounted on the sledge. I have investigated that, and found a workaround, which is to add the following code in sled.lua, just after the call to sled:on_activate()

function sled:on_deactivate(removal)
    if not self.driver then
        return
    end
    local player = minetest.get_player_by_name(self.driver)
    if player then
        leave_sled(self, player)
    end
end

More technical explanation:

Especially in 3rd person view, clicking the ground both mounts the sledge and punches the sledge (if it's at the punched location). This is what causes the player to get stuck in a seated position. A full fix would modify sled:on_punch() to do nothing, if the player had mounted the sledge within (say) the last 0.5 seconds. My workaround above works just fine, though.

Specifically, the sequence of calls is:

:on_activate
:get_staticdata
:on_rightclick
:on_step
:on_punch
:on_deactivate

(On the understanding that this mod is abandoned, I'm posting all fixes here in this thread, for the benefit of anyone who might want to fork the mod.)

@axcore
Copy link
Author

axcore commented Jun 28, 2024

After mounting the sled, it is invisible because the code places it beneath the ground. An acceptable workaround is to replace this line in sled.lua:

self.object:set_attach(player, "", {x=0,y=-9,z=0}, {x=0,y=90,z=0})

With this one:

self.object:set_attach(player, "", {x=0,y=1,z=0}, {x=0,y=90,z=0})

Unfortunately, even after this change, the character animation places the character slightly below the top of the sled, and the rails of the sled are slightly below the ground. This one-line workaround isn't perfect, but is still an improvement and it doesn't require creating new character animations.

@axcore axcore changed the title Various minor bugs/typos Various bugs/typos Jun 28, 2024
@Splizard
Copy link
Owner

The project is certainly open to adopting a new maintainer if anybody is looking to develop this mod into the future.

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