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

Comparing deliantra/maps/perl/nimbus.ext (file contents):
Revision 1.15 by root, Wed Aug 30 08:34:21 2006 UTC vs.
Revision 1.16 by root, Wed Aug 30 12:06:17 2006 UTC

140 teleport $pl, @savebed; 140 teleport $pl, @savebed;
141 141
142 # should make this a temporary map and let cf deal with it 142 # should make this a temporary map and let cf deal with it
143 unlink $map->path; 143 unlink $map->path;
144 unlink $map->path . ".pst"; 144 unlink $map->path . ".pst";
145 unlink $map->path . ".cfperl";
146 145
147 $map->delete_map; 146 $map->delete_map;
148 147
149 $pl->play_sound_player_only (cf::SOUND_PLAYER_DIES); 148 $pl->play_sound_player_only (cf::SOUND_PLAYER_DIES);
150 149
154 153
155 cf::override; 154 cf::override;
156 }, 155 },
157; 156;
158 157
159cf::attach_to_maps #TODO#d# remove, onyl for upgrading old to new nimbus
160 on_upgrade => sub {
161 my ($map) = @_;
162
163 if ($map->path =~ /\/nimbus$/) {
164 warn "NIMBUS UPGRADE ", $map->path, "\n";
165
166 (grep length $_->slaying, $map->at (11, 1))[0]->attach (nimbus_exit => restore => 1);
167
168 for my $x (37 .. 58) {
169 for my $y (32 .. 53) {
170 $_->remove for $map->at ($x, $y);
171
172 my $portal = cf::object::new "well";
173
174 $portal->set_name ("free ride, courtesy of your friendly upgrade script");
175 $portal->set_slaying ($map->path);
176 $portal->set_hp (1);
177 $portal->set_sp (1);
178
179 $portal->insert_ob_in_map_at ($map, undef, cf::INS_ABOVE_FLOOR_ONLY, $x, $y);
180 }
181 }
182 }
183 },
184;
185

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines