public SpawnBuilder(ContractTypeBuilder contractTypeBuilder, GameObject parent, JObject spawner) { this.contractTypeBuilder = contractTypeBuilder; this.parent = parent; this.name = spawner["Name"].ToString(); this.subType = spawner["SubType"].ToString(); this.team = spawner["Team"].ToString(); this.guid = spawner["Guid"].ToString(); this.spawnPointGuids = spawner["SpawnPointGuids"].ToObject <List <string> >(); this.preciseSpawnPoints = spawner.ContainsKey("PreciseSpawnPoints") ? (bool)spawner["PreciseSpawnPoints"] : false; this.mountOnTargets = spawner.ContainsKey("MountOn") ? (JObject)spawner["MountOn"] : null; this.spawnPointPositions = spawner.ContainsKey("SpawnPointPositions") ? (JObject)spawner["SpawnPointPositions"] : null; this.spawnPointRotations = spawner.ContainsKey("SpawnPointRotations") ? (JObject)spawner["SpawnPointRotations"] : null; this.spawnType = spawner["SpawnType"].ToString(); this.position = spawner.ContainsKey("Position") ? (JObject)spawner["Position"] : null; this.rotation = spawner.ContainsKey("Rotation") ? (JObject)spawner["Rotation"] : null; this.aiOrdersArray = spawner.ContainsKey("AI") ? (JArray)spawner["AI"] : null; this.alertLanceOnSpawn = spawner.ContainsKey("AlertLanceOnSpawn") ? (bool)spawner["AlertLanceOnSpawn"] : false; this.defaultDetectionRange = spawner.ContainsKey("DefaultDetectionRange") ? (int)spawner["DefaultDetectionRange"] : 200; this.tags = spawner.ContainsKey("Tags") ? spawner["Tags"].ToObject <List <string> >() : null; if (this.aiOrdersArray != null) { AiOrderBuilder orderBuilder = new AiOrderBuilder(contractTypeBuilder, aiOrdersArray, name); orders = orderBuilder.Build(); } }
public DialogueActivatorBuilder(ContractTypeBuilder contractTypeBuilder, GameObject parent, JObject activator) { this.contractTypeBuilder = contractTypeBuilder; this.activator = activator; this.parent = parent; this.dialogueGuid = activator["EncounterGuid"].ToString(); }
public GenericTriggerBuilder(ContractTypeBuilder contractTypeBuilder, string name, MessageCenterMessageType triggerMessageType, GenericCompoundConditional conditional, string description, List <DesignResult> results) { this.name = name; this.triggerMessageType = triggerMessageType; this.conditional = conditional; this.description = description; this.results = results; }
public ContractEditBuilder(ContractTypeBuilder contractTypeBuilder, GameObject parent, JObject objective) { this.contractTypeBuilder = contractTypeBuilder; this.objective = objective; this.parent = parent; this.name = objective["Name"].ToString(); this.subType = objective["SubType"].ToString(); }
public CombatStateBuilder(ContractTypeBuilder contractTypeBuilder, GameObject parent, JObject state) { this.contractTypeBuilder = contractTypeBuilder; this.state = state; this.parent = parent; this.name = state["Name"].ToString(); this.subType = state["SubType"].ToString(); }
public SetChunkStateAtRandomActivatorBuilder(ContractTypeBuilder contractTypeBuilder, GameObject parent, JObject activator) { this.contractTypeBuilder = contractTypeBuilder; this.activator = activator; this.parent = parent; this.chunkGuids = ((JArray)activator["ChunkGuids"]).ToObject <List <string> >(); this.statusString = activator.ContainsKey("Status") ? activator["Status"].ToString() : "Active"; this.statusType = (EncounterObjectStatus)Enum.Parse(typeof(EncounterObjectStatus), statusString); }
public PlacementBuilder(ContractTypeBuilder contractTypeBuilder, GameObject parent, JObject objective) { this.contractTypeBuilder = contractTypeBuilder; this.objective = objective; this.parent = parent; this.name = objective["Name"].ToString(); this.subType = objective["SubType"].ToString(); this.targetGuid1 = objective["TargetGuid1"].ToString(); this.targetGuid2 = objective["TargetGuid2"].ToString(); }
public ChunkTypeBuilder(ContractTypeBuilder contractTypeBuilder, string name, string type, string subType, bool controlledByContract, string guid, JObject position, JArray children) { this.contractTypeBuilder = contractTypeBuilder; this.name = name; this.type = type; this.controlledByContract = controlledByContract; this.subType = subType; this.guid = (guid == null) ? Guid.NewGuid().ToString() : guid; this.position = position; this.children = children; }
public DialogueBuilder(ContractTypeBuilder contractTypeBuilder, GameObject parent, JObject objective) { this.contractTypeBuilder = contractTypeBuilder; this.objective = objective; this.parent = parent; this.name = objective["Name"].ToString(); this.subType = objective["SubType"].ToString(); this.guid = objective["Guid"].ToString(); this.trigger = objective.ContainsKey("Trigger") ? objective["Trigger"].ToString() : null; this.showOnlyOnce = objective.ContainsKey("ShowOnlyOnce") ? (bool)objective["ShowOnlyOnce"] : false; }
public RegionBuilder(ContractTypeBuilder contractTypeBuilder, GameObject parent, JObject objective) { this.contractTypeBuilder = contractTypeBuilder; this.objective = objective; this.parent = parent; this.name = objective["Name"].ToString(); this.subType = objective["SubType"].ToString(); this.width = objective.ContainsKey("Width") ? (int)objective["Width"] : DEFAULT_WIDTH; this.length = objective.ContainsKey("Length") ? (int)objective["Length"] : DEFAULT_LENGTH; this.position = objective.ContainsKey("Position") ? (JObject)objective["Position"] : null; }
public ObjectiveBuilder(ContractTypeBuilder contractTypeBuilder, GameObject parent, JObject objective) { this.contractTypeBuilder = contractTypeBuilder; this.objective = objective; this.parent = parent; this.name = objective["Name"].ToString(); this.subType = objective["SubType"].ToString(); this.guid = objective["Guid"].ToString(); this.isPrimaryObjectve = (bool)objective["IsPrimaryObjective"]; this.title = objective["Title"].ToString(); this.priority = (int)objective["Priority"]; this.contractObjectiveGuid = objective["ContractObjectiveGuid"].ToString(); }
public SpawnBuilder(ContractTypeBuilder contractTypeBuilder, GameObject parent, JObject spawner) { this.contractTypeBuilder = contractTypeBuilder; this.parent = parent; this.name = spawner["Name"].ToString(); this.subType = spawner["SubType"].ToString(); this.team = spawner["Team"].ToString(); this.guid = spawner["Guid"].ToString(); this.spawnPoints = (int)spawner["SpawnPoints"]; this.spawnPointGuids = spawner["SpawnPointGuids"].ToObject <List <string> >(); this.spawnType = spawner["SpawnType"].ToString(); this.position = spawner.ContainsKey("Position") ? (JObject)spawner["Position"] : null; this.rotation = spawner.ContainsKey("Rotation") ? (JObject)spawner["Rotation"] : null; }
public GenericTriggerBuilder(ContractTypeBuilder contractTypeBuilder, JObject trigger, string name) { this.contractTypeBuilder = contractTypeBuilder; this.trigger = trigger; this.name = name; this.triggerOn = trigger["TriggerOn"].ToString(); this.description = (trigger.ContainsKey("Description")) ? trigger["Description"].ToString() : ""; this.conditionalEvaluationString = (trigger.ContainsKey("SucceedOn")) ? trigger["SucceedOn"].ToString() : "All"; this.conditionalEvaluation = (LogicEvaluation)Enum.Parse(typeof(LogicEvaluation), conditionalEvaluationString); if (trigger.ContainsKey("Conditionals")) { ConditionalBuilder conditionalBuilder = new ConditionalBuilder(contractTypeBuilder, (JArray)trigger["Conditionals"]); this.conditional = conditionalBuilder.Build(); this.conditional.whichMustBeTrue = this.conditionalEvaluation; } if (trigger.ContainsKey("Results")) { ResultsBuilder resultsBuilder = new ResultsBuilder(contractTypeBuilder, (JArray)trigger["Results"]); this.results = resultsBuilder.Build(); } else { Main.Logger.LogError("[GenericTriggerBuilder] Generic Triggers require 'Results'"); } if (!Enum.TryParse(this.triggerOn, out triggerMessageType)) { MessageTypes messageType; if (!Enum.TryParse(this.triggerOn, out messageType)) { Main.Logger.LogError("[GenericTriggerBuilder] Invalid 'TriggerOn' provided."); } else { triggerMessageType = (MessageCenterMessageType)messageType; } } }
public ConditionalBuilder(ContractTypeBuilder contractTypeBuilder, JArray conditionalsObject) { this.contractTypeBuilder = contractTypeBuilder; this.conditionalsObject = conditionalsObject; }
public ResultsBuilder(ContractTypeBuilder contractTypeBuilder, JArray resultsArray) { this.contractTypeBuilder = contractTypeBuilder; this.resultsArray = resultsArray; }
public TeamDataBuilder(ContractTypeBuilder contractTypeBuilder, JObject teamData) { this.contractTypeBuilder = contractTypeBuilder; this.teamData = teamData; }
public AiOrderBuilder(ContractTypeBuilder contractTypeBuilder, JArray ordersArray, string lanceName) { this.contractTypeBuilder = contractTypeBuilder; this.ordersArray = ordersArray; this.lanceName = lanceName; }