54 Commits

Author SHA1 Message Date
Auke Kok
715b8a85e2 minetest.after(): simplify further, pause in singleplayer (#5500)
Using the `dtime` value entirely, this will stop the clock
if the game is paused in singleplayer. Since most of the
clocks were fixed a long time ago, this should again be
safe to use.
2017-04-02 10:51:16 +02:00
MarkuBu
80dc0227c7 First commit for fine pointed (#5485) 2017-04-01 16:50:53 +02:00
Diego Martínez
3837e7d77e Add functions to strip color information. (#5472) 2017-03-28 21:55:39 +02:00
Loïc Blot
9ae099e7ed Fix a type bug in colorize function
This bug was introduced by dd2f1d7551bfd70357ad4f3fb180704194272147 and reported by @kilbith
2017-03-28 14:50:17 +02:00
red-001
792d324efc Change command prefix to "." and add "help" command. 2017-03-26 05:51:14 +01:00
Loïc Blot
4292670b64 Typo fix 2017-03-24 08:59:52 +01:00
red-001
c118df6b00 Add multiline support to colorize. (#5444) 2017-03-24 08:36:29 +01:00
red-001
3912e517a8 Block access to the io library 2017-03-19 12:34:33 +01:00
red-001
9a9db57881 Give CSM access to use core.colorize() (#5113) 2017-03-17 19:20:13 +01:00
red-001
8fe57bcf35 [CSM] Improve security for client-sided mods (#5100) 2017-03-13 23:56:05 +01:00
red-001
2001a8c195 [CSM] Add local formspecs. (#5094) 2017-03-13 23:56:05 +01:00
Loïc Blot
04680f648a [CSM] sound_play & sound_stop support + client_lua_api doc (#5096)
* squashed: CSM: Implement register_globalstep
  * Re-use fatal error mechanism from server to disconnect client on CSM error
  * Little client functions cleanups

* squashed: CSM: add core.after function
  * core.after is shared code between client & server
  * ModApiUtil get_us_time feature enabled for client
2017-03-13 23:56:05 +01:00
red-001
1c7fd8a35c [CSM] Add client-sided chat commands (#5092) 2017-03-13 23:56:05 +01:00
Auke Kok
4eb54bc232 Vector: Add vector.sort(a, b): return box edges
This function returns the box corners of the smallest box
that includes the two given coordinates.
2017-01-23 07:38:39 +00:00
sfan5
a99777ab39 Revert "Adding particle blend, glow and animation (#4705)"
This reverts commit 93e3555eae2deaeca69ee252cfa9cc9c3e0e49ef.
2016-11-14 15:28:06 +01:00
Foghrye4
04ea490226 Adding particle blend, glow and animation (#4705) 2016-11-15 00:09:59 +10:00
Auke Kok
5d6adaebb7 Core.rotate_and_place: Remove unused call to get_look_pitch() 2016-10-31 10:55:36 +00:00
rubenwardy
bb94e62525 Builtin: Add vector.floor helper function 2016-10-17 22:03:49 +02:00
HybridDog
516b701076 Only allow strings to be passed to minetest.global_exists (#4253)
Sometimes you accidentally forget the quotes when using global_exists, this makes minetest abort if you did so.

M  builtin/common/strict.lua
2016-06-28 06:34:22 +02:00
Rui914
7a9e8367db Faster insertion into table 2016-03-06 23:42:04 +00:00
ShadowNinja
677ab7463d Refactor logging
- Add warning log level
- Change debug_log_level setting to enumeration string
- Map Irrlicht log events to MT log events
- Encapsulate log_* functions and global variables into a class, Logger
- Unify dstream with standard logging mechanism
- Unify core.debug() with standard core.log() script API
2015-10-14 01:03:54 -04:00
kwolekr
23316c9f92 Add /emergeblocks command and core.emerge_area() Lua API 2015-09-23 15:56:24 -04:00
sfan5
d7405b6176 Allow random menu images for subgames 2015-07-21 16:58:22 +02:00
est31
d72ea1d30e Fix wrong replace from previous commit 2015-06-02 00:20:12 +02:00
est31
8afcbc6b7e Localize inside whole misc_helpers.lua 2015-06-01 18:18:18 +02:00
ShadowNinja
126ded5c24 Add minetest.global_exists() 2015-04-21 22:58:37 +02:00
ShadowNinja
c07611927c Fix serialization of floating point numbers 2015-02-21 13:16:18 -05:00
est31
22ea6a5d81 Server: announce MIN/MAX protocol version supported to serverlist. Client: check serverlist
Client now informs about incompatible servers from the list, this permits to prevent the protocol movements.
Server announces its supported protocol versions to master server
2015-02-18 16:09:59 +01:00
est31
c1efb227cb Fix crash on passing false as value in table to table.copy(t)
Fixes #2293.
2015-02-14 15:18:11 +10:00
rubenwardy
2fe827939e Change assignment to global in a function to warning 2015-02-04 14:57:06 -05:00
ShadowNinja
1010819207 Fix imprecise serialization of large numbers 2015-01-25 20:19:35 -05:00
kwolekr
4e33a698b7 Simplify deleteblocks chat command argument parsing
Add optional core.pos_to_string decimal place rounding
Move core.string_to_pos to builtin/common/misc_helpers.lua for consistency
2015-01-15 18:05:13 -05:00
Diego Martínez
d74fa1ba9a Fix typo in serialize.lua. 2015-01-15 16:16:41 -05:00
Diego Martínez
d690109348 Fix off-by-one error in string:split implementation. 2015-01-04 23:33:55 -05:00
Diego Martinez
ae65a7056d Faster string.split implementation. 2014-12-28 23:27:07 -05:00
Craig Robbins
2784064a9d Revert "Adjust the values of dirs1 and dirs2 so that rotate_and_place orients textures correctly"
This reverts commit 9878e8de4fdf232ebb77b396766c339786c01218.

See: https://github.com/minetest/minetest/issues/1939 and IRC log for discussion
2014-12-12 16:21:29 +10:00
paramat
89c03f2ce9 Fix undeclared globals in functions and shorten lines in misc_helpers.lua. 2014-12-11 21:37:46 -05:00
SmallJoker
cd74934c42 Add Lua helper functions vector.apply(v) math.sign(x, tolerance) 2014-12-06 10:07:25 +01:00
SmallJoker
e42349140d Add minetest.copy_table(table) To get rid off the "table references"
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-27 18:19:01 +10:00
dvere
4e0dc35971 Adjust the values of dirs1 and dirs2 so that rotate_and_place orients textures correctly
According to doc/lua_api.txt if paramtype2 == "facedir" the two least significant bits of parm2 orient the texture around the axis. For dirs1 (looking at a wall) these would be 0, 1, 2, 3 and for dirs2 (looking at the ceiling) 2, 1, 0, 3
2014-11-25 12:44:47 +10:00
ShadowNinja
cc2855e59b Make duplicate warning checks file and line specific 2014-11-23 16:34:49 -05:00
sapier
6a043635dc Fix console spaming by debug function on mod checking for global variable to exist. 2014-11-23 15:24:37 +01:00
ShadowNinja
4b3c14a9d2 Add strict module
Also fix leaking globals found by it.
2014-11-19 12:40:54 -05:00
ShadowNinja
6ffe52db17 Tweak core.serialize
This adds proper support for nested tables and improves performance a bit.
2014-11-19 12:40:54 -05:00
ShadowNinja
e97ea49385 Fix dump() indentation with non-tab indents 2014-11-08 12:49:50 -05:00
Ryan Newell
c4ddc515f9 Add last_login field to auth.txt
Also shortens some related code and adds more parameters to string.split.
2014-11-08 12:49:50 -05:00
ShadowNinja
160e91e079 Make dump's output prettier
Changes:
  * Indentation with tabs by default.
  * Array keys dumped without "[i] = " prefix.
  * String keys that are valid identifiers aren't enclosed in '[""]'.
  * Basic support for multiple references (as specified in the comment).
2014-09-21 15:24:00 -04:00
ShadowNinja
6a28958b5b Remove vector assertions
These were initially added to get tracebacks for invalid vector errors, but it
didn't work and tracebacks have since been properly fixed in the core.
2014-07-19 23:50:50 -04:00
sapier
73907a2c7e Add srollbar formspec element 2014-07-16 15:02:56 +02:00
ShadowNinja
dd2fe1036b Rework dumping functions
Changes:
  * Add comments to explain the dumping code
  * Add support for dumping values of any type (as '<' <type> '>')
  * Add support for tables as keys in dump2()
  * Make dump2() return it's result (like dump()) rather than printing it
  * Simplify and optimize function serialization via serialize()
2014-05-24 17:32:42 -04:00