play get item sound on <I+N

This commit is contained in:
József Sallai 2022-10-06 19:31:10 +03:00
parent f0949f49cf
commit 8ebe210105
1 changed files with 2 additions and 0 deletions

View File

@ -1564,6 +1564,8 @@ impl TextScriptVM {
let item_id = read_cur_varint(&mut cursor)? as u16;
let amount = read_cur_varint(&mut cursor)? as u16;
state.sound_manager.play_sfx(38);
if game_scene.inventory_player1.has_item_amount(item_id, Ordering::Less, amount) {
game_scene.inventory_player1.add_item(item_id);
state.mod_requirements.append_item(ctx, item_id)?;