whilst working on EE2 I tried checking if there was space in the player's inventory. I did this this way:
Code: Select all
if game.player.can_insert{name = game.player.gui.left.EE_energy_condenser.EE_flow_item_selector.EE_label_item_selector.caption, count = 1} == true then
I Always seem to get a return that was not true, these are the tested cases:
* player has space in main inventory and belt.
* player has space in main inventory but not in belt.
* player does not have space in main inventory but does have space in belt.
* player does not have space in main inventory and not in belt.
all the cases did not result in can_insert actually returning true. attached are the save and the mod files.
instructions to create a scenario in which the inv is not full and the command thinks it is.
1: give yourself an Energy condenser either with test mode (the pic is a wooden chest for now) or with the command(item name= energy-condenser)
2: grab two different items from somewhere, It can be every item
3: open the Energy condenser and click the "select item" button with an item of choice in hand.
4: grab the other item in your hand
5: press the button with this item in hand
6: see as the game prints the message "the player inventory seems to be full" (I made the mod give this message as the inv was full to check this bug's existence)
7: AFTER THIS THE GAME MIGHT CRASH DUE TO EE2 THIS IS JUST A PROBLEM IN THE MOD AND IS NOT ASSOCIATED WITH THIS BUG-REPORT
8: see as the game actually should not have detected a full inventory.
instructions for creating a scenario in which the command seems to work.
1: give yourself an Energy condenser either with test mode (the pic is a wooden chest for now) or with the command(item name= energy-condenser)
2: grab two different items from somewhere, It can be every item
3: open the Energy condenser and click the "select item" button with an item of choice in hand.
4: do this command: "/c game.player.cursor_stack.set_stack{name = "iron-plate", count= "5000000"}" (make sure to do this inside of the energy condenser)
5: place this stack in the Energy condenser inventory.
6: ctrl click this stack to fill the whole player inventory.
7: manually fill the whole player-belt. (clicking the 5mil stack will give you a full stack)
8: press the select item button with another item as that you have currently selected it with. (make sure to fill the spot it had in the player's inventory/belt (if you had it there))
9: see as the game prints the message "the player inventory seems to be full" (I made the mod give this message as the inv was full to check this bug's existence)
10: AFTER THIS THE GAME MIGHT CRASH DUE TO EE2 THIS IS JUST A PROBLEM IN THE MOD AND IS NOT ASSOCIATED WITH THIS BUG-REPORT
11: see as this worked, the inv was full and the command detected this.
other instructions you can probably think of yourself.
Laptop specs:
CPU: Intel Core i3-4005U 1.7GHZ
IGPU: Intel HD 4400
Motherboard: Unknown Laptop Motherboard
Disclaimer: I do have a second screen attached, it is attached thru HDMI. (unknown type)
I hope this post gave enough information. As always I'll gladly give omr information of necessary.