Exemple #1
0
 public void AddDesignRequirement(DesignRequirement dr)
 {
     if (!dr.IsSet())
     {
         Debug.LogError("AddDesignRequirement asked to add unset DesignRequirement. " + dr);
     }
     GetDesignRequirements().Add(dr);
 }
Exemple #2
0
    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);
    }
Exemple #3
0
    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);
    }
Exemple #4
0
    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);
    }