Compare commits

...

2 Commits

Author SHA1 Message Date
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
9f69de44c0 improved the information of the mod and provides the info about this fork 2024-04-29 14:49:27 -04:00
4 changed files with 57 additions and 34 deletions

View File

@ -1,41 +1,56 @@
# Pyramids (with Treasurer support) [`tsm_pyramids`] # minetest-mod-tsm_pyramids
* Version: 1.0.4 BUILDINGS of pyramids with treasures!
## Information
Constructions of pyramids with treasures! You can find them in deserts and sandstone deserts.
## Description
This is a mod for Minetest Game which adds randomly spawned pyramids in deserts and This is a mod for Minetest Game which adds randomly spawned pyramids in deserts and
sandstone deserts. The pyramids are very rare and contain chests with stuff. sandstone deserts. The pyramids are very rare and contain chests with stuff.
Also there are mummies inside, which attack the player if found in their radius. Also there are mummies inside, which attack the player if found in their radius.
## Historic notes ![screenshot.png](screenshot.png)
This mod is a fork of the old `pyramids` mod by BlockMen and intended to be a direct
## Technical info
This mod must be named `tsm_pyramids` and is a forked improved version of wuzzy one,
that is a fork of the old `pyramids` mod by BlockMen and intended to be a direct
(but unofficial) successor of it. (but unofficial) successor of it.
We recommended to use the modernized `pyramids` mod at minenux or oldcoder continuation,
due to the low availability of the developer to solve problems and his inclination towards
the obsolescence of minetests and does not help to solve any problem. This mod fork
is fully compatible with any engine version from 0.4.16 to 5.9.0 version.
The mod will override the default chest and this fork specially will refill the chests
at every pyramid created. Each pyramid will have a special mob named mummy, and the blocks
used in the pyramids are only few used (those with pictures).
The mod will register alias if the older mod "pyramid" is detected.
The mod provides a command, `spawnpyramid` will created a new pyramid and it receives
an optional argumwent as room type, there are 3 rooms types. Such command requirest
the server privilegie to use it.
## Licensing ## Licensing
This program is free software. It comes without any warranty, to This program is free software. It comes without any warranty, to
the extent permitted by applicable law. the extent permitted by applicable law.
### Source code and textures * Source code and textures
* [MIT License](https://mit-license.org/) * [MIT License](https://mit-license.org/)
* (c) Copyright BlockMen (2013) * (c) Copyright BlockMen (2013)
* Mummy model
### Mummy model
* MIT License * MIT License
* (c) Copyright Pavel\_S (2013) * (c) Copyright Pavel\_S (2013)
* Textures
### Textures
* `tsm_pyramids_eye.png` by bas080, [CC-BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/) * `tsm_pyramids_eye.png` by bas080, [CC-BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)
* `tsm_pyramids_men.png` by bas080, CC-BY-SA 3.0 * `tsm_pyramids_men.png` by bas080, CC-BY-SA 3.0
* `tsm_pyramids_sun.png` by bas080, CC-BY-SA 3.0 * `tsm_pyramids_sun.png` by bas080, CC-BY-SA 3.0
* All other: BlockMen (MIT License) * Sounds from ([freesound.org](https://freesound.org)):
### Sounds
The authors are ([freesound.org](https://freesound.org)):
* `mummy.1.ogg` by Raventhornn, [CC0](https://creativecommons.org/publicdomain/zero/1.0/) * `mummy.1.ogg` by Raventhornn, [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
* `mummy.2.ogg` by Raventhornn, CC0 * `mummy.2.ogg` by Raventhornn, CC0
* `mummy_hurt.1.ogg` by Under7dude, CC0 * `mummy_hurt.1.ogg` by Under7dude, CC0
* `mummy_death.1.ogg` by scorpion67890 (modified by Wuzzy), CC0 * `mummy_death.1.ogg` by scorpion67890 (modified by Wuzzy), CC0
* All other: BlockMen (MIT License)

View File

@ -1 +1 @@
Pyramids with treasures! You can find them in deserts and sandstone deserts. BUILDINGS of pyramids with treasures! You can find them in deserts and sandstone deserts.

View File

@ -36,6 +36,10 @@ local PYRA_MAX_Y = 1000
local is_50 = minetest.has_feature("object_use_texture_alpha") local is_50 = minetest.has_feature("object_use_texture_alpha")
-- minetest 5.5 check -- minetest 5.5 check
local is_54 = minetest.has_feature("use_texture_alpha_string_modes") or nil local is_54 = minetest.has_feature("use_texture_alpha_string_modes") or nil
-- get mapgen cos perlin noise must match mapgen choice and nodes
local mgname = minetest.get_mapgen_setting("mg_name") or "v7"
-- also perlin noise must be in sync for simplev7 mod
local mgsimp = minetest.get_modpath("simplev7") or nil
tsm_pyramids = {} tsm_pyramids = {}
tsm_pyramids.is_50 = is_50 tsm_pyramids.is_50 = is_50
@ -283,10 +287,14 @@ local function make(pos, brick, sandstone, stone, sand, ptype, room_id)
return ok, msg return ok, msg
end end
local perl1 local perl1 -- perlin noise / it depends of the mapgen, upstream do not set property
-- if mg v6 set this {SEED1 = 9130, OCTA1 = 3, PERS1 = 0.5, SCAL1 = 250} -- Values should match minetest mapgen V6 desert noise.
perl1 = { SEED1 = 9130, OCTA1 = 1, PERS1 = 0.5, SCAL1 = 25 } -- Values should match minetest mapgen V7 desert noise.
if mgname == "v6" then perl1 = {SEED1 = 9130, OCTA1 = 3, PERS1 = 0.5, SCAL1 = 250} end -- Values should match minetest mapgen V6 desert noise.
if mgname == "v7p" then perl1 = {SEED1 = 9130, OCTA1 = 1, PERS1 = 0.5, SCAL1 = 25} end -- The multicraft v7plus desert noise are not knowwed.
if mgname == "v7" then perl1 = {SEED1 = 9130, OCTA1 = 1, PERS1 = 0.5, SCAL1 = 25} end -- Values should match minetest mapgen V7 desert noise.
if mgsimp ~= nil then perl1 = {SEED1 = 5349, OCTA1 = 3, PERS1 = 0.7, SCAL1 = 500} end -- must match to find some desert sand
-- get_perlin can only call it after the environment is created so wrap code for older engines into minetest.after(0, ...) and only call it once
if tsm_pyramids.is_50 then if tsm_pyramids.is_50 then
tsm_pyramids.perlin1 = minetest.get_perlin(perl1.SEED1, perl1.OCTA1, perl1.PERS1, perl1.SCAL1) tsm_pyramids.perlin1 = minetest.get_perlin(perl1.SEED1, perl1.OCTA1, perl1.PERS1, perl1.SCAL1)
else else

View File

@ -1,5 +1,5 @@
name = tsm_pyramids name = tsm_pyramids
description = Pyramids with treasures! You can find them in deserts and sandstone deserts. description = BUILDINGS of pyramids with treasures! You can find them in deserts and sandstone deserts.
depends = default depends = default
optional_depends = farming, tnt, treasurer, doc_items, awards, cmi optional_depends = farming, tnt, treasurer, doc_items, awards, cmi
min_minetest_version = 5.0 min_minetest_version = 0.4.16