record?

masterZ

New member
What does the keyword record do? I was looking through EatDrink.ash to look for some ideas when I came across this code
Code:
record consumable_entry
{
  boolean manual;	     // If true, data was entered manually and cannot be updated based on autospading
  range consumptionGain;
  int level;
  range adventure;
  range muscle;
  range mysticality;
  range moxie;
  int price;
  int value;
  int numOwned;
  boolean mustPull;
  boolean mustMake;
};

Can this be used to create your own unique classes?
 

Alhifar

Member
Records are somewhat like classes. You can't (as far as I know) have methods, but you can use then, for example:
Code:
consumable_entry it;
it.manual = true;
it.consumptionGain,min = 1;
it.consumptionGain.max = 2;
it.level = 6;
etc.
 
Top