-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issues related with bills and their thingfilters
- Loading branch information
1 parent
c4a4b2a
commit 43f92da
Showing
6 changed files
with
75 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using RimWorld; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
using Verse; | ||
|
||
namespace CooperateRim | ||
{ | ||
class Bill_ProductionWithUft_surrogate : BillSurrogate | ||
{ | ||
public override void GetObjectData(object obj, SerializationInfo info, StreamingContext context) | ||
{ | ||
Bill_ProductionWithUft bpwu = (Bill_ProductionWithUft)obj; | ||
base.GetObjectData(obj, info, context); | ||
info.AddValue("uft", bpwu.BoundUft); | ||
} | ||
|
||
public override object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) | ||
{ | ||
Bill_ProductionWithUft _obj = (Bill_ProductionWithUft)base.SetObjectData(obj, info, context, selector); | ||
UnfinishedThing uft = (UnfinishedThing)info.GetValue("uft", typeof(UnfinishedThing)); | ||
|
||
if (_obj != null) | ||
{ | ||
_obj.SetBoundUft(uft, true); | ||
} | ||
|
||
return _obj; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters