Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
illuna-minetest
Commits
d7b3046c
Commit
d7b3046c
authored
10 years ago
by
Calinou
Committed by
Craig Robbins
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Make dropped items larger and rotate faster
Signed-off-by:
Craig Robbins
<
kde.psych@gmail.com
>
parent
f0cd5903
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
builtin/game/item_entity.lua
+12
-12
12 additions, 12 deletions
builtin/game/item_entity.lua
with
12 additions
and
12 deletions
builtin/game/item_entity.lua
+
12
−
12
View file @
d7b3046c
...
@@ -21,9 +21,9 @@ core.register_entity(":__builtin:item", {
...
@@ -21,9 +21,9 @@ core.register_entity(":__builtin:item", {
hp_max
=
1
,
hp_max
=
1
,
physical
=
true
,
physical
=
true
,
collide_with_objects
=
false
,
collide_with_objects
=
false
,
collisionbox
=
{
-
0
.
24
,
-
0
.
24
,
-
0
.
24
,
0
.
24
,
0
.
24
,
0
.
24
},
collisionbox
=
{
-
0
.
3
,
-
0
.
3
,
-
0
.
3
,
0
.
3
,
0
.
3
,
0
.
3
},
visual
=
"wielditem"
,
visual
=
"wielditem"
,
visual_size
=
{
x
=
0
.
3
,
y
=
0
.
3
},
visual_size
=
{
x
=
0
.
4
,
y
=
0
.
4
},
textures
=
{
""
},
textures
=
{
""
},
spritediv
=
{
x
=
1
,
y
=
1
},
spritediv
=
{
x
=
1
,
y
=
1
},
initial_sprite_basepos
=
{
x
=
0
,
y
=
0
},
initial_sprite_basepos
=
{
x
=
0
,
y
=
0
},
...
@@ -43,8 +43,8 @@ core.register_entity(":__builtin:item", {
...
@@ -43,8 +43,8 @@ core.register_entity(":__builtin:item", {
count
=
max_count
count
=
max_count
self
.
itemstring
=
stack
:
get_name
()
..
" "
..
max_count
self
.
itemstring
=
stack
:
get_name
()
..
" "
..
max_count
end
end
local
s
=
0
.
15
+
0
.
1
5
*
(
count
/
max_count
)
local
s
=
0
.
2
+
0
.
1
*
(
count
/
max_count
)
local
c
=
0
.
8
*
s
local
c
=
s
local
itemtable
=
stack
:
to_table
()
local
itemtable
=
stack
:
to_table
()
local
itemname
=
nil
local
itemname
=
nil
if
itemtable
then
if
itemtable
then
...
@@ -62,7 +62,7 @@ core.register_entity(":__builtin:item", {
...
@@ -62,7 +62,7 @@ core.register_entity(":__builtin:item", {
textures
=
{
itemname
},
textures
=
{
itemname
},
visual_size
=
{
x
=
s
,
y
=
s
},
visual_size
=
{
x
=
s
,
y
=
s
},
collisionbox
=
{
-
c
,
-
c
,
-
c
,
c
,
c
,
c
},
collisionbox
=
{
-
c
,
-
c
,
-
c
,
c
,
c
,
c
},
automatic_rotate
=
math.pi
*
0
.
2
,
automatic_rotate
=
math.pi
*
0
.
5
,
}
}
self
.
object
:
set_properties
(
prop
)
self
.
object
:
set_properties
(
prop
)
end
,
end
,
...
@@ -104,7 +104,7 @@ core.register_entity(":__builtin:item", {
...
@@ -104,7 +104,7 @@ core.register_entity(":__builtin:item", {
return
return
end
end
local
p
=
self
.
object
:
getpos
()
local
p
=
self
.
object
:
getpos
()
p
.
y
=
p
.
y
-
0
.
3
p
.
y
=
p
.
y
-
0
.
5
local
nn
=
core
.
get_node
(
p
).
name
local
nn
=
core
.
get_node
(
p
).
name
-- If node is not registered or node is walkably solid and resting on nodebox
-- If node is not registered or node is walkably solid and resting on nodebox
local
v
=
self
.
object
:
getvelocity
()
local
v
=
self
.
object
:
getvelocity
()
...
@@ -133,8 +133,8 @@ core.register_entity(":__builtin:item", {
...
@@ -133,8 +133,8 @@ core.register_entity(":__builtin:item", {
local
name
=
stack
:
get_name
()
local
name
=
stack
:
get_name
()
if
not
overflow
then
if
not
overflow
then
obj
.
itemstring
=
name
..
" "
..
count
obj
.
itemstring
=
name
..
" "
..
count
s
=
0
.
15
+
0
.
1
5
*
(
count
/
max_count
)
s
=
0
.
2
+
0
.
1
*
(
count
/
max_count
)
c
=
0
.
8
*
s
c
=
s
object
:
set_properties
({
object
:
set_properties
({
visual_size
=
{
x
=
s
,
y
=
s
},
visual_size
=
{
x
=
s
,
y
=
s
},
collisionbox
=
{
-
c
,
-
c
,
-
c
,
c
,
c
,
c
}
collisionbox
=
{
-
c
,
-
c
,
-
c
,
c
,
c
,
c
}
...
@@ -142,15 +142,15 @@ core.register_entity(":__builtin:item", {
...
@@ -142,15 +142,15 @@ core.register_entity(":__builtin:item", {
self
.
object
:
remove
()
self
.
object
:
remove
()
return
return
else
else
s
=
0
.
3
s
=
0
.
4
c
=
0
.
24
c
=
0
.
3
object
:
set_properties
({
object
:
set_properties
({
visual_size
=
{
x
=
s
,
y
=
s
},
visual_size
=
{
x
=
s
,
y
=
s
},
collisionbox
=
{
-
c
,
-
c
,
-
c
,
c
,
c
,
c
}
collisionbox
=
{
-
c
,
-
c
,
-
c
,
c
,
c
,
c
}
})
})
obj
.
itemstring
=
name
..
" "
..
max_count
obj
.
itemstring
=
name
..
" "
..
max_count
s
=
0
.
15
+
0
.
1
5
*
(
count
/
max_count
)
s
=
0
.
2
+
0
.
1
*
(
count
/
max_count
)
c
=
0
.
8
*
s
c
=
s
self
.
object
:
set_properties
({
self
.
object
:
set_properties
({
visual_size
=
{
x
=
s
,
y
=
s
},
visual_size
=
{
x
=
s
,
y
=
s
},
collisionbox
=
{
-
c
,
-
c
,
-
c
,
c
,
c
,
c
}
collisionbox
=
{
-
c
,
-
c
,
-
c
,
c
,
c
,
c
}
...
...
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