This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
component:database [2015/08/12 21:30] rashy |
component:database [2015/08/12 21:31] (current) rashy |
||
---|---|---|---|
Line 31: | Line 31: | ||
local db = component.database -- primary database component | local db = component.database -- primary database component | ||
local invcontrol = component.inventory_controller -- primary inventory controller | local invcontrol = component.inventory_controller -- primary inventory controller | ||
+ | |||
+ | -- define slot numbers | ||
+ | dbSlot = 1 | ||
+ | invSlot = 1 | ||
-- compare item inside remote inventory to item in first slot of database | -- compare item inside remote inventory to item in first slot of database | ||
- | if db.get(1).label == invcontrol.getStackInSlot(sides.north, 1) then | + | if db.get(dbSlot).label == invcontrol.getStackInSlot(sides.north, invSlot).label then |
-- items match, do stuff with it. | -- items match, do stuff with it. | ||
else | else |