Add option for radio to spawn on the train workcartsSuggestion

Add option for radio to spawn on the train workcarts.

Just came to ask this too lol

If you're comfortable editting the code you can add that yourself until the author updates the plugin.  Need to add the definition for the train (PREFAB_WORKCART_ABOVEGROUND) in the top section of code, then a little further down you need to add a definition for the attachments and positions.  While I was at it I noticed the normal workcarts didn't have a radio spawning so I've added that to PREFAB_WORKCART as well.

This will only apply to manually added radios (with /attachradio).

        private const string PREFAB_WORKCART = "assets/content/vehicles/workcart/workcart.entity.prefab";
        private const string PREFAB_WORKCART_ABOVEGROUND = "assets/content/vehicles/workcart/workcart_aboveground.entity.prefab";


...


                [PREFAB_WORKCART] = new Attachment[] {
                    new Attachment(PREFAB_BUTTON, new Vector3(0.19f, 3.13f, 4.95f), new Vector3(235f, 0f, 0f)),
                    new Attachment(PREFAB_RADIO, new Vector3(0.49f, 1.53f, 3.95f), new Vector3(0f, 180f, 0f))
                },
                [PREFAB_WORKCART_ABOVEGROUND] = new Attachment[] {
                    new Attachment(PREFAB_BUTTON, new Vector3(0.19f, 3.13f, 4.95f), new Vector3(235f, 0f, 0f)),
                    new Attachment(PREFAB_RADIO, new Vector3(0.49f, 1.53f, 3.95f), new Vector3(0f, 180f, 0f))
                },

Well im no programmer but I think with your help here I could do it, thanks. EDIT While the code did "work" the above ground workcart has neither a button or a radio and the normal workcart gets a button and no radio lol

Zarius

If you're comfortable editting the code you can add that yourself until the author updates the plugin.  Need to add the definition for the train (PREFAB_WORKCART_ABOVEGROUND) in the top section of code, then a little further down you need to add a definition for the attachments and positions.  While I was at it I noticed the normal workcarts didn't have a radio spawning so I've added that to PREFAB_WORKCART as well.

This will only apply to manually added radios (with /attachradio).

        private const string PREFAB_WORKCART = "assets/content/vehicles/workcart/workcart.entity.prefab";
        private const string PREFAB_WORKCART_ABOVEGROUND = "assets/content/vehicles/workcart/workcart_aboveground.entity.prefab";


...


                [PREFAB_WORKCART] = new Attachment[] {
                    new Attachment(PREFAB_BUTTON, new Vector3(0.19f, 3.13f, 4.95f), new Vector3(235f, 0f, 0f)),
                    new Attachment(PREFAB_RADIO, new Vector3(0.49f, 1.53f, 3.95f), new Vector3(0f, 180f, 0f))
                },
                [PREFAB_WORKCART_ABOVEGROUND] = new Attachment[] {
                    new Attachment(PREFAB_BUTTON, new Vector3(0.19f, 3.13f, 4.95f), new Vector3(235f, 0f, 0f)),
                    new Attachment(PREFAB_RADIO, new Vector3(0.49f, 1.53f, 3.95f), new Vector3(0f, 180f, 0f))
                },