fix another spot where nvals_wave might get an out-of-bounds index passed to it. Also fix a spelling error in the lorebooks.

This commit is contained in:
FaceDeer 2023-10-05 22:10:50 -06:00
parent 019853bf4e
commit fec70718b0
4 changed files with 5 additions and 5 deletions

View File

@ -570,7 +570,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
for i = 1, 30 do
local x = math.random(minp.x, maxp.x)
local z = math.random(minp.z, maxp.z)
local index2d = mapgen_helper.index2d(emin, emax, x, z)
local index2d = mapgen_helper.index2d(minp, maxp, x, z)
local abs_cave = math.abs(nvals_cave[index2d]) -- range is from 0 to approximately 2, with 0 being connected and 2s being islands
local wave = nvals_wave[index2d] * wave_mult
local floor_height = math.floor(abs_cave * floor_mult + median + floor_displace + wave)-1
@ -603,7 +603,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
if hunters_enabled then
local x = math.random(minp.x, maxp.x)
local z = math.random(minp.z, maxp.z)
local index2d = mapgen_helper.index2d(emin, emax, x, z)
local index2d = mapgen_helper.index2d(minp, maxp, x, z)
local abs_cave = math.abs(nvals_cave[index2d]) -- range is from 0 to approximately 2, with 0 being connected and 2s being islands
local wave = nvals_wave[index2d] * wave_mult
local floor_height = math.floor(abs_cave * floor_mult + median + floor_displace + wave)-1

View File

@ -37,7 +37,7 @@ Dr. Theodore Banks]]),
collectible_lore.register_lorebook({
id = "banks cavern types",
title = S("A Heirarchy of Caverns"),
title = S("A Hirearchy of Caverns"),
text = S([[Today, I had the opportunity to delve deeper into the caverns beneath the surface of the world. As I explored, I was struck by the sheer diversity of the caves and tunnels that have been carved out by eons of erosion. There is truly a sort of hierarchy in the form taken by these underground features.
Starting with the smallest, we have the narrow, twisty tunnels that pervade the bedrock. These tunnels can lead for long distances and often provide the only access to more spacious galleries. They are the most ubiquitous type of cave in this subterranean realm.

View File

@ -24,7 +24,7 @@ Background: Sir Reginald Sterling is a wealthy and adventurous nobleman who is d
Sir Sterling's early logs would detail his initial excitement and wonder at the fantastic sights he encountered in the caverns, as well as his attempts to claim them in the name of himself. He would write about the challenges he faced and the obstacles he overcame, as well as the unique features and discoveries he made. However, as he ventured deeper into the caverns, he began to encounter strange and terrifying creatures, and artifacts of ancient eldritch civilizations that began to unsettle him. He started to become paranoid and delusional, and his later logs would become increasingly disjointed and difficult to understand, filled with rambling and incoherent musings about the horrors he had encountered. Despite this, the logs could still contain valuable information and secrets hidden among his madness.
This explorer is distinct from Dr. Banks and Professor Rose as he is not a scientist but a gentleman adventurer, and his main goal is not scientific discovery but fame and glory. He is driven by his desire to be the first to see fantastic sights and to plant his personal flag. He's also a skilled hunter and marksman and is trained archaeologist, which help him in his journey to the caverns. He's the first explorer to enter the caverns and he's the one who faced the ancient eldritch horrors deep beneath the Earth that broke his mind. He wasn't commissioned by any royal patron but he came here on his own initiative.
This explorer is distinct from Dr. Banks and Professor Rose as he is not a scientist but a gentleman adventurer, and his main goal is not scientific discovery but fame and glory. He is driven by his desire to be the first to see fantastic sights and to plant his personal flag. He's also a skilled hunter and marksman and is a trained archaeologist, which help him in his journey to the caverns. He's the first explorer to enter the caverns and he's the one who faced the ancient eldritch horrors deep beneath the Earth that broke his mind. He wasn't commissioned by any royal patron but he came here on his own initiative.
]]--

View File

@ -145,7 +145,7 @@ Tunnel Tube Resources=
### geology_the_great_caverns.lua ###
A Heirarchy of Caverns=
A Hirearchy of Caverns=
Cave Pearls=
During my explorations of the underground world, I have come across a truly fascinating form of mineral deposit known as cave pearls. These delicate, glowing formations can be found studding the walls of tunnels in various locations and are characterized by their calcium-rich composition. The source of their faint luminescence is still a mystery to me, but it is possible that some form of phosphorescent microorganisms may be involved in their creation.@n@nAside from their aesthetic appeal, these cave pearls also serve a practical purpose. Their smooth, round shape and solid composition make them excellent handholds when climbing treacherous walls. This has proven to be a lifesaving feature on more than one occasion, as the underground world can often be a treacherous and inhospitable place.@n@nHowever, despite their practicality, it is the origin of these cave pearls that has captured my imagination the most. Whether they are formed purely through geological processes or with the help of some kind of living action, like the more well-known pearls of the surface world, remains a mystery. I plan to continue my research into this fascinating subject and hope to uncover more about these intriguing formations.@n@nSigned,@nDr. Theodore Banks=