Jump to content

Recommended Posts

Unfortunately, there isn't an easy solution to this problem. Here's what you could do, you must decide what's best for your specific case:

  1. Keep a list of valid prefabs and check whether X is in that list. (You'd use the prefab names as keys for dummy values.)
  2. Use the string library to see whether X's prefab name starts or ends with "cooked".
  3. See whether X is edible but not cookable.
53 minutes ago, Mobbstar said:

Unfortunately, there isn't an easy solution to this problem. Here's what you could do, you must decide what's best for your specific case:

  1. Keep a list of valid prefabs and check whether X is in that list. (You'd use the prefab names as keys for dummy values.)
  2. Use the string library to see whether X's prefab name starts or ends with "cooked".
  3. See whether X is edible but not cookable.

I went with the third option checking if the food was edible but not cookable and it worked so thanks :)

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...