aboutsummaryrefslogtreecommitdiff
path: root/src/environment.cpp
diff options
context:
space:
mode:
authorstujones11 <stujones111@gmail.com>2017-08-24 09:01:16 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-08-24 10:01:16 +0200
commitac4884c3d677ef51bcce47f95ccd49d874022692 (patch)
treed7474c9c8914a6147a157245182fa8f201b51646 /src/environment.cpp
parent01c319d7784c3db614a53745e5af62c43cf45c90 (diff)
downloadminetest-ac4884c3d677ef51bcce47f95ccd49d874022692.tar.gz
minetest-ac4884c3d677ef51bcce47f95ccd49d874022692.tar.bz2
minetest-ac4884c3d677ef51bcce47f95ccd49d874022692.zip
Make entity selection and collision boxes independently settable (#6218)
* Make entity selection and collision boxes independently settable
Diffstat (limited to 'src/environment.cpp')
0 files changed, 0 insertions, 0 deletions
8' href='#n118'>118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
local modname = core.get_current_modname() or "??"
local modstorage = core.get_mod_storage()

dofile("preview:example.lua")
-- This is an example function to ensure it's working properly, should be removed before merge
core.register_on_shutdown(function()
	print("[PREVIEW] shutdown client")
end)

core.register_on_connect(function()
	print("[PREVIEW] Player connection completed")
	local server_info = core.get_server_info()
	print("Server version: " .. server_info.protocol_version)
	print("Server ip: " .. server_info.ip)
	print("Server address: " .. server_info.address)
	print("Server port: " .. server_info.port)
end)

core.register_on_placenode(function(pointed_thing, node)
	print("The local player place a node!")
	print("pointed_thing :" .. dump(pointed_thing))
	print("node placed :" .. dump(node))
	return false
end)

core.register_on_item_use(function(itemstack, pointed_thing)
	print("The local player used an item!")
	print("pointed_thing :" .. dump(pointed_thing))
	print("item = " .. itemstack:get_name())
	return false
end)

-- This is an example function to ensure it's working properly, should be removed before merge
core.register_on_receiving_chat_message(function(message)
	print("[PREVIEW] Received message " .. message)
	return false
end)

-- This is an example function to ensure it's working properly, should be removed before merge
core.register_on_sending_chat_message(function(message)
	print("[PREVIEW] Sending message " .. message)
	return false
end)

-- This is an example function to ensure it's working properly, should be removed before merge
core.register_on_hp_modification(function(hp)
	print("[PREVIEW] HP modified " .. hp)