ChensGradiusMod
Chen.GradiusMod.Drones.Drone
Drone.CreateDroneDef(DroneDef, GameObject, GameObject, InteractableSpawnCard, string, Texture, GameObject, DroneDef) Method
Creates and registers the DroneDef of the custom drone, and links it to the broken interactable so it behaves like a vanilla drone.
The language tokens used are {tokenPrefix}_NAME, {tokenPrefix}_PICKUP, {tokenPrefix}_DESCRIPTION and {tokenPrefix}_SKILL_DESCRIPTION.
protected DroneDef CreateDroneDef(DroneDef tierTemplate, GameObject bodyPrefab, GameObject brokenObject, InteractableSpawnCard spawnCard, string tokenPrefix, Texture icon, GameObject displayPrefab, DroneDef commandTemplate=null);
Parameters
tierTemplate RoR2.DroneDef
A vanilla DroneDef where the tier, type and other gameplay flags are copied from.
bodyPrefab UnityEngine.GameObject
The CharacterBody prefab of the drone.
brokenObject UnityEngine.GameObject
The broken interactable prefab of the drone.
spawnCard RoR2.InteractableSpawnCard
The spawn card of the broken interactable.
tokenPrefix System.String
The prefix of the language tokens of the drone.
icon UnityEngine.Texture
The icon of the drone.
displayPrefab UnityEngine.GameObject
The model displayed when the drone is a pickup. Use CreatePickupDisplay to make one.
commandTemplate RoR2.DroneDef
The vanilla DroneDef the drone body was cloned from. Its Drone Tech command text is reused since the command behavior is inherited.
Returns
RoR2.DroneDef
The registered DroneDef