Move the remaining legacy item template lookups to CObjectTemplate
Dev commands, BuildingManager, ChatManager, ForgeManager, NPCManager, NPC, Warehouse, WorkOrder and ManageNPCMsg now call CObjectTemplate.lookup instead of ItemTemplate.templates.get. Forge production cost reads getItemResourceCosts(). Only the DB loader and linkCacheTemplates still use the legacy class (removed in Task 1.8). Removes the static_item_templates ParityCheck comparator. Final parity (offline p17.py, 7586 rows): every id has a cache template, 0 item_type differences, 0 item_resource_costs differences (84 ITEMs have costs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6b4e9815e0
commit
566870de79
17 files changed
+67
-70
No files matched your search
@@ -11,6 +11,7 @@ package engine.devcmd.cmds;
|
||||
|
||||
import engine.devcmd.AbstractDevCmd;
|
||||
import engine.objects.*;
|
||||
import engine.parsers.objects.CObjectTemplate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -52,8 +53,8 @@ public class PrintBankCmd extends AbstractDevCmd {
|
||||
throwbackInfo(pc, "Bank for " + type + ' ' + name + " (" + tar.getObjectUUID() + ')');
|
||||
|
||||
for (Item item : list) {
|
||||
ItemTemplate template = ItemTemplate.templates.get(item.templateID);
|
||||
throwbackInfo(pc, " " + template.cacheTemplate.getItemBaseName() + ", count: " + item.getNumOfItems());
|
||||
CObjectTemplate template = CObjectTemplate.lookup(item.templateID);
|
||||
throwbackInfo(pc, " " + template.getItemBaseName() + ", count: " + item.getNumOfItems());
|
||||
}
|
||||
|
||||
Item gold = cim.getGoldBank();
|
||||
|
||||
Reference in new issue
Block a user