Beispiel #1
0
 public static void Postfix(WorkableTarget __instance)
 {
     if (__instance.name == "HeliumExtractorComplete")
     {
         // Fix the OilRefinery animation
         __instance.overrideAnims = new KAnimFile[]
         {
             Assets.GetAnim("anim_interacts_metalrefinery_kanim")
         };
     }
 }
 internal void Idle()
 {
     napParticle.Play();
     if (workTarget != null)
     {
         workTarget.WorkerFreed(this);
     }
     StopMoving();
     ReachedDestination = false;
     colorer.SetJobColor(Job.Idle);
     workTarget = null;
 }
        internal void DroppedOnBuilding(Building building)
        {
            // TODO: Set location
            var housing = building.GetComponent <Housing>();

            transform.position = housing != null ? housing.SpawnSpot.position : building.transform.position;

            WorkableTarget target = building.GetComponent <WorkableTarget>();

            if (target == null || !target.RoomForWorker)
            {
                return;
            }

            workTarget = target;
            workTarget.WorkerAssigned(this);
            colorer.SetJobColor(workTarget.job);
            UpdateCurrentTile();
        }