1
0
mirror of https://gitlab.com/echoes91/spears.git synced 2024-11-13 13:20:19 +01:00

Refinements and new textures

This commit is contained in:
echoes91 2020-04-19 21:53:10 +02:00
parent 119116b89e
commit fc1fd99541
10 changed files with 17 additions and 5 deletions

View File

@ -12,18 +12,21 @@ Spears can be used to fight, but are slower and weaker than swords.
Spears can be used to dig, but are slower and weaker and pickaxes.
You can grab a spear on the fly (or maybe wait until it falls).
If you feel even clever, throw a spear right above you and look at it to see what happens.
Someone was reported to have hit its own foot but it takes practice.
Someone once reported to have hit its own foot but it takes practice.
CHANGELOG
2.0:
- Cleaned, streamlined code without deprecated functions
- Spears hurt players
- Spears animated in flight
- Spears stick into nodes
- New sound when hitting flesh
- Changed receipt to fit with default tools
-
- New textures
- Drag depends on fluid
- New gold-plated spear to celebrate
1.1:
- Make use of new on_secondary_use API, requires Minetest 5.2.0

View File

@ -38,12 +38,17 @@ function spears_set_entity(spear_type, base_damage, toughness)
initial_properties = {
physical = false,
visual = "item",
visual_size = {x = 0.3, y = 0.3, z = 0.3},
visual_size = {x = 0.5, y = 0.5, z = 0.5},
wield_item = "spears:spear_" .. spear_type,
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
automatic_rotate = 10,
},
on_punch = function(self, puncher)
on_activate = function (self, staticdata, dtime_s)
self.object:set_armor_groups({immortal = 1})
end,
on_punch = function (self, puncher)
if puncher:is_player() then
local stack = {name='spears:spear_' .. spear_type, wear = self._wear}
local inv = puncher:get_inventory()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 252 B

View File

@ -4,7 +4,7 @@ function spears_register_spear(spear_type, desc, base_damage, toughness, materia
description = desc .. " spear",
wield_image = "spears_spear_" .. spear_type .. ".png",
inventory_image = "spears_spear_" .. spear_type .. ".png^[transform4",
wield_scale= {x=2,y=1,z=1},
wield_scale= {x = 2, y = 2, z = 1},
on_secondary_use = function(itemstack, user, pointed_thing)
spears_throw(itemstack, user, pointed_thing)
if not minetest.setting_getbool("creative_mode") then
@ -73,3 +73,7 @@ end
if not DISABLE_DIAMOND_SPEAR then
spears_register_spear('diamond', 'Diamond', 8, 40, 'default:diamond')
end
if not DISABLE_GOLD_SPEAR then
spears_register_spear('gold', 'Golden', 5, 40, 'default:gold_ingot')
end