--- cf.schmorp.de/maps/perl/nimbus.ext 2006/08/28 07:06:12 1.14 +++ cf.schmorp.de/maps/perl/nimbus.ext 2006/09/08 16:22:14 1.17 @@ -66,7 +66,7 @@ my $save = { stats => stats_get $ob->stats, orig_stats => stats_get $pl->orig_stats, - savebed => [$pl->get_savebed], + savebed => [$pl->savebed], skill_exp => skills_get $ob, }; @@ -82,11 +82,11 @@ cf::localdir, cf::playerdir, $ob->name, "nimbus"; if ($ob->map->path ne $path) { - my $nimbus = cf::map::get_map "/schmorp/nimbus"; - $nimbus->set_path ($path); - $nimbus->set_unique (1); + my $nimbus = cf::map::find "/schmorp/nimbus"; + $nimbus->path ($path); + $nimbus->unique (1); - $pl->set_savebed ($path, 24, 12); + $pl->savebed ($path, 24, 12); } }, ; @@ -100,9 +100,9 @@ my $portal = cf::object::new "exit"; - $portal->set_slaying ($map); - $portal->set_hp ($x); - $portal->set_sp ($y); + $portal->slaying ($map); + $portal->hp ($x); + $portal->sp ($y); $portal->apply ($pl->ob); @@ -133,7 +133,7 @@ @savebed = ("/scorn/taverns/inn", 10, 5); } - $pl->set_savebed (@savebed); + $pl->savebed (@savebed); my $map = $ob->map; @@ -142,7 +142,6 @@ # should make this a temporary map and let cf deal with it unlink $map->path; unlink $map->path . ".pst"; - unlink $map->path . ".cfperl"; $map->delete_map; @@ -156,30 +155,3 @@ }, ; -cf::attach_to_maps #TODO#d# remove, onyl for upgrading old to new nimbus - on_upgrade => sub { - my ($map) = @_; - - if ($map->path =~ /\/nimbus$/) { - warn "NIMBUS UPGRADE ", $map->path, "\n"; - - (grep length $_->slaying, $map->at (11, 1))[0]->attach (nimbus_exit => restore => 1); - - for my $x (37 .. 58) { - for my $y (32 .. 53) { - $_->remove for $map->at ($x, $y); - - my $portal = cf::object::new "well"; - - $portal->set_name ("free ride, courtesy of your friendly upgrade script"); - $portal->set_slaying ($map->path); - $portal->set_hp (1); - $portal->set_sp (1); - - $portal->insert_ob_in_map_at ($map, undef, cf::INS_ABOVE_FLOOR_ONLY, $x, $y); - } - } - } - }, -; -