Exemplo n.º 1
0
 public override void SpawnSetup(Map map)
 {
     base.SpawnSetup(map);
     this.UpdateEntries();
     this.compTithe = this.TryGetComp <CompTitheContainer>();
     if (this.compTithe == null)
     {
         Log.Error("No CompTithe found for Tithe Container. Defaulting.");
         this.compTithe = new CompTitheContainer();
     }
     this.GetActiveThingDefs();
 }
Exemplo n.º 2
0
 public static float SpaceRemainingForThing(CompTitheContainer titheContainer, Thing t)
 {
     return(Mathf.Clamp((titheContainer.tProps.maxContainerCapacity * (1 - titheContainer.massUsage)) / t.GetStatValue(StatDefOf.Mass), 0f, titheContainer.tProps.maxContainerCapacity));
 }