Skip to content

Commit

Permalink
Dump
Browse files Browse the repository at this point in the history
  • Loading branch information
rudderbucky committed Jun 22, 2020
1 parent 537ca96 commit 3aa73d7
Show file tree
Hide file tree
Showing 64 changed files with 3,279 additions and 2,149 deletions.
501 changes: 499 additions & 2 deletions Assets/Scenes/SampleScene.unity

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions Assets/Scripts/Abilities/Harvester.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ public Draggable GetTractorTarget()

public void PowerHeal()
{
owner.TakeShellDamage(-0.025F * owner.GetMaxHealth()[0], 0, null);
owner.TakeCoreDamage(-0.025F * owner.GetMaxHealth()[1]);
owner.TakeEnergy(-0.025F * owner.GetMaxHealth()[2]);
if(!owner.GetIsDead())
{
owner.TakeShellDamage(-0.025F * owner.GetMaxHealth()[0], 0, null);
owner.TakeCoreDamage(-0.025F * owner.GetMaxHealth()[1]);
owner.TakeEnergy(-0.025F * owner.GetMaxHealth()[2]);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,10 @@ private void showTaskPrompt(NodeEditorFramework.Standard.StartTaskNode node, Ent
var type = backgroudBox.Find("Type").GetComponent<Text>();
var abilityTooltip = backgroudBox.GetComponent<AbilityButtonScript>();

abilityIcon.sprite = AbilityUtilities.GetAbilityImageByID(node.partAbilityID, null);
tierIcon.sprite = ResourceManager.GetAsset<Sprite>("AbilityTier" + Mathf.Clamp(node.partTier, 1, 3));
abilityIcon.sprite = AbilityUtilities.GetAbilityImageByID(node.partAbilityID, node.partSecondaryData);
if(node.partTier >= 1)
tierIcon.sprite = ResourceManager.GetAsset<Sprite>("AbilityTier" + Mathf.Clamp(node.partTier, 1, 3));
else tierIcon.enabled = false;
type.text = AbilityUtilities.GetAbilityNameByID(node.partAbilityID, null) + (node.partTier > 0 ? " " + node.partTier : "");
string description = "";
description += AbilityUtilities.GetAbilityNameByID(node.partAbilityID, null) + (node.partTier > 0 ? " " + node.partTier : "") + "\n";
Expand Down Expand Up @@ -751,9 +753,10 @@ IEnumerator FadePassiveDialogueOut()
yield return new WaitForSeconds(0.0025F);
}

for(int i = 0; i < passiveDialogueContents.childCount; i++)
while(passiveDialogueContents.childCount > 0)
{
Destroy(passiveDialogueContents.GetChild(i).gameObject);
passiveDialogueContents.GetChild(0).localScale = new Vector3(1, 1, 1);
passiveDialogueContents.GetChild(0).SetParent(archiveContents, false);
}
}

Expand All @@ -774,6 +777,7 @@ void PassiveDialogueHandler()
queueTimer -= Time.deltaTime;
if(passiveMessages.Count > 0)
{
archiveContents.gameObject.SetActive(false);
passiveDialogueScrollView.localScale = new Vector3(1, 1, 1);
if(queueTimer <= 0)
{
Expand All @@ -797,6 +801,10 @@ void PassiveDialogueHandler()
StartCoroutine(FadePassiveDialogueOut());
}

if(passiveDialogueContents.transform.childCount == 0 && Input.GetKeyDown(KeyCode.Return))
{
archiveContents.gameObject.SetActive(!archiveContents.gameObject.activeSelf);
}
}

public List<string> GetSpeakerIDList()
Expand Down Expand Up @@ -834,4 +842,7 @@ public static Entity GetSpeaker() {
var speakerObj = SectorManager.instance.GetEntity(speakerID);
return speakerObj;
}

public GameObject passiveDialogueArchive;
public Transform archiveContents;
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ public void UpdateInteractible()
&& DialogueSystem.interactionOverrides[ID].Count > 0) interactible = true;

if(isPathing || DialogueSystem.isInCutscene) interactible = false;

if(this as ShellCore && SectorManager.instance.current.type == Sector.SectorType.BattleZone) interactible = false;
}

