Skip to content

Commit

Permalink
Added code to dynamically assign Reflection offsets. Hopefully this …
Browse files Browse the repository at this point in the history
…will eliminate the need to do manual changes in the future

	Updated version to allow all 1.4.*
  • Loading branch information
linuxgurugamer committed Mar 29, 2018
1 parent 61c90b9 commit e76212c
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 6 deletions.
Binary file modified .vs/EditorExtensionsRedux/v15/sqlite3/storage.ide
Binary file not shown.
4 changes: 2 additions & 2 deletions EditorExtensionsRedux.version
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"MAJOR":3,
"MINOR":3,
"PATCH":19,
"BUILD":2
"BUILD":3
},
"KSP_VERSION":
{
Expand All @@ -25,6 +25,6 @@
{
"MAJOR":1,
"MINOR":4,
"PATCH":1
"PATCH":99
}
}
2 changes: 1 addition & 1 deletion EditorExtensionsRedux/AssemblyVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

using System.Reflection;

[assembly: AssemblyVersion("3.3.19.2")]
[assembly: AssemblyVersion("3.3.19.3")]
86 changes: 85 additions & 1 deletion EditorExtensionsRedux/EditorExtensionsRedux.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ 12 ssScaling

return true;
}

#if false
if (Versioning.version_major == 1 && Versioning.version_minor == 4 && Versioning.Revision == 1)
{
// SelectRoot
Expand Down Expand Up @@ -365,6 +365,90 @@ 12 ssScaling

return true;
}
#endif
if (Versioning.version_major == 1 && Versioning.version_minor == 4 && Versioning.Revision >=1)
{
//Log.Debug("State/Event enumeration done.");
EditorLogic el = EditorLogic.fetch;
int c = 0;
foreach (FieldInfo FI in el.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
{
switch (FI.Name)
{
case "selectedPart":
SELECTEDPART = c; break;
case "st_root_select":
ST_ROOT_SELECT = c; break;
case "st_root_unselected":
ST_ROOT_UNSELECTED = c; break;
case "modeMsg":
MODEMSG = c; break;
case "st_idle":
ST_IDLE = c; break;
case "st_place":
ST_PLACE = c; break;
case "st_offset_tweak":
ST_OFFSET_TWEAK = c; break;
case "symUpdateAttachNode":
SYMUPDATEATTACHNODE = c; break;
case "gizmoRotate":
GIZMOROTATE = c; break;
case "gizmoOffset":
GIZMOOFFSET = c; break;
}
c++;
}

MethodInfo[] leMethods = typeof(EditorLogic).GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
if (leMethods != null)
{
c = 0;
foreach (MethodInfo FI in leMethods)
{
switch (FI.Name)
{
case "UpdateSymmetry":
UPDATESYMMETRY = c; break;
case "onOffsetGizmoUpdated":
ONOFFSETGIZMOUPDATED = c; break;
}
c++;
}
}

MethodInfo[] parts = typeof(Part).GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
if (parts != null)
{
c = 0;
foreach (MethodInfo FI in parts)
{
switch (FI.Name)
{
case "OnMouseIsOver":
ONMOUSEISOVER = c; break;
}
c++;
}
}



MethodInfo[] ks = typeof(KFSMState).GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
if (ks != null)
{
c = 0;
foreach (MethodInfo FI in ks)
{
switch (FI.Name)
{
case "get_StateEvents":
GET_STATEEVENTS = c; break;
}
c++;
}
}
return true;
}
return false;
}
}
Expand Down
4 changes: 2 additions & 2 deletions GameData/EditorExtensionsRedux/EditorExtensionsRedux.version
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"MAJOR":3,
"MINOR":3,
"PATCH":19,
"BUILD":2
"BUILD":3
},
"KSP_VERSION":
{
Expand All @@ -25,6 +25,6 @@
{
"MAJOR":1,
"MINOR":4,
"PATCH":1
"PATCH":99
}
}
3 changes: 3 additions & 0 deletions GameData/EditorExtensionsRedux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
##
##

3.3.19.3
Added code to dynamically assign Reflection offsets. Hopefully this will eliminate the need to do manual changes in the future

3.3.19.2
Fixed fuzzy button

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
##
##

3.3.19.3
Added code to dynamically assign Reflection offsets. Hopefully this will eliminate the need to do manual changes in the future

3.3.19.2
Fixed fuzzy button

Expand Down

0 comments on commit e76212c

Please sign in to comment.