1 #ifndef BUILDING_WAREHOUSE_H
2 #define BUILDING_WAREHOUSE_H
3 
4 #include "building/building.h"
5 #include "map/point.h"
6 
7 enum {
8     WAREHOUSE_ROOM = 0,
9     WAREHOUSE_FULL = 1,
10     WAREHOUSE_SOME_ROOM = 2
11 };
12 
13 enum {
14     WAREHOUSE_TASK_NONE = -1,
15     WAREHOUSE_TASK_GETTING = 0,
16     WAREHOUSE_TASK_DELIVERING = 1
17 };
18 
19 int building_warehouse_get_space_info(building *warehouse);
20 
21 int building_warehouse_get_amount(building *warehouse, int resource);
22 
23 int building_warehouse_add_resource(building *b, int resource);
24 
25 int building_warehouse_remove_resource(building *warehouse, int resource, int amount);
26 
27 void building_warehouse_remove_resource_curse(building *warehouse, int amount);
28 
29 void building_warehouse_space_set_image(building *space, int resource);
30 
31 void building_warehouse_space_add_import(building *space, int resource);
32 
33 void building_warehouse_space_remove_export(building *space, int resource);
34 
35 void building_warehouses_add_resource(int resource, int amount);
36 
37 int building_warehouses_remove_resource(int resource, int amount);
38 
39 int building_warehouse_for_storing(int src_building_id, int x, int y, int resource,
40                                    int distance_from_entry, int road_network_id, int *understaffed,
41                                    map_point *dst);
42 
43 int building_warehouse_for_getting(building *src, int resource, map_point *dst);
44 
45 int building_warehouse_determine_worker_task(building *warehouse, int *resource);
46 
47 #endif // BUILDING_WAREHOUSE_H
48