public bool GetInteractible()
Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/Game Object Definitions/SectorManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ public Entity SpawnEntity(EntityBlueprint blueprint, Sector.LevelEntity data)
if(current.type == Sector.SectorType.BattleZone)
{
// set the carrier of the shellcore to the associated faction's carrier
if(carriers.ContainsKey(shellcore.faction))
shellcore.SetCarrier(carriers[shellcore.faction]);
if(carriers.ContainsKey(data.faction))
shellcore.SetCarrier(carriers[data.faction]);

battleZone.AddTarget(shellcore);
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Graphs/DialogueNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class DialogueNode : Node
public override void NodeGUI()
{
GUILayout.Label("Text:");
text = GUILayout.TextArea( text);
text = GUILayout.TextArea(text, GUILayout.ExpandHeight(false));
GUILayout.Label("Text Color:");
float r, g, b;
GUILayout.BeginHorizontal();
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Graphs/FinishTaskNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public override void NodeGUI()
}
}
GUILayout.Label("Reward text:");
rewardText = GUILayout.TextArea(rewardText, GUILayout.Width(200f));
rewardText = GUILayout.TextArea(rewardText, GUILayout.ExpandHeight(false), GUILayout.Width(200f));
height += GUI.skin.textArea.CalcHeight(new GUIContent(rewardText), 200f);
GUILayout.Label("Text Color:");
float r, g, b;
Expand Down
7 changes: 7 additions & 0 deletions Assets/Scripts/Graphs/FollowNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class AIFollowNode : Node

public ConnectionKnob FollowerInput;
public ConnectionKnob TargetInput;
public bool disallowAggression;

ConnectionKnobAttribute IDInStyle = new ConnectionKnobAttribute("Name Input", Direction.In, "EntityID", ConnectionCount.Single, NodeSide.Left);

Expand Down Expand Up @@ -157,6 +158,10 @@ public override void NodeGUI()
}
}
}

GUILayout.BeginHorizontal();
disallowAggression = GUILayout.Toggle(disallowAggression, "Diasallow Aggression", GUILayout.MinWidth(40));
GUILayout.EndHorizontal();
}

