Improve arrow visibility

This commit is contained in:
Juraj Vajda 2022-10-24 16:31:23 -04:00
parent b4dea2e88c
commit 57dcb1d4d2
5 changed files with 24 additions and 8 deletions

View File

@ -197,6 +197,7 @@ function XBows.register_bow(self, name, def, override)
inventory_image = def.inventory_image or 'x_bows_bow_wood.png',
wield_image = def.wield_image or def.inventory_image,
groups = def.groups,
wield_scale = {x = 2, y = 2, z = 1.5},
---@param itemstack ItemStack
---@param placer ObjectRef|nil
---@param pointed_thing PointedThingDef
@ -223,6 +224,7 @@ function XBows.register_bow(self, name, def, override)
inventory_image = def.custom.inventory_image_charged or 'x_bows_bow_wood_charged.png',
wield_image = def.custom.wield_image_charged or def.custom.inventory_image_charged,
groups = def.custom.groups_charged,
wield_scale = {x = 2, y = 2, z = 1.5},
---@param itemstack ItemStack
---@param user ObjectRef|nil
---@param pointed_thing PointedThingDef
@ -1334,7 +1336,8 @@ function XBows.register_entity(self, name, def)
physical = false,
textures = {'air'},
hp_max = 1,
visual_size = {x = 1, y = 1, z = 1}
visual_size = {x = 1, y = 1, z = 1},
glow = 1
}, def.initial_properties or {})
def.on_death = function(selfObj, killer)

View File

@ -46,6 +46,7 @@ minetest.register_globalstep(function(dtime)
end
if minetest.get_item_group(wielded_stack_name, 'bow_charged') ~= 0 and not XBows.player_bow_sneak[player_name].sneak then
--charged weapon
if XBows.playerphysics then
playerphysics.add_physics_factor(player, 'speed', 'x_bows:bow_charged_speed', 0.25)
elseif XBows.player_monoids then

Binary file not shown.

View File

@ -1,8 +1,8 @@
XBows:register_particle_effect('arrow', {
amount = 1,
time = 0.1,
minexptime = 1,
maxexptime = 1,
minexptime = 0.5,
maxexptime = 0.5,
minsize = 2,
maxsize = 2,
texture = 'x_bows_arrow_particle.png',
@ -12,11 +12,15 @@ XBows:register_particle_effect('arrow', {
aspect_h = 8,
length = 1,
},
glow = 1
glow = 1,
minvel = {x = 0, y = -0.1, z = 0},
maxvel = {x = 0, y = -0.1, z = 0},
minacc = {x = 0, y = -0.1, z = 0},
maxacc = {x = 0, y = -0.1, z = 0}
})
XBows:register_particle_effect('arrow_crit', {
amount = 3,
amount = 1,
time = 0.1,
minexptime = 0.5,
maxexptime = 0.5,
@ -29,11 +33,15 @@ XBows:register_particle_effect('arrow_crit', {
aspect_h = 8,
length = 1,
},
glow = 1
glow = 1,
minvel = {x = 0, y = -0.1, z = 0},
maxvel = {x = 0, y = -0.1, z = 0},
minacc = {x = 0, y = -0.1, z = 0},
maxacc = {x = 0, y = -0.1, z = 0}
})
XBows:register_particle_effect('arrow_fast', {
amount = 3,
amount = 1,
time = 0.1,
minexptime = 0.5,
maxexptime = 0.5,
@ -46,7 +54,11 @@ XBows:register_particle_effect('arrow_fast', {
aspect_h = 8,
length = 1,
},
glow = 1
glow = 1,
minvel = {x = 0, y = -0.1, z = 0},
maxvel = {x = 0, y = -0.1, z = 0},
minacc = {x = 0, y = -0.1, z = 0},
maxacc = {x = 0, y = -0.1, z = 0}
})
XBows:register_particle_effect('bubble', {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 235 B