Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - nwilson

#1
Would like an invite as well.
#2
Help / Re: Modding Question
July 31, 2016, 08:06:05 PM
Quote from: DariusWolfe on July 31, 2016, 07:46:33 PM
From what I understand, filth/blood/vomit build up on floors, so the walls won't directly have an effect. You could try having the walls apply a filth reduction effect to nearby floors, but that'd be tricky at best.

Ive confirmed it works........ just not how I wanted to do it.....

I was able to add <Cleanliness>5</Cleanliness> to the xml file so I have confirmed that it takes into account cleanliness on buildings.

but still have not figured out how to change it via the C# code.
#3
Help / Re: Modding Question
July 31, 2016, 07:50:09 PM
The room gets its cleanliness status by adding up all the StatDefOf.Cleanliness from

ThingCategory.Building
ThingCategory.Item
ThingCategory.Filth
ThingCategory.Plant

Walls are considered buildings so this implies that I can add that property to the walls and the ingame function will already be taking them into account.

Having a really hard time figuring out how to set that though.

This is apparently not the way...
    public class NW_sterileWallBuildingBase : Building
    {
        this.StatDefOf.Cleanliness = .02;
    }
#4
Help / Modding Question
July 31, 2016, 07:22:09 PM
I am trying to make my sterile walls create a sterile effect but I cant seem to find how the floors create the effect. I didn't see a way for the floors to do it via XML on the wiki, so ive been trying to find the source code for the sterile floors but I'm not having any luck.

Anyone know where exactly the source code for sterile floors are or even just walls....? I thought id fine Building_Wall but that apparently does not exist.


Closest thing I have found is
public class RoomStatWorker_Cleanliness : RoomStatWorker

but still not sure how to effect this.

So looking at how that function takes room cleanliness into account;
thing.GetStatValue(StatDefOf.Cleanliness, true);

It seems I need to make my walls have this
StatDefOf.Cleanliness

Anyone know of a tutorial or some examples of how I apply this to my walls?