Ejemplo n.º 1
0
        public void AddResource(JobResource resource)
        {
            resources.Add(resource);
            resource.owner    = parent as Pawn;
            resource.jobsComp = this;
            resource.Notify_AcquiredThisResource();

            RefreshCachedModifiers();
        }
Ejemplo n.º 2
0
        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);
        }