Skip to content

Commit

Permalink
add aliases for items from other old projectile mods
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxionary committed Apr 15, 2024
1 parent 73c5510 commit 4309b82
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 15 deletions.
17 changes: 4 additions & 13 deletions 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")
Expand All @@ -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")
2 changes: 2 additions & 0 deletions 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")
14 changes: 14 additions & 0 deletions 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")
10 changes: 8 additions & 2 deletions 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

Expand Down

0 comments on commit 4309b82

Please sign in to comment.