2016-12-27 04:47:45 +00:00
|
|
|
/*
|
|
|
|
* craft.h
|
|
|
|
*
|
|
|
|
* Created on: Dec 26, 2016
|
|
|
|
* Author: root
|
|
|
|
*/
|
|
|
|
|
2019-05-02 08:09:24 +00:00
|
|
|
#ifndef BASIN_CRAFTING_H_
|
|
|
|
#define BASIN_CRAFTING_H_
|
2016-12-27 04:47:45 +00:00
|
|
|
|
2019-04-14 20:45:32 +00:00
|
|
|
#include <basin/network.h>
|
2019-04-18 15:59:54 +00:00
|
|
|
#include <basin/inventory.h>
|
|
|
|
#include <avuna/list.h>
|
2016-12-27 04:47:45 +00:00
|
|
|
|
2019-04-18 15:59:54 +00:00
|
|
|
struct list* crafting_recipies;
|
2016-12-27 04:47:45 +00:00
|
|
|
|
|
|
|
struct crafting_recipe {
|
2019-05-01 10:03:13 +00:00
|
|
|
struct slot* slot[9];
|
|
|
|
struct slot output;
|
|
|
|
uint8_t shapeless;
|
|
|
|
uint8_t width;
|
2016-12-27 04:47:45 +00:00
|
|
|
};
|
|
|
|
|
2019-04-18 15:59:54 +00:00
|
|
|
void crafting_init();
|
2016-12-27 04:47:45 +00:00
|
|
|
|
2019-04-18 15:59:54 +00:00
|
|
|
void crafting_once(struct player* player, struct inventory* inv);
|
2017-01-03 19:18:52 +00:00
|
|
|
|
2019-04-18 15:59:54 +00:00
|
|
|
int crafting_all(struct player* player, struct inventory* inv);
|
2017-01-03 19:18:52 +00:00
|
|
|
|
2019-04-18 15:59:54 +00:00
|
|
|
struct slot* crafting_result(struct mempool* pool, struct slot** slots, size_t slot_count); // 012/345/678 or 01/23
|
2016-12-28 10:18:41 +00:00
|
|
|
|
2019-05-02 08:09:24 +00:00
|
|
|
#endif /* BASIN_CRAFTING_H_ */
|