Commit Graph

70 Commits (main)

Author SHA1 Message Date
mckaygerhard 55028bc300 try to sinc by consider mapgen version
* This will allow pyramids to find some desert sand, but
  the astute will notice those are the v7 Heat Noise Parameters,
  the (5349, 3, 0.7, 500), and the Humidity for those inclined
  to tinker are (842, 3, 0.55, 500), cos mods that rely on
  the perlin noise must be in sync.
* try to detect the older simplev7 mod and sync with guessed values
* also detect the multicraft v7 plus mapgen
2024-04-29 15:06:51 -04:00
mckaygerhard 2c9ea6faca workaround for bulk_set_node newer implementations on onder engines
* the `bulk_set_node` seems the function is since minetest 5.0 but
  it seems does not show in the git-shit-hub search, so found it
  manually at 584d00a01c
  that is only an optimized bulk way of `set_node` using a list of positions
  now with this pyramids will work in older versions of minetest too
* Closes https://codeberg.org/minetest-stuffs/minetest-mod-tsm_pyramids/issues/5
* incorporate a detection of 5.4+ versions of engine
2024-04-29 10:29:47 -04:00
mckaygerhard 762b2d7838 fix perlin noise returns null on some rarte cases as reported in minetest
* i was first checked at https://forum.minetest.net/viewtopic.php?t=8157
  as "minetest.get_perlin() and minetest.get_perlin_map() Return nil" by prestidigitator
  The `minetest.get_perlin()` function returns nil since 0.4.8+ until 5.1.0
  The `PerlinNoise()` constructor does return a valid object, on the other hand,
  barely documented as alternatrive cos is internally used only and not api public
  cos can only call it after the environment is created, so the code
  must bne inside `minetest.after(0, ...)` it only works the first time,
  or must be used an alternative
* was reported also https://github.com/minetest/minetest/issues/10385 that
  does not properly handle large world seeds
* Close https://codeberg.org/Wuzzy/minetest_tsm_pyramids/issues/2
* Close https://codeberg.org/minetest-stuffs/minetest-mod-tsm_pyramids/issues/2
* Also uses older get2d vs get_2d for newer engines older pre 5.0.0
  as seen on https://github.com/minetest-LOTR/Lord-of-the-Test/issues/139
  detect newer engine and uses proper method to get agains perlin object
  Closes https://codeberg.org/minetest-stuffs/minetest-mod-tsm_pyramids/issues/2
2024-04-29 10:17:25 -04:00
general 6b53a21c96 backguard compatibility for 4.X on translator and noisebuffer loading
* the wrokaround is done waithing until mod loads using minetest.after,
 at older engines we only can callit one time at load, but now the error
 generates in other place..  check for more elaborate solution
 at https://codeberg.org/minetest-stuffs/minetest-mod-tsm_pyramids/issues/2#issuecomment-1712924
* reported at https://codeberg.org/Wuzzy/minetest_tsm_pyramids/issues/2
* related to https://github.com/minetest/minetest/issues/10385#issuecomment-1674162787
2024-03-24 18:48:20 -04:00
mckaygerhard f46a9ae4f7 return back original chest fill but leave the refill on 30 minutes
* this was due the change from commit 1eb0bc363e
  of sys4 <sys4@sys4.fr> at Fri Dec 27 01:22:46 2019 +0100
  that said: Ajoute remplissage des coffres 30 minutes après ouverture
  et modifie les items générés par ceux de nalc_trm
  merged at commit dfd03b56c6
2024-03-21 06:14:09 -04:00
mckaygerhard ffdc7cd035 Consider mapgen v7. Add max height.
* set a maximun height and use the parameters on mapgen v7 from poikilos,
  seems oldcoder already does that! this was taken from old fork
  from commit e970ff7955
* the commit only takes the max height part.. the node detection
  suggestion was omited (few 3 lines around sand_cnt_max_id check)
  cos is already added on the previous function `select_pyramid_type(min, max)`
2024-03-21 06:04:04 -04:00
mckaygerhard dfd03b56c6 Merge master from https://github.com/ronoaldo/tsm_pyramids into main: fix crashes
* Fix crash caused by lack of luaentity nil check and minetest 5.6
  from commit d4d89c5cc4
* Add refill to chests 30 minutes after opening; and modify the items
  generated by those of nalc_trm (we must change this later)
  from commit 1eb0bc363e
