forked from github/server
we are about to remove rt_register, but not quite yet.
This commit is contained in:
parent
773f3767d3
commit
95929a99b5
|
@ -193,7 +193,6 @@ void it_register(item_type * itype)
|
||||||
|
|
||||||
assert(len<sizeof(buffer)-sizeof(itype));
|
assert(len<sizeof(buffer)-sizeof(itype));
|
||||||
len = cb_new_kv(name, len, &itype, sizeof(itype), buffer);
|
len = cb_new_kv(name, len, &itype, sizeof(itype), buffer);
|
||||||
rt_register(itype->rtype);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *it_aliases[][2] = {
|
static const char *it_aliases[][2] = {
|
||||||
|
|
|
@ -225,7 +225,7 @@ extern "C" {
|
||||||
int *deaths);
|
int *deaths);
|
||||||
} weapon_type;
|
} weapon_type;
|
||||||
|
|
||||||
extern void rt_register(resource_type * it);
|
void rt_register(resource_type * it);
|
||||||
resource_type *rt_find(const char *name);
|
resource_type *rt_find(const char *name);
|
||||||
item_type *it_find(const char *name);
|
item_type *it_find(const char *name);
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,8 @@ item_type * test_create_itemtype(const char ** names) {
|
||||||
item_type * itype;
|
item_type * itype;
|
||||||
|
|
||||||
rtype = new_resourcetype(names, NULL, RTF_ITEM);
|
rtype = new_resourcetype(names, NULL, RTF_ITEM);
|
||||||
itype = new_itemtype(rtype, ITF_ANIMAL|ITF_BIG, 5000, 7000);
|
rt_register(rtype);
|
||||||
|
itype = new_itemtype(rtype, ITF_ANIMAL | ITF_BIG, 5000, 7000);
|
||||||
|
|
||||||
return itype;
|
return itype;
|
||||||
}
|
}
|
||||||
|
@ -148,7 +149,7 @@ void test_create_world(void)
|
||||||
|
|
||||||
test_create_itemtype(names+0);
|
test_create_itemtype(names+0);
|
||||||
test_create_itemtype(names+4);
|
test_create_itemtype(names+4);
|
||||||
test_create_itemtype(names+6);
|
test_create_itemtype(names + 6);
|
||||||
|
|
||||||
t_plain = test_create_terrain("plain", LAND_REGION | FOREST_REGION | WALK_INTO | CAVALRY_REGION);
|
t_plain = test_create_terrain("plain", LAND_REGION | FOREST_REGION | WALK_INTO | CAVALRY_REGION);
|
||||||
t_plain->size = 1000;
|
t_plain->size = 1000;
|
||||||
|
|
Loading…
Reference in New Issue