Revision: | 1.1 |
Committed: | Wed Jul 11 15:57:30 2007 UTC (17 years ago) by root |
Branch: | MAIN |
Log Message: | rudimentary resource support, create new region_change event and new ext/player-env.ext |
# | User | Rev | Content |
---|---|---|---|
1 | root | 1.1 | #! perl # mandatory |
2 | |||
3 | # this extension provides "environmental effects", | ||
4 | # meaning mostly background music and region messages right now. | ||
5 | |||
6 | cf::player->attach ( | ||
7 | on_region_change => sub { | ||
8 | my ($pl, $new, $old) = @_; | ||
9 | |||
10 | $pl->ob->message ("You are now " . $new->longname . ". H<Use whereami for more details.>", $new->longname); | ||
11 | }, | ||
12 | ); | ||
13 | |||
14 |