// Token: 0x06000079 RID: 121 RVA: 0x000066F4 File Offset: 0x000048F4 public void MSUseStim(Pawn p, bool Using) { if (!Using || p == null) { return; } if (def.defName == "MSBattleStimBelt") { MSExoticUtility.ChkMSBattleStim(p, out var Reason, out var Passed); if (!Passed) { Messages.Message("MSExotic.ReasonPrefix".Translate() + Reason, p, MessageTypeDefOf.NeutralEvent, false); return; } StimUses--; MSExoticUtility.DoMSBattleStim(p, def); if (StimUses < 1 && !this.DestroyedOrNull()) { Destroy(); } } else { Log.Message(string.Concat("ERR: Stim Worn item def not found for ", def.label.CapitalizeFirst(), " : (", def.defName, ")")); } }
// Token: 0x06000079 RID: 121 RVA: 0x000066F4 File Offset: 0x000048F4 public void MSUseStim(Pawn p, bool Using) { if (Using && p != null) { if (this.def.defName == "MSBattleStimBelt") { MSExoticUtility.ChkMSBattleStim(p, out string Reason, out bool Passed); if (!Passed) { Messages.Message("MSExotic.ReasonPrefix".Translate() + Reason, p, MessageTypeDefOf.NeutralEvent, false); return; } this.StimUses--; MSExoticUtility.DoMSBattleStim(p, this.def); if (this.StimUses < 1 && !this.DestroyedOrNull()) { this.Destroy(DestroyMode.Vanish); return; } } else { Log.Message(string.Concat(new string[] { "ERR: Stim Worn item def not found for ", this.def.label.CapitalizeFirst(), " : (", this.def.defName, ")" }), false); } } }
// Token: 0x0600004E RID: 78 RVA: 0x00005538 File Offset: 0x00003738 public override bool CanBeUsedBy(Pawn p, out string failReason) { failReason = null; if (this.parent.def == MSExoticDefOf.ThingDefOf.MSImmunisation) { MSExoticUtility.ChkMSImmunisation(p, out string Reason, out bool Passed); if (!Passed) { failReason = Reason; return(false); } } if (this.parent.def == MSExoticDefOf.ThingDefOf.MSCerebrax) { MSExoticUtility.ChkMSCerebrax(p, out string Reason2, out bool Passed2); if (!Passed2) { failReason = Reason2; return(false); } } if (this.parent.def == MSExoticDefOf.ThingDefOf.MSBattleStim) { MSExoticUtility.ChkMSBattleStim(p, out string Reason3, out bool Passed3); if (!Passed3) { failReason = Reason3; return(false); } } if (MSExoticUtility.GetIsTranscendence(this.parent.def)) { MSExoticUtility.ChkMSTranscendence(p, this.parent.def, out string Reason4, out bool Passed4); if (!Passed4) { failReason = Reason4; return(false); } } if (this.parent.def == MSExoticDefOf.ThingDefOf.MSPerpetuity) { MSExoticUtility.ChkMSPerpetuity(p, out string Reason5, out bool Passed5); if (!Passed5) { failReason = Reason5; return(false); } } if (this.parent.def == MSExoticDefOf.ThingDefOf.MSCondom) { MSExoticUtility.ChkMSCondom(p, out string Reason6, out bool Passed6); if (!Passed6) { failReason = Reason6; return(false); } } return(true); }