
local objects = require 'objects'


objects.assign_properties("base:staff_room/sofa", {
    can_sit = true,
    capacity = 2,
    seat_position = function(idx, rotation)
        idx = idx - 1
        local s, c = math.sin(rotation), math.cos(rotation)
        local x = -0.20 * s + math.abs(c) * (-0.4 + idx * 0.8)
        local y = -0.20 * c + math.abs(s) * (-0.4 + idx * 0.8)
        return x, y, rotation
    end
})

objects.assign_properties("base:chairs/bench", {
    can_sit = true,
    capacity = 1,
    seat_position = function(idx, rotation)
        local s, c = math.sin(rotation), math.cos(rotation)
        local x = -0.16 * s
        local y = -0.16 * c
        return x, y, rotation
    end
})

objects.assign_properties("base:shop/cafe_table", {
    can_sit = true,
    capacity = 4,
    seat_position = function(idx)
        idx = idx - 1
        local rotation = idx * math.pi * 0.5
        local s, c = math.sin(rotation), math.cos(rotation)
        local x = 0.35 * s
        local y = 0.35 * c
        return x, y, rotation
    end
})