[Kovarex] [0.16.4] missing train auto/manual switch ...
Posted: Sun Dec 17, 2017 2:38 pm
				
				map:
www.factorio.com
https://forums.factorio.com/
Code: Select all
/inv <-100,100> - Decrease,increase character inventory bonus.
Code: Select all
commands.add_command("inv", " <" .. -INVENTORY_ROWS_MAX .. "," .. INVENTORY_ROWS_MAX .. "> - Decrease,increase inventory with 10 slots.", function(param)
	characterInventory(game.players[param.player_index], param.parameter)
end)
function characterInventory(player, amountOfBonusLinesString)
  	if amountOfBonusLinesString and tonumber(amountOfBonusLinesString) and tonumber(amountOfBonusLinesString) >= -INVENTORY_ROWS_MAX and tonumber(amountOfBonusLinesString) <= INVENTORY_ROWS_MAX  then
	  	bonus = 10 * tonumber(amountOfBonusLinesString)
	  	if player.character.character_inventory_slots_bonus  + bonus > 0 then
			player.character.character_inventory_slots_bonus  = player.character.character_inventory_slots_bonus + bonus
	    else
	    	player.character.character_inventory_slots_bonus  = 0
	    end
	    if not global["config-pers"][player.name]["bonus"] then
	    	global["config-pers"][player.name]["bonus"] = {}
	    end
      global["config-pers"][player.name]["bonus"]["character_inventory_slots_bonus"] = player.character.character_inventory_slots_bonus
		if bonus < 0 then 
		    msg = "Inventory decreased by "
		else
		    msg = "Inventory increased by "
		end
		slSaysAll(msg .. player.name .. "  (bonus: " .. player.character.character_inventory_slots_bonus .. ")")
  	else
  		if not amountOfBonusLinesString then
  			amountOfBonusLinesString = ""
  		end
		slSays(player, "Please use a value between [" .. -INVENTORY_ROWS_MAX .. "," .. INVENTORY_ROWS_MAX .. "]  (used: /inv " .. amountOfBonusLinesString .. ")")
  	end
end
It happens with any Inventory increase. Try with wormmus config mod. Set inventory size to 1000 and you will see.Loewchen wrote:This save has been modded with a "save-file mod", if you can produce this issue with a not modified save, let us know.