Index: binaries/data/mods/public/simulation/components/Auras.js
===================================================================
--- binaries/data/mods/public/simulation/components/Auras.js	(revision 18037)
+++ binaries/data/mods/public/simulation/components/Auras.js	(working copy)
@@ -8,7 +8,7 @@
 
 Auras.prototype.Init = function()
 {
-	let cmpTechnologyTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TechnologyTemplateManager);
+	let cmpJsonTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_JsonTemplateManager);
 	this.auras = {};
 	this.affectedPlayers = {};
 	let auraNames = this.GetAuraNames();
@@ -15,7 +15,7 @@
 	for (let name of auraNames)
 	{
 		this.affectedPlayers[name] = [];
-		this.auras[name] = cmpTechnologyTemplateManager.GetAuraTemplate(name);
+		this.auras[name] = cmpJsonTemplateManager.GetAuraTemplate(name);
 	}
 	// In case of autogarrisoning, this component can be called before ownership is set.
 	// So it needs to be completely initialised from the start.
Index: binaries/data/mods/public/simulation/components/GuiInterface.js
===================================================================
--- binaries/data/mods/public/simulation/components/GuiInterface.js	(revision 18037)
+++ binaries/data/mods/public/simulation/components/GuiInterface.js	(working copy)
@@ -591,13 +591,13 @@
 
 	// Add aura name and description loaded from JSON file
 	let auraNames = template.Auras._string.split(/\s+/);
