Skip to content
Browse files
Game_api.txt: Add API information for sethome functions
- Documentation for sethome.get, sethome.set and sethome.go
  • Loading branch information
tenplus1 authored and paramat committed Jul 5, 2016
1 parent d42f77c commit c5b0fe72ea47c9c2ede2d0097e53e6c0a7c514f6
Showing 1 changed file with 24 additions and 0 deletions.
@@ -338,6 +338,30 @@ To use it, add the `on_screwdriver` function to the node definition.
* use `on_rotate = screwdriver.disallow` to always disallow rotation
* use `on_rotate = screwdriver.rotate_simple` to allow only face rotation

Sethome API

The sethome API adds three global functions to allow mods to read a players home position,
set a players home position and teleport a player to home position.


* `name` Player who's home position you wish to get
* return value: false if no player home coords exist, position table if true

`sethome.set(name, pos)`

* `name` Player who's home position you wish to set
* `pos` Position table containing coords of home position
* return value: false if unable to set and save new home position, otherwise true


* `name` Player you wish to teleport to their home position
* return value: false if player cannot be sent home, otherwise true

Stairs API

0 comments on commit c5b0fe7

Please sign in to comment.