rumble/init.lua

23 lines
677 B
Lua
Raw Normal View History

2022-02-11 01:26:20 +01:00
-- rumble - Client side mod for Minetest
-- Scripted by: Li0n
2022-02-19 19:41:17 +01:00
-- todo add max rumble strength setting
2022-02-19 23:35:54 +01:00
-- todo add stop on disconnect
-- todo add chatcommand to start and stop logging
2022-02-11 01:26:20 +01:00
-- step 1 (start)
minetest.register_on_mods_loaded(function()
2022-02-19 19:47:52 +01:00
minetest.display_chat_message("rumble mod loaded. May the rumble be with you!")
2022-02-11 01:26:20 +01:00
end)
2022-02-19 19:41:17 +01:00
-- step 2 (take damage)
2022-02-11 01:26:20 +01:00
minetest.register_on_damage_taken(function(hp)
2022-02-19 19:41:17 +01:00
local rumble_strength = hp/20
local rumble_duration = hp
2022-02-19 19:47:52 +01:00
minetest.log("action", "[rumble] ".."queue "..rumble_strength.." "..rumble_duration)
2022-02-11 01:26:20 +01:00
end)
-- step 3 (die)
minetest.register_on_death(function()
2022-02-19 19:41:17 +01:00
minetest.log("action", "[rumble] instant 0 0")
end)