Commit Graph

331 Commits

Author SHA1 Message Date
sapier
1c7c5d571d Fix serverlist 2013-07-09 22:55:39 +02:00
proller
e3b7c8e0cc Public server checkbox 2013-07-10 00:17:47 +04:00
kwolekr
e1a13608d8 Revert "Fix serverlist not beeing escaped correctly"
This reverts commit 39d03148e5d98ef5f9a31b131a79ff2bbd71a877.
2013-07-08 20:21:09 -04:00
sapier
eedb29346e Fix header not beeing shown except on singleplayer tab 2013-07-08 19:58:28 -04:00
sapier
39d03148e5 Fix serverlist not beeing escaped correctly
Always use address for server
Fix first (empty) element beeing selected after deleting last world
2013-07-08 19:58:17 -04:00
sapier
f419f66546 fix crash on play/start with empty world list
make enter button work in create world dialog
2013-07-08 19:58:03 -04:00
PilzAdam
0b5f18754c Make sure that coordinates passed to /teleport are actual numbers 2013-07-08 13:33:14 +02:00
ShadowNinja
a75afb85ca Move math.hypot() to misc_helpers.lua and fix zero-division error 2013-07-07 21:47:38 -04:00
kwolekr
9dcd21911a Lua main menu: Fix world creation dialog 2013-07-07 20:37:00 -04:00
PilzAdam
9bd5f612f7 Set numeric locale in Lua in main menu 2013-07-08 02:28:36 +02:00
sapier
88d43af276 Fix many formspec menu bugs 2013-07-07 19:49:52 -04:00
Sfan5
7e73b7cae9 Fix parseColor, change remaining colorkeys to new format, fix Contributor list 2013-07-07 19:59:18 +02:00
ShadowNinja
07715b1b6a Handle 0 vectors in vector.normalize() 2013-07-07 02:29:09 -04:00
ShadowNinja
ae8ff4b8e2 Add vector helpers 2013-07-07 01:49:11 -04:00
Sfan5
307c57dcc4 Use hexadecimal RRGGBB instead of colorkeys, rename getColor to parseColor 2013-07-06 10:32:58 +02:00
kwolekr
a225efaec5 Lua main menu: Fix crash on init lua error, mapgen dropdown index, and new worlds not saving index 2013-07-03 01:25:26 -04:00
sapier
967121a34b Replace C++ mainmenu by formspec powered one 2013-07-02 19:58:20 -04:00
PilzAdam
caf0b67e47 Remove unnecessary debug output in node_dig() 2013-07-02 00:34:59 +00:00
Lord89James
90b095aa54 Infinite tools in creative mode 2013-07-02 00:33:31 +00:00
kwolekr
0003fc8215 Add Lua VoxelArea methods: contains, containsp, containsi 2013-06-28 22:52:13 -04:00
kwolekr
3f13dc790c Add voxelarea.lua helper to builtin 2013-06-28 11:07:45 -04:00
kwolekr
2e292b67a0 Add Lua on_mapgen_init callback, and minetest.set_mapgen_params API 2013-06-27 22:35:35 -04:00
Diego Martínez
e65ac4d626 Restore old output format of dump() 2013-06-18 19:55:53 +00:00
khonkhortisan
3e4f1462bc Fix crash in dump() when index is a table 2013-06-15 00:10:16 +00:00
sapier
ab43377577 Move scriptapi to separate folder (by sapier)
On the lua side, notably minetest.env:<function>(<args>) should now
be replaced by minetest.<function>(<args>).
The old way is and will stay supported for a long time.

