[Avida-cvs] [avida-svn] r458 - branches/developers/avida-edward/source/python/AvidaGui2

baerb@myxo.css.msu.edu baerb at myxo.css.msu.edu
Thu Feb 2 06:19:52 PST 2006


Author: baerb
Date: 2006-02-02 09:19:52 -0500 (Thu, 02 Feb 2006)
New Revision: 458

Modified:
   branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureView.ui
   branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py
Log:

Fixed problem with creation of new environment file.

Changed names of task in configuration screen to be identical with those in the
clicked orginism report.



Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureView.ui
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureView.ui	2006-02-01 21:58:04 UTC (rev 457)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureView.ui	2006-02-02 14:19:52 UTC (rev 458)
@@ -440,7 +440,7 @@
                                 <cstring>NotCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>Not</string>
+                                <string>not</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
@@ -451,7 +451,7 @@
                                 <cstring>NandCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>Nand</string>
+                                <string>nand</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
@@ -462,7 +462,7 @@
                                 <cstring>AndCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>And</string>
+                                <string>and</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
@@ -473,7 +473,7 @@
                                 <cstring>OrnCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>Orn</string>
+                                <string>ornot</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
@@ -484,7 +484,7 @@
                                 <cstring>AndnCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>Andn</string>
+                                <string>andnot</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
@@ -495,7 +495,7 @@
                                 <cstring>NorCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>Nor</string>
+                                <string>nor</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
@@ -506,7 +506,7 @@
                                 <cstring>OrCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>Or</string>
+                                <string>or</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
@@ -517,7 +517,7 @@
                                 <cstring>XorCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>Xor</string>
+                                <string>xor</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
@@ -528,7 +528,7 @@
                                 <cstring>EquCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>Equ</string>
+                                <string>equals</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py	2006-02-01 21:58:04 UTC (rev 457)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py	2006-02-02 14:19:52 UTC (rev 458)
@@ -125,6 +125,7 @@
         if command_name == "REACTION":
           resource_name = split_out[1].upper()
           resource_key = "REWARD_" + resource_name
+          task_name = split_out[2]
 
           # If the there is a reward key for this resource check further
           # (otherwise print the line)
@@ -132,12 +133,13 @@
           if settings_dict.has_key(resource_key) == True:
 
             # If the value of the reward key is true print it out as is 
-            # (otherwise print out as a comment)
+            # (otherwise print out as a zero bonus)
 
             if settings_dict[resource_key] == "YES":
               out_environment_file.write(line)
             else:
-              out_environment_file.write("# " + line)
+              out_environment_file.write("REACTION " + resource_name + " " +
+                                task_name + " process:value=0.0:type=add\n")
           else:
             out_environment_file.write(line)
         else:




More information about the Avida-cvs mailing list