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

Make sure blocks/houses are not placed where the player is. #5

Open
aleksejrs opened this issue Aug 20, 2019 · 7 comments
Open

Make sure blocks/houses are not placed where the player is. #5

aleksejrs opened this issue Aug 20, 2019 · 7 comments
Labels

Comments

@aleksejrs
Copy link

aleksejrs commented Aug 20, 2019

This issue was reported for Alive AI:
Describe the bug
Sometimes I am suddenly in the complete dark (blackness), and moving doesn't help. Actually, moving more does help: the problem is that a house has appeared where I am!

Desktop (please complete the following information):

Minetest version: - 5.0.1 in Debian (I suppose it was package 5.0.1+repack-2~bpo10+1).

  • Other mods activated: too many to list, sorry.

Additional context
I uninstalled the mod for now, as it was annoying and filled the space with all the poorly placed houses. I also uninstalled some other mods and downgraded Minetest.

@theFox6
Copy link
Owner

theFox6 commented Aug 21, 2019

Are you sure you are referring to working_villages and not to another villages mod from minetest?
Working villages does not spawn buildings, buildings in working_villages can only be built by builders.
Even if you are referring to another mod please don't close this issue because the builders of working_villages might also place blocks inside the player.

@aleksejrs
Copy link
Author

I installed it together with other mods (which never ends good…), including Alive AI that created traders and workers, and possibly mobf_trader. Later I installed mg_villages, but I don't think I have seen any effect yet.

I don't know what the content of these files means:

working_villages_data contains
return {["working_villages:villager_male"] = 0, ["working_villages:villager_female"] = 0}

working_villages_building_sites contains
return {}

working_villages_homes contains
return {}

@aleksejrs
Copy link
Author

Intersecting houses: Minetest-houses-Screenshot_20190822_131837

@theFox6
Copy link
Owner

theFox6 commented Aug 22, 2019

Those are not houses of working_villages and as the building_sites and homes file show there are no houses existing or planned by working_villages. The data currently indicates how many villagers have been spawned.

@theFox6
Copy link
Owner

theFox6 commented Aug 22, 2019

I think mg_villages and Alive AI spawn villages

@aleksejrs
Copy link
Author

aleksejrs commented Aug 22, 2019

It's Alive AI indeed: they talk using the strings in Alive AI's chat.lua, and some of the houses on the screenshots are similar (names, too): https://forum.minetest.net/viewtopic.php?t=16083#p243314.

@aleksejrs aleksejrs changed the title Some houses are placed where the player is. Make sure blocks/houses are not placed where the player is. Sep 10, 2019
@lmaddox
Copy link

lmaddox commented Dec 1, 2023

in :place(), we see that it sets the animation to place the node, pauses, then proceeds with placing logic. We can simply add a check after the pause.
Screenshot_2023-12-01_07_04_35

--set animation
        if self.object:get_velocity().x==0 and self.object:get_velocity().z==0 then
                self:set_animation(working_villages.animation_frames.MINE)
        else
                self:set_animation(working_villages.animation_frames.WALK_MINE)
        end
        --turn to target
        self:set_yaw_by_direction(dist)
        --wait 15 steps
        for _=0,15 do coroutine.yield() end

        -- TODO fix #5: check for player at position
        if is_player_at(pos) then
          print('position blocked issue 5')
          if self.object:get_velocity().x==0 and self.object:get_velocity().z==0 then
                  self:set_animation(working_villages.animation_frames.STAND)
          else
                  self:set_animation(working_villages.animation_frames.WALK)
          end
          return false, fail.blocked
        end

lmaddox pushed a commit to InnovAnon-Inc/working_villages that referenced this issue Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants