[trampoline] Update to Git commit ab1c289:

https://github.com/AntumDeluge/mtmod-trampoline/tree/ab1c289
This commit is contained in:
AntumDeluge 2017-05-26 18:31:59 -07:00
parent 5432dfa8d1
commit 167fa9096a
6 changed files with 41 additions and 45 deletions

View File

@ -42,7 +42,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
* [farming_plus][] ([WTFPL][lic.farming_plus]) -- version: [7e0d976 Git][ver.farming_plus] *2014-07-31* ([patched][patch.farming_plus]) * [farming_plus][] ([WTFPL][lic.farming_plus]) -- version: [7e0d976 Git][ver.farming_plus] *2014-07-31* ([patched][patch.farming_plus])
* furniture/ * furniture/
* [jukebox][] ([WTFPL / CC0][lic.jukebox]) -- version: [e6a507f Git][ver.jukebox] *2016-05-23* * [jukebox][] ([WTFPL / CC0][lic.jukebox]) -- version: [e6a507f Git][ver.jukebox] *2016-05-23*
* [trampoline][] ([GPL][lic.gpl3.0]) -- version: [5e15530 Git][ver.trampoline] *2017-05-26* * [trampoline][] ([GPL][lic.gpl3.0]) -- version: [ab1c289 Git][ver.trampoline] *2017-05-26*
* [trash_can][] ([MIT][lic.trash_can]) -- version: [5fd3df7 Git][ver.trash_can] *2016-01-14* ([patched][patch.trash_can]) * [trash_can][] ([MIT][lic.trash_can]) -- version: [5fd3df7 Git][ver.trash_can] *2016-01-14* ([patched][patch.trash_can])
* inventory/ * inventory/
* [bags][] ([BSD 3-Clause][lic.bags]) -- version: [f17d829 Git][ver.bags] *2015-10-11* ([patched][patch.bags]) * [bags][] ([BSD 3-Clause][lic.bags]) -- version: [f17d829 Git][ver.bags] *2015-10-11* ([patched][patch.bags])
@ -519,7 +519,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[ver.tnt]: https://github.com/PilzAdam/TNT/tree/d6a0b7d [ver.tnt]: https://github.com/PilzAdam/TNT/tree/d6a0b7d
[ver.tools_obsidian]: https://github.com/Dragonop/tools_obsidian/tree/f77fd79 [ver.tools_obsidian]: https://github.com/Dragonop/tools_obsidian/tree/f77fd79
[ver.torches]: https://github.com/BlockMen/torches/tree/e19c772 [ver.torches]: https://github.com/BlockMen/torches/tree/e19c772
[ver.trampoline]: https://github.com/AntumDeluge/mtmod-trampoline/tree/5e15530 [ver.trampoline]: https://github.com/AntumDeluge/mtmod-trampoline/tree/ab1c289
[ver.trash_can]: https://github.com/minetest-mods/trash_can/tree/5fd3df7 [ver.trash_can]: https://github.com/minetest-mods/trash_can/tree/5fd3df7
[ver.unifieddyes]: https://github.com/minetest-mods/unifieddyes/tree/70b1f9f [ver.unifieddyes]: https://github.com/minetest-mods/unifieddyes/tree/70b1f9f
[ver.vector_extras]: https://github.com/HybridDog/vector_extras/tree/472deb6 [ver.vector_extras]: https://github.com/HybridDog/vector_extras/tree/472deb6

View File

@ -1,19 +1,12 @@
-- Colored trampolines (requires 'coloredwood' mod) -- Colored trampolines (requires 'coloredwood' mod)
local color_count = 0 local tramp_colors = {'blue', 'green', 'red', 'violet', 'yellow'}
local tramp_colors = {"blue", "green", "red", "violet", "yellow"}
-- Get the number of tramp colors available
for _ in pairs(tramp_colors) do
color_count = color_count + 1
end
-- Add all available trampoline colors -- Add all available trampoline colors
for i = 1, color_count do for I in pairs(tramp_colors) do
trampoline.addColoredTrampNode(tramp_colors[i], i+1) -- These colored tramps bounce higher than brown tramp
trampoline.addColoredTrampNode(tramp_colors[I], trampoline.bounce * trampoline.multi_colors)
trampoline.addColoredTrampCraft(tramp_colors[i]) trampoline.addColoredTrampCraft(tramp_colors[I])
trampoline.log('Registered \'' .. tramp_colors[I]:gsub('^%l', string.upper) .. ' trampoline\'')
trampoline.log("Registered '" .. tramp_colors[i]:gsub("^%l", string.upper) .. " trampoline'")
end end

View File

