Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Request) Refactor Building_AutoMachineTool.cs #529

Closed
Sn1p3rr3c0n opened this issue Nov 2, 2021 · 2 comments · Fixed by #573
Closed

(Request) Refactor Building_AutoMachineTool.cs #529

Sn1p3rr3c0n opened this issue Nov 2, 2021 · 2 comments · Fixed by #573
Assignees

Comments

@Sn1p3rr3c0n
Copy link
Collaborator

https://github.com/zymex22/Project-RimFactory-Revived/blob/master/Source/ProjectRimFactory/AutoMachineTool/Building_AutoMachineTool.cs
is a bit messy and should get Refactored.

With a96dc09 I attempted this but I broke Reservations and Saving in the process.

#506 will be resolved with #528.
This new issue shall be used for Refactoring the File / Class

@Sn1p3rr3c0n
Copy link
Collaborator Author

The following save related issues remain in d0445c2

SaveableFromNode exception: System.MissingMethodException: Constructor on type 'ProjectRimFactory.AutoMachineTool.SAL_TargetWorktable' not found.
  at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x00213] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00095] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at Verse.ScribeExtractor.SaveableFromNode[T] (System.Xml.XmlNode subNode, System.Object[] ctorArgs) [0x0012f] in <360933dd75ad47e8a6d2a631ae77b5d8>:0 
Subnode:
<salTarget Class="ProjectRimFactory.AutoMachineTool.SAL_TargetWorktable"><unfinished IsNull="True" /><bill>null</bill><dominant>null</dominant><ingredients IsNull="True" /></salTarget> 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

SaveableFromNode exception: System.MissingMethodException: Constructor on type 'ProjectRimFactory.AutoMachineTool.SAL_TargetResearch' not found.
  at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x00213] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00095] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at Verse.ScribeExtractor.SaveableFromNode[T] (System.Xml.XmlNode subNode, System.Object[] ctorArgs) [0x0012f] in <360933dd75ad47e8a6d2a631ae77b5d8>:0 
Subnode:
<salTarget Class="ProjectRimFactory.AutoMachineTool.SAL_TargetResearch" /> 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

SaveableFromNode exception: System.MissingMethodException: Constructor on type 'ProjectRimFactory.AutoMachineTool.SAL_TargetDeepDrill' not found.
  at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x00213] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00095] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at Verse.ScribeExtractor.SaveableFromNode[T] (System.Xml.XmlNode subNode, System.Object[] ctorArgs) [0x0012f] in <360933dd75ad47e8a6d2a631ae77b5d8>:0 
Subnode:
<salTarget Class="ProjectRimFactory.AutoMachineTool.SAL_TargetDeepDrill" /> 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Could not resolve reference to object with loadID Thing_Human33801 of type Verse.Pawn. Was it compressed away, destroyed, had no ID number, or not saved/loaded right? curParent=null:null, null, null, 1, -1 curPathRelToParent= 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Could not resolve reference to object with loadID Job_857 of type Verse.AI.Job. Was it compressed away, destroyed, had no ID number, or not saved/loaded right? curParent=null:null, null, null, 1, -1 curPathRelToParent= 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Could not resolve reference to object with loadID Thing_Human33801 of type Verse.Pawn. Was it compressed away, destroyed, had no ID number, or not saved/loaded right? curParent=null:null, null, null, 1, -1 curPathRelToParent= 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Could not resolve reference to object with loadID Job_857 of type Verse.AI.Job. Was it compressed away, destroyed, had no ID number, or not saved/loaded right? curParent=null:null, null, null, 1, -1 curPathRelToParent= 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Loaded reservation with null claimant: null:null, Thing_DeepDrill18113, null, 1, -1. Deleting it... 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Loaded reservation with null job: null:null, Thing_DeepDrill18113, null, 1, -1. Deleting it... 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Loaded reservation with null claimant: null:null, Thing_HiTechResearchBench18111, null, 1, -1. Deleting it... 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Loaded reservation with null job: null:null, Thing_HiTechResearchBench18111, null, 1, -1. Deleting it... 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

@Sn1p3rr3c0n Sn1p3rr3c0n self-assigned this Mar 17, 2022
Sn1p3rr3c0n added a commit that referenced this issue Mar 19, 2022
Sal now uses WorkTableWorkSpeedFactor
Sn1p3rr3c0n added a commit that referenced this issue Mar 19, 2022
@Sn1p3rr3c0n
Copy link
Collaborator Author

Currently the last remaining known issue is that,
when loading a save from a previous version where the SAL is actively working on a bill

  • The bill progress will be lost
  • that SAL needs to be rebuild

this issue might be fixable using PostExposeData(object obj) of the BackCompatibilityConverter

Sn1p3rr3c0n added a commit that referenced this issue Mar 23, 2022
fixed issue with progress bar
@Sn1p3rr3c0n Sn1p3rr3c0n mentioned this issue Mar 23, 2022
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant