| Revision: | 1.1 |
| Committed: | Fri Mar 19 22:16:27 2010 UTC (16 years, 7 months ago) by root |
| Branch: | MAIN |
| Log Message: | *** empty log message *** |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | root | 1.1 | #! perl |
| 2 | |||
| 3 | # various build extensions | ||
| 4 | |||
| 5 | cf::player->attach ( | ||
| 6 | on_build => sub { | ||
| 7 | my ($pl, $builder, $map, $x, $y) = @_; | ||
| 8 | |||
| 9 | if (defined $map->{user} | ||
| 10 | and $map->{user} ne $pl->ob->name | ||
| 11 | and !$pl->ob->flag (cf::FLAG_WIZ) | ||
| 12 | ) { | ||
| 13 | $pl->failmsg ("You cannot build on maps belonging to another player."); | ||
| 14 | cf::override; | ||
| 15 | } | ||
| 16 | }, | ||
| 17 | ); | ||
| 18 | |||
| 19 |