void SetFollowerID(string ID)
Expand Down Expand Up @@ -226,6 +231,8 @@ public override int Traverse()
{
(AIData.entities[i] as AirCraft).GetAI().follow(target.transform);
Debug.Log("Follow...");

if(disallowAggression) (AIData.entities[i] as AirCraft).GetAI().aggression = AirCraftAI.AIAggression.KeepMoving;
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions Assets/Scripts/Graphs/StartMissionNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public class StartMissionNode : Node
public List<string> prerequisites = new List<string>();
public string prerequisitesUnsatisifedText;
public Color textColor;
public bool overrideCheckpoint;
public string overrideCheckpointName;
float height = 400f;
public override void NodeGUI()
{
Expand Down Expand Up @@ -83,6 +85,12 @@ public override void NodeGUI()
b = RTEditorGUI.FloatField(textColor.b);
GUILayout.EndHorizontal();
textColor = new Color(r, g, b);

if(overrideCheckpoint = GUILayout.Toggle(overrideCheckpoint, "Override Checkpoint", GUILayout.MinWidth(100f)))
{
GUILayout.Label("Checkpoint name: ");
overrideCheckpointName = GUILayout.TextField(overrideCheckpointName);
}
}

public override int Traverse()
Expand Down
12 changes: 11 additions & 1 deletion Assets/Scripts/Graphs/TaskManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,17 @@ public void startQuests()
foreach(var mission in missions)
{
if(traversers.Exists((t) => t.nodeCanvas.missionName == mission.name))
traversers.Find((t) => t.nodeCanvas.missionName == mission.name).activateCheckpoint(mission.checkpoint);
{
var traverser = traversers.Find((t) => t.nodeCanvas.missionName == mission.name);
if(traverser.findRoot().overrideCheckpoint)
{
traverser.activateCheckpoint(traverser.findRoot().overrideCheckpointName);
}
else
{
traverser.activateCheckpoint(mission.checkpoint);
}
}
}

for (int i = 0; i < traversers.Count; i++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ void Awake() {
tipsList.Add("If you double click the Status Menu map it switches from a draggable map to a minimap-style scroll (and vice versa)!");
tipsList.Add("You can shift-click part buttons to instantly buy/sell them!");
tipsList.Add("You can press tab to cycle through your selected targets!");
tipsList.Add("When not receiving background dialogue you can press 'enter' to view all the background dialogue you received before!");
colors = new Color[] {Color.green, Color.cyan, Color.magenta, Color.yellow, Color.blue};
}

Expand Down
1 change: 1 addition & 0 deletions Assets/Scripts/SFX Scripts/AudioManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class AudioManager : MonoBehaviour
void Start()
{
instance = this;
musicOverrideID = null;
ChangeMasterVolume(PlayerPrefs.GetFloat("MasterVolume", 0.5F));
ChangeMusicVolume(PlayerPrefs.GetFloat("MusicVolume", 1));
ChangeSoundEffectsVolume(PlayerPrefs.GetFloat("SFXVolume", 1));
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sectorjson":"{\"sectorName\":\"BattleZone Alpha\",\"bounds\":{\"x\":650,\"y\":30,\"w\":110,\"h\":200},\"type\":2,\"backgroundColor\":{\"r\":0.4000000059604645,\"g\":0.0,\"b\":0.0,\"a\":1.0},\"entities\":[{\"name\":\"Map Background 1\",\"ID\":\"0\",\"faction\":0,\"assetID\":\"mapbg1\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":705.0,\"y\":-70.0}},{\"name\":\"Outpost\",\"ID\":\"1\",\"faction\":1,\"assetID\":\"outpost_blueprint\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":695.0,\"y\":-135.0}},{\"name\":\"Air Carrier\",\"ID\":\"2\",\"faction\":1,\"assetID\":\"carrier_blueprint\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":705.0,\"y\":-145.0}},{\"name\":\"Power Rock\",\"ID\":\"3\",\"faction\":0,\"assetID\":\"energy_rock\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":735.0,\"y\":-90.0}},{\"name\":\"Power Rock\",\"ID\":\"4\",\"faction\":0,\"assetID\":\"energy_rock\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":735.0,\"y\":-45.0}},{\"name\":\"Outpost\",\"ID\":\"5\",\"faction\":1,\"assetID\":\"outpost_blueprint\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":730.0,\"y\":-95.0}},{\"name\":\"Outpost\",\"ID\":\"6\",\"faction\":1,\"assetID\":\"outpost_blueprint\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":730.0,\"y\":-40.0}},{\"name\":\"Outpost\",\"ID\":\"7\",\"faction\":0,\"assetID\":\"outpost_blueprint\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":695.0,\"y\":-5.0}},{\"name\":\"Air Carrier\",\"ID\":\"8\",\"faction\":0,\"assetID\":\"carrier_blueprint\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":705.0,\"y\":5.0}}],\"platform\":{\"instanceID\":-327398},\"targets\":[\"2\",\"8\"],\"hasMusic\":true,\"musicID\":\"music_fast\",\"partDropsDisabled\":false,\"backgroundSpawns\":[],\"waveSetPath\":\"\"}","platformjson":"{\"prefabs\":[\"New Junction\",\"New 1 Entry\",\"New 2 Entry\",\"New 0 Entry\",\"New 0 Entry Ghost\"],\"rows\":20,\"columns\":11,\"tilemap\":[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],\"rotations\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}"}
{"sectorjson":"{\"sectorName\":\"BattleZone Alpha\",\"bounds\":{\"x\":650,\"y\":30,\"w\":110,\"h\":200},\"type\":2,\"backgroundColor\":{\"r\":0.4000000059604645,\"g\":0.0,\"b\":0.0,\"a\":1.0},\"entities\":[{\"name\":\"Map Background 1\",\"ID\":\"0\",\"faction\":0,\"assetID\":\"mapbg1\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":705.0,\"y\":-70.0}},{\"name\":\"Outpost\",\"ID\":\"1\",\"faction\":1,\"assetID\":\"outpost_blueprint\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":695.0,\"y\":-135.0}},{\"name\":\"Air Carrier\",\"ID\":\"2\",\"faction\":1,\"assetID\":\"carrier_blueprint\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":705.0,\"y\":-145.0}},{\"name\":\"Power Rock\",\"ID\":\"3\",\"faction\":0,\"assetID\":\"energy_rock\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":735.0,\"y\":-90.0}},{\"name\":\"Power Rock\",\"ID\":\"4\",\"faction\":0,\"assetID\":\"energy_rock\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":735.0,\"y\":-45.0}},{\"name\":\"Outpost\",\"ID\":\"5\",\"faction\":1,\"assetID\":\"outpost_blueprint\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":730.0,\"y\":-95.0}},{\"name\":\"Outpost\",\"ID\":\"6\",\"faction\":1,\"assetID\":\"outpost_blueprint\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":730.0,\"y\":-40.0}},{\"name\":\"Outpost\",\"ID\":\"7\",\"faction\":0,\"assetID\":\"outpost_blueprint\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":695.0,\"y\":-5.0}},{\"name\":\"Air Carrier\",\"ID\":\"8\",\"faction\":0,\"assetID\":\"carrier_blueprint\",\"blueprintJSON\":\"\",\"dialogueID\":\"\",\"vendingID\":\"\",\"pathID\":\"\",\"position\":{\"x\":705.0,\"y\":5.0}}],\"platform\":{\"instanceID\":-1968286},\"targets\":[\"2\",\"8\"],\"hasMusic\":true,\"musicID\":\"music_fast\",\"partDropsDisabled\":false,\"backgroundSpawns\":[],\"waveSetPath\":\"\"}","platformjson":"{\"prefabs\":[\"New Junction\",\"New 1 Entry\",\"New 2 Entry\",\"New 0 Entry\",\"New 0 Entry Ghost\"],\"rows\":20,\"columns\":11,\"tilemap\":[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],\"rotations\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}"}
Loading

0 comments on commit 3aa73d7

Please sign in to comment.