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 - Wastelander

#91
Help / Re: Initializing comps and inspect string
February 02, 2015, 02:20:13 PM
Is your getInspectString() method marked override? If not, give that a shot.

Otherwise you might not be able to extend Casket and will have to define your own class. Looks like (at least the cryptosleep casket) decompiles nicely, so it shouldn't be much more than a copy-paste job.
#92
Help / Re: Unforbidding pawns on death
February 02, 2015, 02:10:44 PM
QuoteHowever, this solution does not suit me in the long term, as it prevents the player from forbidding a corpse (should he wish to do so), as the method would just unforbid it during the next planned check. Hence I wanted it to be unforbid only once (on death). Unless there is some way to either: check if the forbidding was done by the player OR store a bool whether the corpse was already unfrobidden once, it won't do.

I don't have my decompiler in front of me, but how about this: Pawns are Things, so they can have ThingComps. How about overriding the Human definition, including a custom comp, that unforbids the corpse on death? You could either execute on RareTick, or there's even a "PostApplyDamage" method that looks useful for this.
#93
Help / Re: Modifying core game method?
January 29, 2015, 04:32:51 PM
There's no standard way to override core game classes, only where provided (I.E. where an XML lets you define your own class).

What are you trying to accomplish? Reduce the effect of range on fired weapons?
#94
Mods / Re: [Mod Request] Doors that prisoners can open.
January 28, 2015, 01:56:36 PM
QuoteI think the best solution would be the ability to mark rooms as 'for prisoner use', and if two prisoner rooms are connected to each other, then they'll be able to freely move between the different rooms. Then you can have individual cells that connect to halls, dining areas, outdoor yards, you name it

I've implemented this in a mod I'm working on... in total I had to:
-Create a new door that prisoners can access
-Override default human thinkTree so prisoners no longer just wanderRoom, they wander freely, or else they won't go to access shared resources outside their cell (nutrient dispensers)
-Override the warden workgiver to not haul prisoners who are out of their bedroom, and to not haul prisoners who are in 1x1 rooms (as the prison door itself creates a 1x1 room)

I'm at the point where they'll access their own bedrooms and leave the bedrooms to get food from a shared dispenser.  Still on my list is to build an object that works like a bed but marks a room as a prisoner zone, because only prisoner-marked beds do that in core.