Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autodoc bonesetting #31001

Merged
merged 5 commits into from
Jun 5, 2019
Merged

Autodoc bonesetting #31001

merged 5 commits into from
Jun 5, 2019

Conversation

Night-Pryanik
Copy link
Contributor

@Night-Pryanik Night-Pryanik commented May 31, 2019

Summary

SUMMARY: Features "Added ability to splint broken limbs to autodoc. Replaced computer bonesetting with autodoc bonesetting."

Purpose of change

Get rid of weird behavior when computer somehow splints broken limbs.

Describe the solution

  • Copied the logic of bonesetting from computers.cpp into iexamine::autodoc.
  • Splinting don't require anesthesia, so I had to modify needs_anesthesia bool to check for >1 choice in autodoc menu.
  • Added ability to splint not only player's limbs, but also NPC's limbs.
  • Added a message if no limbs require splinting.
  • Replaced bonesetting computers in hospitals' and labs' mapgen with autodoc and its couch.
  • Removed instances of COMPACT_BONESETTING computer action.

Describe alternatives you've considered

None.

Additional context

At the moment autodoc can splint unlimited number of broken limbs and seems to take splints out of thin air. This is the original (computer one) behavior, but I thought I could change that by manually placing (in jsons) some arbitrary number - say, 4 - of splints in autodoc and making autodoc sealed container. Each splinting will consume one splint, so after 4 splintings it will stop providing bonesetting treatment.
But I don't know if we need this limitation at all, and if we do, if my solution if acceptable.

@Night-Pryanik Night-Pryanik added <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON Map / Mapgen Overmap, Mapgen, Map extras, Map display [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Character / Player Character / Player mechanics labels May 31, 2019
@curstwist
Copy link
Contributor

curstwist commented May 31, 2019

Did you change the lab bonesetter? Will the nursebot effect this any? Good idea : )

@Night-Pryanik
Copy link
Contributor Author

Night-Pryanik commented May 31, 2019

Did you catch the lab bonesetter?

Yeah, I did.

Will the nursebot effect this any?

No, it won't.

@ZhilkinSerg ZhilkinSerg self-assigned this Jun 1, 2019
@tinukedaya
Copy link
Contributor

At the moment autodoc can splint unlimited number of broken limbs and seems to take splints out of thin air. This is the original (computer one) behavior, but I thought I could change that by manually placing (in jsons) some arbitrary number - say, 4 - of splints in autodoc and making autodoc sealed container. Each splinting will consume one splint, so after 4 splintings it will stop providing bonesetting treatment.
But I don't know if we need this limitation at all, and if we do, if my solution if acceptable.

What if you make the autodoc splint be some kind of 3d-printed brace? This kind of thing >>>
image

Autodoc can have a supply of the material (or maybe require plastic chunks for bonesetting). Also the Autodoc brace might be less encumbering (and maybe even not reset the healing status on some minor damage to the limb) thus the player might actually seek the autodoc for bonesetting?

Should be a one time use item. When you take it off, it will be converted to plastic chunks.

@kevingranade
Copy link
Member

I think we eventually want some kind of substance to construct the splint from, but no need at the moment.

The autodoc splint is already better than the player-applied one.

@Night-Pryanik
Copy link
Contributor Author

While testing, I found out that we definitely need a way to say "Go to this tile" to our NPC followers so they could lay up on the autodoc couch - they consider it a hard to cross terrain and try to avoid it at all costs.

@@ -41,7 +41,6 @@ enum computer_action {
COMPACT_BLOOD_ANAL,
COMPACT_DATA_ANAL,
COMPACT_DISCONNECT,
COMPACT_BONESETTING,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this not break the logic of existing computers in savegames?

Copy link
Contributor Author

@Night-Pryanik Night-Pryanik Jun 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested right now. The game doesn't crash, no errors popping up. Existing medical computers won't be working, of course, activating them will show "evacuation" message. I think that's acceptable.

@kevingranade kevingranade merged commit c56d2df into CleverRaven:master Jun 5, 2019
@Night-Pryanik Night-Pryanik deleted the autodoc-bonesetting branch June 5, 2019 07:17
@ZhilkinSerg ZhilkinSerg removed their assignment Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON Map / Mapgen Overmap, Mapgen, Map extras, Map display Mechanics: Character / Player Character / Player mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants