… | |
… | |
347 | } else { |
347 | } else { |
348 | warn "object $ob->{_name} has unknown material ($ob->{material}) set.\n"; |
348 | warn "object $ob->{_name} has unknown material ($ob->{material}) set.\n"; |
349 | } |
349 | } |
350 | } |
350 | } |
351 | |
351 | |
|
|
352 | # check whether attachment is the same as in the archetype |
|
|
353 | if (exists $ob->{attach}) { |
|
|
354 | my $arch = $ARCH{$ob->{_name}}; |
|
|
355 | my $js = JSON::XS->new->utf8->canonical (1); |
|
|
356 | |
|
|
357 | if ($js->encode ($js->decode ($ob->{attach})) eq $js->encode ($arch->{attach})) { |
|
|
358 | delete $ob->{attach} |
|
|
359 | } |
|
|
360 | } |
|
|
361 | |
352 | # color_fg is used as default for magicmap if magicmap does not exist |
362 | # color_fg is used as default for magicmap if magicmap does not exist |
353 | $ob->{magicmap} ||= delete $ob->{color_fg} if exists $ob->{color_fg}; |
363 | $ob->{magicmap} ||= delete $ob->{color_fg} if exists $ob->{color_fg}; |
354 | |
364 | |
355 | # nuke outdated or never supported fields |
365 | # nuke outdated or never supported fields |
356 | delete @$ob{qw( |
366 | delete @$ob{qw( |