Code Monkey home page Code Monkey logo

rimworld-changedresser's People

Contributors

boundir avatar fodnjs0811 avatar kiamev avatar proxyer avatar vaniatd avatar xnonamex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rimworld-changedresser's Issues

Disappearing clothes on role change

Usually when drafted, a pawn's clothes will disappear immediately, usually leaving them naked. One would assume they would be going into the nearest change dresser, however all the ones located on the map are empty, and I can only assume the clothing items are being deleted.

Crashes the game

Hello,

after activating HugsLib, Humanoid Alien Races and Change Dresser - B18, game crashes whenever I click "close" button in mod list.

Here is crash log and if you need any other info, please, ask.

Items lose their Forced status when visiting the change dresser

If a pawn has an item that is Forced, and they visit the change dresser to swap gear, the forced items lose their Forced status. Interestingly, those items are NOT replaced that visit, even if a better one exists, but they will be replaced next visit.

Setup: (the item types are arbitrary)

  • Have at least two shirts, one of which is significantly better than the other. Put the better one in the dresser and force-equip the crappy shirt.
  • Have at least one pair of pants stored in the dresser.

Repro steps:

  1. Have the pawn unequip their pants. They will drop the pants then gain the job "Equipping wooden change dresser".
  2. When they reach the dresser and put on the stored pants, their crappy shirt will no longer be Forced, but they will still be wearing it.
  3. Toggle draft on the colonist. They will switch to the good shirt from storage.

Variants:

  • If you toggle draft after setup or after step 1, nothing unexpected happens. The crappy shirt stays Forced and stays equipped.
  • If you give the colonist another job after step 2, they will then run over to change again and will also replace their crappy shirt.

Slow JobGiver_OptimizeApparel postfix for pawns with Royal Titles

I get about a 10s interruption each time JobGiver_OptimizeApparel.TryGiveJob postfix runs for my pawns with Royal Titles. Forcing very specific outfits helped remove the lag some of the time when drafting/undrafting but not all of the time and the hitch still pops up pretty frequently. I've even been strict on not storing gear I won't equip in ChangeDressers, I think I have a normal amount of apparel stored up for a 16 pawn colony.

I've looked quite a bit at the code and understand in general but I'm not 100% on why this is the current approach. As I understand it, the normal JobGiver_OptimizeApparel.TryGiveJob checks all of the apparel in pawn.Map.listerThings.ThingsInGroup(ThingRequestGroup.Apparel) which is not the same list of apparel you'd like to check. This is where my confusion sets in, because apparel in change dressers is fair game for bills and caravans (this is another thing that confuses me, when WeaponStorage and ChangeDressers dump their inventory for caravan loading, AFAIK, this is not necessary). So, I have a couple of possible suggestions that I'd be happy to try to implement in a PR (or even just a hack in my own version).

  1. Stop overriding the results of JobGiver_OptimizeApparel.TryGiveJob, instead, override the contents of pawn.Map.listerThings.ThingsInGroup(ThingRequestGroup.Apparel) in the prefix to whatever gear you'd like and then swap it back in the postfix (this would also have the benefit of being a little more future proof because you're not so dependent on the internals of the apparel optimization system and you benefit from any code optimizations made).
  2. Refactor the ApparelUtils.FindBetterApparel method to be more functional (remove the ref parameters so it is easier to memoize and cache) and build data structures that allow you to ignore calculating apparel scores that don't require an update.
  3. Use threading to dispatch a new job after you've calculated the best apparel without blocking the UI thread.
  4. A combination of 2 & 3 where some threaded-task system is calculating best apparel and the JobGiver_OptimizeApparel.TryGiveJob is just an interrupt to create a job reflecting this apparel
  5. Remove this harmony patch entirely because it might not do anything helpful (this is more a question of my understanding of the patch).

Drafting colonists resets current outfit selection

Lets say I have 3 different outfits, worker, summer and winter clothing.
If I have someone on "summer" and draft it, after I release him from his duty he'll reset his outfit to "worker" as he changed to "soldier" when he was drafted.

When I try to uninstall change dresser,if it has some apparels will report errors.