Also:
Update and clean up lua_api.txt (by celeron55)
Move EnvRef to lua and remove add_rat and add_firefly (by kahrl)
Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)
2013-05-25 00:51:02 +02:00
PilzAdam
b28734c82c Fix minetest.features 2013-05-01 16:00:58 +02:00
Sfan5
a4183994a4 Add a Way of checking for specific Feature with Lua Adds minetest.get_feature() and minetest.has_feature() 2013-05-01 15:06:01 +02:00
ShadowNinja
3d4d0cb574 Add option to not prepend "Server -!- " to messages sent with minetest.chat_send_player() 2013-04-23 09:47:08 +03:00
RealBadAngel
9449026839 Use system wide LuaJIT if aviable. 2013-04-08 22:10:00 +02:00
PilzAdam
97f0bb0342 Only enqueue falling nodes if they really want to fall 2013-04-05 22:33:11 +02:00
khonkhortisan
1586cdac53 unkn own block -> unkn own node 2013-04-05 15:57:39 +02:00
ShadowNinja
1bae82e6c4 Add private messaging with /msg 2013-04-05 15:25:59 +02:00
Diego Martínez
2fb0e547a0 Use the nodebox as selection box if it's not set manually 2013-04-05 15:14:37 +02:00
PilzAdam
76b86c0368 Add a delay to nodeupdate() 2013-04-05 02:24:39 +02:00
PilzAdam
9ff8012655 Return an ItemStack in minetest.item_place() if nodes' on rightclick doesnt return it 2013-04-02 15:19:02 +02:00
0gb.us
23590a8383 Don't grant priveleges to non-existent players.
When accidentally misspelling a name, privileges are sometimes granted to non-existent players, leaving them with the extra privileges, but without the default privileges, if they ever join the server. This corrects that by disallowing /grant from working with invalid players. For completeness, it does the same for /revoke.
2013-03-30 21:50:07 -04:00
0gb.us
02cbb58107 Fix node replacement in not-quite-loaded chunks
When first entering an area, sometimes placing nodes replaces other nodes that are not buildable_to. This seems to be caused by the fact that nodes in unloaded map blocks are treated as ignore, a node that is buildable_to. This fixes that, by using get_node_or_nil() instead of the previously-used get_node(), then checking to see if the nodes were actually loaded before replacing.
2013-03-29 14:18:51 -04:00
Splizard
9b5bb5c755 Allow falling nodes to pass through solid "buildable_to" nodes. 2013-03-19 16:38:56 +01:00
PilzAdam
d6026a5fee Prevent passing nil to unpack() in minetest.after 2013-03-19 00:15:41 +01:00
Jeija
fc5d2074b9 Allow minetest.after to take a variable number of arguments 2013-03-17 00:23:30 -04:00
kwolekr
ba78194636 Allow any character in formspec strings with escape char 2013-03-05 23:25:02 -05:00
PilzAdam
55097e1985 Fix pickup of dropped items when the player only takes a part of them 2013-03-03 16:35:29 +01:00
PilzAdam
ef6b8bee07 Drop nodes as items when dugged and no room in inventory and dont remove dropped items when no room in inventory 2013-02-21 16:58:50 +01:00
PilzAdam
fc61c8809b Dont drop tools on rightclick 2013-02-19 20:16:55 +01:00
Ilya Zhuravlev
214a8b4597 Set numeric locale for Lua 2013-02-18 13:58:55 +04:00
PilzAdam
86b906d015 Fix minetest.item_place_node() and minetest.item_drop() to always return an ItemStack 2013-02-13 18:06:25 +01:00
RealBadAngel
b1019a88ba Fix to on_rightclick not able to change wielded_item 2013-02-13 02:06:36 +04:00
PilzAdam
28f5b55643 Dont call on_rightclick() if sneak is pressed 2013-01-27 21:58:46 +01:00
PilzAdam
443bbe6a78 Fix spread of items in falling code 2013-01-12 20:55:45 +01:00
PilzAdam
5bc14e2fe4 Add on_rightclick(pos, node, clicker) callback for nodes 2013-01-04 17:15:16 +01:00
PilzAdam
29c17c14f1 Add ability to change the itemstack in placenode callbacks 2012-12-17 19:49:18 +01:00
jordan4ibanez
aa46e5c5e7 Fix item entity's collision with nodeboxes 2012-12-15 15:32:17 -05:00
PilzAdam
52ba413185 Only fly through walls in noclip mode wich requires the noclip privilege 2012-12-11 16:44:13 +01:00
Ilya Zhuravlev
eeb0900291 Fix minetest.get_node_drops(). It should always return list of item names, not ItemStack(s). 2012-12-02 21:09:30 +04:00
PilzAdam
fa50341a71 Only check attachment for nodes with group attached_node 2012-12-01 15:20:53 +01:00
PilzAdam
fa76057e7f Add the group attached_node
Nodes in this group will be dropped as items if the node under them or the node in the wallmounted direction is not walkable.
2012-12-01 13:32:32 +01:00
DannyDark
84ace27872 Log /grant and /revoke command usage 2012-11-30 22:12:21 +02:00
Matthew I
6c8fa83ecd Add shutdown hook interface to Lua API
Scripts can call minetest.register_on_shutdown() to register a
shutdown hook.

