forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement basic saline infusion to help with blood loss (CleverRaven#…
…70566) * fix prosthetics being magical * Implement basic saline iv therapy to help yourself in blood loss * fix leg prosthetics being magic, and make them less rare * fix double spaces, prevent confusions from math * Trying to make it consume disinfectant * drop a bag when saline is used, add chance to get infection * Update data/json/items/containers/generic.json Co-authored-by: Jianxiang Wang (王健翔) <[email protected]> * remove infection stuff --------- Co-authored-by: Jianxiang Wang (王健翔) <[email protected]>
- Loading branch information
1 parent
564fb90
commit fb058db
Showing
18 changed files
with
350 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[ | ||
{ | ||
"type": "effect_on_condition", | ||
"id": "SALINE_INFUSION", | ||
"//": "4 ml of saline per 1 ml of blood, rate 2L/hour. 1 ml of blood = 10 units of vitamin", | ||
"effect": [ | ||
{ "math": [ "u_amount_of_saline_infused", "=", "_volume_of_saline" ] }, | ||
{ "u_assign_activity": "ACT_SALINE_INFUSE", "duration": { "math": [ "_volume_of_saline / 0.55555556" ] } }, | ||
{ "u_consume_item": { "context_val": "bag_id" } }, | ||
{ | ||
"set_string_var": "<context_val:bag_id>_empty", | ||
"target_var": { "context_val": "bag_to_drop" }, | ||
"parse_tags": true | ||
}, | ||
{ "u_spawn_item": { "context_val": "bag_to_drop" }, "suppress_message": true }, | ||
{ | ||
"u_message": "You prepare the tubing, insert the needle into a vein, and patiently wait for the saline solution to flow into your bloodstream.", | ||
"type": "good" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "effect_on_condition", | ||
"id": "SALINE_INFUSION_eff", | ||
"//": "4 ml of saline per 1 ml of blood, rate 2L/hour. 1 ml of blood = 10 units of vitamin", | ||
"effect": [ { "math": [ "u_vitamin('blood')", "+=", "u_amount_of_saline_infused * ( 10 / 4 )" ] } ] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.