Dropped Apparel_Duster736060 in a null map.
Verse.Log:Error(String)
Verse.GenDrop:TryDropSpawn(Thing, IntVec3, Map, ThingPlaceMode, Thing&, Action2) RimWorld.GenThing:TryDropAndSetForbidden(Thing, IntVec3, Map, ThingPlaceMode, Thing&, Boolean) ChangeDresser.Building_Dresser:DropApparel(Apparel, Boolean) ChangeDresser.Building_Dresser:DropApparel(List1)
ChangeDresser.Building_Dresser:Dispose()
ChangeDresser.Building_Dresser:DeSpawn()
Verse.ThingContainer:TryAdd(Thing, Boolean)
RimWorld.MinifiedThing:set_InnerThing(Thing)
RimWorld.MinifyUtility:MakeMinified(Thing)
RimWorld.MinifyUtility:Uninstall(Thing)
RimWorld.Designator_Uninstall:DesignateThing(Thing)
RimWorld.c__AnonStorey3CC:<>m__56F()
Verse.Command_Action:ProcessInput(Event)
Verse.GizmoGridDrawer:DrawGizmoGrid(IEnumerable1, Single, Gizmo&) RimWorld.InspectGizmoGrid:DrawInspectGizmoGridFor(IEnumerable1)
RimWorld.MainTabWindow_Inspect:DrawInspectGizmos()
RimWorld.InspectPaneUtility:ExtraOnGUI(IInspectPane)
RimWorld.MainTabWindow_Inspect:ExtraOnGUI()
Verse.WindowStack:WindowStackOnGUI()
RimWorld.UIRoot_Play:UIRootOnGUI()
Verse.Root:OnGUI()

Tried to spawn thing Apparel_Duster736060, but the map provided does not exist.
Verse.Log:Error(String)
Verse.Thing:SpawnSetup(Map)
Verse.ThingWithComps:SpawnSetup(Map)
ChangeDresser.Building_Dresser:DropApparel(Apparel, Boolean)
ChangeDresser.Building_Dresser:DropApparel(List1) ChangeDresser.Building_Dresser:Dispose() ChangeDresser.Building_Dresser:DeSpawn() Verse.ThingContainer:TryAdd(Thing, Boolean) RimWorld.MinifiedThing:set_InnerThing(Thing) RimWorld.MinifyUtility:MakeMinified(Thing) RimWorld.MinifyUtility:Uninstall(Thing) RimWorld.Designator_Uninstall:DesignateThing(Thing) RimWorld.<DrawInspectGizmoGridFor>c__AnonStorey3CC:<>m__56F() Verse.Command_Action:ProcessInput(Event) Verse.GizmoGridDrawer:DrawGizmoGrid(IEnumerable1, Single, Gizmo&)
RimWorld.InspectGizmoGrid:DrawInspectGizmoGridFor(IEnumerable`1)
RimWorld.MainTabWindow_Inspect:DrawInspectGizmos()
RimWorld.InspectPaneUtility:ExtraOnGUI(IInspectPane)
RimWorld.MainTabWindow_Inspect:ExtraOnGUI()
Verse.WindowStack:WindowStackOnGUI()
RimWorld.UIRoot_Play:UIRootOnGUI()
Verse.Root:OnGUI()

[Bug] Clothing duplication bug.

I keep getting this red error messages stating that there are duped items around.
I erased them manually but they came back in.
(It may be linked on "forcing" clothes on colonist and then drafting them)
Log:
Error Log duplication bug.txt

On the end, there's a map corruption maybe related to it?
Tell me if you need other mods in the list.
Thanks

Massive teleporting clothes bug

I like to use multiple home bases in my game but doing so apparently means that a change dresser with mending attachment ignores space and time like the closet to narnia and teleports torn clothes right off of colonists to be fixed, and new clothes onto them without any rhyme or reason.
This is especially annoying if people in an arctic tundra base have warm clothes assigned to them and the magical wardrobe replaces them with t shirt and shorts, and you cannot get them back since they are now in the dresser a 4 day caravan away - at least until they get teleported unto someone else.
Worse still some clothes i cannot even find any more.
This happens without the pawns being interrupted in what they do and iirc even to pawns not selected at the time.
This might be related to how the dresser handles clothes, because if someone is ordered to haul clothes to the dresser the mending attachment has no time to kick in because the pawns will grab the clothes right away putting them on again, necessitating tricks with queued orders and whatnot to get them to repair their clothes.

Stored items hidden from counts/view

With the way the mod is currently implemented, the items stored in the dresser are not counted at workbenches. All make X clothing/armor bills at workbenches break.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.