font adjustments

This commit is contained in:
Song Minjae
2017-04-12 00:27:14 +09:00
parent 498cf4709b
commit 80d993dced
2 changed files with 4 additions and 4 deletions

View File

@@ -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)
}

View File

@@ -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]