Skip to content

getContents() is undefined #105

@Woodhouse3D

Description

@Woodhouse3D

I'm working on a game and I've found that I need to be able to check for every object of a certain type in a room.

however, the function getContents() is undefined for some reason.

Fortunately, I eventually discovered a workaround:
const get_all_children = function(_room) { var list = scopeBy(item => item.isAtLoc(_room)) var newlist = list list.forEach(function(thingy){ newlist = newlist.concat(get_all_children(thingy)) }) return newlist }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions