Fix cooking sound, wilderness gates and walk clicks lost after opening doors - #1130
Conversation
Wrought-iron gate pairs 1596/1597 (wilderness members fence) and 1589/1590 opened into non-interactive placeholder objects 1562/1563 (no name, no options), leaving an unclickable gate. Map opened states to the real opened gate objects 1560/1561 and remove the suffixless gate_25/gate_26 duplicates that stopped gates 1557/1558 from closing. Add iron door sounds and consistent params across shared ids.
Walk instructions received while a player had an action delay (e.g. the arrive delay set before an object interaction script runs) were silently discarded, so clicking to walk through a just-opened door or gate did nothing until the player clicked again after the delay. Queue the latest walk click as a weak action instead; it executes on the tick the delay expires and is discarded by any newer click, interaction or strong queue.
Not sure this is correct, I think instead the issue is the arriveDelay isn't functioning properly, if you're next to a gate and click it then click to walk - there should be no arrive delay triggered. If you're more than 1 tile away from the gate then the gate interaction should be cancelled |
Every object operate option registered by ObjectTeleporting called delay() before checking whether the target actually has a teleport, so opening any door or gate extended the input lock by an extra tick past the tick the door opened. Look up the teleport definition (using the player-aware transformed object id) before delaying.
|
Tracked down the lingering tick: it wasn't Fixed in d161437: look up the teleport definition first (using the player-aware transformed id, since some teleport objects are varbit transformed) and return early when there is none. With that, the input lock now clears on the same tick the door opens, and the only remaining window is the single legitimate arrive delay tick. |
This reverts commit 9e42663.
Fixes #1129
Fixes #1126
Cooking sound (#1129)
Cooking on a range or fire never played a sound.
Cooking.ktnow plays the already-defined but unusedcooksound (id 2577) once per item after the inventory swap, on both success and burn, matching 2009scape'splayAudio(player, Sounds.FRY_2577)inCookingPulse.Wilderness members fence gates (#1126)
The gate by the ice giants (and all six placements of gate pair 1596/1597 on the wilderness members fence) opened into objects 1562/1563, which are non-interactive placeholders in the cache with no name and no options, leaving an unclickable gate stuck in the fence.
gate_29/30_opened(and the equally-affectedgate_27/28_opened) to 1560/1561.gate_25/gate_26duplicates of 1560/1561. They claimed the ids aftergate_22/23_opened, so gates 1557/1558 answered Close with "The gate won't budge." Neither id has any static map placement.gate = falseandmaterial = "iron"consistently across every entry sharing these ids (definition params are last-write-wins per int id), so the whole family opens as a plain double door with the iron door sounds (71/70), matching 2009scape's metal gate audio.Extra input delay after opening doors/gates
Opening any door then clicking to walk through did nothing until a second or two later, even after the door was visibly open.
ObjectTeleportingregisters an operate handler for every teleport option, including "Open", and its block calleddelay()before checking whether the target actually has a teleport, so every door and gate open ran a second unconditional 1 tick input lock after the door script finished. The handler now looks up the teleport definition first (using the player-aware transformed object id, since some teleport objects are varbit transformed) and returns early when there is none.Tests
New
WildernessGateTestopens the actual Ice Plateau gate from the map, walks through, and closes it. Full:game:testsuite passes.