@ -3,21 +3,21 @@
-- Regular trampoline -- Regular trampoline
minetest.register_craft({ minetest.register_craft({
output = "trampoline:regular", output = 'trampoline:regular',
recipe = { recipe = {
{"technic:rubber", "technic:rubber", "technic:rubber"}, {'technic:rubber', 'technic:rubber', 'technic:rubber'},
{"default:wood", "default:wood", "default:wood"}, {'default:wood', 'default:wood', 'default:wood'},
{"default:stick", "default:stick", "default:stick"} {'default:stick', 'default:stick', 'default:stick'}
} }
}) })
-- Brown trampoline -- Brown trampoline
minetest.register_craft({ minetest.register_craft({
output = "trampoline:brown", output = 'trampoline:brown',
recipe = { recipe = {
{"technic:rubber", "technic:rubber", "technic:rubber"}, {'technic:rubber', 'technic:rubber', 'technic:rubber'},
{"default:junglewood", "default:junglewood", "default:junglewood"}, {'default:junglewood', 'default:junglewood', 'default:junglewood'},
{"default:stick", "default:stick", "default:stick"} {'default:stick', 'default:stick', 'default:stick'}
} }
}) })

View File

@ -9,8 +9,6 @@ end
-- Define function to add a colored trampoline -- Define function to add a colored trampoline
trampoline.addColoredTrampNode = function(color, bounce) trampoline.addColoredTrampNode = function(color, bounce)
local bounce = trampoline.bounce * bounce
minetest.register_node('trampoline:' .. color, { minetest.register_node('trampoline:' .. color, {
description = color:gsub('^%l', string.upper) .. ' Trampoline', description = color:gsub('^%l', string.upper) .. ' Trampoline',
drawtype = 'nodebox', drawtype = 'nodebox',

View File

@ -4,12 +4,17 @@ trampoline.modname = minetest.get_current_modname()
trampoline.modpath = minetest.get_modpath(trampoline.modname) trampoline.modpath = minetest.get_modpath(trampoline.modname)
trampoline.bounce = 20 trampoline.bounce = 20
-- Bounce multipliers
trampoline.multi = 5
trampoline.multi_brown = 6
trampoline.multi_colors = 7
minetest.log("action", "[MOD] Loading '" .. trampoline.modname .. "' ...")
minetest.log('action', '[MOD] Loading \'' .. trampoline.modname .. '\' ...')
trampoline.box = { trampoline.box = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.5, -0.2, -0.5, 0.5, 0, 0.5}, {-0.5, -0.2, -0.5, 0.5, 0, 0.5},
@ -38,4 +43,4 @@ if minetest.global_exists('coloredwood') then
end end
minetest.log("action", "[MOD] '" .. trampoline.modname .. "' loaded") minetest.log('action', '[MOD] \'' .. trampoline.modname .. '\' loaded')

View File

@ -2,32 +2,32 @@
-- Regular trampoline -- Regular trampoline
minetest.register_node("trampoline:regular", { minetest.register_node('trampoline:regular', {
description = "Trampoline", description = 'Trampoline',
drawtype = "nodebox", drawtype = 'nodebox',
node_box = trampoline.box, node_box = trampoline.box,
selection_box = trampoline.box, selection_box = trampoline.box,
paramtype = "light", paramtype = 'light',
tiles = { tiles = {
"top.png", 'top.png',
"bottom.png", 'bottom.png',
"sides.png^sides_overlay.png" 'sides.png^sides_overlay.png'
}, },
groups = {dig_immediate=2, bouncy=trampoline.bounce*2, fall_damage_add_percent=-70}, groups = {dig_immediate=2, bouncy=trampoline.bounce*trampoline.multi, fall_damage_add_percent=-70},
}) })
-- Brown trampoline -- Brown trampoline (bounces higher than regular tramp)
minetest.register_node("trampoline:brown", { minetest.register_node('trampoline:brown', {
description = "Brown Trampoline", description = 'Brown Trampoline',
drawtype = "nodebox", drawtype = 'nodebox',
node_box = trampoline.box, node_box = trampoline.box,
selection_box = trampoline.box, selection_box = trampoline.box,
paramtype = "light", paramtype = 'light',
tiles = { tiles = {
"top.png", 'top.png',
"bottom.png", 'bottom.png',
"sides.png^sides_overlay_brown.png" 'sides.png^sides_overlay_brown.png'
}, },
groups = {dig_immediate=2, bouncy=trampoline.bounce*2, fall_damage_add_percent=-70}, groups = {dig_immediate=2, bouncy=trampoline.bounce*trampoline.multi_brown, fall_damage_add_percent=-70},
}) })