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
73e99e7d
Commit
73e99e7d
authored
7 years ago
by
Thomas--S
Committed by
Hugo Locurcio
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Tin is now in Minetest Game (#18)
parent
0842b4fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
init.lua
+36
-21
36 additions, 21 deletions
init.lua
mg.lua
+16
-14
16 additions, 14 deletions
mg.lua
with
52 additions
and
35 deletions
init.lua
+
36
−
21
View file @
73e99e7d
...
...
@@ -10,6 +10,11 @@ Licensed under the zlib license. See LICENSE.md for more information.
moreores
=
{}
local
default_tin
=
false
if
minetest
.
registered_items
[
"default:tin_ingot"
]
then
default_tin
=
true
end
local
S
if
minetest
.
get_modpath
(
"intllib"
)
then
S
=
intllib
.
Getter
()
...
...
@@ -266,17 +271,6 @@ local oredefs = {
full_punch_interval
=
1
.
0
,
damage_groups
=
{
fleshy
=
6
},
},
tin
=
{
description
=
"Tin"
,
makes
=
{
ore
=
true
,
block
=
true
,
lump
=
true
,
ingot
=
true
,
chest
=
false
},
oredef
=
{
clust_scarcity
=
moreores
.
tin_chunk_size
*
moreores
.
tin_chunk_size
*
moreores
.
tin_chunk_size
,
clust_num_ores
=
moreores
.
tin_ore_per_chunk
,
clust_size
=
moreores
.
tin_chunk_size
,
y_min
=
moreores
.
tin_min_depth
,
y_max
=
moreores
.
tin_max_depth
},
tools
=
{},
},
mithril
=
{
description
=
"Mithril"
,
makes
=
{
ore
=
true
,
block
=
true
,
lump
=
true
,
ingot
=
true
,
chest
=
false
},
...
...
@@ -311,6 +305,20 @@ local oredefs = {
}
}
if
not
default_tin
then
oredefs
.
tin
=
{
description
=
"Tin"
,
makes
=
{
ore
=
true
,
block
=
true
,
lump
=
true
,
ingot
=
true
,
chest
=
false
},
oredef
=
{
clust_scarcity
=
moreores
.
tin_chunk_size
*
moreores
.
tin_chunk_size
*
moreores
.
tin_chunk_size
,
clust_num_ores
=
moreores
.
tin_ore_per_chunk
,
clust_size
=
moreores
.
tin_chunk_size
,
y_min
=
moreores
.
tin_min_depth
,
y_max
=
moreores
.
tin_max_depth
},
tools
=
{},
}
end
for
orename
,
def
in
pairs
(
oredefs
)
do
add_ore
(
modname
,
def
.
description
,
orename
,
def
)
end
...
...
@@ -325,16 +333,23 @@ minetest.register_craft({
}
})
-- Bronze has some special cases, because it is made from copper and tin:
minetest
.
register_craft
(
{
type
=
"shapeless"
,
output
=
"default:bronze_ingot 3"
,
recipe
=
{
"moreores:tin_ingot"
,
"default:copper_ingot"
,
"default:copper_ingot"
,
}
})
if
default_tin
then
minetest
.
register_alias
(
"moreores:mineral_tin"
,
"default:stone_with_tin"
)
minetest
.
register_alias
(
"moreores:tin_lump"
,
"default:tin_lump"
)
minetest
.
register_alias
(
"moreores:tin_ingot"
,
"default:tin_ingot"
)
minetest
.
register_alias
(
"moreores:tin_block"
,
"default:tinblock"
)
else
-- Bronze has some special cases, because it is made from copper and tin:
minetest
.
register_craft
(
{
type
=
"shapeless"
,
output
=
"default:bronze_ingot 3"
,
recipe
=
{
"moreores:tin_ingot"
,
"default:copper_ingot"
,
"default:copper_ingot"
,
}
})
end
-- Unique node:
minetest
.
register_node
(
"moreores:copper_rail"
,
{
...
...
This diff is collapsed.
Click to expand it.
mg.lua
+
16
−
14
View file @
73e99e7d
...
...
@@ -5,20 +5,22 @@ Copyright (c) 2011-2017 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
mg
.
register_ore
({
name
=
"moreores:mineral_tin"
,
wherein
=
"default:stone"
,
seeddiff
=
8
,
maxvdistance
=
10
.
5
,
maxheight
=
8
,
seglenghtn
=
15
,
seglenghtdev
=
6
,
segincln
=
0
,
segincldev
=
0
.
6
,
turnangle
=
57
,
forkturnangle
=
57
,
numperblock
=
2
})
if
not
minetest
.
registered_items
[
"default:tin_ingot"
]
then
mg
.
register_ore
({
name
=
"moreores:mineral_tin"
,
wherein
=
"default:stone"
,
seeddiff
=
8
,
maxvdistance
=
10
.
5
,
maxheight
=
8
,
seglenghtn
=
15
,
seglenghtdev
=
6
,
segincln
=
0
,
segincldev
=
0
.
6
,
turnangle
=
57
,
forkturnangle
=
57
,
numperblock
=
2
})
end
mg
.
register_ore
({
name
=
"moreores:mineral_silver"
,
...
...
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