… | |
… | |
97 | |
97 | |
98 | if ($ns->{can_widget}) { |
98 | if ($ns->{can_widget}) { |
99 | my $ws = $ns->{ws_worldmap} ||= create_widgets $ns; |
99 | my $ws = $ns->{ws_worldmap} ||= create_widgets $ns; |
100 | $ws->{toplevel}->toggle_visibility; |
100 | $ws->{toplevel}->toggle_visibility; |
101 | } else { |
101 | } else { |
102 | $ns->send_msg ("log", "Your client doesn't support the (required) widget extension. Try CFPlus at http://crossfire.schmorp.de/.", cf::NDI_RED); |
102 | $ns->send_msg ("log", "Your client doesn't support the (required) widget extension. Try the deliantra client at http://www.deliantra.net/.", cf::NDI_RED); |
103 | } |
103 | } |
104 | |
104 | |
105 | cf::override 1; |
105 | cf::override 1; |
106 | }, |
106 | }, |
107 | ; |
107 | ; |
108 | |
108 | |
109 | cf::async_ext { |
109 | cf::async_ext { |
110 | $Coro::current->{desc} = "worldmap updater"; |
110 | $Coro::current->{desc} = "worldmap updater"; |
111 | my $schedule_interval = Coro::Event->timer (after => 1, data => cf::WF_AUTOCANCEL); |
|
|
112 | |
111 | |
113 | while () { |
112 | while () { |
114 | $schedule_interval->interval ($WORLDMAP_UPDATE_INTERVAL); |
113 | Coro::EV::timer_once $WORLDMAP_UPDATE_INTERVAL; |
115 | $schedule_interval->next; |
|
|
116 | |
114 | |
117 | cf::get_slot 0.01, -50, "worldmap update"; |
115 | cf::get_slot 0.01, -50, "worldmap update"; |
118 | |
116 | |
119 | ++$GENCOUNT; |
117 | ++$GENCOUNT; |
120 | |
118 | |