ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/pod/extensions.pod
(Generate patch)

Comparing deliantra/server/pod/extensions.pod (file contents):
Revision 1.2 by elmex, Sat Sep 9 23:22:06 2006 UTC vs.
Revision 1.4 by root, Thu Jan 8 03:03:24 2009 UTC

1=head1 CROSSFIRE+ EXTENSION INTRODUCTION 1=head1 DELIANTRA EXTENSION INTRODUCTION
2 2
3In Crossfire+ the plugin/extension and event API was completly rewritten 3In Deliantra, the plugin/extension and event API was completly rewritten
4in Perl and C++. Here is a small guide or introduction on how to 4in Perl and C++. Here is a small guide or introduction on how to use it.
5use it.
6 5
7If you have any questions don't hesitate to contact the developers, 6If you have any questions don't hesitate to contact the developers,
8see: http://cf.schmorp.de/contact.shtml 7see: http://cf.schmorp.de/contact.shtml
9 8
10 9
29can specify a priority with 'prio => -100' to be executed earlier. 28can specify a priority with 'prio => -100' to be executed earlier.
30 29
31You can also attach a Perl package to the skill like this: 30You can also attach a Perl package to the skill like this:
32 31
33 cf::attach_to_type cf::SKILL, cf::SK_JEWELER, 32 cf::attach_to_type cf::SKILL, cf::SK_JEWELER,
34 package => 'Crossfire::JewelerSkill'; 33 package => 'ext::JewelerSkill';
35 34
36cf::attach_to_objects will attach handlers for events on _all_ objects 35cf::attach_to_objects will attach handlers for events on _all_ objects
37in the game, this is mainly for debugging purposes, as it will produce a 36in the game, this is mainly for debugging purposes, as it will produce a
38high load. 37high load.
39 38
47 on_trigger => sub { 46 on_trigger => sub {
48 my ($map, $connection, $state) = @_; 47 my ($map, $connection, $state) = @_;
49 48
50 print "CONNECITON TRIGGERED: $connection : $state\n"; 49 print "CONNECITON TRIGGERED: $connection : $state\n";
51 50
52 for ($map->get_connection ($connection)) { 51 for ($map->find_link ($connection)) {
53 print "connected obj: " . $_->name . "\n"; 52 print "connected obj: " . $_->name . "\n";
54 } 53 }
55 }; 54 };
56 55
57This small attachment dumps all connection activations and the connected 56This small attachment dumps all connection activations and the connected

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines