aboutsummaryrefslogtreecommitdiff
path: root/textures/base/pack/bubble.png
blob: 799327c61a8a04631c5d9247e0194fb11200ef07 (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 0c 00 00 00 0c 08 06 00 00 00 56 75 5c .PNG........IHDR.............Vu\
0020 e7 00 00 00 55 49 44 41 54 78 01 63 40 07 0f 1e fc 87 03 10 9b 01 17 80 29 30 33 3b 54 8f 8c 61 ....UIDATx.c@...........)03;T..a
0040 06 e0 54 8c 6c 3a 4e 4d c8 8a 61 6c 6c 36 e1 55 8c 53 13 50 1d 54 03 7e c5 10 35 50 0d 10 dd 44 ..T.l:NM..all6.U.S.P.T.~..5P...D
0060 6a 00 29 24 a4 08 a7 3f 90 31 ba bf 40 34 ce 38 20 29 2e 08 29 26 39 69 00 00 40 c6 24 82 88 70 j.)$...?.1..@4.8.)..)&9i..@.$..p
0080 61 ea 00 00 00 00 49 45 4e 44 ae 42 60 82 a.....IEND.B`.
ef='#n40'>40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef S_ITEM_H_
#define S_ITEM_H_

#include "cpp_api/s_base.h"
#include "irr_v3d.h"

struct PointedThing;
struct ItemStack;
class ServerActiveObject;
struct ItemDefinition;
class LuaItemStack;
class ModApiItemMod;
class InventoryList;
struct InventoryLocation;

class ScriptApiItem
: virtual public ScriptApiBase
{
public:
	bool item_OnDrop(ItemStack &item,
			ServerActiveObject *dropper, v3f pos);
	bool item_OnPlace(ItemStack &item,
			ServerActiveObject *placer, const PointedThing &pointed);
	bool item_OnUse(ItemStack &item,
			ServerActiveObject *user, const PointedThing &pointed);
	bool item_OnCraft(ItemStack &item, ServerActiveObject *user,
			const InventoryList *old_craft_grid, const InventoryLocation &craft_inv);
	bool item_CraftPredict(ItemStack &item, ServerActiveObject *user,
			const InventoryList *old_craft_grid, const InventoryLocation &craft_inv);

protected:
	friend class LuaItemStack;
	friend class ModApiItemMod;

	bool getItemCallback(const char *name, const char *callbackname);
	void pushPointedThing(const PointedThing& pointed);

};