mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
font adjustments
This commit is contained in:
@@ -113,7 +113,7 @@ class StateInGame : BasicGameState() {
|
||||
/**
|
||||
* Set to false if UI is opened; set to true if UI is closed.
|
||||
*/
|
||||
var canPlayerMove: Boolean = false
|
||||
var canPlayerControl: Boolean = false
|
||||
get() = !paused // FIXME temporary behab (block movement if the game is paused or paused by UIs)
|
||||
|
||||
@Throws(SlickException::class)
|
||||
@@ -521,7 +521,7 @@ class StateInGame : BasicGameState() {
|
||||
|
||||
GameController.keyPressed(key, c)
|
||||
|
||||
if (canPlayerMove) {
|
||||
if (canPlayerControl) {
|
||||
player?.keyPressed(key, c)
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ object GameController {
|
||||
|
||||
// actor process input
|
||||
if (!ingame.consoleHandler.isTakingControl) {
|
||||
if (ingame.canPlayerMove) {
|
||||
if (ingame.canPlayerControl) {
|
||||
ingame.actorContainer.forEach {
|
||||
if (it is Controllable) {
|
||||
// disable control of actor if the actor is riding something?
|
||||
@@ -70,7 +70,7 @@ object GameController {
|
||||
///////////////////
|
||||
|
||||
// Use item: assuming the player has only one effective grip (EquipPosition.HAND_GRIP)
|
||||
if (ingame.player != null) {
|
||||
if (ingame.player != null && ingame.canPlayerControl) {
|
||||
if (input.isMouseButtonDown(Terrarum.getConfigInt("mouseprimary")) || input.isMouseButtonDown(Terrarum.getConfigInt("mousesecondary"))) {
|
||||
val itemOnGrip = ingame.player!!.inventory.itemEquipped[InventoryItem.EquipPosition.HAND_GRIP]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user