Changing the ctor for LevelObject to reflect BarricadeManager.spawnBarricade #4053
Jdance-Media
started this conversation in
Ideas
Replies: 1 comment
-
Sorry, the barricade one is unintentional and I'd be hesitant to make this change because those components aren't expected to be already existing on any objects. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Using
Transform.GetOrAddComponent
could really help us out when it comes to advanced modding. Also allows us to implement #4051 without you having to add yet anotherInteractable
type. It seems you expected us to do something like this when you did the same forBarricadeManager.spawnBarricade
.Further explanation:
A little while back I made a money printer that would automatically harvest itself after a timer modhook was triggered. From this, I figured that by adding an
Interactable
component to my main prefab, it would automatically become the one used by the game. This was true, but only in the case of barricades, because at some point you made it soBarricadeManager.spawnBarricade
usedGetOrAddComponent
rather thanAddComponent
. I attempted to apply the same concept with others using objects, in this case I was using theInteractableObjectQuest
component, this of course did not work because objects weren't setup the same way and didn't 'adopt' the component I had already attached to the prefab.Gamingtoday093 pointed out
BarricadeManager.spawnBarricade
. DrDallas and Loco helped test some of theories.Beta Was this translation helpful? Give feedback.
All reactions