Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
minetest_game
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
minetest_game
Commits
066d23cd
Commit
066d23cd
authored
11 years ago
by
Novatux
Browse files
Options
Downloads
Patches
Plain Diff
Change hoe_on_use to farming.hoe_on_use, for use and override by mods.
parent
cf6f4589
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mods/farming/init.lua
+7
-5
7 additions, 5 deletions
mods/farming/init.lua
with
7 additions
and
5 deletions
mods/farming/init.lua
+
7
−
5
View file @
066d23cd
-- Minetest 0.4 mod: farming
-- See README.txt for licensing and other information.
farming
=
{}
--
-- Soil
--
...
...
@@ -62,7 +64,7 @@ minetest.register_abm({
-- Hoes
--
-- turns nodes with group soil=1 into soil
local
function
hoe_on_use
(
itemstack
,
user
,
pointed_thing
,
uses
)
function
farming
.
hoe_on_use
(
itemstack
,
user
,
pointed_thing
,
uses
)
local
pt
=
pointed_thing
-- check if pointing at a node
if
not
pt
then
...
...
@@ -109,7 +111,7 @@ minetest.register_tool("farming:hoe_wood", {
inventory_image
=
"farming_tool_woodhoe.png"
,
on_use
=
function
(
itemstack
,
user
,
pointed_thing
)
return
hoe_on_use
(
itemstack
,
user
,
pointed_thing
,
30
)
return
farming
.
hoe_on_use
(
itemstack
,
user
,
pointed_thing
,
30
)
end
,
})
...
...
@@ -118,7 +120,7 @@ minetest.register_tool("farming:hoe_stone", {
inventory_image
=
"farming_tool_stonehoe.png"
,
on_use
=
function
(
itemstack
,
user
,
pointed_thing
)
return
hoe_on_use
(
itemstack
,
user
,
pointed_thing
,
90
)
return
farming
.
hoe_on_use
(
itemstack
,
user
,
pointed_thing
,
90
)
end
,
})
...
...
@@ -127,7 +129,7 @@ minetest.register_tool("farming:hoe_steel", {
inventory_image
=
"farming_tool_steelhoe.png"
,
on_use
=
function
(
itemstack
,
user
,
pointed_thing
)
return
hoe_on_use
(
itemstack
,
user
,
pointed_thing
,
200
)
return
farming
.
hoe_on_use
(
itemstack
,
user
,
pointed_thing
,
200
)
end
,
})
...
...
@@ -136,7 +138,7 @@ minetest.register_tool("farming:hoe_bronze", {
inventory_image
=
"farming_tool_bronzehoe.png"
,
on_use
=
function
(
itemstack
,
user
,
pointed_thing
)
return
hoe_on_use
(
itemstack
,
user
,
pointed_thing
,
220
)
return
farming
.
hoe_on_use
(
itemstack
,
user
,
pointed_thing
,
220
)
end
,
})
...
...
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