From 7bde4a50aff0fc7b84ab2b87dd9082f2ee60b74c Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 22 Mar 2024 01:46:55 +0100 Subject: [PATCH] Rename 'parachute' mod to 'rp_parachute' --- mods/{parachute => rp_parachute}/README.txt | 2 +- mods/{parachute => rp_parachute}/init.lua | 54 ++++++++++++------ .../locale/poconvert/ar.po | 2 +- .../locale/poconvert/de.po | 2 +- .../locale/poconvert/fr.po | 2 +- .../locale/poconvert/it.po | 2 +- .../locale/poconvert/pt_BR.po | 2 +- .../locale/poconvert/ru.po | 2 +- .../locale/poconvert/template.pot | 2 +- .../locale/rp_parachute.de.tr} | 2 +- .../locale/rp_parachute.fr.tr} | 2 +- .../locale/rp_parachute.it.tr} | 2 +- .../locale/rp_parachute.pt_BR.tr} | 2 +- .../locale/rp_parachute.ru.tr} | 2 +- .../locale/template.txt | 2 +- mods/{parachute => rp_parachute}/mod.conf | 2 +- .../models/rp_parachute.b3d} | Bin .../models/rp_parachute.blend} | Bin .../sounds/rp_parachute_close.ogg} | Bin .../sounds/rp_parachute_fail.ogg} | Bin .../sounds/rp_parachute_open.ogg} | Bin .../textures/parachute_inventory.png | Bin .../textures/parachute_inventory.xcf | Bin .../textures/parachute_mesh.png | Bin .../textures/parachute_mesh.xcf | Bin .../rp_parachute_achievement_sky_diver.png | Bin 26 files changed, 51 insertions(+), 33 deletions(-) rename mods/{parachute => rp_parachute}/README.txt (80%) rename mods/{parachute => rp_parachute}/init.lua (89%) rename mods/{parachute => rp_parachute}/locale/poconvert/ar.po (95%) rename mods/{parachute => rp_parachute}/locale/poconvert/de.po (93%) rename mods/{parachute => rp_parachute}/locale/poconvert/fr.po (93%) rename mods/{parachute => rp_parachute}/locale/poconvert/it.po (93%) rename mods/{parachute => rp_parachute}/locale/poconvert/pt_BR.po (92%) rename mods/{parachute => rp_parachute}/locale/poconvert/ru.po (94%) rename mods/{parachute => rp_parachute}/locale/poconvert/template.pot (91%) rename mods/{parachute/locale/parachute.de.tr => rp_parachute/locale/rp_parachute.de.tr} (94%) rename mods/{parachute/locale/parachute.fr.tr => rp_parachute/locale/rp_parachute.fr.tr} (95%) rename mods/{parachute/locale/parachute.it.tr => rp_parachute/locale/rp_parachute.it.tr} (94%) rename mods/{parachute/locale/parachute.pt_BR.tr => rp_parachute/locale/rp_parachute.pt_BR.tr} (89%) rename mods/{parachute/locale/parachute.ru.tr => rp_parachute/locale/rp_parachute.ru.tr} (96%) rename mods/{parachute => rp_parachute}/locale/template.txt (89%) rename mods/{parachute => rp_parachute}/mod.conf (81%) rename mods/{parachute/models/parachute.b3d => rp_parachute/models/rp_parachute.b3d} (100%) rename mods/{parachute/models/parachute.blend => rp_parachute/models/rp_parachute.blend} (100%) rename mods/{parachute/sounds/parachute_close.ogg => rp_parachute/sounds/rp_parachute_close.ogg} (100%) rename mods/{parachute/sounds/parachute_fail.ogg => rp_parachute/sounds/rp_parachute_fail.ogg} (100%) rename mods/{parachute/sounds/parachute_open.ogg => rp_parachute/sounds/rp_parachute_open.ogg} (100%) rename mods/{parachute => rp_parachute}/textures/parachute_inventory.png (100%) rename mods/{parachute => rp_parachute}/textures/parachute_inventory.xcf (100%) rename mods/{parachute => rp_parachute}/textures/parachute_mesh.png (100%) rename mods/{parachute => rp_parachute}/textures/parachute_mesh.xcf (100%) rename mods/{parachute => rp_parachute}/textures/rp_parachute_achievement_sky_diver.png (100%) diff --git a/mods/parachute/README.txt b/mods/rp_parachute/README.txt similarity index 80% rename from mods/parachute/README.txt rename to mods/rp_parachute/README.txt index 6ec0c10e..59fff286 100644 --- a/mods/parachute/README.txt +++ b/mods/rp_parachute/README.txt @@ -10,6 +10,6 @@ Tweaked by Kaadmy and Wuzzy for Repixture. * Sound license: CC BY-SA 4.0 * 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. Original sound file downloaded from . diff --git a/mods/parachute/init.lua b/mods/rp_parachute/init.lua similarity index 89% rename from mods/parachute/init.lua rename to mods/rp_parachute/init.lua index f0ea978d..4322504f 100644 --- a/mods/parachute/init.lua +++ b/mods/rp_parachute/init.lua @@ -3,7 +3,7 @@ -- 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) @@ -150,7 +150,7 @@ local function open_parachute_for_player(player, play_sound, load_area) if rp_player.player_attached[name] 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 return false, "already_attached" end @@ -171,14 +171,14 @@ local function open_parachute_for_player(player, play_sound, load_area) local in_node = minetest.get_node(pos) if in_node.name == "ignore" 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 return false, "ignore" end - local obj = minetest.add_entity(ppos, "parachute:entity") + local obj = minetest.add_entity(ppos, "rp_parachute:entity") 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 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) 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 else 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 return false, fail_reason end end minetest.register_craftitem( - "parachute:parachute", { + "rp_parachute:parachute", { description = S("Parachute"), _tt_help = S("Lets you glide safely to the ground when falling"), inventory_image = "parachute_inventory.png", @@ -256,11 +256,11 @@ minetest.register_craftitem( }) minetest.register_entity( - "parachute:entity", + "rp_parachute:entity", { initial_properties = { visual = "mesh", - mesh = "parachute.b3d", + mesh = "rp_parachute.b3d", textures = {"parachute_mesh.png"}, pointable = false, physical = true, @@ -279,7 +279,7 @@ minetest.register_entity( ignore_mode = false, 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}) if dtime_s == 0 then local pos = self.object:get_pos() @@ -428,19 +428,19 @@ minetest.register_entity( else snd_object = self.object 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) 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 - minetest.log("action", "[parachute] Parachute getting destroyed at "..final_pos_str) + minetest.log("action", "[rp_parachute] Parachute getting destroyed at "..final_pos_str) end self.object:remove() end end, 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 rp_player.player_attached[self.attached] then 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 -- better than nothing. 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 ok, fail_reason = open_parachute_for_player(player, false, true) 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) @@ -478,7 +478,7 @@ end) crafting.register_craft( { - output = "parachute:parachute", + output = "rp_parachute:parachute", items = { "group:fuzzy 3", "rp_default:rope 4", @@ -497,3 +497,21 @@ achievements.register_achievement( icon = "rp_parachute_achievement_sky_diver.png", 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, +}) + diff --git a/mods/parachute/locale/poconvert/ar.po b/mods/rp_parachute/locale/poconvert/ar.po similarity index 95% rename from mods/parachute/locale/poconvert/ar.po rename to mods/rp_parachute/locale/poconvert/ar.po index 8a7897c8..6c02c006 100644 --- a/mods/parachute/locale/poconvert/ar.po +++ b/mods/rp_parachute/locale/poconvert/ar.po @@ -1,6 +1,6 @@ msgid "" 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" "POT-Creation-Date: \n" "PO-Revision-Date: 2024-02-27 21:56+0000\n" diff --git a/mods/parachute/locale/poconvert/de.po b/mods/rp_parachute/locale/poconvert/de.po similarity index 93% rename from mods/parachute/locale/poconvert/de.po rename to mods/rp_parachute/locale/poconvert/de.po index 7714fb0f..84bff9f2 100644 --- a/mods/parachute/locale/poconvert/de.po +++ b/mods/rp_parachute/locale/poconvert/de.po @@ -1,6 +1,6 @@ msgid "" 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" "POT-Creation-Date: \n" "PO-Revision-Date: \n" diff --git a/mods/parachute/locale/poconvert/fr.po b/mods/rp_parachute/locale/poconvert/fr.po similarity index 93% rename from mods/parachute/locale/poconvert/fr.po rename to mods/rp_parachute/locale/poconvert/fr.po index 324bbbc2..e8a3f3ff 100644 --- a/mods/parachute/locale/poconvert/fr.po +++ b/mods/rp_parachute/locale/poconvert/fr.po @@ -1,6 +1,6 @@ msgid "" 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" "POT-Creation-Date: \n" "PO-Revision-Date: \n" diff --git a/mods/parachute/locale/poconvert/it.po b/mods/rp_parachute/locale/poconvert/it.po similarity index 93% rename from mods/parachute/locale/poconvert/it.po rename to mods/rp_parachute/locale/poconvert/it.po index 6470e395..c61760df 100644 --- a/mods/parachute/locale/poconvert/it.po +++ b/mods/rp_parachute/locale/poconvert/it.po @@ -1,6 +1,6 @@ msgid "" 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" "POT-Creation-Date: \n" "PO-Revision-Date: \n" diff --git a/mods/parachute/locale/poconvert/pt_BR.po b/mods/rp_parachute/locale/poconvert/pt_BR.po similarity index 92% rename from mods/parachute/locale/poconvert/pt_BR.po rename to mods/rp_parachute/locale/poconvert/pt_BR.po index 3190dcd5..f87d071e 100644 --- a/mods/parachute/locale/poconvert/pt_BR.po +++ b/mods/rp_parachute/locale/poconvert/pt_BR.po @@ -1,6 +1,6 @@ msgid "" 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" "POT-Creation-Date: \n" "PO-Revision-Date: \n" diff --git a/mods/parachute/locale/poconvert/ru.po b/mods/rp_parachute/locale/poconvert/ru.po similarity index 94% rename from mods/parachute/locale/poconvert/ru.po rename to mods/rp_parachute/locale/poconvert/ru.po index 7c14ac4f..fb6b3fd7 100644 --- a/mods/parachute/locale/poconvert/ru.po +++ b/mods/rp_parachute/locale/poconvert/ru.po @@ -1,6 +1,6 @@ msgid "" 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" "POT-Creation-Date: \n" "PO-Revision-Date: \n" diff --git a/mods/parachute/locale/poconvert/template.pot b/mods/rp_parachute/locale/poconvert/template.pot similarity index 91% rename from mods/parachute/locale/poconvert/template.pot rename to mods/rp_parachute/locale/poconvert/template.pot index 4247603a..29bca5a9 100644 --- a/mods/parachute/locale/poconvert/template.pot +++ b/mods/rp_parachute/locale/poconvert/template.pot @@ -1,6 +1,6 @@ msgid "" 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" "POT-Creation-Date: \n" "PO-Revision-Date: \n" diff --git a/mods/parachute/locale/parachute.de.tr b/mods/rp_parachute/locale/rp_parachute.de.tr similarity index 94% rename from mods/parachute/locale/parachute.de.tr rename to mods/rp_parachute/locale/rp_parachute.de.tr index d2c0c574..b3e0654f 100644 --- a/mods/parachute/locale/parachute.de.tr +++ b/mods/rp_parachute/locale/rp_parachute.de.tr @@ -1,4 +1,4 @@ -# textdomain: parachute +# textdomain: rp_parachute Parachute=Fallschirm 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! diff --git a/mods/parachute/locale/parachute.fr.tr b/mods/rp_parachute/locale/rp_parachute.fr.tr similarity index 95% rename from mods/parachute/locale/parachute.fr.tr rename to mods/rp_parachute/locale/rp_parachute.fr.tr index 448ffe36..b27e1f1c 100644 --- a/mods/parachute/locale/parachute.fr.tr +++ b/mods/rp_parachute/locale/rp_parachute.fr.tr @@ -1,4 +1,4 @@ -# textdomain: parachute +# textdomain: rp_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 You can open the parachute only in air!=Vous ne pouvez ouvrir le parachute que dans les airs ! diff --git a/mods/parachute/locale/parachute.it.tr b/mods/rp_parachute/locale/rp_parachute.it.tr similarity index 94% rename from mods/parachute/locale/parachute.it.tr rename to mods/rp_parachute/locale/rp_parachute.it.tr index b8c99951..0969cb81 100644 --- a/mods/parachute/locale/parachute.it.tr +++ b/mods/rp_parachute/locale/rp_parachute.it.tr @@ -1,4 +1,4 @@ -# textdomain: parachute +# textdomain: rp_parachute Parachute=Paracadute 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! diff --git a/mods/parachute/locale/parachute.pt_BR.tr b/mods/rp_parachute/locale/rp_parachute.pt_BR.tr similarity index 89% rename from mods/parachute/locale/parachute.pt_BR.tr rename to mods/rp_parachute/locale/rp_parachute.pt_BR.tr index fb453d8b..396e474d 100644 --- a/mods/parachute/locale/parachute.pt_BR.tr +++ b/mods/rp_parachute/locale/rp_parachute.pt_BR.tr @@ -1,4 +1,4 @@ -# textdomain: parachute +# textdomain: rp_parachute Parachute= Lets you glide safely to the ground when falling= You can open the parachute only in air!= diff --git a/mods/parachute/locale/parachute.ru.tr b/mods/rp_parachute/locale/rp_parachute.ru.tr similarity index 96% rename from mods/parachute/locale/parachute.ru.tr rename to mods/rp_parachute/locale/rp_parachute.ru.tr index 7ae988ea..1be71ecf 100644 --- a/mods/parachute/locale/parachute.ru.tr +++ b/mods/rp_parachute/locale/rp_parachute.ru.tr @@ -1,4 +1,4 @@ -# textdomain: parachute +# textdomain: rp_parachute Parachute=Парашют Lets you glide safely to the ground when falling=Позволяет тебе безопасно парить в воздухе во время падения You can open the parachute only in air!=Ты можешь раскрыть парашют только в воздухе! diff --git a/mods/parachute/locale/template.txt b/mods/rp_parachute/locale/template.txt similarity index 89% rename from mods/parachute/locale/template.txt rename to mods/rp_parachute/locale/template.txt index fb453d8b..396e474d 100644 --- a/mods/parachute/locale/template.txt +++ b/mods/rp_parachute/locale/template.txt @@ -1,4 +1,4 @@ -# textdomain: parachute +# textdomain: rp_parachute Parachute= Lets you glide safely to the ground when falling= You can open the parachute only in air!= diff --git a/mods/parachute/mod.conf b/mods/rp_parachute/mod.conf similarity index 81% rename from mods/parachute/mod.conf rename to mods/rp_parachute/mod.conf index 4d8c461a..13a0eede 100644 --- a/mods/parachute/mod.conf +++ b/mods/rp_parachute/mod.conf @@ -1,3 +1,3 @@ -name = parachute +name = rp_parachute depends = rp_player, rp_crafting, rp_achievements optional_depends = rp_itemdef_defaults diff --git a/mods/parachute/models/parachute.b3d b/mods/rp_parachute/models/rp_parachute.b3d similarity index 100% rename from mods/parachute/models/parachute.b3d rename to mods/rp_parachute/models/rp_parachute.b3d diff --git a/mods/parachute/models/parachute.blend b/mods/rp_parachute/models/rp_parachute.blend similarity index 100% rename from mods/parachute/models/parachute.blend rename to mods/rp_parachute/models/rp_parachute.blend diff --git a/mods/parachute/sounds/parachute_close.ogg b/mods/rp_parachute/sounds/rp_parachute_close.ogg similarity index 100% rename from mods/parachute/sounds/parachute_close.ogg rename to mods/rp_parachute/sounds/rp_parachute_close.ogg diff --git a/mods/parachute/sounds/parachute_fail.ogg b/mods/rp_parachute/sounds/rp_parachute_fail.ogg similarity index 100% rename from mods/parachute/sounds/parachute_fail.ogg rename to mods/rp_parachute/sounds/rp_parachute_fail.ogg diff --git a/mods/parachute/sounds/parachute_open.ogg b/mods/rp_parachute/sounds/rp_parachute_open.ogg similarity index 100% rename from mods/parachute/sounds/parachute_open.ogg rename to mods/rp_parachute/sounds/rp_parachute_open.ogg diff --git a/mods/parachute/textures/parachute_inventory.png b/mods/rp_parachute/textures/parachute_inventory.png similarity index 100% rename from mods/parachute/textures/parachute_inventory.png rename to mods/rp_parachute/textures/parachute_inventory.png diff --git a/mods/parachute/textures/parachute_inventory.xcf b/mods/rp_parachute/textures/parachute_inventory.xcf similarity index 100% rename from mods/parachute/textures/parachute_inventory.xcf rename to mods/rp_parachute/textures/parachute_inventory.xcf diff --git a/mods/parachute/textures/parachute_mesh.png b/mods/rp_parachute/textures/parachute_mesh.png similarity index 100% rename from mods/parachute/textures/parachute_mesh.png rename to mods/rp_parachute/textures/parachute_mesh.png diff --git a/mods/parachute/textures/parachute_mesh.xcf b/mods/rp_parachute/textures/parachute_mesh.xcf similarity index 100% rename from mods/parachute/textures/parachute_mesh.xcf rename to mods/rp_parachute/textures/parachute_mesh.xcf diff --git a/mods/parachute/textures/rp_parachute_achievement_sky_diver.png b/mods/rp_parachute/textures/rp_parachute_achievement_sky_diver.png similarity index 100% rename from mods/parachute/textures/rp_parachute_achievement_sky_diver.png rename to mods/rp_parachute/textures/rp_parachute_achievement_sky_diver.png