tAPI Mantis Bugtracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000166tAPIItemspublic2015-05-28 14:452015-06-10 09:08
Assigned To 
PlatformPCOSWindowsOS Version7
Product Version1.2.4.1 r15 
Target VersionFixed in Version 
Summary0000166: CraftGroups are not named using their displayName
DescriptionIf you use a CraftGroup multiple times, the first recipe using it works as expected. However all the other recipes using that group will show up (for example in the guide crafting gui) with their name instead of their display name because they don't have one.

This is caused by the RecipeResolver which creates a GroupItem the first time the group is used in a Recipe and saves it into ItemDef.
Additional items that use this group will use that previously created item, BUT COPY IT! The reference of this item copy will not be saved into ItemDef.
Now if the CraftGroupResolver sets the display name it will only set it for the original item defined in ItemDef, but not for the copied ones. This causes the recipes besides the first one to have a wrongly named CraftGroup inside of them.
Steps To ReproduceCreate multiple recipes using one CraftGroup
Additional InformationTo fix this in my mod I just made a custom RecipeResolver which hangs on to the reference until OnLoad on my ModBase is called. Then it sets the displayName of each of those item copies to ItemDef.byType[itemCopy.type]
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
LolHens (reporter)
2015-06-09 21:51

Also the game crashes if you don't add a recipe for a CraftGroup. This could be fixed by creating the CraftGroup item if the mod is done loading and no item with the CraftGroup item name is found in ItemDef.byName.

- Issue History
Date Modified Username Field Change
2015-05-28 14:45 LolHens New Issue
2015-06-09 21:51 LolHens Note Added: 0000158
2015-06-10 09:08 Shockah Status new => acknowledged

Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker