mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +01:00
Remove Energy Regeneration
This commit is contained in:
parent
c82ad136ce
commit
79431a73e2
@ -123,14 +123,16 @@ public class Pet implements ISerialize, Runnable {
|
|||||||
public void addEnergy(int amount) {
|
public void addEnergy(int amount) {
|
||||||
this.energy += amount;
|
this.energy += amount;
|
||||||
|
|
||||||
|
/* this is regeneration, add back if needed, deleted when other stuff done
|
||||||
if (this.energy > PetManager.maxEnergy(this.level))
|
if (this.energy > PetManager.maxEnergy(this.level))
|
||||||
this.energy = PetManager.maxEnergy(this.level);
|
this.energy = PetManager.maxEnergy(this.level);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// never negative energy
|
||||||
if (this.energy < 0)
|
if (this.energy < 0)
|
||||||
this.energy = 0;
|
this.energy = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void addHappyness(int amount) {
|
public void addHappyness(int amount) {
|
||||||
this.happyness += amount;
|
this.happyness += amount;
|
||||||
|
|
||||||
@ -253,7 +255,7 @@ public class Pet implements ISerialize, Runnable {
|
|||||||
if (this.levelThirst > 0)
|
if (this.levelThirst > 0)
|
||||||
this.levelThirst--;
|
this.levelThirst--;
|
||||||
|
|
||||||
this.addEnergy(5);
|
//this.addEnergy(5);
|
||||||
|
|
||||||
this.addHappyness(1);
|
this.addHappyness(1);
|
||||||
|
|
||||||
@ -265,7 +267,8 @@ public class Pet implements ISerialize, Runnable {
|
|||||||
this.roomUnit.setStatus(RoomUnitStatus.GESTURE, PetGestures.ENERGY.getKey());
|
this.roomUnit.setStatus(RoomUnitStatus.GESTURE, PetGestures.ENERGY.getKey());
|
||||||
this.gestureTickTimeout = time;
|
this.gestureTickTimeout = time;
|
||||||
}
|
}
|
||||||
} else if (this.tickTimeout >= 5) {
|
} /* this is regeneration, add back if needed
|
||||||
|
else if (this.tickTimeout >= 5) {
|
||||||
if (this.levelHunger < 100)
|
if (this.levelHunger < 100)
|
||||||
this.levelHunger++;
|
this.levelHunger++;
|
||||||
|
|
||||||
@ -277,6 +280,7 @@ public class Pet implements ISerialize, Runnable {
|
|||||||
|
|
||||||
this.tickTimeout = time;
|
this.tickTimeout = time;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (this.task == PetTasks.STAY && Emulator.getIntUnixTimestamp() - this.stayStartedAt >= 120) {
|
if (this.task == PetTasks.STAY && Emulator.getIntUnixTimestamp() - this.stayStartedAt >= 120) {
|
||||||
this.task = null;
|
this.task = null;
|
||||||
@ -289,6 +293,7 @@ public class Pet implements ISerialize, Runnable {
|
|||||||
if (this.energy >= 2)
|
if (this.energy >= 2)
|
||||||
this.addEnergy(-1);
|
this.addEnergy(-1);
|
||||||
|
|
||||||
|
|
||||||
if (this.levelHunger < 100)
|
if (this.levelHunger < 100)
|
||||||
this.levelHunger++;
|
this.levelHunger++;
|
||||||
|
|
||||||
@ -783,4 +788,4 @@ public class Pet implements ISerialize, Runnable {
|
|||||||
public void setStayStartedAt(int stayStartedAt) {
|
public void setStayStartedAt(int stayStartedAt) {
|
||||||
this.stayStartedAt = stayStartedAt;
|
this.stayStartedAt = stayStartedAt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user