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
Compare revisions
dd28424be7f26efdfa92db28260cf01cc3a6a752 to cb9ec2c5a5b0a0a39bb445454d5774d107b4f2cc
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
Illuna-Minetest/bows
Select target project
No results found
cb9ec2c5a5b0a0a39bb445454d5774d107b4f2cc
Select Git revision
Swap
Target
Illuna-Minetest/bows
Select target project
Illuna-Minetest/bows
1 result
dd28424be7f26efdfa92db28260cf01cc3a6a752
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
(re)add rainbow arrows
· cb9ec2c5
Milan
authored
5 years ago
cb9ec2c5
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
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
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.