ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra/Deliantra.pm
(Generate patch)

Comparing deliantra/Deliantra/Deliantra.pm (file contents):
Revision 1.57 by root, Thu Mar 23 08:55:54 2006 UTC vs.
Revision 1.58 by root, Thu Mar 23 20:15:08 2006 UTC

36our %FIELD_MULTILINE = ( 36our %FIELD_MULTILINE = (
37 msg => "endmsg", 37 msg => "endmsg",
38 lore => "endlore", 38 lore => "endlore",
39 maplore => "endmaplore", 39 maplore => "endmaplore",
40); 40);
41
42# movement bit type, PITA
43our %FIELD_MOVEMENT = map +($_ => undef),
44 qw(move_type move_block move_allow move_on move_off move_slow);
41 45
42# same as in server save routine, to (hopefully) be compatible 46# same as in server save routine, to (hopefully) be compatible
43# to the other editors. 47# to the other editors.
44our @FIELD_ORDER_MAP = (qw( 48our @FIELD_ORDER_MAP = (qw(
45 name swap_time reset_timeout fixed_resettime difficulty region 49 name swap_time reset_timeout fixed_resettime difficulty region
104sub MOVE_FLY_LOW (){ 0x02 } 108sub MOVE_FLY_LOW (){ 0x02 }
105sub MOVE_FLY_HIGH (){ 0x04 } 109sub MOVE_FLY_HIGH (){ 0x04 }
106sub MOVE_FLYING (){ 0x06 } 110sub MOVE_FLYING (){ 0x06 }
107sub MOVE_SWIM (){ 0x08 } 111sub MOVE_SWIM (){ 0x08 }
108sub MOVE_BOAT (){ 0x10 } 112sub MOVE_BOAT (){ 0x10 }
113sub MOVE_KNOWN (){ 0x1f } # all of above
109sub MOVE_ALL (){ 0xff } 114sub MOVE_ALLBIT (){ 0x10000 }
115sub MOVE_ALL (){ 0x1001f } # very special value, more PITA
110 116
111sub load_ref($) { 117sub load_ref($) {
112 my ($path) = @_; 118 my ($path) = @_;
113 119
114 open my $fh, "<", $path 120 open my $fh, "<", $path
137 delete $ob->{$_} for qw( 143 delete $ob->{$_} for qw(
138 can_knockback can_parry can_impale can_cut can_dam_armour 144 can_knockback can_parry can_impale can_cut can_dam_armour
139 can_apply pass_thru can_pass_thru 145 can_apply pass_thru can_pass_thru
140 ); 146 );
141 147
142 for my $attr (qw(move_type move_block move_allow move_on move_off move_slow)) { 148 for my $attr (keys %FIELD_MOVEMENT) {
143 next unless exists $ob->{$attr}; 149 next unless exists $ob->{$attr};
150
151 $ob->{$attr} = MOVE_ALL if $ob->{$attr} == 255; #d# compatibility
152
144 next if $ob->{$attr} =~ /^\d+$/; 153 next if $ob->{$attr} =~ /^\d+$/;
145 154
146 my $flags = 0; 155 my $flags = 0;
147 156
148 # assume list 157 # assume list

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines