aboutsummaryrefslogtreecommitdiff
path: root/src/script/common/c_internal.cpp
diff options
context:
space:
mode:
authorMuhammad Nur Hidayat Yasuyoshi <muhdnurhidayat96@yahoo.com>2017-03-03 12:19:44 +0000
committerLoic Blot <loic.blot@unix-experience.fr>2017-04-06 08:37:38 +0200
commit80a5f526343033ec2c4cbfef7797adb2511e7ed9 (patch)
tree27d5558524e65132cc62ccec5e78e991c0a61b5b /src/script/common/c_internal.cpp
parentd39828f17c23ec90ba190d37720f749393e6e534 (diff)
downloadminetest-80a5f526343033ec2c4cbfef7797adb2511e7ed9.tar.gz
minetest-80a5f526343033ec2c4cbfef7797adb2511e7ed9.tar.bz2
minetest-80a5f526343033ec2c4cbfef7797adb2511e7ed9.zip
Translated using Weblate (Malay)
Currently translated at 37.0% (340 of 918 strings)
Diffstat (limited to 'src/script/common/c_internal.cpp')
0 files changed, 0 insertions, 0 deletions
ref='#n128'>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 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
-- Minetest: builtin/item_entity.lua

function core.spawn_item(pos, item)
	-- Take item in any format
	local stack = ItemStack(item)
	local obj = core.add_entity(pos, "__builtin:item")
	-- Don't use obj if it couldn't be added to the map.
	if obj then
		obj:get_luaentity():set_item(stack:to_string())
	end
	return obj
end

-- If item_entity_ttl is not set, enity will have default life time