Document that minetest.register_on_shutdown() callbacks may not be run

If the server crashes, it is unlikely that callbacks registered using
minetest.register_on_shutdown() will be called.
2012-11-30 19:26:51 +02:00
Perttu Ahola
117f208826 Revert "Use wielditem drawtype for all nodes in item_entity"
This reverts commit ffad18e42442fed10c312adc989fc62b74e05896.
2012-11-27 17:32:58 +02:00
PilzAdam
ffad18e424 Use wielditem drawtype for all nodes in item_entity 2012-11-26 18:30:07 +01:00
Anthony
3ba9b26310 Fix server crash on /clearpassword
According to #253, using `/clearpassword` without an argument causes the server to crash from an assertion failure. I've resubmitted matttpt's patch as a pull request to aid in merging.
2012-11-20 16:45:30 +01:00
PilzAdam
23837e4352 Merge pull request #274 from PilzAdam/falling
Fix a bug in falling code where entities get stuck
2012-11-03 15:14:14 -07:00
PilzAdam
936411e4d1 Make air and ignore drop nothing 2012-11-03 18:29:01 +01:00
PilzAdam
21317be493 Fix a bug in falling code where entities get stuck 2012-11-03 18:07:49 +01:00
PilzAdam
df2ad89518 Remove a useless comment 2012-10-31 19:08:00 +01:00
PilzAdam
10dc2b30fb Move falling to builtin 2012-10-31 19:06:11 +01:00
Perttu Ahola
72ef6f637e Statically store always_collect field of __builtin:item 2012-09-09 23:14:41 +03:00
Perttu Ahola
d53a6cd851 Add overridable function for handling dropped items from nodes 2012-09-02 19:38:44 +03:00
Perttu Ahola
0b1ab41a95 Fix github issue #213: Dropping unknown items crashes the game
The items will now just disappear when dropped.
2012-08-19 10:55:04 +03:00
Matthew I
b29d609b0b Move chat commands to Lua and remove servercommand.{cpp,h}
Commands moved:
 /me
 /status
 /time
 /shutdown
 /ban
 /clearobjects
