Commit Graph

102 Commits

Author SHA1 Message Date
Vanessa Ezekowitz
f3423c0e04 check for air OR snow above when growing a plant 2015-07-19 15:27:14 -04:00
LeMagnesium
632f3ebc28 Added french translation
- Added french translation for intllib
2015-05-09 13:58:59 +02:00
Mahmut Elmas
add7954f9c Update and rename plants_lib/locale to plants_lib/locale/tr.txt
Update and rename flowers_plus/textures to flowers_plus/textures/tr.txt
Update and rename bushes_classic/locale to bushes_classic/locale/tr.txt
2015-03-02 21:35:33 -05:00
Vanessa Ezekowitz
f0e3c1052a early exit from the 0.2s loop if there's nothing to do 2015-02-28 12:23:50 -05:00
Vanessa Ezekowitz
3de5c62d87 fix brain-o in new dtime algorithm
don't actually run the checking loop if there's nothing to do!
otherwise it spins the CPU at 100% for no reason
2015-02-28 11:46:18 -05:00
Vanessa Ezekowitz
93a439638e read-out/play back more log entries per globalstep
if there is time to do so (up to a max of 0.2 seconds' worth)
2015-02-28 00:30:47 -05:00
Vanessa Ezekowitz
bc80a079bc Play out the rest of the mapblock log at standard shutdown
This prevents unpopulated map areas being left over after a restart.

Adds a fairly large shutdown penalty to the engine only if the mapgen is
actively generating at the time of shutdown.  If the mapgen is more or less
idle, no extra time is added.
2015-02-27 12:29:43 -05:00
Vanessa Ezekowitz
b80a7a9693 use find_nodes_in_area_under_air() if available
instead of manually searching for air above find_nodes_in_area() list
2015-02-27 11:48:51 -05:00
Vanessa Ezekowitz
4193ffe206 fix copy&paste error 2015-02-17 14:37:49 -05:00
Vanessa Ezekowitz
0c6db75383 add API function to choose a random wall
(rather than always the first found)

move API.txt into plants_lib dir
moderate re-formatting of API.txt, accounting for tab width = 4 spaces.
2015-02-16 22:25:53 -05:00
Vanessa Ezekowitz
b18b0a8211 limit plants_lib's per-step time based on dtime
(requested limit is 0.2s, but actual tends to be around 1.5s max lag spike)
2015-02-08 23:27:58 -05:00
Vanessa Ezekowitz
56177e5142 use current intllib API 2014-12-27 01:20:51 -05:00
Vanessa Ezekowitz
f30cc04a78 copy&paste error
spawn_plants -> biome.spawn_plants

(only affects legacy string-named function based spawners)
2014-11-20 11:14:20 -05:00
Vanessa Ezekowitz
42d858c752 turn debug off 2014-10-01 06:55:30 -04:00
Zeno-
2e82a976ba Fix some nodes not spawning (e.g. wood soils) 2014-09-27 12:55:52 -04:00
Vanessa Ezekowitz
f270890a5d fix incorrect filtering-out of group: in surface registration. 2014-09-27 00:33:11 -04:00
Vanessa Ezekowitz
1f6695189b turn debug on, get rid of a redundant variable 2014-09-26 23:26:18 -04:00
Vanessa Ezekowitz
077c985388 record chunk generate events, but populate the results gradually during
globalstep rather than on-generate

without-air-checking code does not work correctly yet.
2014-09-24 08:15:48 -04:00
Vanessa Ezekowitz
c1f7fb784b functionalize the filter code
so that both types of mapgen routines can use the same subroutines.
less code duplication that way.
2014-09-24 03:31:24 -04:00
Vanessa Ezekowitz
27430814a0 allow multiple nodes to be specified as a table in the
nodes_or_function_or_model field of the mapgen register call
2014-08-22 23:31:30 -04:00
Vanessa Ezekowitz
9c7e96dd62 allow random_facedir parameter during mapgen call 2014-08-21 01:06:41 -04:00
Vanessa Ezekowitz
5fdcaa25c4 roll "legacy" mapgen calls into a loop similar to the standard one, call them
"no air check" instead.  Adjust debug prints and summary accordingly.

This reduces the total number of mapgen hooks from 5 down to just 2.
2014-08-18 19:23:56 -04:00
Vanessa Ezekowitz
b914e5395b use set_node(), not add_node()
don't use minetest.env:* method (deprecated), use minetest.* instead
2014-08-15 19:34:15 -04:00
Vanessa Ezekowitz
985111d17c that wasn't a memory leak
the table falls out of context at the end of the loop anyway
so the GC will delete it when the loop ends. No reason to delete it manually.
2014-08-15 18:58:05 -04:00
Vanessa Ezekowitz
1e4ad757a5 route most of the various recent print statements through plantslib:dbg()
(still defaults to false)
2014-08-15 16:25:32 -04:00
Vanessa Ezekowitz
8e4c942d9a don't register surface types if their nodes aren't defined. 2014-08-15 16:14:09 -04:00
Vanessa Ezekowitz
a25fb55c57 print a final report of the number of actions and legacy mapgen hooks that were registered 2014-08-15 15:51:03 -04:00
Vanessa Ezekowitz
760160d638 legacy stuff should always be marked as "Warning:"
and make warnings more consistent
2014-08-15 11:10:17 -04:00
Vanessa Ezekowitz
5cf07fd39f remove useless mention of last revision. 2014-08-15 11:01:42 -04:00
Vanessa Ezekowitz
da732bb18e use real function calls instead of the old string method where possible
(basically leaving only the old legacy mapgen calls still using the string method)
2014-08-15 10:47:44 -04:00
Vanessa Ezekowitz
8f9b8014c7 Don't allow registration of actions for undefined nodes 2014-08-15 00:51:08 -04:00
Vanessa Ezekowitz
6a13ffc5d2 don't bother testing if air check is enabled in legacy
...because it never will be :P
2014-08-15 00:00:30 -04:00
Vanessa Ezekowitz
c312c4e52f local-ize the block cache table 2014-08-14 23:52:23 -04:00
Vanessa Ezekowitz
33c565fbdb move perlin1 (perlin_fertile_area) out of the inner loop
(it only needs to be inside the action loop)
2014-08-14 23:47:23 -04:00
Vanessa Ezekowitz
6bc8fead15 optimize out table.insert() and ipairs() calls 2014-08-14 23:35:02 -04:00
Vanessa Ezekowitz
c311de6694 free the block cache memory after using it (fix mem leak) 2014-08-13 21:19:53 -04:00
Vanessa Ezekowitz
c636c62480 new mapgen algorithm - do the surface eval in one pass. 2014-08-12 22:04:48 -04:00
Vanessa Ezekowitz
da211cc07d get rid of the old clone_node function. nothing uses or needs it now.
use minetest.override_item() instead
2014-07-30 14:29:42 -04:00
Vanessa Ezekowitz
ca88a35f26 use minetest built-in functions for node protection
phase out the old hand-rolled protection function
drops support for old protection mods
2014-06-22 22:20:51 -04:00
SoniEx2
ce8433ac1e Use the length operator instead of table.getn
Should also be faster...
2014-05-25 10:03:29 -03:00
SoniEx2
ebeb286c31 Added function support in ABM growing code 2014-05-24 18:51:32 -04:00
Vanessa Ezekowitz
753cb01234 ...and make it local. 2014-05-24 17:08:15 -04:00
Vanessa Ezekowitz
591a917e21 performance improvement
cache type() check of node/function/model, always check if it's string
before trying to execute that string as a function.
2014-05-24 16:39:35 -04:00
SoniEx2
942aefd7dd Better handling of function calls
Make sure that bad function calls fail safely, and failed function
calls don't leave spawned=true
2014-05-24 16:26:59 -04:00
Vanessa Ezekowitz
c1d3d6b454 couple small optimizations in mapgen code 2014-05-16 17:04:12 -04:00
Vanessa Ezekowitz
6b65eeb1fb better way to test for valid function name in generate call, by SoniEx2 2014-05-16 16:39:32 -04:00
Vanessa Ezekowitz
5eb48a2c67 got rid of more debugging stuff 2014-05-15 06:26:18 -04:00
Vanessa Ezekowitz
2e0293a3f3 got rid of all extraneous debugging statements
left the actual function in, and replaced one call with a print statement
since if it happens, it indicates a non-fatal error that should always be
reported anyway (invalid object refs in mapgen calls)
2014-05-15 06:23:50 -04:00
Vanessa Ezekowitz
df6f23baed last revision date 2014-05-15 06:09:59 -04:00
Vanessa Ezekowitz
087c661090 more robust handling of function/table/string values
in register_generate_plant() call (to handle e.g. unknown nodes being spawned)
2014-05-15 06:08:25 -04:00