function stall_placer(x, y, placer, version, rotation)
    x = math.floor(x)
    y = math.floor(y)
    placer:animated_model("base:toilet/stall", "open", x + 0.5, 0.0, y + 0.5, rotation * (math.pi / 2))
    local c = math.cos(-rotation * (math.pi / 2))
    local s = math.sin(-rotation * (math.pi / 2))
    placer:placement_bound(
        x - math.max(-s, 0),
        y - math.max(c, 0),
        1.0 + math.abs(s),
        1.0 + math.abs(c)
    )

    local r = rotation % 4
    if r ~= 0 then
        placer:collision_bound(x, y, 1.0, 0.25)
    end
    if r ~= 1 then
        placer:collision_bound(x, y, 0.25, 1.0)
    end
    if r ~= 2 then
        placer:collision_bound(x, y + 0.75, 1.0, 0.25)
    end
    if r ~= 3 then
        placer:collision_bound(x + 0.75, y, 0.25, 1.0)
    end

    placer:selection_bound(x, 0.0, y, 1.0, 1.0, 1.0)
    if not placer:contains_bound(
        x - math.max(-s, 0),
        y - math.max(c, 0),
        1.0 + math.abs(s),
        1.0 + math.abs(c)
    ) then
        placer:fail("Stall not inside the room")
    end
    return 0
end