ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/deliantra
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/deliantra (file contents):
Revision 1.105 by root, Sat Apr 3 02:58:25 2010 UTC vs.
Revision 1.107 by root, Thu Apr 8 03:51:26 2010 UTC

806 user => $PROFILE->{user}, 806 user => $PROFILE->{user},
807 pass => $PROFILE->{password}, 807 pass => $PROFILE->{password},
808 mapw => $mapw, 808 mapw => $mapw,
809 maph => $maph, 809 maph => $maph,
810 810
811 client => "deliantra",
811 client => "$DC::VERSION $] $^O", 812 clientversion => $DC::VERSION,
812 813
813 map_widget => $MAPWIDGET, 814 map_widget => $MAPWIDGET,
814 statusbox => $STATUSBOX, 815 statusbox => $STATUSBOX,
815 map => $MAP, 816 map => $MAP,
816 mapmap => $MAPMAP, 817 mapmap => $MAPMAP,
1941 $r 1942 $r
1942} 1943}
1943 1944
1944my %SORT_ORDER = ( 1945my %SORT_ORDER = (
1945 type => sub { 1946 type => sub {
1947 use sort 'stable';
1946 sort { $a->{type} <=> $b->{type} or $a->{name} cmp $b->{name} } @_ 1948 sort { $a->{type} <=> $b->{type} or $a->{name} cmp $b->{name} } @_
1947 }, 1949 },
1948 mtime => sub { 1950 mtime => sub {
1951 use sort 'stable';
1949 my $NOW = time; 1952 my $NOW = time;
1950 sort { 1953 sort {
1951 my $atime = $a->{mtime} - $NOW; $atime = $atime < 5 * 60 ? int $atime / 60 : 6; 1954 my $atime = $a->{mtime} - $NOW; $atime = $atime < 5 * 60 ? int $atime / 60 : 6;
1952 my $btime = $b->{mtime} - $NOW; $btime = $btime < 5 * 60 ? int $btime / 60 : 6; 1955 my $btime = $b->{mtime} - $NOW; $btime = $btime < 5 * 60 ? int $btime / 60 : 6;
1953 1956
1954 ($a->{flags} & F_LOCKED) <=> ($b->{flags} & F_LOCKED) 1957 ($a->{flags} & F_LOCKED) <=> ($b->{flags} & F_LOCKED)
1955 or $btime <=> $atime 1958 or $btime <=> $atime
1956 or $a->{type} <=> $b->{type} 1959 or $a->{type} <=> $b->{type}
1957 } @_ 1960 } @_
1958 }, 1961 },
1959 weight => sub { sort { 1962 weight => sub {
1963 use sort 'stable';
1964 sort {
1960 $a->{weight} * ($a->{nrof} || 1) <=> $b->{weight} * ($b->{nrof} || 1) 1965 $a->{weight} * ($a->{nrof} || 1) <=> $b->{weight} * ($b->{nrof} || 1)
1961 or $a->{type} <=> $b->{type} 1966 or $a->{type} <=> $b->{type}
1962 } @_ }, 1967 } @_
1968 },
1963); 1969);
1964 1970
1965sub inventory_widget { 1971sub inventory_widget {
1966 my $hb = new DC::UI::HBox homogeneous => 1; 1972 my $hb = new DC::UI::HBox homogeneous => 1;
1967 1973

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines