1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Rename minetest.* to core.* in devtest

This commit is contained in:
Lars Müller 2024-10-28 15:57:54 +01:00 committed by GitHub
parent d849d51c2d
commit 88c7a54e08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
78 changed files with 914 additions and 914 deletions

View file

@ -2,7 +2,7 @@
local walk_speed = 2
local walk_distance = 10
minetest.register_entity("soundstuff:bigfoot", {
core.register_entity("soundstuff:bigfoot", {
initial_properties = {
physical = false,
collisionbox = {-1, -1, -1, 1, 1, 1},
@ -31,18 +31,18 @@ minetest.register_entity("soundstuff:bigfoot", {
end,
})
minetest.register_chatcommand("spawn_bigfoot", {
core.register_chatcommand("spawn_bigfoot", {
params = "",
description = "Spawn a big foot object that makes footstep sounds",
func = function(name, _param)
local player = minetest.get_player_by_name(name)
local player = core.get_player_by_name(name)
if not player then
return false, "No player."
end
local pos = player:get_pos()
pos.y = pos.y + player:get_properties().collisionbox[2]
pos.y = pos.y - (-1) -- bigfoot collisionbox goes 1 down
minetest.add_entity(pos, "soundstuff:bigfoot")
core.add_entity(pos, "soundstuff:bigfoot")
return true
end,
})