2024-03-21 05:31:37 -04:00
Wuzzy 408e33b76f Add missing 'than' in comment 2023-08-12 09:53:23 +02:00
sys4 1eb0bc363e Ajoute remplissage des coffres 30 minutes après ouverture
et modifie les items générés par ceux de nalc_trm
2019-12-27 01:22:46 +01:00
Wuzzy 2538680eea Fix undeclared global warnings 2019-09-26 14:31:24 +02:00
Wuzzy e0f929d8dd Refactor pyramid type selection 2019-08-25 16:41:22 +02:00
Wuzzy f71ca591c9 More treasure variety 2019-08-25 14:00:03 +02:00
Wuzzy 9d5dace4fb Guarantee 1 chest with treasures 2019-08-25 12:37:36 +02:00
Wuzzy d9c4b78998 Remove papyrus from treasures 2019-08-25 05:18:35 +02:00
Wuzzy 19c81a9b4f Improve initial mummy spawn 2019-08-25 01:52:12 +02:00
Wuzzy b278da5bcf Remove useless node sets in make_entrance 2019-08-25 00:19:45 +02:00
Wuzzy 7f5e97357e Remove useless call 2019-08-24 22:53:11 +02:00
Wuzzy a6e3a50266 Keep pyramids away from cactus and trees 2019-08-24 22:00:08 +02:00
Wuzzy 269987771d Remove sand spam 2019-08-24 21:45:41 +02:00
Wuzzy 4aa41e096f Fix some logging errors 2019-08-24 21:28:35 +02:00
Wuzzy 4d25bdadf2 Reduce spawning of floating pyramids 2019-08-24 21:19:25 +02:00
Wuzzy 1d9fee5ab1 Improve node restriction handling 2019-08-24 20:12:03 +02:00
Wuzzy 4ec1b6b5bc Present desert stone pyramids in sandy areas 2019-08-24 20:05:51 +02:00
Wuzzy 4300f641dc Keep pyramids away from the beach 2019-08-24 19:37:11 +02:00
Wuzzy 01acc67011 Desert stone pyramids: Disable sand 2019-08-24 19:26:37 +02:00
Wuzzy 9af486611c Reacivate desert stone pyramids ... for now 2019-08-24 19:25:40 +02:00
Wuzzy 76bd636df2 Drop a minetest.after 2019-08-24 18:58:20 +02:00
Wuzzy 39e5289b74 Reduce the water distance restriction 2019-08-23 21:01:35 +02:00
Wuzzy 212636b66d Never spawn pyramids beyond maxp 2019-08-23 18:53:35 +02:00
Wuzzy 10cf7524b5 Add pyramid size variable 2019-08-23 17:26:01 +02:00
Wuzzy 2f82b3665c Remove outdated TODOs/FIXMEs 2019-08-23 13:02:18 +02:00
Wuzzy 92d36f9e79 Disable desert stone pyramids for now 2019-08-23 13:00:35 +02:00
Wuzzy e40a41e473 Merge branch 'desert_stone' 2019-08-23 12:58:27 +02:00
Wuzzy e824fa467e Randomly rotate pyramids 2019-08-22 14:50:26 +02:00
Wuzzy 08a750820b Don't use sand in desert sand pyramids 2019-08-20 20:47:11 +02:00
Wuzzy 461326ad32 Generate desert pyramids 2019-08-20 20:32:14 +02:00
Wuzzy 783a5d8666 Add desert stone pyramids (still a bit buggy) 2019-08-20 20:16:11 +02:00
Wuzzy 9b9e4c1f50 50% chance for sandstone pyramids in v6 2019-08-20 17:05:45 +02:00
Wuzzy 9c6dc7908a Remove heavy bias towards desert sandstone pyramid 2019-08-20 16:43:47 +02:00
Wuzzy d834170a7b /spawnpyramid places pyramid at more useful pos 2019-08-20 15:11:51 +02:00
Wuzzy b00f540567 Use bulk_set_node to improve efficiency 2019-08-20 14:58:51 +02:00
Wuzzy 9ddfbed720 Add a tip to some pyramids 2019-08-20 05:40:52 +02:00
Wuzzy 2407c70523 Fix initial mummies spawning inside walls 2019-08-20 04:22:20 +02:00
Wuzzy 84a04cec27 Randomize spawner position (a bit) 2019-08-20 04:05:20 +02:00
Wuzzy 6a43244322 Fix various flood_sand bugs 2019-08-20 03:26:54 +02:00
Wuzzy 6fc1d927f8 Reduce amount of sand in chests 2019-08-20 03:19:46 +02:00
Wuzzy fb6cbbea66 Put sand into chests in sand-flooded pyramids 2019-08-20 03:14:39 +02:00
Wuzzy acc22a5576 Flood every 8th pyramid with sand 2019-08-20 02:58:37 +02:00
Wuzzy d3187e4a08 Distribute treasures more evenly across chests 2019-08-20 02:08:44 +02:00
Wuzzy d6bc045bbb Add a few additional default treasures 2019-08-20 01:52:43 +02:00