2019-04-14 20:45:32 +00:00
|
|
|
/*
|
|
|
|
* tools.h
|
|
|
|
*
|
|
|
|
* Created on: Dec 26, 2016
|
|
|
|
* Author: root
|
|
|
|
*/
|
|
|
|
|
2019-05-02 08:09:24 +00:00
|
|
|
#ifndef BASIN_TOOLS_H_
|
|
|
|
#define BASIN_TOOLS_H_
|
2019-04-14 20:45:32 +00:00
|
|
|
|
|
|
|
#include <basin/item.h>
|
|
|
|
#include <basin/world.h>
|
|
|
|
|
|
|
|
struct tool_proficiency {
|
2019-05-01 10:03:13 +00:00
|
|
|
uint16_t* proficient;
|
|
|
|
size_t proficient_size;
|
2019-04-14 20:45:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct tool_info {
|
2019-05-01 10:03:13 +00:00
|
|
|
char* name;
|
|
|
|
struct tool_proficiency* proficiencies;
|
|
|
|
size_t proficient_size;
|
2019-04-14 20:45:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void tools_init();
|
|
|
|
|
|
|
|
struct tool_info* tools_get(char* name);
|
|
|
|
|
|
|
|
int tools_proficient(struct tool_info* info, uint8_t harvest_level, uint16_t b);
|
|
|
|
|
|
|
|
void tools_add(struct tool_info* tool);
|
|
|
|
|
2019-05-02 08:09:24 +00:00
|
|
|
#endif /* BASIN_TOOLS_H_ */
|