… | |
… | |
2122 | |
2122 | |
2123 | void fix_generated_item (object *op, object *creator, int difficulty, int max_magic, int flags); |
2123 | void fix_generated_item (object *op, object *creator, int difficulty, int max_magic, int flags); |
2124 | |
2124 | |
2125 | MODULE = cf PACKAGE = cf::object PREFIX = cf_ |
2125 | MODULE = cf PACKAGE = cf::object PREFIX = cf_ |
2126 | |
2126 | |
2127 | # no clean way to get an object from an archetype - stupid idiotic |
|
|
2128 | # dumb kludgy misdesigned plug-in api slowly gets on my nerves. |
|
|
2129 | |
|
|
2130 | object *new (utf8_string archetype = 0) |
2127 | object *new (utf8_string archetype = 0) |
2131 | PROTOTYPE: ;$ |
2128 | PROTOTYPE: ;$ |
2132 | CODE: |
2129 | CODE: |
2133 | RETVAL = archetype |
2130 | RETVAL = archetype |
2134 | ? archetype::get (archetype) |
2131 | ? archetype::get (archetype) |
… | |
… | |
2600 | archetype *skillvec (U32 index) |
2597 | archetype *skillvec (U32 index) |
2601 | CODE: |
2598 | CODE: |
2602 | RETVAL = index < skillvec.size () ? (archetype *)(object *)skillvec [index] : 0; |
2599 | RETVAL = index < skillvec.size () ? (archetype *)(object *)skillvec [index] : 0; |
2603 | OUTPUT: RETVAL |
2600 | OUTPUT: RETVAL |
2604 | |
2601 | |
|
|
2602 | void |
|
|
2603 | find_by_type (int type) |
|
|
2604 | PPCODE: |
|
|
2605 | for_all_archetypes (arch) |
|
|
2606 | if (arch->type == type) |
|
|
2607 | XPUSHs (sv_2mortal (to_sv (arch))); |
|
|
2608 | |
2605 | INCLUDE: $PERL $srcdir/genacc archetype $srcdir/../include/object.h | |
2609 | INCLUDE: $PERL $srcdir/genacc archetype $srcdir/../include/object.h | |
2606 | |
2610 | |
2607 | MODULE = cf PACKAGE = cf::party |
2611 | MODULE = cf PACKAGE = cf::party |
2608 | |
2612 | |
2609 | partylist *first () |
2613 | partylist *first () |