summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Behaviors/BehaviorBreeder.h
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2017-08-22 14:15:36 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2017-08-22 19:55:30 +0200
commit18c3dd3b4fc6c40c103296e7b5a53a99fa5e758e (patch)
tree221db2c2a9f4c3388f50edf79d38448ca1a0e4a2 /src/Mobs/Behaviors/BehaviorBreeder.h
parentd (diff)
downloadcuberite-18c3dd3b4fc6c40c103296e7b5a53a99fa5e758e.tar
cuberite-18c3dd3b4fc6c40c103296e7b5a53a99fa5e758e.tar.gz
cuberite-18c3dd3b4fc6c40c103296e7b5a53a99fa5e758e.tar.bz2
cuberite-18c3dd3b4fc6c40c103296e7b5a53a99fa5e758e.tar.lz
cuberite-18c3dd3b4fc6c40c103296e7b5a53a99fa5e758e.tar.xz
cuberite-18c3dd3b4fc6c40c103296e7b5a53a99fa5e758e.tar.zst
cuberite-18c3dd3b4fc6c40c103296e7b5a53a99fa5e758e.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Behaviors/BehaviorBreeder.h54
1 files changed, 26 insertions, 28 deletions
diff --git a/src/Mobs/Behaviors/BehaviorBreeder.h b/src/Mobs/Behaviors/BehaviorBreeder.h
index 4d7dc1aa4..fa52a40d4 100644
--- a/src/Mobs/Behaviors/BehaviorBreeder.h
+++ b/src/Mobs/Behaviors/BehaviorBreeder.h
@@ -17,44 +17,42 @@ class cBehaviorBreeder
{
public:
- cBehaviorBreeder(cMonster * a_Parent, cItems & a_BreedingItems);
+ cBehaviorBreeder(cMonster * a_Parent, cItems & a_BreedingItems);
- // Functions our host Monster should invoke:
- void Tick();
- bool ActiveTick();
- void OnRightClicked(cPlayer & a_Player);
- void Destroyed();
+ // Functions our host Monster should invoke:
+ void Tick();
+ bool ActiveTick();
+ void OnRightClicked(cPlayer & a_Player);
+ void Destroyed();
- /** Returns the partner which the monster is currently mating with. */
- cMonster * GetPartner(void) const { return m_LovePartner; }
+ /** Returns the partner which the monster is currently mating with. */
+ cMonster * GetPartner(void) const { return m_LovePartner; }
- /** Start the mating process. Causes the monster to keep bumping into the partner until m_MatingTimer reaches zero. */
- void EngageLoveMode(cMonster * a_Partner);
+ /** Start the mating process. Causes the monster to keep bumping into the partner until m_MatingTimer reaches zero. */
+ void EngageLoveMode(cMonster * a_Partner);
- /** Finish the mating process. Called after a baby is born. Resets all breeding related timers and sets m_LoveCooldown to 20 minutes. */
- void ResetLoveMode();
+ /** Finish the mating process. Called after a baby is born. Resets all breeding related timers and sets m_LoveCooldown to 20 minutes. */
+ void ResetLoveMode();
- /** Returns whether the monster has just been fed and is ready to mate. If this is "true" and GetPartner isn't "nullptr", then the monster is mating. */
- bool IsInLove() const;
+ /** Returns whether the monster has just been fed and is ready to mate. If this is "true" and GetPartner isn't "nullptr", then the monster is mating. */
+ bool IsInLove() const;
- /** Returns whether the monster is tired of breeding and is in the cooldown state. */
- bool IsInLoveCooldown() const;
+ /** Returns whether the monster is tired of breeding and is in the cooldown state. */
+ bool IsInLoveCooldown() const;
private:
- /** Our parent */
- cMonster * m_Parent;
+ /** Our parent */
+ cMonster * m_Parent;
- /** The monster's breeding partner. */
- cMonster * m_LovePartner;
+ /** The monster's breeding partner. */
+ cMonster * m_LovePartner;
- /** If above 0, the monster is in love mode, and will breed if a nearby monster is also in love mode. Decrements by 1 per tick till reaching zero. */
- int m_LoveTimer;
+ /** If above 0, the monster is in love mode, and will breed if a nearby monster is also in love mode. Decrements by 1 per tick till reaching zero. */
+ int m_LoveTimer;
- /** If above 0, the monster is in cooldown mode and will refuse to breed. Decrements by 1 per tick till reaching zero. */
- int m_LoveCooldown;
+ /** If above 0, the monster is in cooldown mode and will refuse to breed. Decrements by 1 per tick till reaching zero. */
+ int m_LoveCooldown;
- /** The monster is engaged in mating, once this reaches zero, a baby will be born. Decrements by 1 per tick till reaching zero, then a baby is made and ResetLoveMode() is called. */
- int m_MatingTimer;
-
- cItems & m_BreedingItems;
+ /** The monster is engaged in mating, once this reaches zero, a baby will be born. Decrements by 1 per tick till reaching zero, then a baby is made and ResetLoveMode() is called. */
+ int m_MatingTimer;
};