Implemented multi-mission sectors / Various bugfixes

This commit is contained in:
Anuken
2018-07-29 11:57:46 -04:00
parent b2d61a93d9
commit 81e954c258
10 changed files with 42 additions and 48 deletions
@@ -84,10 +84,7 @@ public class TileEntity extends BaseEntity implements TargetTrait{
return this;
}
/**
* Call when nothing is happening to the entity.
* This increments the internal sleep timer.
*/
/**Call when nothing is happening to the entity. This increments the internal sleep timer.*/
public void sleep(){
sleepTime += Timers.delta();
if(!sleeping && sleepTime >= timeToSleep){
@@ -97,20 +94,6 @@ public class TileEntity extends BaseEntity implements TargetTrait{
}
}
/**
* Call when something just happened to the entity.
* If the entity was sleeping, this enables it. This also resets the sleep timer.
*/
public void wakeUp(){
noSleep();
for(Tile tile : proximity){
if(tile.entity.isSleeping()){
tile.entity.wakeUp();
}
}
}
/**Call when this entity is updating. This wakes it up.*/
public void noSleep(){
sleepTime = 0f;