Added message for last accessed player of block
This commit is contained in:
@@ -10,7 +10,6 @@ import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.scene.*;
|
||||
import arc.scene.event.*;
|
||||
import arc.scene.ui.*;
|
||||
import arc.scene.ui.layout.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
@@ -257,7 +256,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
}
|
||||
|
||||
@Remote(targets = Loc.both, called = Loc.server, forward = true, unreliable = true)
|
||||
public static void rotateBlock(Player player, Building tile, boolean direction){
|
||||
public static void rotateBlock(@Nullable Player player, Building tile, boolean direction){
|
||||
if(tile == null) return;
|
||||
|
||||
if(net.server() && (!Units.canInteract(player, tile) ||
|
||||
@@ -265,6 +264,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
throw new ValidateException(player, "Player cannot rotate a block.");
|
||||
}
|
||||
|
||||
if(player != null) tile.lastAccessed = player.name;
|
||||
tile.rotation = Mathf.mod(tile.rotation + Mathf.sign(direction), 4);
|
||||
tile.updateProximity();
|
||||
tile.noSleep();
|
||||
|
||||
Reference in New Issue
Block a user