From 0dd1cd750bb51403d85a226a97a5ad93eb99b144 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 15 Jun 2017 15:32:33 +0200 Subject: BlockEntities: Support cloning self. --- src/ItemGrid.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ItemGrid.h') diff --git a/src/ItemGrid.h b/src/ItemGrid.h index 46e200b9c..a346c9c8d 100644 --- a/src/ItemGrid.h +++ b/src/ItemGrid.h @@ -48,6 +48,11 @@ public: /** Converts slot number into XY coords; sets coords to -1 on invalid slot number. Exported in ManualBindings.cpp */ void GetSlotCoords(int a_SlotNum, int & a_X, int & a_Y) const; + /** Copies all items from a_Src to this grid. + Both grids must be the same size (asserts). + Doesn't copy the listeners. */ + void CopyFrom(const cItemGrid & a_Src); + // tolua_begin // Retrieve slots by coords or slot number; Logs warning and returns the first slot on invalid coords / slotnum -- cgit v1.2.3