Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Usage of 'string[] entitybuildersubtypenames'

Discussion in 'Programming Questions and Suggestions' started by Cursedth, Jun 1, 2017.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Cursedth Apprentice Engineer

    Messages:
    111
    What do I put there and also where do I create this string array and how do I populate it? - -a

    Code:
      [MyEntityComponentDescriptor(typeof(MyObjectBuilder_SensorBlock), true/false, ..<here??>..)]
      public class EvilSensor : MyGameLogicComponent
      {
    Thanks Cursedth.
     
  2. Phoera Senior Engineer

    Messages:
    1,713
    1)you can put there subtypeids of block, this will limit this component to specific blocks(subtype are found in block definition)
    2)this arg is params arg, so you can just put them via comma
    Code:
    [MyEntityComponentDescriptor(typeof(MyObjectBuilder_SensorBlock), true/false, "SmallBlockSensor", "LargeBlockSensor")]
    or alternative
    Code:
    [MyEntityComponentDescriptor(typeof(MyObjectBuilder_SensorBlock), true/false, new string[]{ "SmallBlockSensor", "LargeBlockSensor"})]
    which actually same.
    coede from above will bind component only to vanilla sensor blocks, any modded will be ignored.(it must have own subtypeid, or it will replace vanilla)
     
  3. Cursedth Apprentice Engineer

    Messages:
    111
    Ah okay thanks for explaining.
    :)
     
Thread Status:
This last post in this thread was made more than 31 days old.