cursor only shows for specific items
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
f755cea74e
commit
3338487241
@ -1450,6 +1450,7 @@ Static rocks which harvest into rock items that spawn in forest
|
|||||||
(04/05/2025)
|
(04/05/2025)
|
||||||
Stone Axe item
|
Stone Axe item
|
||||||
Fix human data for RH sword slash attack moves
|
Fix human data for RH sword slash attack moves
|
||||||
|
Cursor only for specific items
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -44,6 +44,11 @@ public class ClientToolbarState implements BehaviorTree {
|
|||||||
*/
|
*/
|
||||||
public static final int MAX_TOOLBAR_SIZE = 10;
|
public static final int MAX_TOOLBAR_SIZE = 10;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Token for displaying cursor
|
||||||
|
*/
|
||||||
|
public static final String CURSOR_TOKEN = "CURSOR";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The selected toolbar slot
|
* The selected toolbar slot
|
||||||
*/
|
*/
|
||||||
@ -171,6 +176,18 @@ public class ClientToolbarState implements BehaviorTree {
|
|||||||
Globals.clientSceneWrapper.getScene().removeEntityFromTag(toEquip, EntityTags.TARGETABLE);
|
Globals.clientSceneWrapper.getScene().removeEntityFromTag(toEquip, EntityTags.TARGETABLE);
|
||||||
GravityUtils.clientAttemptDeactivateGravity(toEquip);
|
GravityUtils.clientAttemptDeactivateGravity(toEquip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//cursor logic
|
||||||
|
if(targetPoint != null){
|
||||||
|
Item itemData = Globals.gameConfigCurrent.getItemMap().getItem(toEquip);
|
||||||
|
if(Globals.playerCursor != null){
|
||||||
|
if(itemData.getTokens().contains(ClientToolbarState.CURSOR_TOKEN)){
|
||||||
|
Globals.clientSceneWrapper.getScene().registerEntityToTag(Globals.playerCursor, EntityTags.DRAWABLE);
|
||||||
|
} else {
|
||||||
|
Globals.clientSceneWrapper.getScene().removeEntityFromTag(Globals.playerCursor, EntityTags.DRAWABLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -233,6 +250,10 @@ public class ClientToolbarState implements BehaviorTree {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Globals.playerCursor != null){
|
||||||
|
Globals.clientSceneWrapper.getScene().removeEntityFromTag(Globals.playerCursor, EntityTags.DRAWABLE);
|
||||||
|
}
|
||||||
|
|
||||||
//null out the attached entity
|
//null out the attached entity
|
||||||
this.equippedEntity = null;
|
this.equippedEntity = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user