diff --git a/LICENSE.txt b/LICENSE.txt index 7fe94c9..a6ab12c 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -453,3 +453,109 @@ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +### Code + +GNU Lesser General Public License v2.1 or later + +### Textures + +**CC-BY-SA-4.0, Pixel Perfection by XSSheep**, https://minecraft.curseforge.com/projects/pixel-perfection-freshly-updated + +- x_bows_arrow_particle.png +- x_bows_bubble.png + +**CC-BY-SA-3.0, by paramat** + +- x_bows_hotbar_selected.png +- x_bows_quiver_hotbar.png +- x_bows_single_hotbar.png + +**CC-BY-SA-4.0, by SaKeL** + +- x_bows_quiver.png +- x_bows_quiver_open.png +- x_bows_arrow_slot.png +- x_bows_arrow_mesh.png +- x_bows_quiver_mesh.png +- x_bows_quiver_empty_mesh.png +- x_bows_quiver_blank_mesh.png +- x_bows_quiver_slot.png +- x_bows_dmg_0.png +- x_bows_dmg_1.png +- x_bows_dmg_2.png +- x_bows_dmg_3.png +- x_bows_dmg_4.png +- x_bows_dmg_5.png +- x_bows_dmg_6.png +- x_bows_dmg_7.png +- x_bows_dmg_8.png +- x_bows_dmg_9.png +- x_bows_bow_wood.png +- x_bows_bow_wood_charged.png +- x_bows_arrow_wood.png +- x_bows_arrow_stone.png +- x_bows_arrow_bronze.png +- x_bows_arrow_steel.png +- x_bows_arrow_mese.png +- x_bows_arrow_diamond.png +- x_bows_target.png + +### Sounds + +**Creative Commons License, EminYILDIRIM**, https://freesound.org + +- x_bows_bow_load.1.ogg +- x_bows_bow_load.2.ogg +- x_bows_bow_load.3.ogg + +**Creative Commons License, bay_area_bob**, https://freesound.org + +- x_bows_bow_loaded.ogg + +**Creative Commons License**, https://freesound.org + +- x_bows_bow_shoot_crit.ogg + +**Creative Commons License, robinhood76**, https://freesound.org + +- x_bows_arrow_hit.1.ogg +- x_bows_arrow_hit.2.ogg +- x_bows_arrow_hit.3.ogg + +**Creative Commons License, brendan89**, https://freesound.org + +- x_bows_bow_shoot.1.ogg + +**Creative Commons License, natty23**, https://freesound.org + +- x_bows_arrow_successful_hit.ogg + +**Creative Commons License, Shamewap**, https://freesound.org + +- x_bows_quiver.1.ogg +- x_bows_quiver.2.ogg +- x_bows_quiver.3.ogg +- x_bows_quiver.4.ogg +- x_bows_quiver.5.ogg +- x_bows_quiver.6.ogg +- x_bows_quiver.7.ogg +- x_bows_quiver.8.ogg +- x_bows_quiver.9.ogg + +### Models + +**CC-BY-SA-4.0, by SaKeL** + +- x_bows_arrow.obj +- x_bows_arrow.blend + +**Original model by MirceaKitsune (CC BY-SA 3.0).** +**Various alterations and fixes by kilbith, sofar, xunto, Rogier-5, TeTpaAka, Desour, stujones11, An0n3m0us (CC BY-SA 3.0):** + +Modified by SaKeL (added quiver): + +- x_bows_3d_armor_character.b3d +- x_bows_3d_armor_character.blend +- x_bows_character.b3d +- x_bows_character.blend diff --git a/README.md b/README.md index b9de0d7..4406375 100644 --- a/README.md +++ b/README.md @@ -94,114 +94,7 @@ There are few indications on how to know when the bow shot arrow from quiver: ## License: -### Code - -GNU Lesser General Public License v2.1 or later (see included LICENSE file) - -### Textures - -**CC BY-SA 4.0, Pixel Perfection by XSSheep**, https://minecraft.curseforge.com/projects/pixel-perfection-freshly-updated - -- x_bows_bow_wood.png -- x_bows_bow_wood_charged.png -- x_bows_arrow_wood.png -- x_bows_arrow_particle.png -- x_bows_bubble.png -- x_bows_target.png - -Modified by SaKeL: - -- x_bows_arrow_stone.png -- x_bows_arrow_bronze.png -- x_bows_arrow_steel.png -- x_bows_arrow_mese.png -- x_bows_arrow_diamond.png - -**CC-BY-SA-3.0, by paramat** - -- x_bows_hotbar_selected.png -- x_bows_quiver_hotbar.png -- x_bows_single_hotbar.png - -**LGPL-2.1-or-later, by SaKeL** - -- x_bows_quiver.png -- x_bows_quiver_open.png -- x_bows_arrow_slot.png -- x_bows_arrow_mesh.png -- x_bows_quiver_mesh.png -- x_bows_quiver_empty_mesh.png -- x_bows_quiver_blank_mesh.png -- x_bows_quiver_slot.png -- x_bows_dmg_0.png -- x_bows_dmg_1.png -- x_bows_dmg_2.png -- x_bows_dmg_3.png -- x_bows_dmg_4.png -- x_bows_dmg_5.png -- x_bows_dmg_6.png -- x_bows_dmg_7.png -- x_bows_dmg_8.png -- x_bows_dmg_9.png - -### Sounds - -**Creative Commons License, EminYILDIRIM**, https://freesound.org - -- x_bows_bow_load.1.ogg -- x_bows_bow_load.2.ogg -- x_bows_bow_load.3.ogg - -**Creative Commons License, bay_area_bob**, https://freesound.org - -- x_bows_bow_loaded.ogg - -**Creative Commons License**, https://freesound.org - -- x_bows_bow_shoot_crit.ogg - -**Creative Commons License, robinhood76**, https://freesound.org - -- x_bows_arrow_hit.1.ogg -- x_bows_arrow_hit.2.ogg -- x_bows_arrow_hit.3.ogg - -**Creative Commons License, brendan89**, https://freesound.org - -- x_bows_bow_shoot.1.ogg - -**Creative Commons License, natty23**, https://freesound.org - -- x_bows_arrow_successful_hit.ogg - -**Creative Commons License, Shamewap**, https://freesound.org - -- x_bows_quiver.1.ogg -- x_bows_quiver.2.ogg -- x_bows_quiver.3.ogg -- x_bows_quiver.4.ogg -- x_bows_quiver.5.ogg -- x_bows_quiver.6.ogg -- x_bows_quiver.7.ogg -- x_bows_quiver.8.ogg -- x_bows_quiver.9.ogg - -### Models - -**LGPL-2.1-or-later, by SaKeL** - -- x_bows_arrow.obj -- x_bows_arrow.blend - -**Original model by MirceaKitsune (CC BY-SA 3.0).** -**Various alterations and fixes by kilbith, sofar, xunto, Rogier-5, TeTpaAka, Desour, stujones11, An0n3m0us (CC BY-SA 3.0):** - -Modified by SaKeL (added quiver): - -- x_bows_3d_armor_character.b3d -- x_bows_3d_armor_character.blend -- x_bows_character.b3d -- x_bows_character.blend +- see included LICENSE.txt file ## Installation diff --git a/api.lua b/api.lua index ff814fc..3376b8e 100644 --- a/api.lua +++ b/api.lua @@ -651,6 +651,11 @@ function XBows.shoot(self, itemstack, user, pointed_thing) local tflp = (time_shoot - time_load) / 1000000 ---@type ItemStack local arrow_itemstack = ItemStack(minetest.deserialize(meta:get_string('arrow_itemstack_string'))) + + if arrow_itemstack:is_empty() then + return itemstack + end + local arrow_itemstack_meta = arrow_itemstack:get_meta() local arrow_name = arrow_itemstack:get_name() local is_arrow_from_quiver = arrow_itemstack_meta:get_int('is_arrow_from_quiver') @@ -741,6 +746,9 @@ function XBows.shoot(self, itemstack, user, pointed_thing) sound_name = x_bows_registered_bow_charged_def.custom.sound_shoot_crit end + -- remove arrow meta to prevent multiple shots while waiting for async `after` + meta:set_string('arrow_itemstack_string', '') + ---stop punching close objects/nodes when shooting minetest.after(0.2, function() local wield_item = user:get_wielded_item() diff --git a/textures/x_bows_arrow_bronze.png b/textures/x_bows_arrow_bronze.png index 074ace8..f99efa6 100644 Binary files a/textures/x_bows_arrow_bronze.png and b/textures/x_bows_arrow_bronze.png differ diff --git a/textures/x_bows_arrow_diamond.png b/textures/x_bows_arrow_diamond.png index 542c497..88dcbd7 100644 Binary files a/textures/x_bows_arrow_diamond.png and b/textures/x_bows_arrow_diamond.png differ diff --git a/textures/x_bows_arrow_mese.png b/textures/x_bows_arrow_mese.png index aa4f0f8..3765187 100644 Binary files a/textures/x_bows_arrow_mese.png and b/textures/x_bows_arrow_mese.png differ diff --git a/textures/x_bows_arrow_mesh.png b/textures/x_bows_arrow_mesh.png index 21aae46..9fc0935 100644 Binary files a/textures/x_bows_arrow_mesh.png and b/textures/x_bows_arrow_mesh.png differ diff --git a/textures/x_bows_arrow_slot.png b/textures/x_bows_arrow_slot.png index 045d9d7..41e815d 100644 Binary files a/textures/x_bows_arrow_slot.png and b/textures/x_bows_arrow_slot.png differ diff --git a/textures/x_bows_arrow_steel.png b/textures/x_bows_arrow_steel.png index edde5fa..b139b70 100644 Binary files a/textures/x_bows_arrow_steel.png and b/textures/x_bows_arrow_steel.png differ diff --git a/textures/x_bows_arrow_stone.png b/textures/x_bows_arrow_stone.png index 35086a0..9defc2a 100644 Binary files a/textures/x_bows_arrow_stone.png and b/textures/x_bows_arrow_stone.png differ diff --git a/textures/x_bows_arrow_wood.png b/textures/x_bows_arrow_wood.png index 47c472c..4a63d3d 100644 Binary files a/textures/x_bows_arrow_wood.png and b/textures/x_bows_arrow_wood.png differ diff --git a/textures/x_bows_bow_wood.png b/textures/x_bows_bow_wood.png index e895ef1..d606d57 100644 Binary files a/textures/x_bows_bow_wood.png and b/textures/x_bows_bow_wood.png differ diff --git a/textures/x_bows_bow_wood_charged.png b/textures/x_bows_bow_wood_charged.png index 205220f..63bceb9 100644 Binary files a/textures/x_bows_bow_wood_charged.png and b/textures/x_bows_bow_wood_charged.png differ diff --git a/textures/x_bows_target.png b/textures/x_bows_target.png index 7799aec..64bc0e2 100644 Binary files a/textures/x_bows_target.png and b/textures/x_bows_target.png differ