Mod for allowing doctors treating themselves?

Started by mugenzebra, November 29, 2016, 04:17:11 PM

Previous topic - Next topic

mugenzebra

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.

deliveryservice

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

Illusion Distort

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.

faltonico

That mod should be called Leonid Rogozov.
The man operated himself from appendicitis in the arctic.

mugenzebra

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.

Facepunch

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.

RawCode

operating?

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

Rock5

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.
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport

mugenzebra

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.