Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ethereal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
ethereal
Commits
7a619317
Commit
7a619317
authored
7 years ago
by
TenPlus1
Browse files
Options
Downloads
Patches
Plain Diff
Tweaked crystal shovel, bonemeal grows bushes, added toolranks support
parent
6c8ea9e5
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+6
-0
6 additions, 0 deletions
README.md
bonemeal.lua
+5
-0
5 additions, 0 deletions
bonemeal.lua
crystal.lua
+44
-38
44 additions, 38 deletions
crystal.lua
depends.txt
+1
-0
1 addition, 0 deletions
depends.txt
with
56 additions
and
38 deletions
README.md
+
6
−
0
View file @
7a619317
...
...
@@ -10,6 +10,12 @@ Ethereal Mapgen mod for Minetest (works on all except v6)
## Changelog
### 1.23
-
Added bonemeal support for bush sapling and acacia bush sapling
-
Added support for [toolranks] mod if found
-
Reworked Crystal Shovel so it acts more like a normal shovel with soft touch
### 1.22
-
Added coral and silver sand to mapgen (0.4.15 only)
...
...
This diff is collapsed.
Click to expand it.
bonemeal.lua
+
5
−
0
View file @
7a619317
...
...
@@ -219,6 +219,11 @@ local function growth(pointed_thing)
elseif
node
.
name
==
"default:aspen_sapling"
and
enough_height
(
pos
,
11
)
then
default
.
grow_new_aspen_tree
(
pos
)
elseif
node
.
name
==
"default:bush_sapling"
then
default
.
grow_bush
(
pos
)
elseif
node
.
name
==
"default:acacia_bush_sapling"
then
default
.
grow_acacia_bush
(
pos
)
end
return
...
...
This diff is collapsed.
Click to expand it.
crystal.lua
+
44
−
38
View file @
7a619317
...
...
@@ -166,51 +166,38 @@ minetest.register_craft({
}
})
-- Crystal Shovel (with Soft Touch so player can dig up dirt with grass intact)
minetest
.
register_tool
(
"ethereal:shovel_crystal"
,
{
description
=
S
(
"Crystal (soft touch) Shovel"
),
inventory_image
=
"crystal_shovel.png"
,
wield_image
=
"crystal_shovel.png^[transformR90"
,
sound
=
{
breaks
=
"default_tool_breaks"
},
on_use
=
function
(
itemstack
,
user
,
pointed_thing
)
local
old_handle_node_drops
=
minetest
.
handle_node_drops
if
pointed_thing
.
type
~=
"node"
then
return
end
function
minetest
.
handle_node_drops
(
pos
,
drops
,
digger
)
--
Check if node protected
if
minetest
.
is_protected
(
pointed_thing
.
under
,
user
:
get_player_name
())
then
return
end
--
are we holding Crystal Shovel?
if
digger
:
get_wielded_item
():
get_name
()
~=
"ethereal:shovel_crystal"
then
return
old_handle_node_drops
(
pos
,
drops
,
digger
)
end
local
pos
=
pointed_thing
.
under
local
nn
=
minetest
.
get_node
(
pos
).
name
local
nn
=
minetest
.
get_node
(
pos
).
name
-- Is node dirt, sand or gravel
if
minetest
.
get_item_group
(
nn
,
"crumbly"
)
>
0
then
if
minetest
.
get_item_group
(
nn
,
"crumbly"
)
==
0
then
return
old_handle_node_drops
(
pos
,
drops
,
digger
)
end
local
inv
=
user
:
get_inventory
()
return
old_handle_node_drops
(
pos
,
{
ItemStack
(
nn
)},
digger
)
end
minetest
.
remove_node
(
pointed_thing
.
under
)
ethereal
.
check_falling
(
pos
)
if
minetest
.
setting_getbool
(
"creative_mode"
)
then
if
not
inv
:
contains_item
(
"main"
,
{
name
=
nn
})
then
inv
:
add_item
(
"main"
,
{
name
=
nn
})
end
else
inv
:
add_item
(
"main"
,
{
name
=
nn
})
itemstack
:
add_wear
(
65535
/
100
)
-- 111 uses
end
minetest
.
sound_play
(
"default_dig_crumbly"
,
{
pos
=
pos
,
gain
=
0
.
4
})
return
itemstack
end
end
,
minetest
.
register_tool
(
"ethereal:shovel_crystal"
,
{
description
=
"Crystal Shovel"
,
inventory_image
=
"crystal_shovel.png"
,
wield_image
=
"crystal_shovel.png^[transformR90"
,
tool_capabilities
=
{
full_punch_interval
=
1
.
0
,
max_drop_level
=
1
,
groupcaps
=
{
crumbly
=
{
times
=
{[
1
]
=
1
.
10
,
[
2
]
=
0
.
50
,
[
3
]
=
0
.
30
},
uses
=
30
,
maxlevel
=
3
},
},
damage_groups
=
{
fleshy
=
4
},
},
sound
=
{
breaks
=
"default_tool_breaks"
},
})
minetest
.
register_craft
({
...
...
@@ -244,3 +231,22 @@ minetest.register_craft({
"ethereal:crystal_ingot"
},
})
-- Add [toolranks] mod support if found
if
minetest
.
get_modpath
(
"toolranks"
)
then
minetest
.
override_item
(
"ethereal:pick_crystal"
,
{
original_description
=
"Crystal Pickaxe"
,
description
=
toolranks
.
create_description
(
"Crystal Pickaxe"
,
0
,
1
),
after_use
=
toolranks
.
new_afteruse
})
minetest
.
override_item
(
"ethereal:axe_crystal"
,
{
original_description
=
"Crystal Axe"
,
description
=
toolranks
.
create_description
(
"Crystal Axe"
,
0
,
1
),
after_use
=
toolranks
.
new_afteruse
})
minetest
.
override_item
(
"ethereal:shovel_crystal"
,
{
original_description
=
"Crystal Shovel"
,
description
=
toolranks
.
create_description
(
"Crystal Shovel"
,
0
,
1
),
after_use
=
toolranks
.
new_afteruse
})
end
This diff is collapsed.
Click to expand it.
depends.txt
+
1
−
0
View file @
7a619317
...
...
@@ -7,3 +7,4 @@ bakedclay?
moreblocks?
intllib?
lucky_block?
toolranks?
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