mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-17 14:04:05 +09:00
FIX: quickbar opacity bug, Notification won't display, remaned majuscule to fullwidth, keyboard layouts for control helper
Former-commit-id: 99c51499131a7cbae1b7345c15d804bd5340e7b6 Former-commit-id: 1326b69cb920d3590fe2cbe33013c85c9eeb1191
This commit is contained in:
@@ -404,6 +404,7 @@ open class ActorWithBody : Actor(), Visible {
|
||||
grounded = true
|
||||
}
|
||||
else if (isTouchingSide(nextHitbox, COLLIDING_BOTTOM) && !isColliding(nextHitbox)) { // actor hit something on its bottom
|
||||
hitAndReflectY()
|
||||
grounded = true
|
||||
}
|
||||
else { // the actor is not grounded at all
|
||||
@@ -751,11 +752,14 @@ open class ActorWithBody : Actor(), Visible {
|
||||
internal val bodyFriction: Int
|
||||
get() {
|
||||
var friction = 0
|
||||
val frictionCalcHitbox = if (isWalking)
|
||||
Hitbox(nextHitbox.posX + 1.0, nextHitbox.posY + 1.0,
|
||||
nextHitbox.width - 2.0, nextHitbox.height - 2.0)
|
||||
else
|
||||
nextHitbox.clone()
|
||||
val frictionCalcHitbox =
|
||||
if (!isWalking)
|
||||
Hitbox(nextHitbox.posX, nextHitbox.posY,
|
||||
nextHitbox.width + 2.0, nextHitbox.height + 2.0)
|
||||
// when not walking, enlarge the hitbox for calculation so that
|
||||
// feet tiles are to be taken into calculation
|
||||
else
|
||||
nextHitbox.clone()
|
||||
|
||||
// take highest value
|
||||
val tilePosXStart = (frictionCalcHitbox.posX / TSIZE).floorInt()
|
||||
|
||||
@@ -24,7 +24,7 @@ object CreatureRawInjector {
|
||||
*/
|
||||
@Throws(IOException::class, SlickException::class)
|
||||
fun inject(actorValueRef: ActorValue, jsonFileName: String) {
|
||||
val jsonObj = JsonFetcher.readJson(JSONPATH + jsonFileName)
|
||||
val jsonObj = JsonFetcher(JSONPATH + jsonFileName)
|
||||
|
||||
val elementsString = arrayOf(AVKey.RACENAME, AVKey.RACENAMEPLURAL)
|
||||
val elementsDouble = arrayOf(AVKey.BASEHEIGHT, AVKey.BASEMASS, AVKey.ACCEL, AVKey.TOOLSIZE, AVKey.ENCUMBRANCE)
|
||||
|
||||
@@ -277,8 +277,6 @@ class Player : ActorWithBody(), Controllable, Pocketed, Factionable, Luminous, L
|
||||
jumpAcc = -pwr * timedJumpCharge * JUMP_ACCELERATION_MOD * Math.sqrt(scale) // positive value
|
||||
|
||||
applyForce(Vector2(0.0, jumpAcc))
|
||||
|
||||
if (jumpAcc != 0.0) println(jumpAcc)
|
||||
}
|
||||
|
||||
// for mob ai:
|
||||
|
||||
@@ -17,7 +17,7 @@ object FactionFactory {
|
||||
*/
|
||||
@Throws(IOException::class)
|
||||
fun create(filename: String): Faction {
|
||||
val jsonObj = JsonFetcher.readJson(JSONPATH + filename)
|
||||
val jsonObj = JsonFetcher(JSONPATH + filename)
|
||||
val factionObj = Faction(jsonObj.get("factionname").asString)
|
||||
|
||||
jsonObj.get("factionamicable").asJsonArray.forEach { s -> factionObj.addFactionAmicable(s.asString) }
|
||||
|
||||
Reference in New Issue
Block a user