-	let cmpTechnologyTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TechnologyTemplateManager);
+	let cmpJsonTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_JsonTemplateManager);
 	for (let name of auraNames)
 	{
-		let auraTemplate = cmpTechnologyTemplateManager.GetAuraTemplate(name);
+		let auraTemplate = cmpJsonTemplateManager.GetAuraTemplate(name);
 		if (!auraTemplate)
 		{
-			// the following warning is perhaps useless since it's yet done in TechnologyTemplateManager
+			// the following warning is perhaps useless since it's yet done in JsonTemplateManager
 			warn("Tried to get data for invalid aura: " + name);
 			continue;
 		}
@@ -610,8 +610,8 @@
 
 GuiInterface.prototype.GetTechnologyData = function(player, name)
 {
-	let cmpTechnologyTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TechnologyTemplateManager);
-	let template = cmpTechnologyTemplateManager.GetTemplate(name);
+	let cmpJsonTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_JsonTemplateManager);
+	let template = cmpJsonTemplateManager.GetTechnologyTemplate(name);
 
 	if (!template)
 	{
Index: binaries/data/mods/public/simulation/components/JsonTemplateManager.js
===================================================================
--- binaries/data/mods/public/simulation/components/JsonTemplateManager.js	(revision 18037)
+++ binaries/data/mods/public/simulation/components/JsonTemplateManager.js	(working copy)
@@ -1,21 +1,23 @@
 /**
  * System component which loads the technology and the aura data files
  */
-function TechnologyTemplateManager() {}
+function JsonTemplateManager() {}
 
-TechnologyTemplateManager.prototype.Schema =
+JsonTemplateManager.prototype.Schema =
 	"<a:component type='system'/><empty/>";
 
-TechnologyTemplateManager.prototype.Init = function()
+JsonTemplateManager.prototype.Init = function()
 {
 	this.allTechs = {};
 	this.allAuras = {};
 	var techNames = this.ListAllTechs();
 	for (var i in techNames)
-		this.GetTemplate(techNames[i]);
+		this.GetTechnologyTemplate(techNames[i]);
 };
 
-TechnologyTemplateManager.prototype.GetTemplate = function(template)
+JsonTemplateManager.prototype.Serialize = null; // we have no dynamic state to save
+
+JsonTemplateManager.prototype.GetTechnologyTemplate = function(template)
 {
 	if (!this.allTechs[template])
 	{
@@ -27,7 +29,7 @@
 	return this.allTechs[template];
 };
 
-TechnologyTemplateManager.prototype.GetAuraTemplate = function(template)
+JsonTemplateManager.prototype.GetAuraTemplate = function(template)
 {
 	if (!this.allAuras[template])
 	{
@@ -39,14 +41,14 @@
 	return this.allAuras[template];
 };
 
-TechnologyTemplateManager.prototype.ListAllTechs = function()
+JsonTemplateManager.prototype.ListAllTechs = function()
 {
 	return Engine.FindJSONFiles("technologies", true);
 };
 
-TechnologyTemplateManager.prototype.GetAllTechs = function()
+JsonTemplateManager.prototype.GetAllTechs = function()
 {
 	return this.allTechs;
 };
 
-Engine.RegisterSystemComponentType(IID_TechnologyTemplateManager, "TechnologyTemplateManager", TechnologyTemplateManager);
+Engine.RegisterSystemComponentType(IID_JsonTemplateManager, "JsonTemplateManager", JsonTemplateManager);
Index: binaries/data/mods/public/simulation/components/ProductionQueue.js
===================================================================
--- binaries/data/mods/public/simulation/components/ProductionQueue.js	(revision 18037)
+++ binaries/data/mods/public/simulation/components/ProductionQueue.js	(working copy)
@@ -159,7 +159,7 @@
 
 	// Remove any technologies that can't be searched by this civ (after capture for example)
 	techs = techs.filter(tech => {
-		let reqs = cmpTechnologyManager.GetTechnologyTemplate(tech).requirements || null;
+		let reqs = cmpTechnologyManager.GetTemplate(tech).requirements || null;
 		return cmpTechnologyManager.CheckTechnologyRequirements(reqs, true);
 	});
 
@@ -175,7 +175,7 @@
 		var tech = techs[i];
 		if (disabledTechnologies && disabledTechnologies[tech])
 			continue;
-		var template = cmpTechnologyManager.GetTechnologyTemplate(tech);
+		var template = cmpTechnologyManager.GetTemplate(tech);
 		if (!template.supersedes || techs.indexOf(template.supersedes) === -1)
 			techList.push(tech);
 		else
@@ -206,7 +206,7 @@
 			continue;
 		}
 
-		var template = cmpTechnologyManager.GetTechnologyTemplate(tech);
+		var template = cmpTechnologyManager.GetTemplate(tech);
 		if (template.top)
 			ret[i] = {"pair": true, "top": template.top, "bottom": template.bottom};
 		else
@@ -223,7 +223,7 @@
 	
 	var cmpTechnologyManager = QueryOwnerInterface(this.entity, IID_TechnologyManager);
 	
-	var template = cmpTechnologyManager.GetTechnologyTemplate(tech);
+	var template = cmpTechnologyManager.GetTemplate(tech);
 	if (template.top)
 	{
 		return (cmpTechnologyManager.IsTechnologyResearched(template.top) || cmpTechnologyManager.IsInProgress(template.top)
@@ -316,8 +316,8 @@
 		else if (type == "technology")
 		{
 			// Load the technology template
-			var cmpTechnologyTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TechnologyTemplateManager);
-			var template = cmpTechnologyTemplateManager.GetTemplate(templateName);
+			var cmpJsonTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_JsonTemplateManager);
+			var template = cmpJsonTemplateManager.GetTechnologyTemplate(templateName);
 			if (!template)
 				return;
 			var cmpPlayer = QueryOwnerInterface(this.entity);
@@ -760,7 +760,7 @@
 			var cmpTechnologyManager = QueryOwnerInterface(this.entity, IID_TechnologyManager);
 			cmpTechnologyManager.ResearchTechnology(item.technologyTemplate);
 			
-			var template = cmpTechnologyManager.GetTechnologyTemplate(item.technologyTemplate);
+			var template = cmpTechnologyManager.GetTemplate(item.technologyTemplate);
 			
 			if (template && template.soundComplete)
 			{
Index: binaries/data/mods/public/simulation/components/TechnologyManager.js
===================================================================
--- binaries/data/mods/public/simulation/components/TechnologyManager.js	(revision 18037)
+++ binaries/data/mods/public/simulation/components/TechnologyManager.js	(working copy)
@@ -41,7 +41,7 @@
 	// Some technologies are automatically researched when their conditions are met.  They have no cost and are 
 	// researched instantly.  This allows civ bonuses and more complicated technologies.
 	this.autoResearchTech = {};
-	var allTechs = Engine.QueryInterface(SYSTEM_ENTITY, IID_TechnologyTemplateManager).GetAllTechs();
+	var allTechs = Engine.QueryInterface(SYSTEM_ENTITY, IID_JsonTemplateManager).GetAllTechs();
 	for (var key in allTechs)
 	{
 		if (allTechs[key].autoResearch || allTechs[key].top)
@@ -58,10 +58,10 @@
 // This function checks if the requirements of any autoresearch techs are met and if they are it researches them
 TechnologyManager.prototype.UpdateAutoResearch = function()
 {
-	var cmpTechTempMan = Engine.QueryInterface(SYSTEM_ENTITY, IID_TechnologyTemplateManager);
+	var cmpJsonTempMan = Engine.QueryInterface(SYSTEM_ENTITY, IID_JsonTemplateManager);
 	for (var key in this.autoResearchTech)
 	{
-		var tech = cmpTechTempMan.GetTemplate(key);
+		var tech = cmpJsonTempMan.GetTechnologyTemplate(key);
 		if ((tech.autoResearch && this.CanResearch(key))
 			|| (tech.top && (this.IsTechnologyResearched(tech.top) || this.IsTechnologyResearched(tech.bottom))))
 		{
@@ -72,9 +72,9 @@
 	}
 };
 
-TechnologyManager.prototype.GetTechnologyTemplate = function(tech)
+TechnologyManager.prototype.GetTemplate = function(tech)
 {
-	return Engine.QueryInterface(SYSTEM_ENTITY, IID_TechnologyTemplateManager).GetTemplate(tech);
+	return Engine.QueryInterface(SYSTEM_ENTITY, IID_JsonTemplateManager).GetTechnologyTemplate(tech);
 };
 
 // Checks an entity template to see if its technology requirements have been met
@@ -97,7 +97,7 @@
 // Checks the requirements for a technology to see if it can be researched at the current time
 TechnologyManager.prototype.CanResearch = function(tech)
 {
-	var template = this.GetTechnologyTemplate(tech);
+	var template = this.GetTemplate(tech);
 	if (!template)
 	{
 		warn("Technology \"" + tech + "\" does not exist");
@@ -254,7 +254,7 @@
 {
 	this.StoppedResearch(tech); // The tech is no longer being currently researched
 
-	var template = this.GetTechnologyTemplate(tech);
+	var template = this.GetTemplate(tech);
 
 	if (!template)
 	{
@@ -319,7 +319,7 @@
 			if (!i || this.IsTechnologyResearched(i))
 				continue;
 
-			var template = this.GetTechnologyTemplate(i);
+			var template = this.GetTemplate(i);
 			this.researchedTechs[i] = template;
 
 			// Change the EntityLimit if any
Index: binaries/data/mods/public/simulation/components/TechnologyTemplateManager.js
===================================================================
--- binaries/data/mods/public/simulation/components/TechnologyTemplateManager.js	(revision 18037)
+++ binaries/data/mods/public/simulation/components/TechnologyTemplateManager.js	(nonexistent)
@@ -1,52 +0,0 @@
-/**
- * System component which loads the technology and the aura data files
- */
-function TechnologyTemplateManager() {}
-
-TechnologyTemplateManager.prototype.Schema =
-	"<a:component type='system'/><empty/>";
-
-TechnologyTemplateManager.prototype.Init = function()
-{
-	this.allTechs = {};
-	this.allAuras = {};
-	var techNames = this.ListAllTechs();
-	for (var i in techNames)
-		this.GetTemplate(techNames[i]);
-};
-
-TechnologyTemplateManager.prototype.GetTemplate = function(template)
-{
-	if (!this.allTechs[template])
-	{
-		this.allTechs[template] = Engine.ReadJSONFile("technologies/" + template + ".json");
-		if (!this.allTechs[template])
-			error("Failed to load technology \"" + template + "\"");
-	}
-
-	return this.allTechs[template];
-};
-
-TechnologyTemplateManager.prototype.GetAuraTemplate = function(template)
-{
-	if (!this.allAuras[template])
-	{
-		this.allAuras[template] = Engine.ReadJSONFile("auras/" + template + ".json");
-		if (!this.allAuras[template])
-			error("Failed to load aura \"" + template + "\"");
-	}
-
-	return this.allAuras[template];
-};
-
-TechnologyTemplateManager.prototype.ListAllTechs = function()
-{
-	return Engine.FindJSONFiles("technologies", true);
-};
-
-TechnologyTemplateManager.prototype.GetAllTechs = function()
-{
-	return this.allTechs;
-};
-
-Engine.RegisterSystemComponentType(IID_TechnologyTemplateManager, "TechnologyTemplateManager", TechnologyTemplateManager);
Index: binaries/data/mods/public/simulation/components/tests/test_Auras.js
===================================================================
--- binaries/data/mods/public/simulation/components/tests/test_Auras.js	(revision 18037)
+++ binaries/data/mods/public/simulation/components/tests/test_Auras.js	(working copy)
@@ -25,7 +25,7 @@
 	GetEntityFlagMask: function(identifier) { },
 });
 
-AddMock(SYSTEM_ENTITY, IID_TechnologyTemplateManager, {
+AddMock(SYSTEM_ENTITY, IID_JsonTemplateManager, {
 	GetAuraTemplate: function(name) {
 		if (name == "test1")
 			return {
Index: binaries/data/mods/public/simulation/helpers/Cheat.js
===================================================================
--- binaries/data/mods/public/simulation/helpers/Cheat.js	(revision 18037)
+++ binaries/data/mods/public/simulation/helpers/Cheat.js	(working copy)
@@ -90,8 +90,8 @@
 			return;
 
 		// check if specialised tech exists (like phase_town_athen)
-		var cmpTechnologyTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TechnologyTemplateManager);
-		if (cmpTechnologyTemplateManager.ListAllTechs().indexOf(parameter + "_" + cmpPlayer.civ) > -1)
+		var cmpJsonTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_JsonTemplateManager);
+		if (cmpJsonTemplateManager.ListAllTechs().indexOf(parameter + "_" + cmpPlayer.civ) > -1)
 			parameter += "_" + cmpPlayer.civ;
 
 		Cheat({ "player": input.player, "action": "researchTechnology", "parameter": parameter, "selected": input.selected });
Index: source/simulation2/TypeList.h
===================================================================
--- source/simulation2/TypeList.h	(revision 18037)
+++ source/simulation2/TypeList.h	(working copy)
@@ -160,8 +160,8 @@
 INTERFACE(ValueModificationManager)
 COMPONENT(ValueModificationManagerScripted)
 
-INTERFACE(TechnologyTemplateManager)
-COMPONENT(TechnologyTemplateManagerScripted)
+INTERFACE(JsonTemplateManager)
+COMPONENT(JsonTemplateManagerScripted)
 
 INTERFACE(Terrain)
 COMPONENT(Terrain)
Index: source/simulation2/components/CCmpAIManager.cpp
===================================================================
--- source/simulation2/components/CCmpAIManager.cpp	(revision 18037)
+++ source/simulation2/components/CCmpAIManager.cpp	(working copy)
@@ -34,7 +34,7 @@
 #include "simulation2/components/ICmpObstructionManager.h"
 #include "simulation2/components/ICmpRangeManager.h"
 #include "simulation2/components/ICmpTemplateManager.h"
-#include "simulation2/components/ICmpTechnologyTemplateManager.h"
+#include "simulation2/components/ICmpJsonTemplateManager.h"
 #include "simulation2/components/ICmpTerritoryManager.h"
 #include "simulation2/helpers/LongPathfinder.h"
 #include "simulation2/serialization/DebugSerializer.h"
@@ -979,12 +979,12 @@
 		JSAutoRequest rq(cx);
 
 		// load the technology templates
-		CmpPtr<ICmpTechnologyTemplateManager> cmpTechTemplateManager(GetSystemEntity());
-		ENSURE(cmpTechTemplateManager);
+		CmpPtr<ICmpJsonTemplateManager> cmpJsonTemplateManager(GetSystemEntity());
+		ENSURE(cmpJsonTemplateManager);
 
 		// Get the game state from AIInterface
 		JS::RootedValue techTemplates(cx);
-		cmpTechTemplateManager->GetAllTechs(&techTemplates);
+		cmpJsonTemplateManager->GetAllTechs(&techTemplates);
 
 		m_Worker.RegisterTechTemplates(scriptInterface.WriteStructuredClone(techTemplates));
 		m_Worker.TryLoadSharedComponent(true);
Index: source/simulation2/components/ICmpJsonTemplateManager.cpp
===================================================================
--- source/simulation2/components/ICmpJsonTemplateManager.cpp	(revision 18037)
+++ source/simulation2/components/ICmpJsonTemplateManager.cpp	(working copy)
@@ -17,18 +17,18 @@
 
 #include "precompiled.h"
 
-#include "ICmpTechnologyTemplateManager.h"
+#include "ICmpJsonTemplateManager.h"
 
 #include "simulation2/system/InterfaceScripted.h"
 #include "simulation2/scripting/ScriptComponent.h"
 
-BEGIN_INTERFACE_WRAPPER(TechnologyTemplateManager)
-END_INTERFACE_WRAPPER(TechnologyTemplateManager)
+BEGIN_INTERFACE_WRAPPER(JsonTemplateManager)
+END_INTERFACE_WRAPPER(JsonTemplateManager)
 
-class CCmpTechnologyTemplateManagerScripted : public ICmpTechnologyTemplateManager
+class CCmpJsonTemplateManagerScripted : public ICmpJsonTemplateManager
 {
 public:
-	DEFAULT_SCRIPT_WRAPPER(TechnologyTemplateManagerScripted)
+	DEFAULT_SCRIPT_WRAPPER(JsonTemplateManagerScripted)
 
 	virtual void GetAllTechs(JS::MutableHandleValue ret)
 	{
@@ -36,4 +36,4 @@
 	}
 };
 
-REGISTER_COMPONENT_SCRIPT_WRAPPER(TechnologyTemplateManagerScripted)
+REGISTER_COMPONENT_SCRIPT_WRAPPER(JsonTemplateManagerScripted)
Index: source/simulation2/components/ICmpJsonTemplateManager.h
===================================================================
--- source/simulation2/components/ICmpJsonTemplateManager.h	(revision 18037)
+++ source/simulation2/components/ICmpJsonTemplateManager.h	(working copy)
@@ -15,8 +15,8 @@
  * along with 0 A.D.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef INCLUDED_ICMPTECHNOLOGYTEMPLATEMANAGER
-#define INCLUDED_ICMPTECHNOLOGYTEMPLATEMANAGER
+#ifndef INCLUDED_ICMPJSONTEMPLATEMANAGER
+#define INCLUDED_ICMPJSONTEMPLATEMANAGER
 
 #include "simulation2/system/Interface.h"
 
@@ -23,16 +23,16 @@
 #include "maths/Fixed.h"
 
 /**
- * Technology template manager interface.
+ * Json template manager interface.
  * (This interface only includes the functions needed by native code for accessing
- *	technology template data, the associated logic is handled in scripts)
+ *	json template data, the associated logic is handled in scripts)
  */
-class ICmpTechnologyTemplateManager : public IComponent
+class ICmpJsonTemplateManager : public IComponent
 {
 public:
 	virtual void GetAllTechs(JS::MutableHandleValue ret) = 0;
 
-	DECLARE_INTERFACE_TYPE(TechnologyTemplateManager)
+	DECLARE_INTERFACE_TYPE(JsonTemplateManager)
 };
 
-#endif // INCLUDED_ICMPTECHNOLOGYTEMPLATEMANAGER
+#endif // INCLUDED_ICMPJSONTEMPLATEMANAGER
Index: source/simulation2/components/ICmpTechnologyTemplateManager.cpp
===================================================================
--- source/simulation2/components/ICmpTechnologyTemplateManager.cpp	(revision 18037)
+++ source/simulation2/components/ICmpTechnologyTemplateManager.cpp	(nonexistent)
@@ -1,39 +0,0 @@
-/* Copyright (C) 2012 Wildfire Games.
- * This file is part of 0 A.D.
- *
- * 0 A.D. is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * 0 A.D. is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 0 A.D.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "precompiled.h"
-
-#include "ICmpTechnologyTemplateManager.h"
-
-#include "simulation2/system/InterfaceScripted.h"
-#include "simulation2/scripting/ScriptComponent.h"
-
-BEGIN_INTERFACE_WRAPPER(TechnologyTemplateManager)
-END_INTERFACE_WRAPPER(TechnologyTemplateManager)
-
-class CCmpTechnologyTemplateManagerScripted : public ICmpTechnologyTemplateManager
-{
-public:
-	DEFAULT_SCRIPT_WRAPPER(TechnologyTemplateManagerScripted)
-
-	virtual void GetAllTechs(JS::MutableHandleValue ret)
-	{
-		return m_Script.CallRef("GetAllTechs", ret);
-	}
-};
-
-REGISTER_COMPONENT_SCRIPT_WRAPPER(TechnologyTemplateManagerScripted)

Property changes on: source/simulation2/components/ICmpTechnologyTemplateManager.cpp
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Index: source/simulation2/components/ICmpTechnologyTemplateManager.h
===================================================================
--- source/simulation2/components/ICmpTechnologyTemplateManager.h	(revision 18037)
+++ source/simulation2/components/ICmpTechnologyTemplateManager.h	(nonexistent)
@@ -1,38 +0,0 @@
-/* Copyright (C) 2012 Wildfire Games.
- * This file is part of 0 A.D.
- *
- * 0 A.D. is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * 0 A.D. is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 0 A.D.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef INCLUDED_ICMPTECHNOLOGYTEMPLATEMANAGER
-#define INCLUDED_ICMPTECHNOLOGYTEMPLATEMANAGER
-
-#include "simulation2/system/Interface.h"
-
-#include "maths/Fixed.h"
-
-/**
- * Technology template manager interface.
- * (This interface only includes the functions needed by native code for accessing
- *	technology template data, the associated logic is handled in scripts)
- */
-class ICmpTechnologyTemplateManager : public IComponent
-{
-public:
-	virtual void GetAllTechs(JS::MutableHandleValue ret) = 0;
-
-	DECLARE_INTERFACE_TYPE(TechnologyTemplateManager)
-};
-
-#endif // INCLUDED_ICMPTECHNOLOGYTEMPLATEMANAGER

Property changes on: source/simulation2/components/ICmpTechnologyTemplateManager.h
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
