Skip to content

Commit

Permalink
Merge ktanemodkit from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
timtmok committed Aug 14, 2016
2 parents 123ed02 + 269498d commit d5501a3
Show file tree
Hide file tree
Showing 74 changed files with 10,161 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ ExportedObj/
*.mdb
.idea*


# Unity3D generated meta files
*.pidb.meta

Expand Down
6 changes: 6 additions & 0 deletions Assets/Editor/Scripts/AssetBundler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,13 @@ void CompileAssemblyWithEditor()
.Select(path => "Assets/Plugins/Managed/" + Path.GetFileNameWithoutExtension(path))
.ToList();

<<<<<<< HEAD
managedReferences.Add("Library/UnityAssemblies/UnityEngine");
=======
string unityAssembliesLocation = EditorApplication.applicationPath.Replace("Unity.exe", "Data/Managed/");

managedReferences.Add(unityAssembliesLocation + "UnityEngine");
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7

//Next we need to grab some type references and use reflection to build things the way Unity does.
//Note that EditorUtility.CompileCSharp will do *almost* exactly the same thing, but it unfortunately
Expand Down
4 changes: 4 additions & 0 deletions Assets/Editor/Scripts/Workshop/WorkshopEditorWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ protected void OnGUI()

if (dir.Exists)
{
<<<<<<< HEAD
FileInfo[] files = dir.GetFiles();
=======
FileInfo[] files = dir.GetFiles("*.*", SearchOption.AllDirectories);
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7
long totalSize = 0;
foreach (var file in files)
{
Expand Down
4 changes: 4 additions & 0 deletions Assets/Editor/Scripts/Workshop/WorkshopItemEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
[CustomEditor(typeof(WorkshopItem))]
public class WorkshopItemEditor : Editor
{
<<<<<<< HEAD
private static string[] tags = { "Module", "Setup Room", "Gameplay Room", "Audio", "Bomb Casing", "Other" };
=======
private static string[] tags = { "Regular Module", "Needy Module", "Missions", "Setup Room", "Gameplay Room", "Audio", "Bomb Casing", "Widget", "Other" };
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7

public override void OnInspectorGUI()
{
Expand Down
37 changes: 37 additions & 0 deletions Assets/Examples/1.1 Module/ExampleModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@ public class ExampleModule : MonoBehaviour
public KMSelectable[] buttons;

int correctIndex;
<<<<<<< HEAD
=======
bool isActivated = false;
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7

void Start()
{
Init();
<<<<<<< HEAD
=======

GetComponent<KMBombModule>().OnActivate += ActivateModule;
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7
}

void Init()
Expand All @@ -26,6 +35,7 @@ void Init()
}
}

<<<<<<< HEAD
void OnPress(bool correctButton)
{
Debug.Log("Pressed " + correctButton + " button");
Expand All @@ -36,6 +46,33 @@ void OnPress(bool correctButton)
else
{
GetComponent<KMBombModule>().HandleStrike();
=======
void ActivateModule()
{
isActivated = true;
}

void OnPress(bool correctButton)
{
GetComponent<KMAudio>().PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform);

if (!isActivated)
{
Debug.Log("Pressed button before module has been activated!");
GetComponent<KMBombModule>().HandleStrike();
}
else
{
Debug.Log("Pressed " + correctButton + " button");
if (correctButton)
{
GetComponent<KMBombModule>().HandlePass();
}
else
{
GetComponent<KMBombModule>().HandleStrike();
}
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7
}
}
}
29 changes: 29 additions & 0 deletions Assets/Examples/1.1 Module/ExampleModule.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,11 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100008}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
<<<<<<< HEAD
m_LocalPosition: {x: 0, y: 0, z: 0}
=======
m_LocalPosition: {x: 0.004, y: 0, z: 0}
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
Expand All @@ -711,7 +715,11 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100018}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
<<<<<<< HEAD
m_LocalPosition: {x: 0, y: 0, z: 0}
=======
m_LocalPosition: {x: 0.004, y: 0, z: 0}
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
Expand Down Expand Up @@ -740,7 +748,11 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100024}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
<<<<<<< HEAD
m_LocalPosition: {x: 0, y: 0, z: 0}
=======
m_LocalPosition: {x: 0.004, y: 0, z: 0}
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
Expand Down Expand Up @@ -769,7 +781,11 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100032}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
<<<<<<< HEAD
m_LocalPosition: {x: 0, y: 0, z: 0}
=======
m_LocalPosition: {x: 0.004, y: 0, z: 0}
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
Expand Down Expand Up @@ -1126,7 +1142,11 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 194656}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
<<<<<<< HEAD
m_LocalPosition: {x: -0.004, y: 0, z: 0}
=======
m_LocalPosition: {x: 0, y: 0, z: 0}
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
Expand All @@ -1139,7 +1159,11 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 194658}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
<<<<<<< HEAD
m_LocalPosition: {x: -0.004, y: 0, z: 0}
=======
m_LocalPosition: {x: 0, y: 0, z: 0}
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
Expand Down Expand Up @@ -2104,7 +2128,12 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
ModuleType: exampleModule1
<<<<<<< HEAD
ModuleDisplayName:
=======
ModuleDisplayName: Example Module 1
RequiresTimerVisibility: 0
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7
--- !u!114 &11448482
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down
4 changes: 4 additions & 0 deletions Assets/Examples/1.1 Module/ExampleModule.prefab.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Assets/Examples/1.10 NeedyModule/ExampleNeedyModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ public class ExampleNeedyModule : MonoBehaviour
public KMSelectable SolveButton;
public KMSelectable AddTimeButton;

