Skip to content
Permalink
Browse files

Improve inner/outer stairs translation for external mods (#2584)

  • Loading branch information
louisroyer committed Sep 21, 2020
1 parent 63cffc4 commit 4c145bf9aaa2aa10362c7f2e9352536c07553c12
Showing with 14 additions and 7 deletions.
  1. +8 −2 game_api.txt
  2. +6 −5 mods/stairs/init.lua
@@ -765,12 +765,18 @@ delivered with Minetest Game, to keep them compatible with other mods.
* `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
* `full_description`: Overrides the description, bypassing string concatenation. This is useful for translation. (optional)

`stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds, worldaligntex)`
```
stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab,
sounds, worldaligntex, desc_stair_inner, desc_stair_outer)
```

* A wrapper for stairs.register_stair, stairs.register_slab, stairs.register_stair_inner, stairs.register_stair_outer
* Uses almost the same arguments as stairs.register_stair
* `desc_stair`: Description for stair nodes. For corner stairs 'Inner' or 'Outer' will be prefixed
* `desc_stair`: Description for stair nodes. For corner stairs 'Inner' or 'Outer' will be prefixed unless
`desc_stair_inner` or `desc_stair_outer` are specified, which are used instead.
* `desc_slab`: Description for slab node
* `desc_stair_inner`: Description for inner stair node
* `desc_stair_outer`: Description for outer stair node


Xpanes API
@@ -468,13 +468,14 @@ end
-- Nodes will be called stairs:{stair,slab}_<subname>

function stairs.register_stair_and_slab(subname, recipeitem, groups, images,
desc_stair, desc_slab, sounds, worldaligntex)
desc_stair, desc_slab, sounds, worldaligntex,
desc_stair_inner, desc_stair_outer)
stairs.register_stair(subname, recipeitem, groups, images, desc_stair,
sounds, worldaligntex)
stairs.register_stair_inner(subname, recipeitem, groups, images, desc_stair,
sounds, worldaligntex)
stairs.register_stair_outer(subname, recipeitem, groups, images, desc_stair,
sounds, worldaligntex)
stairs.register_stair_inner(subname, recipeitem, groups, images,
desc_stair, sounds, worldaligntex, desc_stair_inner)
stairs.register_stair_outer(subname, recipeitem, groups, images,
desc_stair, sounds, worldaligntex, desc_stair_outer)
stairs.register_slab(subname, recipeitem, groups, images, desc_slab,
sounds, worldaligntex)
end

0 comments on commit 4c145bf

Please sign in to comment.
You can’t perform that action at this time.