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
876630c7
Unverified
Commit
876630c7
authored
6 years ago
by
Hugo Locurcio
Browse files
Options
Downloads
Patches
Plain Diff
Add a Luacheck configuration file and tweak code style
parent
fe7d6562
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.luacheckrc
+30
-0
30 additions, 0 deletions
.luacheckrc
init.lua
+19
-8
19 additions, 8 deletions
init.lua
with
49 additions
and
8 deletions
.luacheckrc
0 → 100644
+
30
−
0
View file @
876630c7
std = "lua51+minetest"
unused_args = false
allow_defined_top = true
max_line_length = 90
stds.minetest = {
read_globals = {
"DIR_DELIM",
"minetest",
"core",
"dump",
"vector",
"nodeupdate",
"VoxelManip",
"VoxelArea",
"PseudoRandom",
"ItemStack",
"default",
table = {
fields = {
"copy",
},
},
}
}
read_globals = {
"intllib",
"mg",
}
This diff is collapsed.
Click to expand it.
init.lua
+
19
−
8
View file @
876630c7
...
...
@@ -88,7 +88,11 @@ local function get_recipe(c, name)
return
{{
c
,
c
,
c
},
{
c
,
c
,
c
},
{
c
,
c
,
c
}}
end
if
name
==
"lockedchest"
then
return
{{
"group:wood"
,
"group:wood"
,
"group:wood"
},
{
"group:wood"
,
c
,
"group:wood"
},
{
"group:wood"
,
"group:wood"
,
"group:wood"
}}
return
{
{
"group:wood"
,
"group:wood"
,
"group:wood"
},
{
"group:wood"
,
c
,
"group:wood"
},
{
"group:wood"
,
"group:wood"
,
"group:wood"
},
}
end
end
...
...
@@ -100,7 +104,6 @@ local function add_ore(modname, description, mineral_name, oredef)
local
item_base
=
tool_base
..
mineral_name
local
ingot
=
item_base
..
"_ingot"
local
lump_item
=
item_base
..
"_lump"
local
ingotcraft
=
ingot
if
oredef
.
makes
.
ore
then
minetest
.
register_node
(
modname
..
":mineral_"
..
mineral_name
,
{
...
...
@@ -242,12 +245,13 @@ local oredefs = {
silver
=
{
description
=
"Silver"
,
makes
=
{
ore
=
true
,
block
=
true
,
lump
=
true
,
ingot
=
true
,
chest
=
true
},
oredef
=
{
clust_scarcity
=
moreores
.
silver_chunk_size
*
moreores
.
silver_chunk_size
*
moreores
.
silver_chunk_size
,
oredef
=
{
clust_scarcity
=
moreores
.
silver_chunk_size
^
3
,
clust_num_ores
=
moreores
.
silver_ore_per_chunk
,
clust_size
=
moreores
.
silver_chunk_size
,
y_min
=
moreores
.
silver_min_depth
,
y_max
=
moreores
.
silver_max_depth
},
},
tools
=
{
pick
=
{
cracky
=
{
times
=
{[
1
]
=
2
.
60
,
[
2
]
=
1
.
00
,
[
3
]
=
0
.
60
},
uses
=
100
,
maxlevel
=
1
}
...
...
@@ -274,12 +278,13 @@ local oredefs = {
mithril
=
{
description
=
"Mithril"
,
makes
=
{
ore
=
true
,
block
=
true
,
lump
=
true
,
ingot
=
true
,
chest
=
false
},
oredef
=
{
clust_scarcity
=
moreores
.
mithril_chunk_size
*
moreores
.
mithril_chunk_size
*
moreores
.
mithril_chunk_size
,
oredef
=
{
clust_scarcity
=
moreores
.
mithril_chunk_size
^
3
,
clust_num_ores
=
moreores
.
mithril_ore_per_chunk
,
clust_size
=
moreores
.
mithril_chunk_size
,
y_min
=
moreores
.
mithril_min_depth
,
y_max
=
moreores
.
mithril_max_depth
},
},
tools
=
{
pick
=
{
cracky
=
{
times
=
{[
1
]
=
2
.
25
,
[
2
]
=
0
.
55
,
[
3
]
=
0
.
35
},
uses
=
200
,
maxlevel
=
2
}
...
...
@@ -309,7 +314,8 @@ 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
,
oredef
=
{
clust_scarcity
=
moreores
.
tin_chunk_size
^
3
,
clust_num_ores
=
moreores
.
tin_ore_per_chunk
,
clust_size
=
moreores
.
tin_chunk_size
,
y_min
=
moreores
.
tin_min_depth
,
...
...
@@ -355,7 +361,12 @@ end
minetest
.
register_node
(
"moreores:copper_rail"
,
{
description
=
S
(
"Copper Rail"
),
drawtype
=
"raillike"
,
tiles
=
{
"moreores_copper_rail.png"
,
"moreores_copper_rail_curved.png"
,
"moreores_copper_rail_t_junction.png"
,
"moreores_copper_rail_crossing.png"
},
tiles
=
{
"moreores_copper_rail.png"
,
"moreores_copper_rail_curved.png"
,
"moreores_copper_rail_t_junction.png"
,
"moreores_copper_rail_crossing.png"
,
},
inventory_image
=
"moreores_copper_rail.png"
,
wield_image
=
"moreores_copper_rail.png"
,
paramtype
=
"light"
,
...
...
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