From 70c2d5fffb10ec8378a8f81658af0a46741eece7 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Sat, 12 May 2018 08:48:22 -0400 Subject: fix jumping mod (oops?) --- jumping/README.md | 36 ++++++++ jumping/depends.txt | 1 + jumping/description.txt | 1 + jumping/init.lua | 94 +++++++++++++++++++++ jumping/mod.conf | 1 + jumping/textures/jumping_cushion_sides.png | Bin 0 -> 284 bytes jumping/textures/jumping_cushion_tb.png | Bin 0 -> 618 bytes jumping/textures/jumping_trampoline_bottom.png | Bin 0 -> 451 bytes jumping/textures/jumping_trampoline_sides.png | Bin 0 -> 216 bytes .../textures/jumping_trampoline_sides_overlay1.png | Bin 0 -> 185 bytes .../textures/jumping_trampoline_sides_overlay2.png | Bin 0 -> 188 bytes .../textures/jumping_trampoline_sides_overlay3.png | Bin 0 -> 178 bytes .../textures/jumping_trampoline_sides_overlay4.png | Bin 0 -> 180 bytes .../textures/jumping_trampoline_sides_overlay5.png | Bin 0 -> 176 bytes .../textures/jumping_trampoline_sides_overlay6.png | Bin 0 -> 171 bytes jumping/textures/jumping_trampoline_top.png | Bin 0 -> 539 bytes textures/jumping_cushion_sides.png | Bin 284 -> 0 bytes textures/jumping_cushion_tb.png | Bin 618 -> 0 bytes textures/jumping_trampoline_bottom.png | Bin 451 -> 0 bytes textures/jumping_trampoline_sides.png | Bin 216 -> 0 bytes textures/jumping_trampoline_sides_overlay1.png | Bin 185 -> 0 bytes textures/jumping_trampoline_sides_overlay2.png | Bin 188 -> 0 bytes textures/jumping_trampoline_sides_overlay3.png | Bin 178 -> 0 bytes textures/jumping_trampoline_sides_overlay4.png | Bin 180 -> 0 bytes textures/jumping_trampoline_sides_overlay5.png | Bin 176 -> 0 bytes textures/jumping_trampoline_sides_overlay6.png | Bin 171 -> 0 bytes textures/jumping_trampoline_top.png | Bin 539 -> 0 bytes 27 files changed, 133 insertions(+) create mode 100644 jumping/README.md create mode 100644 jumping/depends.txt create mode 100644 jumping/description.txt create mode 100644 jumping/init.lua create mode 100644 jumping/mod.conf create mode 100644 jumping/textures/jumping_cushion_sides.png create mode 100644 jumping/textures/jumping_cushion_tb.png create mode 100644 jumping/textures/jumping_trampoline_bottom.png create mode 100644 jumping/textures/jumping_trampoline_sides.png create mode 100644 jumping/textures/jumping_trampoline_sides_overlay1.png create mode 100644 jumping/textures/jumping_trampoline_sides_overlay2.png create mode 100644 jumping/textures/jumping_trampoline_sides_overlay3.png create mode 100644 jumping/textures/jumping_trampoline_sides_overlay4.png create mode 100644 jumping/textures/jumping_trampoline_sides_overlay5.png create mode 100644 jumping/textures/jumping_trampoline_sides_overlay6.png create mode 100644 jumping/textures/jumping_trampoline_top.png delete mode 100644 textures/jumping_cushion_sides.png delete mode 100644 textures/jumping_cushion_tb.png delete mode 100644 textures/jumping_trampoline_bottom.png delete mode 100644 textures/jumping_trampoline_sides.png delete mode 100644 textures/jumping_trampoline_sides_overlay1.png delete mode 100644 textures/jumping_trampoline_sides_overlay2.png delete mode 100644 textures/jumping_trampoline_sides_overlay3.png delete mode 100644 textures/jumping_trampoline_sides_overlay4.png delete mode 100644 textures/jumping_trampoline_sides_overlay5.png delete mode 100644 textures/jumping_trampoline_sides_overlay6.png delete mode 100644 textures/jumping_trampoline_top.png diff --git a/jumping/README.md b/jumping/README.md new file mode 100644 index 0000000..2c2ab6d --- /dev/null +++ b/jumping/README.md @@ -0,0 +1,36 @@ +# Jumping + +Jumping is a mod for Minetest that adds trampolines of different power levels, and cushions! The trampolines allow you to jump higher, while the cushions let you fall farther and not take as much damage. + +## Recipes +### Cushion +![Cushion Recipe](textures/.example/cushion_recipe.png) + +* ![Cotton](textures/.example/farming_cotton.png) - Cotton + +* ![Wool (can be any colour)](textures/.example/wool.png) - Wool (can be any colour, as long as it is wool) + +The wool can be any colour, however, different coloured cushions and trampolines will soon be added creating a use for the different colours of wool. + +Two wool is required because you would probably want as much "cushioning" as possible in a cushion. The cotton is meant as an outline creating the cloth surrounding the wool. + +### Trampoline +![Trampoline Recipe](textures/.example/trampoline_recipe.png) + +* ![Steel Ingot](textures/.example/default_steel_ingot.png) - Steel Ingot + +* ![Cushion](textures/.example/jumping_cushion.png) - Cushion + +When coloured cushions are implemented, colour will become not only an indicator to show how bouncy the trampoline is, but also a decoration on the top. You can also look at the InfoText to find the value showing how bouncy said trampoline is. This is called the "bouncy level." + +To change the bouncy level, simply left click (punch) any trampoline. This will increase the bouncy level by 1 until 6. Right click to decrease the bouncy level by 1, until 1. + +The steel ingots are used for the legs, while the cushions are obviously acting as the canvas. In fact, when some type of canvas is added, it will be used instead for the trampoline recipe. + +## Development Repositories +* **Jeija **: [Jeija/minetest-mod-jumping](http://github.com/Jeija/minetest-mod-jumping) + +## License and Information +**License**: [GPLv3](http://www.gnu.org/licenses/gpl-3.0.en.html) + +**Creator**: [Jeija](http://github.com/Jeija) diff --git a/jumping/depends.txt b/jumping/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/jumping/depends.txt @@ -0,0 +1 @@ +default diff --git a/jumping/description.txt b/jumping/description.txt new file mode 100644 index 0000000..37fda93 --- /dev/null +++ b/jumping/description.txt @@ -0,0 +1 @@ +adds trampolines, cushions, ... diff --git a/jumping/init.lua b/jumping/init.lua new file mode 100644 index 0000000..955213d --- /dev/null +++ b/jumping/init.lua @@ -0,0 +1,94 @@ +local trampolinebox = { + type = "fixed", + fixed = { + {-0.5, -0.2, -0.5, 0.5, 0, 0.5}, + + {-0.5, -0.5, -0.5, -0.4, -0.2, -0.4}, + { 0.4, -0.5, -0.5, 0.5, -0.2, -0.4}, + { 0.4, -0.5, 0.4, 0.5, -0.2, 0.5}, + {-0.5, -0.5, 0.4, -0.4, -0.2, 0.5}, + } +} + +local cushionbox = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.3, 0.5}, + } +} + +local trampoline_punch = function(pos, node) + local id = string.sub(node.name, #node.name) + if id < "6" then + id = id + 1 + minetest.swap_node(pos, {name = string.sub(node.name, 1, #node.name - 1)..id}) + minetest.get_meta(pos):set_string("infotext", "Bouncy Level: "..id) + end +end + +local power_decrease = function(pos, node) + local id = string.sub(node.name, #node.name) + if id > "1" then + id = id - 1 + minetest.swap_node(pos, {name = string.sub(node.name, 1, #node.name - 1)..id}) + minetest.get_meta(pos):set_string("infotext", "Bouncy Level: "..id) + end +end + +for i = 1, 6 do + minetest.register_node("jumping:trampoline"..i, { + description = "Trampoline", + drawtype = "nodebox", + node_box = trampolinebox, + selection_box = trampolinebox, + paramtype = "light", + on_construct = function(pos) + minetest.get_meta(pos):set_string("infotext", "Bouncy Level: "..i) + end, + on_punch = trampoline_punch, + on_rightclick = power_decrease, + drop = "jumping:trampoline1", + tiles = { + "jumping_trampoline_top.png", + "jumping_trampoline_bottom.png", + "jumping_trampoline_sides.png^jumping_trampoline_sides_overlay"..i..".png" + }, + groups = { + dig_immediate = 2, + bouncy = 20 + i * 20, + fall_damage_add_percent = -70, + not_in_creative_inventory = ( i > 1 and 1 or nil), + }, + }) +end + +minetest.register_node("jumping:cushion", { + description = "Cushion", + drawtype = "nodebox", + node_box = cushionbox, + selection_box = cushionbox, + paramtype = "light", + tiles = { + "jumping_cushion_tb.png", + "jumping_cushion_tb.png", + "jumping_cushion_sides.png" + }, + groups = {dig_immediate=2, disable_jump=1, fall_damage_add_percent=-100}, +}) + +minetest.register_craft({ + output = "jumping:trampoline1", + recipe = { + {"jumping:cushion", "jumping:cushion", "jumping:cushion"}, + {"default:steel_ingot", "", "default:steel_ingot"} + } +}) + +minetest.register_craft({ + output = "jumping:cushion", + recipe = { + {"farming:cotton", "group:wool", "farming:cotton"}, + {"farming:cotton", "group:wool", "farming:cotton"}, + {"farming:cotton", "farming:cotton", "farming:cotton"} + } +}) diff --git a/jumping/mod.conf b/jumping/mod.conf new file mode 100644 index 0000000..1fcc313 --- /dev/null +++ b/jumping/mod.conf @@ -0,0 +1 @@ +jumping diff --git a/jumping/textures/jumping_cushion_sides.png b/jumping/textures/jumping_cushion_sides.png new file mode 100644 index 0000000..8c6de57 Binary files /dev/null and b/jumping/textures/jumping_cushion_sides.png differ diff --git a/jumping/textures/jumping_cushion_tb.png b/jumping/textures/jumping_cushion_tb.png new file mode 100644 index 0000000..09b50e8 Binary files /dev/null and b/jumping/textures/jumping_cushion_tb.png differ diff --git a/jumping/textures/jumping_trampoline_bottom.png b/jumping/textures/jumping_trampoline_bottom.png new file mode 100644 index 0000000..cd9da65 Binary files /dev/null and b/jumping/textures/jumping_trampoline_bottom.png differ diff --git a/jumping/textures/jumping_trampoline_sides.png b/jumping/textures/jumping_trampoline_sides.png new file mode 100644 index 0000000..a5f3689 Binary files /dev/null and b/jumping/textures/jumping_trampoline_sides.png differ diff --git a/jumping/textures/jumping_trampoline_sides_overlay1.png b/jumping/textures/jumping_trampoline_sides_overlay1.png new file mode 100644 index 0000000..aebcf05 Binary files /dev/null and b/jumping/textures/jumping_trampoline_sides_overlay1.png differ diff --git a/jumping/textures/jumping_trampoline_sides_overlay2.png b/jumping/textures/jumping_trampoline_sides_overlay2.png new file mode 100644 index 0000000..74f43fa Binary files /dev/null and b/jumping/textures/jumping_trampoline_sides_overlay2.png differ diff --git a/jumping/textures/jumping_trampoline_sides_overlay3.png b/jumping/textures/jumping_trampoline_sides_overlay3.png new file mode 100644 index 0000000..d619fcc Binary files /dev/null and b/jumping/textures/jumping_trampoline_sides_overlay3.png differ diff --git a/jumping/textures/jumping_trampoline_sides_overlay4.png b/jumping/textures/jumping_trampoline_sides_overlay4.png new file mode 100644 index 0000000..f1679e6 Binary files /dev/null and b/jumping/textures/jumping_trampoline_sides_overlay4.png differ diff --git a/jumping/textures/jumping_trampoline_sides_overlay5.png b/jumping/textures/jumping_trampoline_sides_overlay5.png new file mode 100644 index 0000000..2af894d Binary files /dev/null and b/jumping/textures/jumping_trampoline_sides_overlay5.png differ diff --git a/jumping/textures/jumping_trampoline_sides_overlay6.png b/jumping/textures/jumping_trampoline_sides_overlay6.png new file mode 100644 index 0000000..3c2fa6e Binary files /dev/null and b/jumping/textures/jumping_trampoline_sides_overlay6.png differ diff --git a/jumping/textures/jumping_trampoline_top.png b/jumping/textures/jumping_trampoline_top.png new file mode 100644 index 0000000..a927fdb Binary files /dev/null and b/jumping/textures/jumping_trampoline_top.png differ diff --git a/textures/jumping_cushion_sides.png b/textures/jumping_cushion_sides.png deleted file mode 100644 index 8c6de57..0000000 Binary files a/textures/jumping_cushion_sides.png and /dev/null differ diff --git a/textures/jumping_cushion_tb.png b/textures/jumping_cushion_tb.png deleted file mode 100644 index 09b50e8..0000000 Binary files a/textures/jumping_cushion_tb.png and /dev/null differ diff --git a/textures/jumping_trampoline_bottom.png b/textures/jumping_trampoline_bottom.png deleted file mode 100644 index cd9da65..0000000 Binary files a/textures/jumping_trampoline_bottom.png and /dev/null differ diff --git a/textures/jumping_trampoline_sides.png b/textures/jumping_trampoline_sides.png deleted file mode 100644 index a5f3689..0000000 Binary files a/textures/jumping_trampoline_sides.png and /dev/null differ diff --git a/textures/jumping_trampoline_sides_overlay1.png b/textures/jumping_trampoline_sides_overlay1.png deleted file mode 100644 index aebcf05..0000000 Binary files a/textures/jumping_trampoline_sides_overlay1.png and /dev/null differ diff --git a/textures/jumping_trampoline_sides_overlay2.png b/textures/jumping_trampoline_sides_overlay2.png deleted file mode 100644 index 74f43fa..0000000 Binary files a/textures/jumping_trampoline_sides_overlay2.png and /dev/null differ diff --git a/textures/jumping_trampoline_sides_overlay3.png b/textures/jumping_trampoline_sides_overlay3.png deleted file mode 100644 index d619fcc..0000000 Binary files a/textures/jumping_trampoline_sides_overlay3.png and /dev/null differ diff --git a/textures/jumping_trampoline_sides_overlay4.png b/textures/jumping_trampoline_sides_overlay4.png deleted file mode 100644 index f1679e6..0000000 Binary files a/textures/jumping_trampoline_sides_overlay4.png and /dev/null differ diff --git a/textures/jumping_trampoline_sides_overlay5.png b/textures/jumping_trampoline_sides_overlay5.png deleted file mode 100644 index 2af894d..0000000 Binary files a/textures/jumping_trampoline_sides_overlay5.png and /dev/null differ diff --git a/textures/jumping_trampoline_sides_overlay6.png b/textures/jumping_trampoline_sides_overlay6.png deleted file mode 100644 index 3c2fa6e..0000000 Binary files a/textures/jumping_trampoline_sides_overlay6.png and /dev/null differ diff --git a/textures/jumping_trampoline_top.png b/textures/jumping_trampoline_top.png deleted file mode 100644 index a927fdb..0000000 Binary files a/textures/jumping_trampoline_top.png and /dev/null differ -- cgit v1.2.3