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 API to control respawn logic and behavior #3113

Merged
merged 1 commit into from
May 12, 2024
Merged

Conversation

sfan5
Copy link
Member

@sfan5 sfan5 commented Apr 10, 2024

resolves #2630, resolves #2117

How to test

  1. Carefully inspect code
  2. Check that bed respawning works
  3. Try the static_spawnpoint, engine_spawn and enable_bed_respawn settings
  4. Also check that it works as expected on mgv6 (spawn algo is disabled there)

Copy link
Contributor

@appgurueu appgurueu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks fine

tested on v6:

  • spawns me at the world origin by default;
  • static_spawnpoint works;
  • engine_spawn works and finds an alternative spawnpoint nearby if the world origin is obstructed
  • bed respawning works

tested on v7:

  • static_spawnpoint works;
  • engine_spawn works;
  • bed respawning works

mods/beds/functions.lua Outdated Show resolved Hide resolved
game_api.txt Outdated Show resolved Hide resolved
@sfan5 sfan5 merged commit c60d8e4 into minetest:master May 12, 2024
2 checks passed
@sfan5 sfan5 deleted the spapi branch May 12, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'spawn' mod should have an API Spawn mod: make the spawning code a global function usable by mods
2 participants