luvies / TaledensInvManagerUpdated

The code base for my unofficial update of Taleden's Inventory Manager
25 stars 28 forks source link

Ammo transfer for modded weapons that have the type IMySmallMissileLauncher #17

Open Dutak opened 6 years ago

Dutak commented 6 years ago

After a little bit of work i have found that some modded weapons that have conveyor connectability but do not transfer items into them. The main weapon I've been testing with is the small ship "Light Cannon" from CMDBob's Weapons. These weapons get ignored entirely by TIM as it dose not allow any form of transfer with IMySmallMissileLauncher type. The section of code that seems to be the problem is in the function ParseBlockTags()

else if (!block.HasInventory | (block is IMySmallMissileLauncher & !(block is IMySmallMissileLauncherReload | block.BlockDefinition.SubtypeName == "LargeMissileLauncher")) | block is IMyLargeInteriorTurret) { name.Append(String.Join(":", fields).ToLower() + " "); debugText.Add("Cannot sort items to " + block.CustomName + ": no conveyor-connected inventory"); }

This also seems to completely skips the FORCE: modifier as it beaks out of the if statement as soon as it is encountered.