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
b701e500
Commit
b701e500
authored
5 years ago
by
sfan5
Browse files
Options
Downloads
Patches
Plain Diff
Support for icesheet dungeons in dungeon_loot
parent
37710866
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
game_api.txt
+3
-2
3 additions, 2 deletions
game_api.txt
mods/dungeon_loot/loot.lua
+21
-10
21 additions, 10 deletions
mods/dungeon_loot/loot.lua
mods/dungeon_loot/mapgen.lua
+2
-0
2 additions, 0 deletions
mods/dungeon_loot/mapgen.lua
with
26 additions
and
12 deletions
game_api.txt
+
3
−
2
View file @
b701e500
...
...
@@ -276,7 +276,7 @@ The mod that places chests with loot in dungeons provides an API to register add
name = "item:name",
chance = 0.5,
-- ^ chance value from 0.0 to 1.0 that the item will appear in the chest when chosen
--
d
ue to an extra step in the selection process, 0.5 does not(!) mean that
--
D
ue to an extra step in the selection process, 0.5 does not(!) mean that
-- on average every second chest will have this item
count = {1, 4},
-- ^ table with minimum and maximum amounts of this item
...
...
@@ -286,7 +286,8 @@ The mod that places chests with loot in dungeons provides an API to register add
-- optional, defaults to no height restrictions
types = {"desert"},
-- ^ table with types of dungeons this item can be found in
-- supported types: "normal" (the cobble/mossycobble one), "sandstone", "desert"
-- supported types: "normal" (the cobble/mossycobble one), "sandstone"
-- "desert" and "ice"
-- optional, defaults to no type restrictions
...
...
This diff is collapsed.
Click to expand it.
mods/dungeon_loot/loot.lua
+
21
−
10
View file @
b701e500
dungeon_loot
.
registered_loot
=
{
-- buckets
{
name
=
"bucket:bucket_empty"
,
chance
=
0
.
55
},
-- water in deserts or above ground, lava otherwise
{
name
=
"bucket:bucket_water"
,
chance
=
0
.
45
,
types
=
{
"sandstone"
,
"desert"
}},
{
name
=
"bucket:bucket_water"
,
chance
=
0
.
45
,
y
=
{
0
,
32768
},
types
=
{
"normal"
}},
{
name
=
"bucket:bucket_lava"
,
chance
=
0
.
45
,
y
=
{
-
32768
,
-
1
},
types
=
{
"normal"
}},
-- water in deserts/ice or above ground, lava otherwise
{
name
=
"bucket:bucket_water"
,
chance
=
0
.
45
,
types
=
{
"sandstone"
,
"desert"
,
"ice"
}},
{
name
=
"bucket:bucket_water"
,
chance
=
0
.
45
,
y
=
{
0
,
32768
},
types
=
{
"normal"
}},
{
name
=
"bucket:bucket_lava"
,
chance
=
0
.
45
,
y
=
{
-
32768
,
-
1
},
types
=
{
"normal"
}},
-- various items
{
name
=
"default:stick"
,
chance
=
0
.
6
,
count
=
{
3
,
6
}},
...
...
@@ -16,8 +19,10 @@ dungeon_loot.registered_loot = {
{
name
=
"farming:string"
,
chance
=
0
.
5
,
count
=
{
1
,
8
}},
{
name
=
"farming:wheat"
,
chance
=
0
.
5
,
count
=
{
2
,
5
}},
{
name
=
"default:apple"
,
chance
=
0
.
4
,
count
=
{
1
,
4
}},
{
name
=
"farming:seed_cotton"
,
chance
=
0
.
4
,
count
=
{
1
,
4
},
types
=
{
"normal"
}},
{
name
=
"default:cactus"
,
chance
=
0
.
4
,
count
=
{
1
,
4
},
types
=
{
"sandstone"
,
"desert"
}},
{
name
=
"farming:seed_cotton"
,
chance
=
0
.
4
,
count
=
{
1
,
4
},
types
=
{
"normal"
}},
{
name
=
"default:cactus"
,
chance
=
0
.
4
,
count
=
{
1
,
4
},
types
=
{
"sandstone"
,
"desert"
}},
-- minerals
{
name
=
"default:coal_lump"
,
chance
=
0
.
9
,
count
=
{
1
,
12
}},
...
...
@@ -31,10 +36,16 @@ dungeon_loot.registered_loot = {
{
name
=
"default:axe_diamond"
,
chance
=
0
.
05
},
-- natural materials
{
name
=
"default:sand"
,
chance
=
0
.
8
,
count
=
{
4
,
32
},
y
=
{
-
64
,
32768
},
types
=
{
"normal"
}},
{
name
=
"default:desert_sand"
,
chance
=
0
.
8
,
count
=
{
4
,
32
},
y
=
{
-
64
,
32768
},
types
=
{
"sandstone"
}},
{
name
=
"default:desert_cobble"
,
chance
=
0
.
8
,
count
=
{
4
,
32
},
types
=
{
"desert"
}},
{
name
=
"default:dirt"
,
chance
=
0
.
6
,
count
=
{
2
,
16
},
y
=
{
-
64
,
32768
}},
{
name
=
"default:sand"
,
chance
=
0
.
8
,
count
=
{
4
,
32
},
y
=
{
-
64
,
32768
},
types
=
{
"normal"
}},
{
name
=
"default:desert_sand"
,
chance
=
0
.
8
,
count
=
{
4
,
32
},
y
=
{
-
64
,
32768
},
types
=
{
"sandstone"
}},
{
name
=
"default:desert_cobble"
,
chance
=
0
.
8
,
count
=
{
4
,
32
},
types
=
{
"desert"
}},
{
name
=
"default:snow"
,
chance
=
0
.
8
,
count
=
{
8
,
64
},
y
=
{
-
64
,
32768
},
types
=
{
"ice"
}},
{
name
=
"default:dirt"
,
chance
=
0
.
6
,
count
=
{
2
,
16
},
y
=
{
-
64
,
32768
},
types
=
{
"normal"
,
"sandstone"
,
"desert"
}},
{
name
=
"default:obsidian"
,
chance
=
0
.
25
,
count
=
{
1
,
3
},
y
=
{
-
32768
,
-
512
}},
{
name
=
"default:mese"
,
chance
=
0
.
15
,
y
=
{
-
32768
,
-
512
}},
}
...
...
This diff is collapsed.
Click to expand it.
mods/dungeon_loot/mapgen.lua
+
2
−
0
View file @
b701e500
...
...
@@ -59,6 +59,8 @@ local function find_walls(cpos)
type
=
"desert"
elseif
biome
:
find
(
"sandstone_desert"
)
==
1
then
type
=
"sandstone"
elseif
biome
:
find
(
"icesheet"
)
==
1
then
type
=
"ice"
end
return
{
...
...
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