コード例 #1
0
 public void ApplyApparelEffects( Pawn pawn, Apparel apparel )
 {
     if(
         ( pawn.outfits != null )&&
         ( pawn.outfits.forcedHandler != null )
     )
     {
         pawn.outfits.forcedHandler.SetForced( apparel, true );
     }
     pawn.Drawer.renderer.graphics.ResolveApparelGraphics();
     if( apparel.IsSlaveCollar() )
     {
         ApplyCollarEffects( pawn, apparel );
     }
     if( apparel.IsRestraints() )
     {
         ApplyRestraintsEffects( pawn, apparel );
     }
 }
コード例 #2
0
 public void RemoveApparelFromPawn( Pawn pawn, Apparel apparel, IntVec3 dropCell )
 {
     // Try to unlock the apparel
     var compLock = apparel.TryGetComp<CompLockable>();
     if( compLock != null )
     {
         compLock.ChangeLockState( false );
     }
     Apparel result = null;
     pawn.apparel.TryDrop( apparel, out result, dropCell, false );
     if( apparel.IsRestraints() )
     {
         RemoveRestraintsEffects( pawn, apparel );
     }
 }