Commit Message

This commit is contained in:
SilicaAndPina 2020-07-29 13:23:42 +12:00
parent 4d8d04bc75
commit f20c4b7469
2 changed files with 6 additions and 5 deletions

View file

@ -35,6 +35,7 @@
<script>scripts\save_game_data.gml</script> <script>scripts\save_game_data.gml</script>
<script>scripts\pull_towards_black_holes.gml</script> <script>scripts\pull_towards_black_holes.gml</script>
<script>scripts\add_item_to_inventory.gml</script> <script>scripts\add_item_to_inventory.gml</script>
<script>scripts\use_item_in_inventory.gml</script>
</scripts> </scripts>
<objects name="objects"> <objects name="objects">
<objects name="natural generation"> <objects name="natural generation">
@ -58,7 +59,7 @@
</objects> </objects>
<objects name="items"> <objects name="items">
<object>objects\obj_dropped_item</object> <object>objects\obj_dropped_item</object>
<object>objects\obj_dropped_stone</object> <object>objects\obj_placed_item</object>
</objects> </objects>
</objects> </objects>
<rooms name="rooms"> <rooms name="rooms">

View file

@ -1,12 +1,12 @@
///use_item_in_inventory(slot) ///use_item_in_inventory(slot)
var slotno = argument0; var slotno = argument0;
var count = obj_inv_controller.inventoryCount[slot]; var count = obj_inv_controller.inventoryCount[slotno];
count--; count--;
obj_inv_controller.inventoryCount[slot] = count; obj_inv_controller.inventoryCount[slotno] = count;
if(count <= 0) if(count <= 0)
{ {
obj_inv_controller.inventory[slot] = 0; obj_inv_controller.inventory[slotno] = 0;
obj_inv_controller.inventoryCount[slot] = 0; obj_inv_controller.inventoryCount[slotno] = 0;
} }