void StartConstructionJobButton()
    {
        // Get resource list
        ResourceQuantityQualityList jobResources = resourceChoiceDropdown.GetCurrentChoices();

        JobDef newConstructionJobDef = CreateConstructionJobDef(jobResources, resourceChoiceDropdown.taskName);

        BuildingJobObj newJob = jobManager.AddConstructionJob(newConstructionJobDef, iLoc, jLoc);

        newJob.SetResources(jobResources);
        newJob.StartJob();
        newJob.AddWorker();
        newJob.AddWorker();
        newJob.AddWorker();
        newJob.AddWorker();
        newJob.AddWorker();
        newJob.AddWorker();
        newJob.AddWorker();
        newJob.AddWorker();
        newJob.AddWorker();
        newJob.AddWorker();

        // Change surface type to construction
        ManagerBase.domain.mapData.SetSurfaceValue(iLoc, jLoc, ManagerBase.surfaceValueDictionary["Gear"]);

        // Reload the map and re-focus on the tile
        WorldEventHandlerManager.Broadcast(worldEventChannels.map, mapChannelEvents.change, new WorldEventArg(iLoc, jLoc));
    }
Exemple #2
0
    public BuildingJobObj AddConstructionJob(JobDef newJobDef, int iLoc, int jLoc)
    {
        BuildingJobObj newJobObj = new BuildingJobObj(newJobDef, iLoc, jLoc);

        newJobObj.UpdateBonuses(jobBonusList);
        jobList.Add(newJobObj);
        return(newJobObj);
    }