rnd-20040424-1-src
[rocksndiamonds.git] / src / editor.c
index f499cf116576b4af3d4a58de3f2960f4cf5c6135..c4392072282e37d0f8eec97c5b231a9dd7233ccd 100644 (file)
@@ -1449,6 +1449,7 @@ static struct ValueTextInfo options_change_trigger_page[] =
 static struct ValueTextInfo options_change_replace_when[] =
 {
   { CP_WHEN_EMPTY,             "empty"                         },
+  { CP_WHEN_WALKABLE,          "walkable"                      },
   { CP_WHEN_DIGGABLE,          "diggable"                      },
   { CP_WHEN_COLLECTIBLE,       "collectible"                   },
   { CP_WHEN_REMOVABLE,         "removable"                     },
@@ -5858,12 +5859,18 @@ static void CopyCustomElementPropertiesToEditor(int element)
      CAN_EXPLODE_CROSS(element));
 
   /* special case: sub-settings dependent from main setting */
+#if 0
+  custom_element.can_explode_by_fire = CAN_EXPLODE_BY_FIRE(element);
+  custom_element.can_explode_smashed = CAN_EXPLODE_SMASHED(element);
+  custom_element.can_explode_impact  = CAN_EXPLODE_IMPACT(element);
+#else
   if (CAN_EXPLODE_BY_FIRE(element))
     custom_element.can_explode_by_fire = TRUE;
   if (CAN_EXPLODE_SMASHED(element))
     custom_element.can_explode_smashed = TRUE;
   if (CAN_EXPLODE_IMPACT(element))
     custom_element.can_explode_impact  = TRUE;
+#endif
 
   /* ---------- element settings: advanced (custom elements) --------------- */
 
@@ -5945,6 +5952,7 @@ static void CopyCustomElementPropertiesToGame(int element)
 {
   int i;
   int access_type_and_layer;
+  boolean can_explode;
 
   /* mark that this custom element has been modified */
   custom_element.modified_settings = TRUE;
@@ -6021,6 +6029,17 @@ static void CopyCustomElementPropertiesToGame(int element)
     custom_element_properties[EP_EXPLODE_RESULT];
 
   /* special case: sub-settings dependent from main setting */
+#if 0
+  can_explode = (custom_element_properties[EP_CAN_EXPLODE_1X1] ||
+                custom_element_properties[EP_CAN_EXPLODE_3X3] ||
+                custom_element_properties[EP_CAN_EXPLODE_CROSS]);
+  custom_element_properties[EP_CAN_EXPLODE_BY_FIRE] =
+    (can_explode && custom_element.can_explode_by_fire);
+  custom_element_properties[EP_CAN_EXPLODE_SMASHED] =
+    (can_explode && custom_element.can_explode_smashed);
+  custom_element_properties[EP_CAN_EXPLODE_IMPACT] =
+    (can_explode && custom_element.can_explode_impact);
+#else
   if (custom_element_properties[EP_CAN_EXPLODE_1X1] ||
       custom_element_properties[EP_CAN_EXPLODE_3X3] ||
       custom_element_properties[EP_CAN_EXPLODE_CROSS])
@@ -6032,6 +6051,7 @@ static void CopyCustomElementPropertiesToGame(int element)
     custom_element_properties[EP_CAN_EXPLODE_IMPACT] =
       custom_element.can_explode_impact;
   }
+#endif
 
   /* ---------- element settings: advanced (custom elements) --------------- */