public void AddResource(JobResource resource) { resources.Add(resource); resource.owner = parent as Pawn; resource.jobsComp = this; resource.Notify_AcquiredThisResource(); RefreshCachedModifiers(); }
public static JobResource MakeResourceInstance(DivineJobResourceDef def, Pawn owner = null, DivineJobsComp comp = null) { JobResource instance = (JobResource)Activator.CreateInstance(def.resourceClass); instance.def = def; instance.owner = owner; instance.jobsComp = comp; instance.PostMake(); return(instance); }