Further update to new ledger-like internals
This commit is contained in:
parent
5a7a7184dd
commit
1cbc906f1e
22 changed files with 153 additions and 149 deletions
|
@ -31,13 +31,12 @@ sub _read_warnings {
|
|||
|
||||
sub command { NEXT }
|
||||
|
||||
sub hook_add {
|
||||
my ($class, $cart, $user, $item) = @_;
|
||||
return if defined $user; # skip market items
|
||||
return if not exists $item->{product_id}; # skip unlisted, deposit, give, take
|
||||
sub hook_add_entry {
|
||||
my ($class, $cart, $entry) = @_;
|
||||
return if not $entry->has_attribute('product_id'); # skip unlisted, deposit, give, take
|
||||
|
||||
my @warnings = map {
|
||||
$_->( $item->{product_id}, $item->{description} )
|
||||
$_->( $entry->attribute('product_id'), $entry->{description} )
|
||||
} _read_warnings;
|
||||
|
||||
return if not @warnings;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue