From 4309b82b6fa30ae1a5468446b2351eaa2e619802 Mon Sep 17 00:00:00 2001 From: flux <25628292+fluxionary@users.noreply.github.com> Date: Mon, 15 Apr 2024 13:45:23 -0700 Subject: [PATCH] add aliases for items from other old projectile mods --- compat/bows.lua | 17 ++++------------- compat/init.lua | 2 ++ compat/projectile.lua | 14 ++++++++++++++ settingtypes.txt | 10 ++++++++-- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/compat/bows.lua b/compat/bows.lua index 548045d..2d5dc67 100644 --- a/compat/bows.lua +++ b/compat/bows.lua @@ -1,3 +1,7 @@ +if not y_bows.settings.alias_bows then + return +end + minetest.register_alias("bows:bow_wood", "y_bows:bow_wood") minetest.register_alias("bows:bow_steel", "y_bows:bow_steel") minetest.register_alias("bows:bow_bronze", "y_bows:bow_steel") @@ -7,16 +11,3 @@ minetest.register_alias("bows:arrow", "y_bows:arrow_wood") minetest.register_alias("bows:arrow_steel", "y_bows:arrow_steel") minetest.register_alias("bows:arrow_mese", "y_bows:arrow_mese") minetest.register_alias("bows:arrow_diamond", "y_bows:arrow_diamond") - --- projectile - -minetest.register_alias("projectile:bow", "y_bows:bow_wood") -minetest.register_alias("projectile:steel_bow", "y_bows:bow_steel") - -minetest.register_alias("projectile:arrow", "y_bows:arrow_steel") -minetest.register_alias("projectile:arrow_high_velocity", "y_bows:arrow_diamond") -minetest.register_alias("projectile:arrow_fire", "y_bows:arrow_fire") - -minetest.register_alias("projectile:slingshot", "y_bows:slingshot_wood") -minetest.register_alias("projectile:steel_slingshot", "y_bows:slingshot_steel") -minetest.register_alias("projectile:rock", "y_bows:ball_rock") diff --git a/compat/init.lua b/compat/init.lua index 7803538..8d815b6 100644 --- a/compat/init.lua +++ b/compat/init.lua @@ -1,4 +1,6 @@ +y_bows.dofile("compat", "bows") y_bows.dofile("compat", "cucina_vegana") y_bows.dofile("compat", "farming_redo") y_bows.dofile("compat", "mesecons") +y_bows.dofile("compat", "projectile") y_bows.dofile("compat", "x_bows") diff --git a/compat/projectile.lua b/compat/projectile.lua index e69de29..661967a 100644 --- a/compat/projectile.lua +++ b/compat/projectile.lua @@ -0,0 +1,14 @@ +if not y_bows.settings.alias_projectile then + return +end + +minetest.register_alias("projectile:bow", "y_bows:bow_wood") +minetest.register_alias("projectile:steel_bow", "y_bows:bow_steel") + +minetest.register_alias("projectile:arrow", "y_bows:arrow_steel") +minetest.register_alias("projectile:arrow_high_velocity", "y_bows:arrow_diamond") +minetest.register_alias("projectile:arrow_fire", "y_bows:arrow_fire") + +minetest.register_alias("projectile:slingshot", "y_bows:slingshot_wood") +minetest.register_alias("projectile:steel_slingshot", "y_bows:slingshot_steel") +minetest.register_alias("projectile:rock", "y_bows:ball_rock") diff --git a/settingtypes.txt b/settingtypes.txt index 23708b2..cc112cc 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -1,5 +1,11 @@ -# when true, x_bows items will be aliased to y_bows items. -y_bows:alias_x_bows (alias x_bows items) bool true +# when true, x_bows mod items will be aliased to y_bows items. +y_bows:alias_x_bows (alias x_bows mod items) bool true + +# when true, bows mod items will be aliased to y_bows items. +y_bows:alias_bows (alias bows mod items) bool true + +# when true, projectile mod items will be aliased to y_bows items. +y_bows:alias_projectile (alias projectile mod items) bool true y_bows:arrows_per_craft (arrows per craft) int 4 1 65535