private void UpdateGunVerbs() { if (this.gun == null) { this.MakeGun(); if (this.gun == null) { return; } } List <Verb> allVerbs = this.gun.TryGetComp <CompEquippable>().AllVerbs; if (allVerbs.NullOrEmpty()) { return; } for (int i = 0; i < allVerbs.Count; i++) { Verb verb = allVerbs[i]; verb.caster = (Thing)this.Operator ?? this.parent; verb.castCompleteCallback = new Action(this.BurstComplete); Verb_ShootCompMounted verb_ = verb as Verb_ShootCompMounted; if (verb_ != null) { verb_.turret = this; } } }
// Token: 0x0600567A RID: 22138 RVA: 0x001CE860 File Offset: 0x001CCA60 public static int TotalChargesFromQueuedJobs(Pawn pawn, ThingWithComps gear) { CompTurret compReloadable = gear.TryGetCompFast <CompTurret>(); int num = 0; if (compReloadable != null && pawn != null) { foreach (Job job in pawn.jobs.AllJobs()) { Verb_ShootCompMounted verbToUse = job.verbToUse as Verb_ShootCompMounted; if (verbToUse != null && compReloadable == verbToUse.ReloadableCompSource) { num++; } } } return(num); }