Align elevator stops with room walk bands
This commit is contained in:
parent
6188db9e13
commit
f3284814db
10
src/main.js
10
src/main.js
@ -222,9 +222,13 @@ const ROOMS = [
|
||||
|
||||
const ROOM_BY_ID = new Map(ROOMS.map((room) => [room.id, room]))
|
||||
|
||||
function floorLiftStopY(slot) {
|
||||
return slot.y + Math.round(slot.h * 0.84)
|
||||
}
|
||||
|
||||
function elevatorStopY(room) {
|
||||
if (room.isRoof) return ROOF_LIFT_STOP_Y
|
||||
return room.y + Math.round(room.height / 2)
|
||||
return room.walkBand.homeY
|
||||
}
|
||||
|
||||
function elevatorEntry(room) {
|
||||
@ -269,7 +273,7 @@ function buildElevatorSvg() {
|
||||
const shaftHeight = HOUSE_BOTTOM - ELEVATOR_SHAFT_TOP
|
||||
const stopYs = [
|
||||
ROOF_LIFT_STOP_Y,
|
||||
...FLOOR_SLOTS.map((slot) => slot.y + slot.h / 2)
|
||||
...FLOOR_SLOTS.map(floorLiftStopY)
|
||||
]
|
||||
|
||||
const openings = stopYs.map((stopY) => {
|
||||
@ -1303,7 +1307,7 @@ const game = new Phaser.Game({
|
||||
})
|
||||
|
||||
window.__DOLLHOUSE__ = {
|
||||
version: '0.10.8',
|
||||
version: '0.10.9',
|
||||
game,
|
||||
async resetAll() {
|
||||
await clearGameState()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user