<<<<<<< HEAD
float timeRemaining;

=======
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7
void Awake()
{
GetComponent<KMNeedyModule>().OnNeedyActivation += OnNeedyActivation;
Expand Down Expand Up @@ -47,8 +50,11 @@ protected bool AddTime()
GetComponent<KMNeedyModule>().SetNeedyTimeRemaining(time + 5f);
}

<<<<<<< HEAD
GetComponent<KMNeedyModule>().HandleStrike();

=======
>>>>>>> 269498d64dd5143303ee2574f4f1ec320083d6f7
return false;
}
}
4 changes: 4 additions & 0 deletions Assets/Examples/1.10 NeedyModule/NeedyModule.prefab.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/Examples/1.11 Missions.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions Assets/Examples/1.11 Missions/TableOfContents.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -434690030, guid: 45b809be76fd7a3468b6f517bced6f28, type: 3}
m_Name: TableOfContents
m_EditorClassIdentifier:
Title: Example Mod Missions
Sections:
- Title: Very Easy
MissionIDs:
- example_mission_1
- example_mission_2
- Title: Mission w/ Mods
MissionIDs:
- example_mission_3
8 changes: 8 additions & 0 deletions Assets/Examples/1.11 Missions/TableOfContents.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions Assets/Examples/1.11 Missions/example_mission_1.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -548183353, guid: 45b809be76fd7a3468b6f517bced6f28, type: 3}
m_Name: example_mission_1
m_EditorClassIdentifier:
DisplayName: Very Easy Mission
Description: This mission is very easy.
GeneratorSetting:
TimeLimit: 300
NumStrikes: 3
TimeBeforeNeedyActivation: 90
ComponentPools:
- Count: 1
AllowedSources: 2
ComponentTypes: 02000000
SpecialComponentType: 0
ModTypes: []
- Count: 1
AllowedSources: 2
ComponentTypes: 04000000
SpecialComponentType: 0
ModTypes: []
- Count: 1
AllowedSources: 2
ComponentTypes: 03000000
SpecialComponentType: 0
ModTypes: []
PacingEventsEnabled: 0
8 changes: 8 additions & 0 deletions Assets/Examples/1.11 Missions/example_mission_1.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions Assets/Examples/1.11 Missions/example_mission_2.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -548183353, guid: 45b809be76fd7a3468b6f517bced6f28, type: 3}
m_Name: example_mission_2
m_EditorClassIdentifier:
DisplayName: Slightly More Difficult
Description: This mission has a shorter time limit, a needy module, and can select
from any solvable module in the base game.
GeneratorSetting:
TimeLimit: 240
NumStrikes: 1
TimeBeforeNeedyActivation: 5
ComponentPools:
- Count: 5
AllowedSources: 1
ComponentTypes:
SpecialComponentType: 1
ModTypes: []
- Count: 2
AllowedSources: 2
ComponentTypes: 0d000000
SpecialComponentType: 0
ModTypes: []
PacingEventsEnabled: 1
8 changes: 8 additions & 0 deletions Assets/Examples/1.11 Missions/example_mission_2.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d5501a3

Please sign in to comment.