public static bool TreatLightCondition(this Pawn p, LightCondition LC, Hediff h, float lightLevel, bool outside, bool debug = false) { if ( (LC.RequiresLightLevel && !LC.level.Value.Includes(lightLevel)) || (LC.requiresOutside && !outside) || (LC.requiresInside && outside) ) { return(RemoveHediffAndReturnTrue(p, h, debug)); } return(false); }
public LightCondition(LightCondition copyMe) { requiresInside = copyMe.requiresInside; requiresOutside = copyMe.requiresOutside; level = copyMe.level; }