2012-08-12 16:45:58 +03:00
Matthew I
1ed559bd24 Allow digging of unknown nodes
This allows the removal of nodes with unknown types.
get_item_callback() (C++) would fail if a node has an unknown type.  Now it
will try using the callback from minetest.nodedef_default in this case.
Also, minetest.node_dig() (Lua) was altered to always allow digging when
the node definition is empty (i.e. unknown node).
2012-08-12 16:04:18 +03:00
Perttu Ahola
a9d8df83d2 Make the rollback system VERY FUCKING GOD DAMN POWERFUL 2012-07-27 13:24:28 +03:00
Perttu Ahola
508b7b5e51 Don't track liquids for rollback because of too much log 2012-07-27 02:46:54 +03:00
Perttu Ahola
0190f9b077 Experimental-ish rollback functionality 2012-07-27 02:27:18 +03:00
Perttu Ahola
100345f1e4 Deprecate minetest.add_to_creative_inventory and use group not_in_creative_inventory instead 2012-07-25 18:05:31 +03:00
Perttu Ahola
0a18dda158 Remove special handling of creative mode 2012-07-25 14:07:45 +03:00
Perttu Ahola
9eaf93d41d Detached inventory callbacks and reworked node metadata callbacks 2012-07-25 02:36:54 +03:00
Perttu Ahola
96eac87d47 builtin/item.lua: callbacks with copies of positions and nodes rather than recycle the same ones, which callbacks can modify 2012-07-24 17:46:17 +03:00
Perttu Ahola
e8331f0c1d Add oldnode parameter to minetest.register_on_placenode callback 2012-07-23 20:44:56 +03:00
Perttu Ahola
c009aa3a22 Fix building on top of (pointable && buildable_to) nodes 2012-07-23 20:42:08 +03:00
Perttu Ahola
2c027b03db Move /give, /giveme, /spawnentity and /pulverize to builtin/chatcommands.lua 2012-07-23 17:43:08 +03:00
Perttu Ahola
4cc98d7add minetest.register_on_player_receive_fields() 2012-07-22 17:40:48 +03:00
Matthew I
c62a121cca Add "/mods" command to list mods to client 2012-07-22 13:36:10 +03:00
Perttu Ahola
0b61253931 Actually fix facedir-rotated nodes placed using minetest.env:place_node() 2012-07-21 21:23:15 +03:00
Perttu Ahola
43df78102c Check whether node is known before reading definition in __builtin:item:on_step() 2012-07-21 16:36:14 +03:00
Calinou
61e58ee9b7 Message cleanups (consistency) and prevent /me when not allowed to shout 2012-07-21 02:27:58 +03:00
darkrose
f21af8da9c Handle nil placer as it might occur when using minetest.env:place_node. (Uberi) 2012-07-21 02:27:46 +03:00
Perttu Ahola
57550b2b3d Fix /setpassword and /clearpassword 2012-06-16 23:35:11 +03:00
Perttu Ahola
2b500d72e5 Remove tiles and special_tiles from node definition prototype because otherwise the old names can't be used 2012-06-16 18:02:26 +03:00
Perttu Ahola
cd0014b24f Update field names to non-deprecated ones in node definition prototype 2012-06-16 17:05:21 +03:00
Perttu Ahola
6a0388bb4b Node placement client-side prediction 2012-06-10 12:46:48 +03:00
Perttu Ahola
22502f80db Don't deprecate minetest.register_on_placenode and minetest.register_on_dignode 2012-06-08 01:51:23 +03:00
Perttu Ahola
81554fbf72 Add minetest.serialize() and minetest.deserialize() 2012-06-07 00:05:00 +03:00
Perttu Ahola
c3658e7c79 place_node, dig_node and punch_node; an in-game tester tool; remove old code 2012-06-05 23:10:07 +03:00
darkrose
a149c6ecde Add can_dig callback 2012-06-03 22:31:02 +03:00
Perttu Ahola
bf8cfce50e Add ObjRef:is_player() and modify ObjRef:get_player_name() to always return a string to aid better inter-object compatibility of code that assumes objects to be players 2012-06-03 22:31:01 +03:00
Perttu Ahola
35df1ee253 Implement locked chest; add after_place_node and after_dig_node node callbacks 2012-06-03 22:31:01 +03:00
Perttu Ahola
aba7134301 on_metadata_inventory_{move,offer,take} 2012-06-03 22:31:01 +03:00
Perttu Ahola
f3ec1452cd Random node metadata things 2012-06-03 22:31:00 +03:00
Perttu Ahola
29f03756bd Attempt to begin to implement chests and furnace in Lua (with problems) 2012-06-03 22:31:00 +03:00
Perttu Ahola
7a427c9070 Take out the "Privileges of foo are hidden from you." response of /privs 2012-05-19 12:42:55 +03:00
Perttu Ahola
24603d7ad3 Fix executing register_chatcommand-defined commands even in the middle of a chat line 2012-04-13 17:20:48 +03:00
Perttu Ahola
8742b3dab2 basic_privs to allow granting/revoking interact_extra too 2012-04-10 00:41:28 +03:00
Perttu Ahola
93cdc9b9dc Support static_spawnpoint setting 2012-04-09 23:32:13 +03:00
Perttu Ahola
07a5e59ae7 Allow redefining minetest.item_place and the like 2012-04-09 21:14:16 +03:00
Perttu Ahola
b1f043d010 Add basic_privs privilege 2012-04-09 18:57:41 +03:00
Perttu Ahola
251c0c8508 Improve doc/lua_api.txt and add minetest.get_item_group(name, group) 2012-04-09 12:36:25 +03:00
Perttu Ahola
3214daca4c Fix unable to join server first time with a password 2012-04-09 11:24:35 +03:00
Perttu Ahola
2b4d21160f minetest.get_node_group(name, group) 2012-04-08 18:39:55 +03:00
Perttu Ahola
24953ba974 Fix super-small size of regular item entities 2012-04-04 22:57:29 +03:00
Perttu Ahola
b22168d3da Fix dropped nodeitem visuals 2012-04-04 13:16:09 +03:00
Perttu Ahola
f0e7da8a63 Implement dropped items as LuaEntities; leave the old ones as is for compatibility 2012-04-01 16:06:01 +03:00
Perttu Ahola
8ecfd88d92 Remplement and improve /setting in Lua, now called /set 2012-04-01 13:08:52 +03:00
Perttu Ahola
b54178bbbd Don't allow /granting unknown privileges 2012-04-01 12:45:38 +03:00
Perttu Ahola
67547f74fc Split builtin.lua to multiple files 2012-04-01 12:38:19 +03:00
Perttu Ahola
d5594e431c granting and revoking of all privileges at once 2012-04-01 01:10:29 +03:00
Perttu Ahola
a18326e97a Fix authentication handler reporting failed password change while it isn't 2012-03-31 17:41:04 +03:00
Perttu Ahola
36c9463467 Improve /grant and /revoke output, add /auth_reload 2012-03-31 17:26:44 +03:00
Perttu Ahola
52122c342d Add 'fly' and 'fast' privileges and the underlying privileges-to-client system 2012-03-31 16:25:02 +03:00
Perttu Ahola
e297c73913 More documentation in doc/lua_api.txt 2012-03-31 13:08:17 +03:00
Perttu Ahola
280e1a2512 Allow group:groupname in ABM definition and implement minetest.hash_node_position() 2012-03-31 12:30:11 +03:00
Perttu Ahola
29110d5428 Fix handling of missing auth.txt in the new handler 2012-03-30 23:12:01 +03:00
Perttu Ahola
b494324ec3 Fix admin password handling in minetest.builtin_auth_handler.get_auth 2012-03-30 21:25:54 +03:00
Perttu Ahola
4cee9a86ac Improved teleport command 2012-03-30 20:54:57 +03:00
Perttu Ahola
7cad0a2dcd Reimplement authentication handler in Lua; now we have 1) infinite privilege names, 2) minetest.register_authentication_handler() 2012-03-30 18:42:18 +03:00
Perttu Ahola
80a64341f0 Add minetest.get_connected_players() 2012-03-30 13:45:51 +03:00
Perttu Ahola
b9ffb5f30d minetest.register_chatcommand(cmd, def) 2012-03-30 01:45:23 +03:00
Kahrl
a9ddbb4beb on_joinplayer + on_leaveplayer + scriptapi_run_callbacks + bugfix
Add minetest.register_on_joinplayer and minetest.register_on_leaveplayer,
make adding new callbacks to scriptapi.cpp easier by adding
scriptapi_run_callbacks, also fix a minor bug with PlayerSAO <->
singleplayer mode interaction
2012-03-29 14:27:09 +03:00
Perttu Ahola
fa24e6b995 Fix and extend minetest.after(time, func, param) 2012-03-27 08:17:42 +03:00
Perttu Ahola
37b64ff616 Add minetest.after(time, func) 2012-03-27 00:37:31 +03:00
Perttu Ahola
97b693052c Flatten share/ and user/ in the source and for the RUN_IN_PLACE build 2012-03-20 00:08:00 +02:00