Jump to content

Moon Base cannot be repaired, because repairable component should be added before workable


Whateverr
  • Fixed

I made a mod that allows players to build their own moon bases.

However, after the recent update, the moon base cannot be repaired with moon rocks.

I tried to find out why, and here is what I found:

This update changed `workable.lua`.

When `workable.workleft` changes, the component references the `repairable` component to set if the inst could be repaired.

But in `moonbase.lua`, `repairable` was added after the `workable` component was set up.

That means, if I spawn a moon base directly, its workable state will never be changed, as a result, the moon base could not be repaired unless I restart the server.

I think the problem can be solved by changing the order in which the components are added in `moonbase.lua`.

 


Steps to Reproduce

1. start a new game

2. spawn a moon base manually

3. take a a bunch of moon rocks

4. try to use the moon rocks to repair the moon base




User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...