X-Git-Url: https://ruin.nu/git/?p=hbs.git;a=blobdiff_plain;f=bs%2Funittype.h;h=9bf008e83eeeb8e1294aa94b5f595db4f3b21e90;hp=3357671df7816b31341e4cf6b9846e77d6918122;hb=15d92b3097a80faf26b8ce4cb4a6b957d17bc092;hpb=56b09bf912d2965744e2e78a30fc68d73ebe401c diff --git a/bs/unittype.h b/bs/unittype.h index 3357671..9bf008e 100644 --- a/bs/unittype.h +++ b/bs/unittype.h @@ -41,16 +41,16 @@ public: /*! This function sets the name for this unittype (ie. interceptor) */ void setName(std::string sName); /** Returns the name of this unittype */ - std::string Name(); + std::string Name() const; /** This functions sets which race this unittype is, the race is represented with a integer. */ void setRace(int iRace); /** Returns the race this unittype belongs to*/ - int Race(); + int Race() const; /** Sets the class for the unittype, it's represented as a integer */ void setClass(std::string sClass); - std::string Class(); + std::string Class() const; /** Sets the classes that this unittype targets. a vector is used. */ void setTarget(std::vector Target); @@ -61,58 +61,58 @@ public: * \param index where to place the target. 0 being the default and first place. */ void insTarget(std::string iTarget, int index = 0); /** Returns all targets from the target list */ - std::vector Target(); + std::vector Target() const; /** Returns a specific target * \param index An index value that represents the target. 0 being the first*/ - std::string Target(int index); + std::string Target(int index) const; /** Sets the initiatve, the lower it is the earlier the unit shots */ void setInitiative(int iInit); - int Initiative(); + int Initiative() const; /** Sets the agility, the higher it is the harder it is to hit the unit */ void setAgility (int iAgil); - int Agility(); + int Agility() const; /** Sets the weaponspeed.. just a simple integer that shows how good it is at hitting things */ void setWeaponSpeed(int iWPSP); - int WeaponSpeed(); + int WeaponSpeed() const; /** Sets the number of guns. */ void setGuns(int iGuns); - int Guns(); + int Guns() const; /** Sets the how much power the guns have.. or in other words: the damage they do. */ void setPower(int iPower); - int Power(); + int Power() const; /** Sets the armor, this is how much damage the unittype can take before it's destroyed */ void setArmor(int iArmor); - int Armor(); + int Armor() const; /** Sets the emp resistance, the lower value the easier it is to block it */ void setEMP(int iEMP); - int EMP(); + int EMP() const; /** Sets the resource cost for this unittype. Used for example for score calculation and so on. */ void setTotalResources(int iTR); /** Returns the number of total resources this unittype cost. */ - int TotRes(); + int TotRes() const; /** Sets the fuelcost for this unittype */ void setFuel(int iFuel); /** Returns the fuelcost */ - int Fuel(); + int Fuel() const; /** Sets the ETA, the speed in a sort of inverted form.. the lower ETA, the faster is the unit */ void setETA(int iETA); - int ETA(); + int ETA() const; /** Sets the type of the unit. What the types do must be specified in the real battle engine (Fleet) though. * \param iType An integer to symbolise the type. */ void setType(std::string type); /** What type of ship this is. */ - std::string Type(); + std::string Type() const; protected: std::string m_sName; int m_iRace; //!< Not really the race, but an indiaction on what race can use it..