Ludeon Forums

RimWorld => Mods => Topic started by: mugenzebra on November 29, 2016, 04:17:11 PM

Title: Mod for allowing doctors treating themselves?
Post by: mugenzebra on November 29, 2016, 04:17:11 PM
I wonder has anyone thought of this yet. If everyone else is downed or only one colonist is left, the situation can be dangerous if he gets injured. Little injuries should be allowed to be bandaged by the pawn itself , and self surgery should be allowed for exceptionally skilled doctors. But the speed of the treatment should be slowed.  How would this mod be approached to code? I couldn't find anything after searching 'right click' in source code.
Title: Re: Mod for allowing doctors treating themselves?
Post by: deliveryservice on November 30, 2016, 03:04:12 AM
I think to justify it Lore-wise they have strange issues about treating their own wounds.
Either they could even think it would be unthinkable, or they're a serious sissy. :P
Title: Re: Mod for allowing doctors treating themselves?
Post by: Illusion Distort on November 30, 2016, 07:36:13 AM
The soulution would be making a new recipe, defining that the doctor is also the patience and a workgiver that makes it a priority. Think you would have to write it in C# tho, and unless you have some experience that could get tricky real fast. Believe Skullywag and other old-schools on the forum were thinking about something like this a long time ago, but I dont know what they concluded upon.

As for balancing and lore, it would probably be best to have it require the doctor/pacient being close to a medical bed or other medical equipment.
Title: Re: Mod for allowing doctors treating themselves?
Post by: faltonico on November 30, 2016, 09:55:11 AM
That mod should be called Leonid Rogozov (https://en.wikipedia.org/wiki/Leonid_Rogozov).
The man operated himself from appendicitis in the arctic.
Title: Re: Mod for allowing doctors treating themselves?
Post by: mugenzebra on November 30, 2016, 03:57:11 PM
Quote from: Illusion Distort on November 30, 2016, 07:36:13 AM
The soulution would be making a new recipe, defining that the doctor is also the patience and a workgiver that makes it a priority.
I am looking files in RecipeDefs folder and couldn't find anything. But looking at Jobs_Work.xml seems interesting, particularly I found   <!--============= Medical ===============-->

  <JobDef>
    <defName>FeedPatient</defName>
    <driverClass>JobDriver_FoodFeedPatient</driverClass>
    <reportString>feeding TargetA to TargetB.</reportString>
  </JobDef>

  <JobDef>
    <defName>TendPatient</defName>
    <driverClass>JobDriver_TendPatient</driverClass>
    <reportString>tending to TargetA.</reportString>
    <casualInterruptible>false</casualInterruptible>
  </JobDef>


And looking at JobDriver_TendPatient.cs I found

public class JobDriver_TendPatient : JobDriver
{
private const int BaseTendDuration = 600;

protected Thing Medicine
{
get
{
return base.CurJob.targetB.Thing;
}
}

protected Pawn Deliveree
{
get
{
return (Pawn)base.CurJob.targetA.Thing;
}
}
}

This seems to be the starting point, but I don't see anything directly related to if the pawn can self-target itself and give itself treatment.
Title: Re: Mod for allowing doctors treating themselves?
Post by: Facepunch on November 30, 2016, 10:30:15 PM
Quote from: deliveryservice on November 30, 2016, 03:04:12 AM
I think to justify it Lore-wise they have strange issues about treating their own wounds.
Either they could even think it would be unthinkable, or they're a serious sissy. :P

Nah, the vast majority of people wouldn't survive operating on themselves, on account of being unable to fix it if something goes wrong and they lose conciousness. Even that crazy Russian guy had assistants.
Title: Re: Mod for allowing doctors treating themselves?
Post by: RawCode on December 01, 2016, 11:26:32 AM
operating?

currently pawns unable to just put piece of cloth on wound to stop minor bleeding...
Title: Re: Mod for allowing doctors treating themselves?
Post by: Rock5 on December 01, 2016, 11:41:09 AM
Operating on yourself should be out of the question but bandaging yourself, sure, why not. Seems reasonable. It would be easy to balance, just make it a lot slower than having someone else do it. That way it will always be preferable to have someone else do it. You would only have someone heal themselves when they are the only one left. And that would make sense because it's always going to be more awkward to bandage yourself than have someone else do it.
Title: Re: Mod for allowing doctors treating themselves?
Post by: mugenzebra on December 02, 2016, 12:05:46 AM
Quote from: RawCode on December 01, 2016, 11:26:32 AM
operating?

currently pawns unable to just put piece of cloth on wound to stop minor bleeding...

We gotta start by taking small step right? And it sounds to me self-treatment might not be as simple as it sounds. How about having a button, which upon press will start bandaging the pawn itself. My gut feel is bypassing the job giver system is quicker.