diff --git a/.gitignore b/.gitignore index b0b69edf4..0e53b75b4 100644 --- a/.gitignore +++ b/.gitignore @@ -85,6 +85,9 @@ build/android/path.cfg build/android/and_env build/android/AndroidManifest.xml timestamp +<<<<<<< HEAD ## Backup files *backup.tar.gz +======= +>>>>>>> bca616493783b18b2f280d4773cb4be41d01c434 diff --git a/builtin/mainmenu/common.lua b/builtin/mainmenu/common.lua index 3dd7d8b4a..0cd82a567 100644 --- a/builtin/mainmenu/common.lua +++ b/builtin/mainmenu/common.lua @@ -290,7 +290,11 @@ end -------------------------------------------------------------------------------- function is_server_protocol_compat(server_proto_min, server_proto_max) +<<<<<<< HEAD return min_supp_proto <= (server_proto_max or 24) and max_supp_proto >= (server_proto_min or 13) +======= + return not ((min_supp_proto > (server_proto_max or 24)) or (max_supp_proto < (server_proto_min or 13))) +>>>>>>> bca616493783b18b2f280d4773cb4be41d01c434 end -------------------------------------------------------------------------------- function is_server_protocol_compat_or_error(server_proto_min, server_proto_max) diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index ca331ff4e..8d565c30d 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -241,9 +241,12 @@ send_pre_v25_init (Support older servers) bool true # Save the map received by the client on disk. enable_local_map_saving (Saving map received from server) bool false +<<<<<<< HEAD # Show entity selection boxes show_entity_selectionbox (Show entity selection boxes) bool true +======= +>>>>>>> bca616493783b18b2f280d4773cb4be41d01c434 # Enable usage of remote media server (if provided by server). # Remote servers offer a significantly faster way to download media (e.g. textures) # when connecting to the server. diff --git a/doc/lua_api.txt b/doc/lua_api.txt index fdc736906..967b8659e 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -945,7 +945,10 @@ Displays a horizontal bar made up of half-images. * `number`: Number of items in the inventory to be displayed. * `item`: Position of item that is selected. * `direction` +<<<<<<< HEAD * `offset`: offset in pixels from position. +======= +>>>>>>> bca616493783b18b2f280d4773cb4be41d01c434 ### `waypoint` Displays distance to selected world position. @@ -1871,7 +1874,10 @@ Call these functions only at load time! * `modifier`: when true, the function should return the actual hp_change. Note: modifiers only get a temporary hp_change that can be modified by later modifiers. modifiers can return true as a second argument to stop the execution of further functions. +<<<<<<< HEAD Non-modifiers receive the final hp change calculated by the modifiers. +======= +>>>>>>> bca616493783b18b2f280d4773cb4be41d01c434 * `minetest.register_on_respawnplayer(func(ObjectRef))` * Called when player is to be respawned * Called _before_ repositioning of player occurs @@ -1883,6 +1889,36 @@ Call these functions only at load time! * Called when a player joins the game * `minetest.register_on_leaveplayer(func(ObjectRef))` * Called when a player leaves the game +<<<<<<< HEAD +======= +* `minetest.register_on_inventory_move_item(func(inv_from,list_from,slot_from,inv_to,list_to,slot_to,stack,amount,player)` + * Called when a player move items between inventories using GUI (including crafting grid). + * `inv_from`: InvRef of inventory from which item was extracted. + * `list_from`: name of a list, where from stack extracted. + * `slot_from`: integer, speak by itself + * `inv_to`: InvRef of inventory to which item was dropped. + * `list_to`: name of a list, where to stack dropped. + * `slot_to`: integer, speak by itself + * `stack`: ItemStack of a stack moved + * `amount`: integer, amount of items, which was sucessfully transported + * `player`: ObjectRef of the player +* `minetest.register_on_inventory_add_item(func(inv_to,list_to,stack,stack_left,player)` + * Called when a player recive item via digging or from item entity or when `player:add_item(list, item)` called. + * `inv_to`: InvRef of inventory to which item was added. + * `list_to`: name of a list, where stack was added. + * `slot_to`: integer, speak by itself + * `stack`: ItemStack of a stack added + * `stack_left`: ItemStack of a stack which was left on ground + * `player`: ObjectRef of the player +* `minetest.register_on_inventory_drop_item(func(inv_from,list_from,slot_from,stack,player, dropped_pos)` + * Called when a player drop item on ground + * `inv_from`: InvRef of inventory from which item was dropped. + * `list_from`: name of a list, where from stack dropped. Usually 'main'. + * `slot_from`: integer, speak by itself + * `stack`: ItemStack of a stack dropped + * `player`: ObjectRef of the player + * `dropped_pos`: a table `{x=x_pos, y=y_pos, z=z_pos}`, where values contain absolute position of new item object. +>>>>>>> bca616493783b18b2f280d4773cb4be41d01c434 * `minetest.register_on_cheat(func(ObjectRef, cheat))` * Called when a player cheats * `cheat`: `{type=}`, where `` is one of: @@ -2574,6 +2610,10 @@ This is basically a reference to a C++ `ServerActiveObject` * `get_hp()`: returns number of hitpoints (2 * number of hearts) * `set_hp(hp)`: set number of hitpoints (2 * number of hearts) * `get_inventory()`: returns an `InvRef` +<<<<<<< HEAD +======= +* `add_item(listname, stack)`: add item somewhere in list, returns leftover `ItemStack`. If object has no inventory, return `ItemStack`. Same as for `InvRef`, `player:add_item(listname, stack)` can be used instead of `player:get_inventory():add_item(listname, stack)`, but will launch callbacks registered by `minetest.register_on_inventory_add_item`. +>>>>>>> bca616493783b18b2f280d4773cb4be41d01c434 * `get_wield_list()`: returns the name of the inventory list the wielded item is in * `get_wield_index()`: returns the index of the wielded item * `get_wielded_item()`: returns an `ItemStack` diff --git a/minetest.conf.example b/minetest.conf.example index e913140ae..88aacf196 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -253,10 +253,13 @@ # type: bool # enable_local_map_saving = false +<<<<<<< HEAD # Show entity selection boxes. # type: bool # show_entity_selectionbox true +======= +>>>>>>> bca616493783b18b2f280d4773cb4be41d01c434 # Enable usage of remote media server (if provided by server). # Remote servers offer a significantly faster way to download media (e.g. textures) # when connecting to the server.