ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/minesweeper.ext
(Generate patch)

Comparing deliantra/maps/perl/minesweeper.ext (file contents):
Revision 1.13 by root, Mon Aug 28 07:06:12 2006 UTC vs.
Revision 1.14 by root, Fri Sep 8 16:22:14 2006 UTC

10 if (my $teleport = $ob->{options}{"teleport_$status"}) { 10 if (my $teleport = $ob->{options}{"teleport_$status"}) {
11 my ($x, $y, $damned) = split /,/, $teleport; 11 my ($x, $y, $damned) = split /,/, $teleport;
12 my $pl = cf::player::find $ob->{player}; 12 my $pl = cf::player::find $ob->{player};
13 13
14 $pl->ob->transfer ($x, $y); 14 $pl->ob->transfer ($x, $y);
15 $pl->set_savebed ($pl->ob->map->path, $x, $y) 15 $pl->savebed ($pl->ob->map->path, $x, $y)
16 if $ob->{options}{"set_savebed_$status"}; 16 if $ob->{options}{"set_savebed_$status"};
17 } 17 }
18} 18}
19 19
20sub apply { 20sub apply {
92 my $map = $self->{map} = []; 92 my $map = $self->{map} = [];
93 93
94 for my $x (0 .. $arg{width} - 1) { 94 for my $x (0 .. $arg{width} - 1) {
95 for my $y (0 .. $arg{height} - 1) { 95 for my $y (0 .. $arg{height} - 1) {
96 my $ob = $map->[$x][$y] = cf::object::new "minesweeper-unknown"; 96 my $ob = $map->[$x][$y] = cf::object::new "minesweeper-unknown";
97 $ob->set_name ("apply to try your luck or intelligence"); 97 $ob->name ("apply to try your luck or intelligence");
98 Scalar::Util::weaken ($ob->{meta} = $self); 98 Scalar::Util::weaken ($ob->{meta} = $self);
99 99
100 $ob->attach ("minesweeper_field"); 100 $ob->attach ("minesweeper_field");
101 $ob->insert_ob_in_map_at ($self->map, undef, cf::INS_ABOVE_FLOOR_ONLY, 101 $ob->insert_ob_in_map_at ($self->map, undef, cf::INS_ABOVE_FLOOR_ONLY,
102 $self->x + $x, $self->y + $y); 102 $self->x + $x, $self->y + $y);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines