Yesterday I added two new Components to the game: Part and Nothing. These are intended to help simplify a couple object interactions I ran into.
Part
A Part is a regular object in most respects, but it’s directly connected to another object. A button on a shirt, a branch on a tree, etc. Parts don’t have much in the way of unique behavior (yet). For now it allows me to easily restrict objects from being taken when they’re part of a larger object.
Part Component
1 | parts.c('part', { |
Later on, parts might interact with their parent objects in more complex ways.
Nothing
A Nothing is a thing that isn’t really a thing. The specific use case was creating a hole in something. You can look at a hole, and possibly put things in a hole, but some activities don’t make sense with an abstract object like a hole. For example, you can’t take a hole. The response to a player trying to take a Nothing is slightly different than a Part. You can’t take a Part because it’s attached to something; you can’t take a Nothing because it’s fundamentally not a thing that can be taken.
Nothing Component
1 | coreModule.c('nothing', { |
As part of building the bird feeder item, I added a hole (nothing) that is a part of the feeder. The feeder also has a part called a post (which is not nothing), and together it all makes a whole.