What's the expected benefit of the feature you are requesting?
A sibling of #136, this idea's goal is to reduce boilerplate code used to bring a prop into the inventory, and vice-versa.
Describe the solution you'd like
The two virtual methods mentioned in the issue title would allow one to automagically collect a prop into the inventory or place an inventory item in the scene as a prop.
Mapping props to items and back can be done with a progressive specification of parameters:
Simply calling C.Grab() will inspect the name of a clickable prop and will try to add an item with the same name to the inventory, hiding the clickable on the scene. Graceful failing is provided if there is no matching (by triggering the fallback or not acting at all). C.Place() would walk the same, just the other way around.
Calling C.Grab("Name") will jump the inspection of the clickable. This may be useful when collecting a prop you are not clicking on it (pull a lever, get the banana)
Calling C.Grab("Candle", "LitCandle") disables the "Candle" prop, enabling the "LitCandle" inventory item). Same for "Place()", just the other way around.
Describe alternatives you've considered
Boilerplate code.
Additional context
The Grab() method is already available on the character, but it does nothing.
What's the expected benefit of the feature you are requesting?
A sibling of #136, this idea's goal is to reduce boilerplate code used to bring a prop into the inventory, and vice-versa.
Describe the solution you'd like
The two virtual methods mentioned in the issue title would allow one to automagically collect a prop into the inventory or place an inventory item in the scene as a prop.
Mapping props to items and back can be done with a progressive specification of parameters:
C.Grab()
will inspect the name of a clickable prop and will try to add an item with the same name to the inventory, hiding the clickable on the scene. Graceful failing is provided if there is no matching (by triggering the fallback or not acting at all).C.Place()
would walk the same, just the other way around.C.Grab("Name")
will jump the inspection of the clickable. This may be useful when collecting a prop you are not clicking on it (pull a lever, get the banana)C.Grab("Candle", "LitCandle")
disables the "Candle" prop, enabling the "LitCandle" inventory item). Same for "Place()", just the other way around.Describe alternatives you've considered
Boilerplate code.
Additional context
The
Grab()
method is already available on the character, but it does nothing.