Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#3909 closed defect (fixed)

[PATCH] Rename TechnologyTemplateManager to JsonTemplateManager — at Version 4

Reported by: sanderd17 Owned by: sanderd17
Priority: Should Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description (last modified by elexis)

Since the TechnologyTemplateManager doesn't only do techs anymore, it should be renamed to something more generic, like JsonTemplateManager.

Note: this also disables serialization of the cached tech data (refs #3834 )

Due to the difficulty of renaming files and creating diffs of those, I've included two patches. They're the same with the exception that one has renamed files and the other one doesn't.

Change History (6)

by sanderd17, 8 years ago

Attachment: renameTechMan.diff added

by sanderd17, 8 years ago

Attachment: renameTechManNoFile.diff added

comment:1 by sanderd17, 8 years ago

Note from leper: jsonTemplateManager isn't a good name either (data can contain any data format). Better is something like dataTemplateManager.

comment:2 by Itms, 8 years ago

Keywords: review removed

I agree with the naming CCmpDataTemplateManager.

Why do you change the function name in TechnologyManager? After all it is still the technology manager so GetTechnologyTemplate is not an inaccurate name.

comment:3 by sanderd17, 8 years ago

Owner: set to sanderd17
Resolution: fixed
Status: newclosed

In 18100:

Rename TechnologyTemplateManager to DataTemplateManager in order to reflect its new function. Fixes #3909. Disable serialisation of technology templates. Refs #3834

comment:4 by elexis, 6 years ago

Description: modified (diff)

Since it wasn't linked here yet, it was broken because the Auras and TechnologyManager components still serialized the objects from the DataTemplateManager, thus yielding different backrefs for rejoined clients, thus OOS deluxe (not even visible in the textual dump diff), see #4239.

The component should be a globalscript, so that it can be used by the AI, GUI and rmgen as well.

I initially agreed with JSONTemplateManager so that we immediately know how its different from the TemplateManager. But even better would be splitting the file into an Aura and a Technology file.

Note: See TracTickets for help on using tickets.