Skip to content

Commit

Permalink
Quality of life fixes (#443)
Browse files Browse the repository at this point in the history
* Add simpler disconnect callback

* Fix weapon render animations

* Fix wilderness lever pull

* Remove single client thread closes #425

* Close dialogues on closing of interfaces where enterInt and enterString are used

* Add prayer altars closes #430

* Fix nested world timers/shop restocking

* Fix shop definitions with wrong lengths closes #393

* Fix General Store messages

* Add lent item restrictions to General Stores

* Version 1.1.2
  • Loading branch information
GregHib committed Feb 11, 2024
1 parent bf4bac4 commit ec0e876
Show file tree
Hide file tree
Showing 30 changed files with 390 additions and 82 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ allprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")

group = "world.gregs.void"
version = "1.1.1"
version = "1.1.2"

java.sourceCompatibility = JavaVersion.VERSION_19
java.targetCompatibility = java.sourceCompatibility
Expand Down
3 changes: 2 additions & 1 deletion data/definitions/animations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1624,4 +1624,5 @@ teleport_jewellery:
teleport_pharaohs_sceptre:
id: 9596
ticks: 3
fill_bucket: 895
fill_bucket: 895
altar_pray: 645
2 changes: 1 addition & 1 deletion data/definitions/inventories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4573,7 +4573,7 @@ aarons_archery_appendages_trimmed:
- leather_cowl: 10
- leather_vambraces: 10
- ranged_cape_t: 1
runecrafting_skillcape_skillcape:
runecrafting_skillcape:
id: 459
defaults:
- runecrafting_cape: 1
Expand Down
269 changes: 262 additions & 7 deletions data/definitions/objects.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
crate:
id: 1
examine: "Big mysterious crate. You wonder what could be inside."
altar:
id: 2640
examine: "Shrine to the glory of Saradomin."
altar_2:
id: 36972
examine: "Shrine to the glory of Saradomin."
door_opened:
id: 1531
examine: "The door is open."
Expand Down Expand Up @@ -11354,4 +11348,265 @@ water_trough_11:
examine: "A handy source of water."
water_trough_12:
id: 55841
examine: "A handy source of water."
examine: "A handy source of water."
prayer_altar_chaos_varrock:
id: 61
examine: "Shrine to the glory of Zamorak."
prayer_altar_normal:
id: 409
examine: "Shrine to the glory of Saradomin."
prayer_altar_chaos_ourania:
id: 411
examine: "Shrine to the glory of Zamorak."
prayer_altar_chaos_yanille_agility_dungeon:
id: 412
examine: "Shrine to the glory of Zamorak."
prayer_altar_edgeville:
id: 2640
examine: "A shrine for the faithful to worship at."
prayer_altar_nature:
id: 3521
examine: "A grotto transformed into an altar of nature."
prayer_altar_well_of_voyage:
id: 4008
examine: "Shrine to the glory of Saradomin."
prayer_altar_gorilla_statue:
id: 4859
examine: "It's a huge statue of some kind of gorilla."
altar_dessert_treasure:
id: 6552
examine: "A mysterious ancient altar to some forgotten god..."
prayer_altar_lletya:
id: 8749
examine: "A shrine to the glory of Seren."
prayer_altar_entrana:
id: 10638
examine: "Shrine to the glory of Saradomin."
prayer_altar_entrana_bag:
id: 10639
examine: "Shrine to the glory of Saradomin."
prayer_altar_entrana_star:
id: 10640
examine: "Shrine to the glory of Saradomin."
prayer_altar_oak_saradomin:
id: 13179
examine: "An oak altar with a symbol of Saradomin."
prayer_altar_oak_zamorak:
id: 13180
examine: "An oak altar with a symbol of Zamorak."
prayer_altar_oak_guthix:
id: 13181
examine: "An oak altar with a symbol of Guthix."
prayer_altar_teak_saradomin:
id: 13182
examine: "A teak altar with a symbol of Saradomin."
prayer_altar_teak_zamorak:
id: 13183
examine: "A teak altar with a symbol of Zamorak."
prayer_altar_teak_guthix:
id: 13184
examine: "A teak altar with a symbol of Guthix."
prayer_altar_cloth_saradomin:
id: 13185
examine: "A cloth-covered teak altar with a symbol of Saradomin."
prayer_altar_cloth_zamorak:
id: 13186
examine: "A cloth-covered teak altar with a symbol of Zamorak."
prayer_altar_cloth_guthix:
id: 13187
examine: "A cloth-covered teak altar with a symbol of Guthix."
prayer_altar_mahogany_saradomin:
id: 13188
examine: "A mahogany altar with a symbol of Saradomin."
prayer_altar_mahogany_zamorak:
id: 13189
examine: "A mahogany altar with a symbol of Zamorak."
prayer_altar_mahogany_guthix:
id: 13190
examine: "A mahogany altar with a symbol of Guthix."
prayer_altar_limestone_saradomin:
id: 13191
examine: "A limestone altar with a symbol of Saradomin."
prayer_altar_limestone_zamorak:
id: 13192
examine: "A limestone altar with a symbol of Zamorak."
prayer_altar_limestone_guthix:
id: 13193
examine: "A limestone altar with a symbol of Guthix."
prayer_altar_marble_saradomin:
id: 13194
examine: "A marble altar with a symbol of Saradomin."
prayer_altar_marble_zamorak:
id: 13195
examine: "A marble altar with a symbol of Zamorak."
prayer_altar_marble_guthix:
id: 13196
examine: "A marble altar with a symbol of Guthix."
prayer_altar_gilded_saradomin:
id: 13197
examine: "A gilded marble altar with a symbol of Saradomin."
prayer_altar_gilded_zamorak:
id: 13198
examine: "A gilded marble altar with a symbol of Zamorak."
prayer_altar_gilded_guthix:
id: 13199
examine: "A gilded marble altar with a symbol of Guthix."
prayer_altar_witchaven:
id: 18254
examine: "An altar with a symbol of Saradomin."
prayer_altar_camelot:
id: 19145
examine: "Shrine to the glory of Saradomin."
prayer_altar_sophanem_large:
id: 20377
examine: "An altar."
prayer_altar_sophanem:
id: 20378
examine: "An altar."
prayer_altar_varrock_church:
id: 24343
examine: "A cloth-covered altar with a symbol of Saradomin."
prayer_zamorak_altar_godwars:
id: 26286
examine: "An altar to Zamorak."
prayer_saradomin_altar_godwars:
id: 26287
examine: "An altar to Saradomin."
prayer_armadyl_altar_godwars:
id: 26288
examine: "The last remaining holy place of the aviantese."
prayer_bandos_altar_godwars:
id: 26289
examine: "Altar to the goblin god."
prayer_altar_goblin_temple:
id: 27306
examine: "An altar to the Big High War God."
prayer_altar_goblin_temple_corner:
id: 27338
examine: "An altar to the Big High War God."
prayer_altar_goblin_temple_base:
id: 27339
examine: "An altar to the Big High War God."
prayer_altar_duel_arena:
id: 27661
examine: "Shrine to the glory of Saradomin."
altar_of_guthix_druidic_ritual:
id: 28698
examine: "An ancient altar to the glory of Guthix."
prayer_altar_paterdomus_temple:
id: 30726
examine: "A broken altar."
prayer_altar_chaos_underground_pass:
id: 32079
examine: "Shrine to the glory of Zamorak."
prayer_altar_ardougne:
id: 34616
examine: "A shrine to the glory of Saradomin."
prayer_altar_lumbridge:
id: 36972
examine: "A shrine to the glory of Saradomin."
prayer_altar_lumbridge_copy:
id: 37630
examine: "A shrine to Saradomin."
prayer_altar_chaos_wilderness:
id: 37990
examine: "Shrine to the glory of Zamorak."
prayer_altar_stealing_creation:
id: 39547
examine: "You can recharge your Prayer points here."
prayer_altar_port_sarim_church:
id: 39842
examine: "A shrine to the glory of Saradomin."
prayer_altar_oak_saradomin_offer:
id: 44926
examine: "An oak altar with a symbol of Saradomin."
prayer_altar_oak_zamorak_offer:
id: 44927
examine: "An oak altar with a symbol of Zamorak."
prayer_altar_oak_guthix_offer:
id: 44928
examine: "An oak altar with a symbol of Guthix."
prayer_altar_teak_saradomin_offer:
id: 44929
examine: "A teak altar with a symbol of Saradomin."
prayer_altar_teak_zamorak_offer:
id: 44930
examine: "A teak altar with a symbol of Zamorak."
prayer_altar_teak_guthix_offer:
id: 44931
examine: "A teak altar with a symbol of Guthix."
prayer_altar_cloth_saradomin_offer:
id: 44932
examine: "A cloth-covered teak altar with a symbol of Saradomin."
prayer_altar_cloth_zamorak_offer:
id: 44933
examine: "A cloth-covered teak altar with a symbol of Zamorak."
prayer_altar_cloth_guthix_offer:
id: 44934
examine: "A cloth-covered teak altar with a symbol of Guthix."
prayer_altar_mahogany_saradomin_offer:
id: 44935
examine: "A mahogany altar with a symbol of Saradomin."
prayer_altar_mahogany_zamorak_offer:
id: 44936
examine: "A mahogany altar with a symbol of Zamorak."
prayer_altar_mahogany_guthix_offer:
id: 44937
examine: "A mahogany altar with a symbol of Guthix."
prayer_altar_limestone_saradomin_offer:
id: 44938
examine: "A limestone altar with a symbol of Saradomin."
prayer_altar_limestone_zamorak_offer:
id: 44939
examine: "A limestone altar with a symbol of Zamorak."
prayer_altar_limestone_guthix_offer:
id: 44940
examine: "A limestone altar with a symbol of Guthix."
prayer_altar_marble_saradomin_offer:
id: 44941
examine: "A marble altar with a symbol of Saradomin."
prayer_altar_marble_zamorak_offer:
id: 44942
examine: "A marble altar with a symbol of Zamorak."
prayer_altar_marble_guthix_offer:
id: 44943
examine: "A marble altar with a symbol of Guthix."
prayer_altar_guilded_saradomin_offer:
id: 44944
examine: "A gilded marble altar with a symbol of Saradomin."
prayer_altar_guilded_zamorak_offer:
id: 44945
examine: "A gilded marble altar with a symbol of Zamorak."
prayer_altar_guilded_guthix_offer:
id: 44946
examine: "A gilded marble altar with a symbol of Guthix."
prayer_altar_abandoned:
id: 51061
examine: "A shrine for the faithful to worship at."
prayer_altar_frozen:
id: 51609
examine: "A shrine for the faithful to worship at."
prayer_altar_furnished:
id: 52154
examine: "A shrine for the faithful to worship at."
altar_love_story:
id: 52825
examine: "A gilded marble altar with a symbol of Zamorak."
prayer_altar_frozen_construction:
id: 53368
examine: "A shrine for the faithful to worship at."
prayer_altar_abandoned_construction:
id: 53376
examine: "A shrine for the faithful to worship at."
prayer_altar_furnished_construction:
id: 53384
examine: "A shrine for the faithful to worship at."
prayer_altar_occult_construction:
id: 53739
examine: "A shrine for the faithful to worship at."
prayer_altar_zaros:
id: 55340
examine: "Shrine to the glory of Zaros."
prayer_altar_warped_construction:
id: 55667
examine: "A shrine for the faithful to worship at."
3 changes: 2 additions & 1 deletion data/definitions/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ quest_complete: 2193
quest_progress: 2194
activate_prayer: 2295
achievement_has_requirements: 3224
achievement_complete: 3994
achievement_complete: 3994
close_dialogue: 571
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class InstructionTask(

@OptIn(ExperimentalCoroutinesApi::class)
override fun run() {
players.forEach { player ->
for (player in players) {
val instructions = player.instructions
for (instruction in instructions.replayCache) {
if (player["debug", false]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ object World : Entity, Variable, EventDispatcher, Runnable, KoinComponent {
if (GameLoop.tick <= tick) {
continue
}
block.invoke()
iterator.remove()
block.invoke()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package world.gregs.voidps.engine.entity.character.player

import kotlinx.coroutines.flow.MutableSharedFlow
import org.rsmod.game.pathfinder.collision.CollisionStrategy
import world.gregs.voidps.engine.Contexts
import world.gregs.voidps.engine.client.ConnectionQueue
import world.gregs.voidps.engine.client.ui.GameFrame
import world.gregs.voidps.engine.client.ui.InterfaceOptions
Expand Down Expand Up @@ -34,7 +33,6 @@ import world.gregs.voidps.engine.timer.TimerQueue
import world.gregs.voidps.engine.timer.Timers
import world.gregs.voidps.network.Instruction
import world.gregs.voidps.network.client.Client
import world.gregs.voidps.network.client.ClientState
import world.gregs.voidps.network.encode.login
import world.gregs.voidps.network.encode.logout
import world.gregs.voidps.network.visual.PlayerVisuals
Expand Down Expand Up @@ -119,7 +117,7 @@ class Player(
this.client = client
interfaces.client = client
(variables as PlayerVariables).client = client
client.on(Contexts.Game, ClientState.Disconnecting) {
client.onDisconnecting {
logout(false)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import world.gregs.voidps.engine.entity.character.Character
import world.gregs.voidps.engine.entity.character.mode.interact.Interaction
import world.gregs.voidps.engine.entity.character.mode.interact.TargetObjectContext
import world.gregs.voidps.engine.entity.character.player.Player
import world.gregs.voidps.engine.event.Priority
import world.gregs.voidps.engine.event.on
import world.gregs.voidps.engine.event.wildcardEquals
import world.gregs.voidps.engine.suspend.arriveDelay
Expand All @@ -26,9 +27,9 @@ fun objectApproach(option: String, vararg objects: String = arrayOf("*"), block:
}
}

fun objectOperate(option: String, vararg objects: String = arrayOf("*"), arrive: Boolean = true, block: suspend ObjectOption.() -> Unit) {
fun objectOperate(option: String, vararg objects: String = arrayOf("*"), arrive: Boolean = true, priority: Priority = Priority.MEDIUM, block: suspend ObjectOption.() -> Unit) {
for (id in objects) {
on<ObjectOption>({ operate && wildcardEquals(id, target.id) && wildcardEquals(option, this.option) }) { _: Player ->
on<ObjectOption>({ operate && wildcardEquals(id, target.id) && wildcardEquals(option, this.option) }, priority) { _: Player ->
if (arrive) {
arriveDelay()
}
Expand Down
2 changes: 1 addition & 1 deletion game/src/main/kotlin/world/gregs/voidps/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ object Main {
val protocol = protocol(get<Huffman>())

val gatekeeper: ConnectionGatekeeper = get()
val loginServer = LoginServer.load(properties, protocol, gatekeeper, accountLoader, Contexts.Game)
val loginServer = LoginServer.load(properties, protocol, gatekeeper, accountLoader)
val server = GameServer.load(cache, properties, gatekeeper, loginServer)

val tickStages = getTickStages(iterator = if (CharacterTask.DEBUG) SequentialIterator() else ParallelIterator())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ objectOperate("Collect") {

interfaceClose("bank") { player: Player ->
player.close("bank_side")
player.sendScript(571)
}

interfaceOpen("bank") { player: Player ->
Expand Down
Loading

0 comments on commit ec0e876

Please sign in to comment.