File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
src/PatchManager.Parts/Modifiables Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 55 "name" : " Patch Manager" ,
66 "description" : " A mod for generic patching needs similar to KSP 1's Module Manager." ,
77 "source" : " https://github.com/KSP2Community/PatchManager" ,
8- "version" : " 0.10.0 " ,
8+ "version" : " 0.10.1 " ,
99 "version_check" : " https://raw.githubusercontent.com/KSP2Community/PatchManager/main/plugin_template/swinfo.json" ,
1010 "ksp2_version" : {
1111 "min" : " 0.2.0" ,
Original file line number Diff line number Diff line change @@ -23,14 +23,18 @@ public override DataValue GetFieldValue(string fieldName)
2323 var repl = fieldName . Replace ( "PartComponent" , "" ) ;
2424 if ( JToken is not JObject jObject )
2525 return DataValue . Null ;
26- if ( ! jObject . ContainsKey ( "serializedPartModules" ) )
26+ if ( ! jObject . ContainsKey ( "serializedPartModules" ) )
2727 return DataValue . Null ;
2828 foreach ( var module in jObject [ "serializedPartModules" ] )
2929 {
30- if ( module is not JObject moduleObject ) continue ;
30+ if ( module is not JObject moduleObject ) continue ;
3131 if ( moduleObject . ContainsKey ( "Name" ) && ( ( string ) moduleObject [ "Name" ] ) ! . Replace ( "PartComponent" , "" ) == repl )
3232 return DataValue . FromJToken ( module ) ;
3333 }
34+
35+ if ( jObject . TryGetValue ( fieldName , out var value ) )
36+ return DataValue . FromJToken ( value ) ;
37+
3438 return DataValue . Null ;
3539 }
3640
You can’t perform that action at this time.
0 commit comments