From eff81d7163b23b560ebff5e505080db7d0acaca3 Mon Sep 17 00:00:00 2001
From: Allanis <allanis@saracraft.net>
Date: Sat, 3 Aug 2013 11:44:06 +0100
Subject: [PATCH] [Add] Ugly hack to allow modifying special tech1.

---
 utils/resedit/space.py | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/utils/resedit/space.py b/utils/resedit/space.py
index 82bb606..fc496e2 100644
--- a/utils/resedit/space.py
+++ b/utils/resedit/space.py
@@ -452,8 +452,10 @@ class Space:
     # Tech.
     try:
       self.__pwidget("spiTech0").set_text(str(planet["general"]["tech"]["main"]))
+      self.__pwidget("spiTech1").set_text(str(planet["general"]["tech"]["special"]))
     except:
       self.__pwidget("spiTech0").set_text(str(0))
+      self.__pwidget("spiTech1").set_text(str(0))
 
     # Services.
     services = int(planet["general"]["services"])
@@ -560,15 +562,24 @@ class Space:
     planet["general"]["services"] = services
 
     # Get the techs.
-    tech0 = self.__pwidget("spiTech0").get_text()
-    if tech0 > 0:
+    tech = self.__pwidget("spiTech0").get_text()
+    if tech > 0:
       try:
-        planet["general"]["tech"]["main"] = tech0
+        planet["general"]["tech"]["main"] = tech
       except:
         planet["general"]["tech"] = {}
-        planet["general"]["tech"]["main"] = tech0
+        planet["general"]["tech"]["main"] = tech
       else:
         del planet["general"]["tech"]["main"]
+      tech = self.__pwidget("spiTech1").get_text()
+      if tech > 0:
+        try:
+          planet["general"]["tech"]["special"] = tech
+        except:
+          planet["general"]["tech"] = {}
+          planet["general"]["tech"]["special"] = tech
+      else:
+        del planet["general"]["tech"]["special"]
 
   def __sinpStore(self, system, wgt, tag, minortag=None):
     text = self.__swidget(wgt).get_text()