ep_can_grow and expandable walls

Discussion around programming R'n'D, its source code and its tools.

Moderators: Flumminator, Zomis

Post Reply
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

ep_can_grow and expandable walls

Post by Zomis »

InitElementPropertiesStatic, init.h:

Code: Select all

  static int ep_can_grow[] =
  {
    EL_BD_AMOEBA,
    EL_AMOEBA_DROP,
    EL_AMOEBA_WET,
    EL_AMOEBA_DRY,
    EL_AMOEBA_FULL,
    EL_GAME_OF_LIFE,
    EL_BIOMAZE,
    EL_EMC_DRIPPER,

    -1
  };
Why isn't the expandable walls included there? I guess it's because ep_can_grow only includes those which can be digged into something diggable (after a quick look at the source), did I guess right?
But Amoeba drops () can't dig into something diggable...? They can just land on something and then turn into amoeba_wet, right?
GreaseMonkey
Posts: 2
Joined: Fri Dec 29, 2006 3:36 am

Post by GreaseMonkey »

Yeah, I'm pretty sure that the ep_can_grow only applies to those that can grow into something diggable. Have a look in the editor, and look at the Element Settings of each of them. Under the Config tab, each of them should have a checkbox that says "CAN GROW INTO ANYTHING DIGGABLE". If you uncheck it on any of the elements, then it will be unchecked on each of the elements in that list.

Amoeba drops (I think) cannot grow into anything diggable. I don't believe that the source does anything with the EL_AMOEBA_DROP or EL_AMOEBA_DROPPING when it comes to ep_can_grow; I believe that it's just there because it's an amoeba.
Got user-defined elements? I do! :D
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

Yep, GreaseMonkey is right here.

> But Amoeba drops () can't dig into something diggable...? They can just
> land on something and then turn into amoeba_wet, right?

Yep, right. It's just included here to have the level editor switch "[ ] can grow into anything diggable" displayed for all amoeba style elements, even though the amoeba drop itself cannot really grow somewhere (but turns into amoeba after landing).
Post Reply