Cursor should not change for other teams when hovering over doors and construction. (#4838)
* Cursor should not change for other teams. * Use Built-in interaction check Co-authored-by: Patrick 'Quezler' Mounier <Quezler@me.com> * Building should use built-in check, same treatment for ConstructBlock Co-authored-by: Patrick 'Quezler' Mounier <Quezler@me.com>
This commit is contained in:
co-authored by
Patrick 'Quezler' Mounier
parent
05dc13c922
commit
a89d50e74d
@@ -1142,7 +1142,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||||||
|
|
||||||
/** Returns whether or not a hand cursor should be shown over this block. */
|
/** Returns whether or not a hand cursor should be shown over this block. */
|
||||||
public Cursor getCursor(){
|
public Cursor getCursor(){
|
||||||
return block.configurable && team == player.team() ? SystemCursor.hand : SystemCursor.arrow;
|
return block.configurable && interactable(player.team()) ? SystemCursor.hand : SystemCursor.arrow;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ public class ConstructBlock extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Cursor getCursor(){
|
public Cursor getCursor(){
|
||||||
return SystemCursor.hand;
|
return interactable(player.team()) ? SystemCursor.hand : SystemCursor.arrow;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ public class Door extends Wall{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Cursor getCursor(){
|
public Cursor getCursor(){
|
||||||
return SystemCursor.hand;
|
return interactable(player.team()) ? SystemCursor.hand : SystemCursor.arrow;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user