zymex22 / Project-RimFactory-Revived

Project RimFactory Revived
MIT License
46 stars 34 forks source link

Advanced IO Port Enhancements #727

Open Sn1p3rr3c0n opened 1 year ago

Sn1p3rr3c0n commented 1 year ago

Simultaneous Input Output Usage _IO

This is a Combination of the First two Points.

Currently the Advanced IO Port exclusively serves as an Output. Where it will only take back the excess for the requested Stack. To allow it to function as an Input the Pickup process needs to fundamentally change.

Currently the Desired Item is simply moved to the Advanced IO Port.

The Idea would be that Pawns are instead assigned some kind of Job to move to the Advanced IO Port. On success the requested / desired item would be directly added to their Inventory and they would resume their original Task.

If that could be Implemented, the Cell above the Port would be freed. This would allow us to classify it as an Input, thus satisfying the request. In my current Attempts I can issue such a Job, but still need to resort to moving the item on top of the Port.

ASU Support _ASU

This Feature was originally intended to be included with the original Release of the Advanced Port. Unfortunately I failed to add Support back then. To Release it back then they were marked incompatible, since then this support has been requested countless times.

After the Initial release I have attempted to add Compatibility again but failed. From one such attempt I still have the following git diff advancedIO_ColdStorage_FoodPatchFail.zip

I'm currently attempting it again and aim to document it in a better way.

Sn1p3rr3c0n commented 1 year ago

Test Maps

Intended to Test "Start Job" Specifically Haul to Wall and Construct. Where a Pawn is Blocked inside of an Area

With DSU: New Arrivals244.zip With ASU: Advanced.zip

image

Sn1p3rr3c0n commented 1 year ago

The Current Implementation Somehow bricks the SkyManager

Root level exception in Update(): System.NullReferenceException: Object reference not set to an instance of an object
  at Verse.SkyManager.CurrentSkyTarget () [0x00164] in <95de19971c5d40878d8742747904cdcd>:0 
  at Verse.SkyManager.SkyManagerUpdate () [0x00000] in <95de19971c5d40878d8742747904cdcd>:0 
  at Verse.Map.MapUpdate () [0x00005] in <95de19971c5d40878d8742747904cdcd>:0 
  at Verse.Game.UpdatePlay () [0x00049] in <95de19971c5d40878d8742747904cdcd>:0 
  at Verse.Root_Play.Update () [0x00032] in <95de19971c5d40878d8742747904cdcd>:0  
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

After Testing on a Opened Variant of the Test Map I believe that is caused by a Faulty Patch_RegionProcessorClosestThingReachable_RegionProcessor

As only the 10 Jobs Error (with no work being done) Remains.

67450 Katia: StartJob [HaulToContainer (Job_63833) A=Thing_Steel66075 B=Thing_Blueprint_Wall68430 C=Thing_Blueprint_Wall68429] lastJobEndCondition=None, jobGiver=Verse.AI.ThinkNode_QueuedJob, cancelBusyStances=False
67450 Katia: JobDriver_HaulToContainer ends current job HaulToContainer (Job_63833) A=Thing_Steel66075 B=Thing_Blueprint_Wall68430 C=Thing_Blueprint_Wall68429 because of toil GotoThing at toils[1].endConditions[0]
67450 Katia: EndCurrentJob HaulToContainer (Job_63833) A=Thing_Steel66075 B=Thing_Blueprint_Wall68430 C=Thing_Blueprint_Wall68429 condition=Incompletable curToil=GotoThing at toils[1]

... because of toil GotoThing at toils[1].endConditions[0] ...

Likely caused by Patch_Pawn_JobTracker_StartJob not supporting items in the ASU

Open Map: image OpenTestMap.zip

Sn1p3rr3c0n commented 1 year ago

With https://github.com/zymex22/Project-RimFactory-Revived/commit/d5f10f888b3ac61563e1b6ca775667496d323cf6 I'm at another issue i Remember from privius attempts. Not being able to Spawn the Things. Still not Sure what the spawning fails.