Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion game/src/main/kotlin/content/entity/Movement.kt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Movement : Script {
if (player.tile == target && player.mode != EmptyMode && player.mode != PauseMode) {
player.mode = EmptyMode
}
player.walkTo(target, forceWalk = player.equipped(EquipSlot.Weapon).id == "stone_bowl")
player.walkTo(target, forceWalk = walk || player.equipped(EquipSlot.Weapon).id == "stone_bowl")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,10 @@ class PlagueCity : Script {

init {
playerSpawn {
if (get("plaguecity_hide_edmond_up_top", false)) {
sendVariable("plaguecity_hide_edmond_up_top")
}
if (get("plaguecity_dug_mud_pile", false)) {
sendVariable("plaguecity_dug_mud_pile")
}
if (get("plaguecity_checked_grill", false)) {
sendVariable("plaguecity_checked_grill")
}
if (get("plaguecity_key_asked", false)) {
sendVariable("plaguecity_key_asked")
}
sendVariable("plaguecity_hide_edmond_up_top")
sendVariable("plaguecity_dug_mud_pile")
sendVariable("plaguecity_checked_grill")
sendVariable("plaguecity_key_asked")
sendVariable("plaguecity_pipe")
sendVariable("plaguecity_elena_at_home")
sendVariable("plague_city")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package world.gregs.voidps.network.client.instruction

import world.gregs.voidps.network.client.Instruction

data class Walk(val x: Int, val y: Int, val minimap: Boolean = false) : Instruction
data class Walk(val x: Int, val y: Int, val walk: Boolean = false, val minimap: Boolean = false) : Instruction
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class WalkMapDecoder : Decoder(5) {

override suspend fun decode(packet: Source): Instruction {
val y = packet.readShortLittleEndian().toInt()
val running = packet.readBooleanAdd()
val forceWalk = packet.readBooleanAdd()
val x = packet.readUnsignedShortAdd()
return Walk(x, y)
return Walk(x, y, forceWalk)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class WalkMiniMapDecoder : Decoder(18) {

override suspend fun decode(packet: Source): Instruction {
val y = packet.readShortLittleEndian().toInt()
val running = packet.readBooleanAdd()
val forceWalk = packet.readBooleanAdd()
val x = packet.readUnsignedShortAdd()
packet.readByte() // -1
packet.readByte() // -1
Expand All @@ -24,6 +24,6 @@ class WalkMiniMapDecoder : Decoder(18) {
packet.readShort() // X in region?
packet.readShort() // Y in region?
packet.readByte() // 63
return Walk(x, y, minimap = true)
return Walk(x, y, forceWalk, minimap = true)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ class DecoderTest {
EnterName("a string"), // 43
null, // 84
null, // 71
Walk(1234, 4321), // 35
Walk(1234, 4321, minimap = true), // 82
Walk(1234, 4321, walk = true), // 35
Walk(1234, 4321, walk = true, minimap = true), // 82
null, // 49
null, // 8
SongEnd(12345), // 52
Expand Down
Loading