mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
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)
This commit is contained in:
parent
865f380c91
commit
ab43377577
87 changed files with 6401 additions and 5584 deletions
|
@ -79,14 +79,12 @@ minetest.register_craftitem(":rat", {
|
|||
description = "Rat",
|
||||
inventory_image = "rat.png",
|
||||
on_drop = function(item, dropper, pos)
|
||||
minetest.env:add_rat(pos)
|
||||
item:take_item()
|
||||
return item
|
||||
end,
|
||||
on_place = function(item, dropped, pointed)
|
||||
pos = minetest.get_pointed_thing_position(pointed, true)
|
||||
if pos ~= nil then
|
||||
minetest.env:add_rat(pos)
|
||||
item:take_item()
|
||||
return item
|
||||
end
|
||||
|
@ -103,14 +101,12 @@ minetest.register_craftitem(":firefly", {
|
|||
description = "Firefly",
|
||||
inventory_image = "firefly.png",
|
||||
on_drop = function(item, dropper, pos)
|
||||
minetest.env:add_firefly(pos)
|
||||
item:take_item()
|
||||
return item
|
||||
end,
|
||||
on_place = function(item, dropped, pointed)
|
||||
pos = minetest.get_pointed_thing_position(pointed, true)
|
||||
if pos ~= nil then
|
||||
minetest.env:add_firefly(pos)
|
||||
item:take_item()
|
||||
return item
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue