Yayo/Smokeleaf/Psychoid leaves in prison not available for crafting

Started by Mehni, February 07, 2017, 06:46:16 AM

Previous topic - Next topic

Mehni

If the raw materials required to produce smokeleaf/flake/yayo/Go-Juice is stored in a room with a prisoner bed, pawns cannot access those materials to craft drugs.

Image should be self-explanatory, but steps to reproduce:

1. Make a enclosed stockpile with smokeleaf/psychoid leaves and yayo.
2. Place a prisoner spot inside.
3. Set bills to produce smokeleaf joints, yayo and Go-Juice.

Save-file attached.

Strangely pawns will take the neutroamine out of the prison to produce wake-up, but not the neutroamine & yayo to make Go-Juice. Pawns seem to respect the digestible part when crafting, yet don't when they're on a drug binge.



[attachment deleted by admin due to age]

NolanSyKinsley

That is due to consumables and wearables in prison cells being marked for prisoner use. If you place clothes down the prisoners can wear them, and you can feed them their drug of choice to satiate their addictions. It works this way with food as well, so pawns don't immediately haul away the meals and consumables placed in prisoner's cells for prisoner's use.


Neutroamine is not consumable, so will be picked up by pawns for crafting.

Mehni

That's the case with beer and food, but not yayo or clothing - and it certainly shouldn't apply to leaves.

Even then, the feedback to the drug production should be clearer.

NolanSyKinsley

Clothing is automatically forbidden when dropped within a prisoner cell to allow for the prisoners to use it. Anything consumable isn't visibly marked forbidden, but is earmarked for the prisoner's use. The leaves are consumable even if they are not a finished product, and that is why they are left for the prisoner and not allowed to be used for crafting as all consumables dropped in the cell are considered for the prisoner's consumption.

Bottom line is the prisoner's cell should not be used as a stockpile/warehouse at all, and only items you want the prisoner to have/use should be placed in the cell. In fact if there is any actual bug in this report at all, it should be that prisoners should gather weapons left in their cells and attempt to escape with them, as for some reason you are storing a triple rocket launcher in your prisoner's cell, which makes absolutely no logical sense at all.

Mehni

Your gatekeeping is completely unnecessary and your statements are false.

a) Clothing, when colonists are manually told to drop it, are automatically forbidden wherever they got unequipped.
b) Clothing in a prison cell isn't earmarked. It's treated as any other piece of clothing.
c) Leaves aren't consumable by people. They are by animals, but animals don't respect the prison reservation.
d) Only beer and food are considered for the prisoner's consumption, and a right-click on that item will CLEARLY show as such.
e) Prisoners can go berserk and destroy doors. This is something that happens during normal play and will cause confusion for players.

If you get tripped over a screenshot that made was in dev mode specifically to illustrate a point, I don't know what you're doing on the bug reporting forum.

Tynan

The core issue is that "socially proper" is defined, roughly, as "only prisoners can interact with stuff inside prisoner rooms".
--Hauling doesn't use this check, it uses its own check (under PawnCanAutomaticallyHaulBasicChecks) which checks socially-proper only for foods.
--Bills *do* use this check (though there's a flag which prevents them from doing so).

socialPropernessMatters is true for:
-Food
-Drugs
-Chairs
-Tables
-Joy buildings
-Nutrient paste dispenser

--------------------------------------------------
Rejected options

A. IsSociallyProper redefined so that non-prisoners can go into prisoner rooms for more things.
--Pros: Nice and clean, makes most jobs happy to take things out of prisoner rooms.
--Cons: This function is being used for a lot of stuff; we'd also need a "bed" exception, and this is starting to feel like a lot of exceptions.

B. Add a new function similar to IsSociallyProper, except it also lets non-prisoners go into prisoner rooms for a lot of stuff. Use it where appropriate.
--Pros: Like (A) but more controlled.
--Cons: I admit I'm not super-excited about yet another kind of permission that can get out of sync (although presumably, it would just check the item type, then possibly call IsSociallyProper, so it might be okay.)

C. Bills no longer check social-properness for items with zero nutrition

--------------------------------------------------
Action plan:

C. Bills no longer check social properness at all.

D. Turns off socialPropernessMatters for things where it's not necessary, including drug crafting ingredients. (Since prisoners have no use for these items in any scenario, there's no reason they should be reserved for prisoners.)

E. Also, make a debug log lister that writes out all DefNames with socialPropernessMatters, so we can ensure they're 100% correct.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Tynan

Tynan Sylvester - @TynanSylvester - Tynan's Blog


ZorbaTHut

Fixed in A17. Thanks for the report!

As part of this, I've adjusted technically-edible drug components down a tier in the food preferability list, to DesperateOnly; in addition, wardens will no longer deliver materials below RawBad to prisoners for food. I figure if things get that bad foodwise, the warden would rather save it for colonists, and they'll get tended by a doctor when they fall over eventually anyway.

Assuming the doctor hasn't starved to death yet, at least.