LUA function: get_ground_level

inkelyad
Member
 
Posts: 12
Joined: Sat Jan 21, 2012 13:56

LUA function: get_ground_level

by inkelyad » Sat Jan 21, 2012 14:18

github link

It shoul be useful for 'More Ores' and 'Gemstones' mods.
 

User avatar
Death Dealer
Member
 
Posts: 1379
Joined: Wed Feb 15, 2012 18:46

by Death Dealer » Sat Feb 18, 2012 15:53

Very cheap yo, most people are not looking to cheat the game.
Keep calm and code python^_^
 

jn
Member
 
Posts: 106
Joined: Tue Jan 03, 2012 19:15

by jn » Sat Feb 18, 2012 20:40

How is this related to cheating?
 

User avatar
Death Dealer
Member
 
Posts: 1379
Joined: Wed Feb 15, 2012 18:46

by Death Dealer » Sat Feb 18, 2012 21:59

What's this lua Funtion do? Teleport to ground level?
Keep calm and code python^_^
 

User avatar
IPushButton2653
Member
 
Posts: 666
Joined: Wed Nov 16, 2011 22:47

by IPushButton2653 » Sat Feb 18, 2012 22:10

It makes ores stay below the Y coordinate of 0. So no more gemstones where dirt should be :P
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Sun Feb 19, 2012 01:09

IPushButton2653 wrote:It makes ores stay below the Y coordinate of 0. So no more gemstones where dirt should be :P


Mmm... this can be a problem because of the fact of mountains that are way above Y=0. So a mountain, that would normally have a few or a lot gemstones/ores, would no longer have them.

Although this could be good, or again, it could not be. Its all situational.

While yes, this makes it generally more realistic, in other cases, such as the mountain stated above; It would make it unrealistic.

Since both cases will happen on a server, I cannot really justify using it.
 

User avatar
IPushButton2653
Member
 
Posts: 666
Joined: Wed Nov 16, 2011 22:47

by IPushButton2653 » Sun Feb 19, 2012 03:32

It just dawned on me, but couldn't this also be used to make an ore-like material, for say, fossils, appear under a certain depth?
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Sun Feb 19, 2012 05:54

IPushButton2653 wrote:It just dawned on me, but couldn't this also be used to make an ore-like material, for say, fossils, appear under a certain depth?


In theory, yes. By logic, if you can force ores to only show up when Y<0, then certainly you can make fossils appear when Y<X.

Only way to be 100% sure is to test it :D
Last edited by Gatharoth on Sun Feb 19, 2012 08:07, edited 1 time in total.
 

User avatar
Death Dealer
Member
 
Posts: 1379
Joined: Wed Feb 15, 2012 18:46

by Death Dealer » Sun Feb 19, 2012 07:38

Oooooo. Interesting....
Keep calm and code python^_^
 

User avatar
sdzen
Member
 
Posts: 1170
Joined: Fri Aug 05, 2011 22:33

by sdzen » Sun Feb 19, 2012 12:18

well if you think about it gemstones should be deep in the ground anyway so their somewhat hard to get to
[h]Zen S.D.[/h] The next generation of tranquility!
malheureusement mon français n'est pas bon :<
Owner of the Zelo's
In game name: MuadTralk, spdtainted, sdzen, sd zen, sdzeno
 

inkelyad
Member
 
Posts: 12
Joined: Sat Jan 21, 2012 13:56

by inkelyad » Sun Feb 19, 2012 14:33

Gatharoth wrote:Mmm... this can be a problem because of the fact of mountains that are way above Y=0. So a mountain, that would normally have a few or a lot gemstones/ores, would no longer have them.

My function solves exactly this problem. It return ground level. You want to know mountains height, right?

sdzen wrote:well if you think about it gemstones should be deep in the ground anyway so their somewhat hard to get to

Yes, they should. Here is how I do it: https://github.com/inkelyad/zlovespancakes-minetest-mods/blob/use_get_ground_level/gemstones/init.lua
Last edited by inkelyad on Sun Feb 19, 2012 16:08, edited 1 time in total.
 

User avatar
IPushButton2653
Member
 
Posts: 666
Joined: Wed Nov 16, 2011 22:47

by IPushButton2653 » Sun Feb 19, 2012 23:57

Unfortunately, I can't seem to compile on my computer. But if anyone has a windows version with this in it, I'd be thankful if they'd share it with me.
 

jn
Member
 
Posts: 106
Joined: Tue Jan 03, 2012 19:15

by jn » Sun Mar 25, 2012 09:36

What is the exact error message you get?
 


Return to Minetest Engine

Who is online

Users browsing this forum: No registered users and 1 guest

cron