Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bows
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
bows
Commits
cb9ec2c5
Commit
cb9ec2c5
authored
5 years ago
by
Milan
Browse files
Options
Downloads
Patches
Plain Diff
(re)add rainbow arrows
parent
dd28424b
Branches
master
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
items.lua
+14
-0
14 additions, 0 deletions
items.lua
items_functions.lua
+47
-0
47 additions, 0 deletions
items_functions.lua
with
61 additions
and
0 deletions
items.lua
+
14
−
0
View file @
cb9ec2c5
...
...
@@ -181,3 +181,17 @@ bows.register_arrow("arrow_toxic",{
{
"group:arrow"
,
"default:papyrus"
},
}
})
bows
.
register_arrow
(
"arrow_rainbow"
,{
description
=
"Rainbow arrow"
,
texture
=
"bows_arrow_wood.png^bows_rainbow.png"
,
craft_count
=
8
,
damage
=
11
,
--[[ craft={
{"group:arrow","group:arrow","group:arrow"},
{"group:arrow","bows:rainbow","group:arrow"},
{"group:arrow","group:arrow","group:arrow"}
},]]
on_step
=
bows
.
arrow_rainbow_step
,
on_hit_object
=
bows
.
arrow_rainbow_object
})
This diff is collapsed.
Click to expand it.
items_functions.lua
+
47
−
0
View file @
cb9ec2c5
...
...
@@ -42,3 +42,50 @@ bows.arrow_admin_node=function(self,pos,user,lastpos)
bows
.
arrow_remove
(
self
)
return
self
end
bows
.
arrow_rainbow_step
=
function
(
self
,
dtime
,
user
,
pos
,
lastpos
)
minetest
.
add_particlespawner
({
amount
=
20
,
time
=
0
.
5
,
minpos
=
pos
,
maxpos
=
pos
,
minvel
=
{
x
=-
1
,
y
=-
1
,
z
=-
1
},
maxvel
=
{
x
=
1
,
y
=-
0
.
5
,
z
=
1
},
minacc
=
{
x
=
0
,
y
=
0
,
z
=
0
},
maxacc
=
{
x
=
0
,
y
=
0
,
z
=
0
},
minexptime
=
1
.
0
,
maxexptime
=
1
.
5
,
minsize
=
1
.
6
,
maxsize
=
0
.
2
,
texture
=
"bows_rainbow.png"
,
})
end
bows
.
arrow_rainbow_object
=
function
(
self
,
target
,
hp
,
user
,
lastpos
)
local
pos
=
target
:
get_pos
()
minetest
.
add_particle
({
pos
=
pos
,
velocity
=
vector
.
new
(),
acceleration
=
vector
.
new
(),
expirationtime
=
0
.
4
,
size
=
20
,
collisiondetection
=
true
,
vertical
=
false
,
texture
=
"bows_rainbow.png"
,
})
minetest
.
add_particlespawner
({
amount
=
100
,
time
=
0
.
5
,
minpos
=
vector
.
subtract
(
pos
,
3
),
maxpos
=
vector
.
add
(
pos
,
3
),
minvel
=
{
x
=
-
10
,
y
=
-
10
,
z
=
-
10
},
maxvel
=
{
x
=
10
,
y
=
10
,
z
=
10
},
minacc
=
vector
.
new
(),
maxacc
=
vector
.
new
(),
minexptime
=
1
,
maxexptime
=
2
.
5
,
minsize
=
3
,
maxsize
=
9
,
texture
=
"bows_rainbow.png"
,
})
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment