Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
s_nodemeta.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5#pragma once
6
7#include "cpp_api/s_base.h"
8#include "cpp_api/s_item.h"
9#include "irr_v3d.h"
10
11struct MoveAction;
12struct ItemStack;
13
15 : virtual public ScriptApiBase,
16 public ScriptApiItem
17{
18public:
19 ScriptApiNodemeta() = default;
20 virtual ~ScriptApiNodemeta() = default;
21
22 // Return number of accepted items to be moved
24 const MoveAction &ma, int count,
25 ServerActiveObject *player);
26 // Return number of accepted items to be put
28 const MoveAction &ma, const ItemStack &stack,
29 ServerActiveObject *player);
30 // Return number of accepted items to be taken
32 const MoveAction &ma, const ItemStack &stack,
33 ServerActiveObject *player);
34 // Report moved items
36 const MoveAction &ma, int count,
37 ServerActiveObject *player);
38 // Report put items
40 const MoveAction &ma, const ItemStack &stack,
41 ServerActiveObject *player);
42 // Report taken items
44 const MoveAction &ma, const ItemStack &stack,
45 ServerActiveObject *player);
46private:
47
48};
Definition s_base.h:64
Definition s_item.h:22
Definition s_nodemeta.h:17
int nodemeta_inventory_AllowPut(const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player)
Definition s_nodemeta.cpp:53
int nodemeta_inventory_AllowMove(const MoveAction &ma, int count, ServerActiveObject *player)
Definition s_nodemeta.cpp:15
ScriptApiNodemeta()=default
void nodemeta_inventory_OnMove(const MoveAction &ma, int count, ServerActiveObject *player)
Definition s_nodemeta.cpp:125
void nodemeta_inventory_OnPut(const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player)
Definition s_nodemeta.cpp:158
void nodemeta_inventory_OnTake(const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player)
Definition s_nodemeta.cpp:189
int nodemeta_inventory_AllowTake(const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player)
Definition s_nodemeta.cpp:89
virtual ~ScriptApiNodemeta()=default
Definition serveractiveobject.h:41
Definition inventory.h:19
Definition inventorymanager.h:128