Rename 'parachute' mod to 'rp_parachute'
This commit is contained in:
parent
7d2a32e4cc
commit
7bde4a50af
@ -10,6 +10,6 @@ Tweaked by Kaadmy and Wuzzy for Repixture.
|
|||||||
* Sound license: CC BY-SA 4.0
|
* Sound license: CC BY-SA 4.0
|
||||||
* Source code license: LGPLv2.1
|
* Source code license: LGPLv2.1
|
||||||
|
|
||||||
The parachute sounds (`parachute_open.ogg`, `parachute_close.ogg`, `parachute_fail.ogg`)
|
The parachute sounds (`rp_parachute_open.ogg`, `rp_parachute_close.ogg`, `rp_parachute_fail.ogg`)
|
||||||
are derivative works of a sound by freesound.org user EugeneEverett.
|
are derivative works of a sound by freesound.org user EugeneEverett.
|
||||||
Original sound file downloaded from <https://freesound.org/people/EugeneEverett/sounds/596522/>.
|
Original sound file downloaded from <https://freesound.org/people/EugeneEverett/sounds/596522/>.
|
@ -3,7 +3,7 @@
|
|||||||
-- Parachute mod
|
-- Parachute mod
|
||||||
--
|
--
|
||||||
|
|
||||||
local S = minetest.get_translator("parachute")
|
local S = minetest.get_translator("rp_parachute")
|
||||||
|
|
||||||
local GRAVITY = tonumber(minetest.settings:get("movement_gravity") or 9.81)
|
local GRAVITY = tonumber(minetest.settings:get("movement_gravity") or 9.81)
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ local function open_parachute_for_player(player, play_sound, load_area)
|
|||||||
|
|
||||||
if rp_player.player_attached[name] then
|
if rp_player.player_attached[name] then
|
||||||
if play_sound then
|
if play_sound then
|
||||||
minetest.sound_play({name="parachute_fail", gain=SND_GAIN_FAIL}, {object=player}, true)
|
minetest.sound_play({name="rp_parachute_fail", gain=SND_GAIN_FAIL}, {object=player}, true)
|
||||||
end
|
end
|
||||||
return false, "already_attached"
|
return false, "already_attached"
|
||||||
end
|
end
|
||||||
@ -171,14 +171,14 @@ local function open_parachute_for_player(player, play_sound, load_area)
|
|||||||
local in_node = minetest.get_node(pos)
|
local in_node = minetest.get_node(pos)
|
||||||
if in_node.name == "ignore" then
|
if in_node.name == "ignore" then
|
||||||
if play_sound then
|
if play_sound then
|
||||||
minetest.sound_play({name="parachute_fail", gain=SND_GAIN_FAIL}, {object=player}, true)
|
minetest.sound_play({name="rp_parachute_fail", gain=SND_GAIN_FAIL}, {object=player}, true)
|
||||||
end
|
end
|
||||||
return false, "ignore"
|
return false, "ignore"
|
||||||
end
|
end
|
||||||
|
|
||||||
local obj = minetest.add_entity(ppos, "parachute:entity")
|
local obj = minetest.add_entity(ppos, "rp_parachute:entity")
|
||||||
if play_sound then
|
if play_sound then
|
||||||
minetest.sound_play({name="parachute_open", gain=SND_GAIN_OPEN}, {object=player}, true)
|
minetest.sound_play({name="rp_parachute_open", gain=SND_GAIN_OPEN}, {object=player}, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
obj:set_velocity(
|
obj:set_velocity(
|
||||||
@ -208,18 +208,18 @@ local function open_parachute_for_player(player, play_sound, load_area)
|
|||||||
meta:set_int("parachute:start_y_set", 1)
|
meta:set_int("parachute:start_y_set", 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.log("action", "[parachute] "..name.." opens a parachute at "..minetest.pos_to_string(obj:get_pos(), 1))
|
minetest.log("action", "[rp_parachute] "..name.." opens a parachute at "..minetest.pos_to_string(obj:get_pos(), 1))
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
if play_sound then
|
if play_sound then
|
||||||
minetest.sound_play({name="parachute_fail", gain=SND_GAIN_FAIL}, {object=player}, true)
|
minetest.sound_play({name="rp_parachute_fail", gain=SND_GAIN_FAIL}, {object=player}, true)
|
||||||
end
|
end
|
||||||
return false, fail_reason
|
return false, fail_reason
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_craftitem(
|
minetest.register_craftitem(
|
||||||
"parachute:parachute", {
|
"rp_parachute:parachute", {
|
||||||
description = S("Parachute"),
|
description = S("Parachute"),
|
||||||
_tt_help = S("Lets you glide safely to the ground when falling"),
|
_tt_help = S("Lets you glide safely to the ground when falling"),
|
||||||
inventory_image = "parachute_inventory.png",
|
inventory_image = "parachute_inventory.png",
|
||||||
@ -256,11 +256,11 @@ minetest.register_craftitem(
|
|||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_entity(
|
minetest.register_entity(
|
||||||
"parachute:entity",
|
"rp_parachute:entity",
|
||||||
{
|
{
|
||||||
initial_properties = {
|
initial_properties = {
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "parachute.b3d",
|
mesh = "rp_parachute.b3d",
|
||||||
textures = {"parachute_mesh.png"},
|
textures = {"parachute_mesh.png"},
|
||||||
pointable = false,
|
pointable = false,
|
||||||
physical = true,
|
physical = true,
|
||||||
@ -279,7 +279,7 @@ minetest.register_entity(
|
|||||||
ignore_mode = false,
|
ignore_mode = false,
|
||||||
|
|
||||||
on_activate = function(self, staticdata, dtime_s)
|
on_activate = function(self, staticdata, dtime_s)
|
||||||
minetest.log("info", "[parachute] Parachute at "..minetest.pos_to_string(self.object:get_pos(), 1).." is activating (dtime_s="..dtime_s..")")
|
minetest.log("info", "[rp_parachute] Parachute at "..minetest.pos_to_string(self.object:get_pos(), 1).." is activating (dtime_s="..dtime_s..")")
|
||||||
self.object:set_armor_groups({immortal=1})
|
self.object:set_armor_groups({immortal=1})
|
||||||
if dtime_s == 0 then
|
if dtime_s == 0 then
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
@ -428,19 +428,19 @@ minetest.register_entity(
|
|||||||
else
|
else
|
||||||
snd_object = self.object
|
snd_object = self.object
|
||||||
end
|
end
|
||||||
minetest.sound_play({name="parachute_close", gain=SND_GAIN_CLOSE}, {object=snd_object}, true)
|
minetest.sound_play({name="rp_parachute_close", gain=SND_GAIN_CLOSE}, {object=snd_object}, true)
|
||||||
|
|
||||||
local final_pos_str = minetest.pos_to_string(self.object:get_pos(), 1)
|
local final_pos_str = minetest.pos_to_string(self.object:get_pos(), 1)
|
||||||
if player then
|
if player then
|
||||||
minetest.log("action", "[parachute] Parachute of "..player:get_player_name().." getting destroyed at "..final_pos_str)
|
minetest.log("action", "[rp_parachute] Parachute of "..player:get_player_name().." getting destroyed at "..final_pos_str)
|
||||||
else
|
else
|
||||||
minetest.log("action", "[parachute] Parachute getting destroyed at "..final_pos_str)
|
minetest.log("action", "[rp_parachute] Parachute getting destroyed at "..final_pos_str)
|
||||||
end
|
end
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_deactivate = function(self, removal)
|
on_deactivate = function(self, removal)
|
||||||
minetest.log("info", "[parachute] Parachute at "..minetest.pos_to_string(self.object:get_pos(), 1).." is deactivating (removal="..tostring(removal)..")")
|
minetest.log("info", "[rp_parachute] Parachute at "..minetest.pos_to_string(self.object:get_pos(), 1).." is deactivating (removal="..tostring(removal)..")")
|
||||||
if self.attached ~= nil then
|
if self.attached ~= nil then
|
||||||
if rp_player.player_attached[self.attached] then
|
if rp_player.player_attached[self.attached] then
|
||||||
local player = minetest.get_player_by_name(self.attached)
|
local player = minetest.get_player_by_name(self.attached)
|
||||||
@ -465,11 +465,11 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
-- This isn't perfect as the old velocity isn't preserved but better
|
-- This isn't perfect as the old velocity isn't preserved but better
|
||||||
-- better than nothing.
|
-- better than nothing.
|
||||||
if meta:get_int("parachute:active") == 1 then
|
if meta:get_int("parachute:active") == 1 then
|
||||||
minetest.log("action", "[parachute] Trying to open parachute for reconnected player "..player:get_player_name().." ...")
|
minetest.log("action", "[rp_parachute] Trying to open parachute for reconnected player "..player:get_player_name().." ...")
|
||||||
local pos = player:get_pos()
|
local pos = player:get_pos()
|
||||||
local ok, fail_reason = open_parachute_for_player(player, false, true)
|
local ok, fail_reason = open_parachute_for_player(player, false, true)
|
||||||
if not ok then
|
if not ok then
|
||||||
minetest.log("action", "[parachute] Parachute opening failed because: "..fail_reason)
|
minetest.log("action", "[rp_parachute] Parachute opening failed because: "..fail_reason)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@ -478,7 +478,7 @@ end)
|
|||||||
|
|
||||||
crafting.register_craft(
|
crafting.register_craft(
|
||||||
{
|
{
|
||||||
output = "parachute:parachute",
|
output = "rp_parachute:parachute",
|
||||||
items = {
|
items = {
|
||||||
"group:fuzzy 3",
|
"group:fuzzy 3",
|
||||||
"rp_default:rope 4",
|
"rp_default:rope 4",
|
||||||
@ -497,3 +497,21 @@ achievements.register_achievement(
|
|||||||
icon = "rp_parachute_achievement_sky_diver.png",
|
icon = "rp_parachute_achievement_sky_diver.png",
|
||||||
difficulty = 6.2,
|
difficulty = 6.2,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Legacy support
|
||||||
|
minetest.register_alias("parachute:parachute", "rp_parachute:parachute")
|
||||||
|
|
||||||
|
-- Remove legacy parachute entity
|
||||||
|
minetest.register_entity(":parachute:entity", {
|
||||||
|
initial_properties = {
|
||||||
|
is_visible = false,
|
||||||
|
pointable = false,
|
||||||
|
physical = false,
|
||||||
|
static_save = false,
|
||||||
|
},
|
||||||
|
on_activate = function(self)
|
||||||
|
self.object:remove()
|
||||||
|
minetest.log("action", "[rp_parachute] Legacy parachute entity at "..minetest.pos_to_string(self.object:get_pos(), 1).." removed")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Minetest textdomain parachute x.x.x\n"
|
"Project-Id-Version: Minetest textdomain rp_parachute x.x.x\n"
|
||||||
"Report-Msgid-Bugs-To: Wuzzy@disroot.org\n"
|
"Report-Msgid-Bugs-To: Wuzzy@disroot.org\n"
|
||||||
"POT-Creation-Date: \n"
|
"POT-Creation-Date: \n"
|
||||||
"PO-Revision-Date: 2024-02-27 21:56+0000\n"
|
"PO-Revision-Date: 2024-02-27 21:56+0000\n"
|
@ -1,6 +1,6 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Minetest textdomain parachute x.x.x\n"
|
"Project-Id-Version: Minetest textdomain rp_parachute x.x.x\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: \n"
|
"POT-Creation-Date: \n"
|
||||||
"PO-Revision-Date: \n"
|
"PO-Revision-Date: \n"
|
@ -1,6 +1,6 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Minetest textdomain parachute x.x.x\n"
|
"Project-Id-Version: Minetest textdomain rp_parachute x.x.x\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: \n"
|
"POT-Creation-Date: \n"
|
||||||
"PO-Revision-Date: \n"
|
"PO-Revision-Date: \n"
|
@ -1,6 +1,6 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Minetest textdomain parachute x.x.x\n"
|
"Project-Id-Version: Minetest textdomain rp_parachute x.x.x\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: \n"
|
"POT-Creation-Date: \n"
|
||||||
"PO-Revision-Date: \n"
|
"PO-Revision-Date: \n"
|
@ -1,6 +1,6 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Minetest textdomain parachute x.x.x\n"
|
"Project-Id-Version: Minetest textdomain rp_parachute x.x.x\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: \n"
|
"POT-Creation-Date: \n"
|
||||||
"PO-Revision-Date: \n"
|
"PO-Revision-Date: \n"
|
@ -1,6 +1,6 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Minetest textdomain parachute x.x.x\n"
|
"Project-Id-Version: Minetest textdomain rp_parachute x.x.x\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: \n"
|
"POT-Creation-Date: \n"
|
||||||
"PO-Revision-Date: \n"
|
"PO-Revision-Date: \n"
|
@ -1,6 +1,6 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Minetest textdomain parachute x.x.x\n"
|
"Project-Id-Version: Minetest textdomain rp_parachute x.x.x\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: \n"
|
"POT-Creation-Date: \n"
|
||||||
"PO-Revision-Date: \n"
|
"PO-Revision-Date: \n"
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: parachute
|
# textdomain: rp_parachute
|
||||||
Parachute=Fallschirm
|
Parachute=Fallschirm
|
||||||
Lets you glide safely to the ground when falling=Damit gleitet man sicher im Sinkflug zu Boden
|
Lets you glide safely to the ground when falling=Damit gleitet man sicher im Sinkflug zu Boden
|
||||||
You can open the parachute only in air!=Fallschirm kann nur in der Luft geöffnet werden!
|
You can open the parachute only in air!=Fallschirm kann nur in der Luft geöffnet werden!
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: parachute
|
# textdomain: rp_parachute
|
||||||
Parachute=Parachute
|
Parachute=Parachute
|
||||||
Lets you glide safely to the ground when falling=Vous permet de planer jusqu'au sol en toute sécurité lors d'une chute
|
Lets you glide safely to the ground when falling=Vous permet de planer jusqu'au sol en toute sécurité lors d'une chute
|
||||||
You can open the parachute only in air!=Vous ne pouvez ouvrir le parachute que dans les airs !
|
You can open the parachute only in air!=Vous ne pouvez ouvrir le parachute que dans les airs !
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: parachute
|
# textdomain: rp_parachute
|
||||||
Parachute=Paracadute
|
Parachute=Paracadute
|
||||||
Lets you glide safely to the ground when falling=Permette di planare a terra in sicurezza quando si cade
|
Lets you glide safely to the ground when falling=Permette di planare a terra in sicurezza quando si cade
|
||||||
You can open the parachute only in air!=Puoi aprire il paracadute solo in aria!
|
You can open the parachute only in air!=Puoi aprire il paracadute solo in aria!
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: parachute
|
# textdomain: rp_parachute
|
||||||
Parachute=
|
Parachute=
|
||||||
Lets you glide safely to the ground when falling=
|
Lets you glide safely to the ground when falling=
|
||||||
You can open the parachute only in air!=
|
You can open the parachute only in air!=
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: parachute
|
# textdomain: rp_parachute
|
||||||
Parachute=Парашют
|
Parachute=Парашют
|
||||||
Lets you glide safely to the ground when falling=Позволяет тебе безопасно парить в воздухе во время падения
|
Lets you glide safely to the ground when falling=Позволяет тебе безопасно парить в воздухе во время падения
|
||||||
You can open the parachute only in air!=Ты можешь раскрыть парашют только в воздухе!
|
You can open the parachute only in air!=Ты можешь раскрыть парашют только в воздухе!
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: parachute
|
# textdomain: rp_parachute
|
||||||
Parachute=
|
Parachute=
|
||||||
Lets you glide safely to the ground when falling=
|
Lets you glide safely to the ground when falling=
|
||||||
You can open the parachute only in air!=
|
You can open the parachute only in air!=
|
@ -1,3 +1,3 @@
|
|||||||
name = parachute
|
name = rp_parachute
|
||||||
depends = rp_player, rp_crafting, rp_achievements
|
depends = rp_player, rp_crafting, rp_achievements
|
||||||
optional_depends = rp_itemdef_defaults
|
optional_depends = rp_itemdef_defaults
|
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 119 B After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 833 B After Width: | Height: | Size: 833 B |
Loading…
x
Reference in New Issue
Block a user