Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moreores
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
moreores
Commits
d7ac127d
Commit
d7ac127d
authored
5 years ago
by
Louis Royer
Committed by
Hugo Locurcio
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add compatibility with mod frame
- [mod frame](
https://github.com/minetest-mods/frame
)
parent
8aa3cbd1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.luacheckrc
+2
-0
2 additions, 0 deletions
.luacheckrc
init.lua
+19
-0
19 additions, 0 deletions
init.lua
mod.conf
+1
-1
1 addition, 1 deletion
mod.conf
with
22 additions
and
1 deletion
.luacheckrc
+
2
−
0
View file @
d7ac127d
...
...
@@ -25,7 +25,9 @@ stds.minetest = {
}
read_globals = {
"carts",
"farming",
"frame",
"intllib",
"mg",
}
This diff is collapsed.
Click to expand it.
init.lua
+
19
−
0
View file @
d7ac127d
...
...
@@ -23,6 +23,9 @@ if minetest.get_modpath("mg") then
dofile
(
modpath
..
"/mg.lua"
)
end
-- `frame` support
local
use_frame
=
minetest
.
get_modpath
(
"frame"
)
local
default_stone_sounds
=
default
.
node_sound_stone_defaults
()
local
default_metal_sounds
=
default
.
node_sound_metal_defaults
()
...
...
@@ -89,6 +92,10 @@ local function add_ore(modname, description, mineral_name, oredef)
sounds
=
default_stone_sounds
,
drop
=
lump_item
,
})
if
use_frame
then
frame
.
register
(
modname
..
":mineral_"
..
mineral_name
)
end
end
if
oredef
.
makes
.
block
then
...
...
@@ -112,6 +119,9 @@ local function add_ore(modname, description, mineral_name, oredef)
}
})
end
if
use_frame
then
frame
.
register
(
block_item
)
end
end
if
oredef
.
makes
.
lump
then
...
...
@@ -127,6 +137,9 @@ local function add_ore(modname, description, mineral_name, oredef)
recipe
=
lump_item
,
})
end
if
use_frame
then
frame
.
register
(
lump_item
)
end
end
if
oredef
.
makes
.
ingot
then
...
...
@@ -135,6 +148,9 @@ local function add_ore(modname, description, mineral_name, oredef)
inventory_image
=
img_base
..
"_ingot.png"
,
})
minetest
.
register_alias
(
mineral_name
..
"_ingot"
,
ingot
)
if
use_frame
then
frame
.
register
(
ingot
)
end
end
if
oredef
.
makes
.
chest
then
...
...
@@ -217,6 +233,9 @@ local function add_ore(modname, description, mineral_name, oredef)
end
minetest
.
register_alias
(
tool_name
..
tool_post
,
fulltool_name
)
if
use_frame
then
frame
.
register
(
fulltool_name
)
end
end
end
...
...
This diff is collapsed.
Click to expand it.
mod.conf
+
1
−
1
View file @
d7ac127d
name
=
moreores
description
=
Adds
new
ore
types
.
depends
=
default
optional_depends
=
carts
,
farming
,
intllib
,
mg
optional_depends
=
carts
,
farming
,
frame
,
intllib
,
mg
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