Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
caverealms
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
caverealms
Commits
86bbbd66
Commit
86bbbd66
authored
10 years ago
by
Chris N
Browse files
Options
Downloads
Patches
Plain Diff
Dev Branch Created
Here there be drag- I mean bugs.
parent
d310d2a1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config.lua
+1
-1
1 addition, 1 deletion
config.lua
init.lua
+4
-6
4 additions, 6 deletions
init.lua
with
5 additions
and
7 deletions
config.lua
+
1
−
1
View file @
86bbbd66
...
...
@@ -23,7 +23,7 @@ end
--generation settings
setting
(
"number"
,
"ymin"
,
-
33000
)
--bottom realm limit
setting
(
"number"
,
"ymax"
,
-
700
)
--top realm limit
setting
(
"number"
,
"chuint"
,
2
)
--vertical chunk interval between caves
setting
(
"number"
,
"chuint"
,
4
)
--vertical chunk interval between caves
--falling icicles
setting
(
"bool"
,
"falling_icicles"
,
true
)
--enable/disable falling icicles
...
...
This diff is collapsed.
Click to expand it.
init.lua
+
4
−
6
View file @
86bbbd66
-- caverealms 0.2.
8
by HeroOfTheWinds
-- caverealms 0.2.
9
by HeroOfTheWinds
-- For latest stable Minetest and back to 0.4.8
-- Depends default
-- License: code WTFPL
...
...
@@ -104,9 +104,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
--determine if there's enough spacing between layers to start a realm
local
chulay
=
math.floor
((
minp
.
y
+
32
)
/
80
)
-- chunk layer number, 0 = surface chunk
if
math.fmod
(
chulay
,
CHUINT
)
~=
0
then
-- if chulay / CHUINT has a remainder
return
end
local
tercen
=
(
math.floor
(
chulay
/
CHUINT
)
*
CHUINT
+
CHUINT
/
2
)
*
80
-
32
-- terrain centre of this layer
--easy to reference variables for limits and time
local
t1
=
os.clock
()
...
...
@@ -192,7 +190,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
for
x
=
x0
,
x1
do
-- for each node do
--here's the good part
local
si
=
x
-
x0
+
1
--stability index
local
cavemid
=
chumid
+
nvals_wave
[
nixz
]
*
WAVAMP
--grab the middle of the cave's amplitude
local
cavemid
=
tercen
+
nvals_wave
[
nixz
]
*
WAVAMP
--grab the middle of the cave's amplitude
local
grad
if
y
>
cavemid
then
grad
=
((
y
-
cavemid
)
/
HISCAL
)
^
HIEXP
--for the ceiling
...
...
@@ -298,7 +296,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
for
x
=
x0
,
x1
do
-- for each node do
--here's the good part
local
si
=
x
-
x0
+
1
--stability index
local
cavemid
=
chumid
+
nvals_wave
[
nixz2
]
*
WAVAMP
--grab the middle of the cave's amplitude
local
cavemid
=
tercen
+
nvals_wave
[
nixz2
]
*
WAVAMP
--grab the middle of the cave's amplitude
local
grad
if
y
>
cavemid
then
grad
=
((
y
-
cavemid
)
/
HISCAL
)
^
HIEXP
--for the ceiling
...
...
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