public void AddDesignRequirement(DesignRequirement dr) { if (!dr.IsSet()) { Debug.LogError("AddDesignRequirement asked to add unset DesignRequirement. " + dr); } GetDesignRequirements().Add(dr); }
public void AddTool(ThingTypes requiredThingType, float energyPerNode, int replacedNodeCount, string nodeSubstring) { //see comments for AddThing. DesignRequirement dr = new DesignRequirement(requiredThingType); dr.SetWorkRequirement(energyPerNode); dr.SetSubstringLocation(nodeSubstring, replacedNodeCount); AddDesignRequirement(dr); }
public void AddThing(ThingTypes requiredThingType, int quantity, Vector3 position) { //adds a thing requirement for this blueprint design. //adds one node that needs "quantity" number of "requiredThingType", offset by "position" DesignRequirement dr = new DesignRequirement(requiredThingType); dr.SetVectorLocation(position); dr.SetThingRequirement(quantity); AddDesignRequirement(dr); }
public void AddThing(ThingTypes requiredThingType, int quantityPerNode, int replacedNodeCount, string nodeSubstring) { //adds a thing requirement for this blueprint design. //requiredThingType is the needed thing //nodeSubstring is used to help Blueprint build its BlueprintNodes. It uses nodeSubstring to find which GameObjects //to replace with a node. //quantityPerNode is how many requiredThingTypes are needed per node. replacedNodeCount is how many nodes to create. DesignRequirement dr = new DesignRequirement(requiredThingType); dr.SetSubstringLocation(nodeSubstring, replacedNodeCount); dr.SetThingRequirement(quantityPerNode); AddDesignRequirement(dr); }