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

More pharmacological expansion infrastructure work + a few new drugs #70239

Merged
merged 56 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b331b28
initial commit. Add ibuprofen/acetaminophen and introduce aspirin ble…
gkarfakis19 Dec 15, 2023
0c273b4
initial commit. Add ibuprofen/acetaminophen and introduce aspirin ble…
gkarfakis19 Dec 15, 2023
474df28
small changes
gkarfakis19 Dec 16, 2023
4a8b73d
in-progress json effects
gkarfakis19 Dec 16, 2023
425f439
It works now! Cleaned up and added reasonable values.
gkarfakis19 Dec 16, 2023
ade162c
It works now! Cleaned up and added reasonable values.
gkarfakis19 Dec 16, 2023
0c96850
cleanup
gkarfakis19 Dec 16, 2023
4b4a800
conjunction
gkarfakis19 Dec 16, 2023
d6349a8
added drugs to loot lists
gkarfakis19 Dec 16, 2023
eb9587a
added some spawns I missed
gkarfakis19 Dec 16, 2023
113827a
minor fixes
gkarfakis19 Dec 16, 2023
2560caa
more infrastracture + perspiration --> respiration (lol)
gkarfakis19 Dec 16, 2023
4e70433
woops
gkarfakis19 Dec 16, 2023
607a55d
astyle
gkarfakis19 Dec 16, 2023
15d82cc
minor fix
gkarfakis19 Dec 16, 2023
7869b37
Update npc.cpp sorting
gkarfakis19 Dec 16, 2023
05f3e46
Update inventory.cpp
gkarfakis19 Dec 16, 2023
55ff52c
Update character_body.cpp
gkarfakis19 Dec 16, 2023
c661e67
Update character.h
gkarfakis19 Dec 16, 2023
87d2525
metaprolol first draft.
gkarfakis19 Dec 17, 2023
894e4d5
made metaprolol go through stomach for 30 min delay
gkarfakis19 Dec 18, 2023
97275a4
Merge branch 'newdrugs_branch' of https://github.com/gkarfakis19/Cata…
gkarfakis19 Dec 18, 2023
357e2d6
minor comment and astyle
gkarfakis19 Dec 18, 2023
5924db1
updated new meds to use new vit system
gkarfakis19 Dec 18, 2023
1f8f3bf
forgot to add naproxen to new system
gkarfakis19 Dec 18, 2023
b2f4d2b
compiler and test fixes.
gkarfakis19 Dec 18, 2023
27cd61e
astyle :(
gkarfakis19 Dec 18, 2023
c3bdca1
minor balancing
gkarfakis19 Dec 19, 2023
e128b2e
fix
gkarfakis19 Dec 19, 2023
faf8acd
implemented venera's suggestion to make aspirin make bleeding last lo…
gkarfakis19 Dec 19, 2023
2bacb57
Very minor fixes
gkarfakis19 Dec 19, 2023
3dcc2e2
woops
gkarfakis19 Dec 19, 2023
5441921
clang tidy
gkarfakis19 Dec 19, 2023
52e6173
fixed percentages. Thanks fungamer2-2
gkarfakis19 Dec 20, 2023
eae5f5b
also json comment fix
gkarfakis19 Dec 20, 2023
7690105
fixed mod decay logic.
gkarfakis19 Dec 21, 2023
f8f69e3
Updated documentation.
gkarfakis19 Dec 21, 2023
f8c3025
vomiting removes digesting drugs now
gkarfakis19 Dec 22, 2023
f01e919
vomit code deduplication
gkarfakis19 Dec 22, 2023
d9aa175
further documentation
gkarfakis19 Dec 22, 2023
4176081
Merge branch 'master' into newdrugs_branch
gkarfakis19 Dec 22, 2023
e2d231b
documentation fix
gkarfakis19 Dec 22, 2023
2342c76
Merge branch 'newdrugs_branch' of https://github.com/gkarfakis19/Cata…
gkarfakis19 Dec 22, 2023
2088941
forgot one pkill!
gkarfakis19 Dec 22, 2023
448c48e
Merge branch 'CleverRaven:master' into newdrugs_branch
gkarfakis19 Dec 23, 2023
8ef5471
removed foreign code from PR.
gkarfakis19 Dec 24, 2023
dd8e3d4
Update data/json/items/comestibles/med.json
gkarfakis19 Dec 29, 2023
57343c9
Update data/json/effects.json
gkarfakis19 Dec 29, 2023
d31302b
Update data/json/itemgroups/Clothing_Gear/clothing.json
gkarfakis19 Dec 29, 2023
cb0b265
erk's suggestions + renamed item groups to otc painkillers
gkarfakis19 Dec 29, 2023
ee327f0
Update data/json/items/comestibles/med.json
gkarfakis19 Dec 29, 2023
34e1147
Update src/character.cpp
gkarfakis19 Jan 2, 2024
f712c98
Update inventory.cpp
gkarfakis19 Jan 2, 2024
530e824
Merge branch 'newdrugs_branch' of https://github.com/gkarfakis19/Cata…
gkarfakis19 Jan 2, 2024
8be0b3f
increased pill-based pkill duration based on Erk's suggestions
gkarfakis19 Jan 2, 2024
5b82650
Merge branch 'master' into newdrugs_branch
gkarfakis19 Jan 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 52 additions & 1 deletion data/json/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -2035,12 +2035,43 @@
},
{
"type": "effect_type",
"id": "pkill1",
"id": "bleedrate_up",
gkarfakis19 marked this conversation as resolved.
Show resolved Hide resolved
"max_intensity": 3,
"rating": "bad",
"blood_analysis_description": "Blood Thinner",
"effect_dur_scaling": [ { "effect_id": "bleed", "modifier": 1.05, "same_bp": false } ]
},
{
"type": "effect_type",
"id": "ibuprofen_eff",
gkarfakis19 marked this conversation as resolved.
Show resolved Hide resolved
"//": "Blood pressure up. Remember that this is divided by 10000, so maximum 5% increase.",
gkarfakis19 marked this conversation as resolved.
Show resolved Hide resolved
"rating": "bad",
"base_mods": { "blood_pressure_tick": [ 100 ], "blood_pressure_min": [ 2 ], "blood_pressure_max_val": [ 500 ] }
},
{
"type": "effect_type",
"id": "pkill1_generic",
"max_duration": "4 m",
"base_mods": { "pkill_tick": [ 42 ], "pkill_min": [ 1 ], "pkill_max_val": [ 15 ] },
"rating": "good",
"blood_analysis_description": "Minor Painkiller"
},
{
"type": "effect_type",
"id": "pkill1_nsaid",
"max_duration": "4 m",
"base_mods": { "pkill_tick": [ 42 ], "pkill_min": [ 1 ], "pkill_max_val": [ 15 ] },
"rating": "good",
"blood_analysis_description": "Minor Painkiller (NSAID-based)"
},
{
"type": "effect_type",
"id": "pkill1_acetaminophen",
"max_duration": "4 m",
"base_mods": { "pkill_tick": [ 42 ], "pkill_min": [ 1 ], "pkill_max_val": [ 15 ] },
"rating": "good",
"blood_analysis_description": "Minor Painkiller (Acetaminophen)"
},
{
"type": "effect_type",
"id": "pkill2",
Expand Down Expand Up @@ -3621,6 +3652,26 @@
"rating": "bad",
"blood_analysis_description": "Scurvy"
},
{
"type": "effect_type",
"id": "betablock",
"name": [ "Beta blocker" ],
"desc": [
"You are under the influence of a beta blocker. This controls your heart rate, decreasing the influence of stressful events such as pain on it. However, it also lowers blood pressure and induces fatigue."
],
"max_intensity": 3,
"base_mods": {
"blood_pressure_tick": [ 250 ],
"blood_pressure_min": [ -2 ],
"blood_pressure_min_val": [ -200 ],
gkarfakis19 marked this conversation as resolved.
Show resolved Hide resolved
"fatigue_min": [ 4 ],
"fatigue_chance": [ 500 ],
"fatigue_max_val": [ 200 ]
},
"scaling_mods": { "blood_pressure_min": [ -1 ], "blood_pressure_min_val": [ -100 ], "fatigue_max_val": [ 50 ], "fatigue_min": [ 2 ] },
"rating": "neutral",
"blood_analysis_description": "Beta Blocker"
},
{
"type": "effect_type",
"id": "hypervitaminosis",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
"id": "numbness",
"effect": [
{ "u_message": "You suddenly feel so numb…", "type": "mixed" },
{ "u_add_effect": "pkill1", "duration": "15 minutes" }
{ "u_add_effect": "pkill1_generic", "duration": "15 minutes" }
]
},
{
Expand Down
8 changes: 6 additions & 2 deletions data/json/itemgroups/Clothing_Gear/clothing.json
Original file line number Diff line number Diff line change
Expand Up @@ -4517,10 +4517,14 @@
{
"type": "item_group",
"id": "aspirin_bottle_plastic_pill_painkiller_20",
gkarfakis19 marked this conversation as resolved.
Show resolved Hide resolved
"subtype": "collection",
"subtype": "distribution",
"//": "This group was created automatically and may contain errors.",
gkarfakis19 marked this conversation as resolved.
Show resolved Hide resolved
"container-item": "bottle_plastic_pill_painkiller",
"entries": [ { "item": "aspirin", "container-item": "null", "count": 20 } ]
"entries": [
{ "item": "aspirin", "container-item": "null", "count": 20 },
{ "item": "ibuprofen", "container-item": "null", "count": 20 },
{ "item": "acetaminophen", "container-item": "null", "count": 20 }
]
},
{
"type": "item_group",
Expand Down
60 changes: 54 additions & 6 deletions data/json/itemgroups/Drugs_Tobacco_Alcohol/drugs.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,14 @@
"//": "Painkillers balanced according to rarity excluding illicit drugs",
"subtype": "distribution",
"entries": [
{ "group": "aspirin_ad_group", "prob": 150 },
{ "group": "codeine_ad_group", "prob": 30 },
{ "group": "tramadol_ad_group", "prob": 30 },
{ "item": "morphine", "count-min": 1, "count-max": 12, "container-item": "null", "prob": 5 },
{ "group": "oxycodone_ad_group", "prob": 100 }
{ "group": "aspirin_ad_group", "prob": 50 },
{ "group": "ibuprofen_ad_group", "prob": 100 },
{ "group": "acetaminophen_ad_group", "prob": 100 },
{ "group": "naproxen_ad_group", "prob": 50 },
{ "group": "codeine_ad_group", "prob": 60 },
{ "group": "tramadol_ad_group", "prob": 60 },
{ "item": "morphine", "count-min": 1, "count-max": 12, "container-item": "null", "prob": 10 },
{ "group": "oxycodone_ad_group", "prob": 200 }
]
},
{
Expand All @@ -88,7 +91,10 @@
"//": "Common healing items found almost everywhere",
"items": [
{ "group": "used_1st_aid", "prob": 5 },
[ "aspirin", 50 ],
[ "aspirin", 10 ],
[ "ibuprofen", 17 ],
[ "acetaminophen", 13 ],
[ "naproxen", 10 ],
{ "group": "alcohol_wipes_box_used", "prob": 40 },
{ "group": "alcohol_wipes_box_full", "prob": 5 },
{ "item": "bandages", "prob": 30, "count": [ 1, 3 ] },
Expand Down Expand Up @@ -323,6 +329,27 @@
"container-item": "bottle_plastic_pill_prescription",
"entries": [ { "item": "aspirin", "container-item": "null", "count": [ 5, 60 ] } ]
},
{
"type": "item_group",
"id": "acetaminophen_ad_group",
"subtype": "collection",
"container-item": "bottle_plastic_pill_prescription",
"entries": [ { "item": "acetaminophen", "container-item": "null", "count": [ 5, 60 ] } ]
},
{
"type": "item_group",
"id": "ibuprofen_ad_group",
"subtype": "collection",
"container-item": "bottle_plastic_pill_prescription",
"entries": [ { "item": "ibuprofen", "container-item": "null", "count": [ 5, 60 ] } ]
},
{
"type": "item_group",
"id": "naproxen_ad_group",
"subtype": "collection",
"container-item": "bottle_plastic_pill_prescription",
"entries": [ { "item": "naproxen", "container-item": "null", "count": [ 5, 60 ] } ]
},
{
"type": "item_group",
"id": "codeine_ad_group",
Expand Down Expand Up @@ -579,6 +606,27 @@
"container-item": "bottle_plastic_pill_prescription",
"entries": [ { "item": "aspirin", "container-item": "null", "count": 20 } ]
},
{
"type": "item_group",
"id": "ibuprofen_bottle_full",
"subtype": "collection",
"container-item": "bottle_plastic_pill_prescription",
"entries": [ { "item": "ibuprofen", "container-item": "null", "count": 20 } ]
},
{
"type": "item_group",
"id": "acetaminophen_bottle_full",
"subtype": "collection",
"container-item": "bottle_plastic_pill_prescription",
"entries": [ { "item": "acetaminophen", "container-item": "null", "count": 20 } ]
},
{
"type": "item_group",
"id": "naproxen_bottle_full",
"subtype": "collection",
"container-item": "bottle_plastic_pill_prescription",
"entries": [ { "item": "naproxen", "container-item": "null", "count": 20 } ]
},
{
"type": "item_group",
"id": "melatonin_bottle_full",
Expand Down
3 changes: 3 additions & 0 deletions data/json/itemgroups/Locations_MapExtras/locations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2342,6 +2342,9 @@
[ "cookies", 60 ],
[ "brownie", 60 ],
[ "aspirin", 40 ],
[ "ibuprofen", 40 ],
[ "acetaminophen", 40 ],
[ "naproxen", 40 ],
{ "group": "tobacco_products", "prob": 150 },
{ "group": "cigar_box_opened", "prob": 20 },
{ "group": "cigar_box_unopened", "prob": 5 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"magazine": 100,
"subtype": "distribution",
"entries": [
{ "prob": 85, "group": "aspirin_bottle_plastic_pill_painkiller_1_10" },
{ "prob": 85, "group": "aspirin_bottle_plastic_pill_painkiller_1_20" },
{ "prob": 25, "group": "caffeine_bottle_plastic_pill_supplement_1_10" },
{ "prob": 5, "group": "melatonin_tablet_bottle_plastic_pill_supplement_1_30" },
{ "group": "tobacco_products", "prob": 161 },
Expand Down Expand Up @@ -2165,14 +2165,6 @@
{ "item": "touristmap", "prob": 1 }
]
},
{
gkarfakis19 marked this conversation as resolved.
Show resolved Hide resolved
"type": "item_group",
"id": "aspirin_bottle_plastic_pill_painkiller_1_10",
"subtype": "collection",
"//": "This group was created automatically and may contain errors.",
"container-item": "bottle_plastic_pill_painkiller",
"entries": [ { "item": "aspirin", "container-item": "null", "count": [ 1, 10 ] } ]
},
{
"type": "item_group",
"id": "egg_bird_unfert_carton_egg_10",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
{ "group": "vitamins_bottle_plastic_pill_supplement_20", "prob": 75 },
{ "group": "calcium_tablet_bottle_full", "prob": 75 },
{ "group": "aspirin_bottle_full", "prob": 45 },
{ "group": "ibuprofen_bottle_full", "prob": 45 },
{ "group": "naproxen_bottle_full", "prob": 45 },
{ "group": "acetaminophen_bottle_full", "prob": 45 },
{ "group": "caffeine_bottle_full", "prob": 50 },
{ "group": "pills_sleep_bottle_full", "prob": 45 },
{ "group": "melatonin_bottle_full", "prob": 30 },
Expand Down
2 changes: 1 addition & 1 deletion data/json/itemgroups/Locations_MapExtras/mansion.json
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@
[ "bikini_bottom", 10 ],
[ "bikini_bottom_short", 5 ],
{ "prob": 10, "group": "vitamins_bottle_plastic_pill_supplement_1_10" },
{ "prob": 10, "group": "aspirin_bottle_plastic_pill_painkiller_1_10" },
{ "prob": 10, "group": "aspirin_bottle_plastic_pill_painkiller_1_20" },
[ "karate_gi", 10 ],
[ "judo_gi", 5 ],
[ "fitness_band", 5 ],
Expand Down
23 changes: 22 additions & 1 deletion data/json/itemgroups/SUS/domestic.json
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,28 @@
"distribution": [
{
"item": "aspirin",
"prob": 160,
"prob": 50,
"count": [ 1, 30 ],
"container-item": "null",
"entry-wrapper": "bottle_plastic_pill_painkiller"
},
{
"item": "acetaminophen",
"prob": 70,
"count": [ 1, 30 ],
"container-item": "null",
"entry-wrapper": "bottle_plastic_pill_painkiller"
},
{
"item": "ibuprofen",
"prob": 80,
"count": [ 1, 30 ],
"container-item": "null",
"entry-wrapper": "bottle_plastic_pill_painkiller"
},
{
"item": "naproxen",
"prob": 20,
"count": [ 1, 30 ],
"container-item": "null",
"entry-wrapper": "bottle_plastic_pill_painkiller"
Expand Down
8 changes: 6 additions & 2 deletions data/json/itemgroups/activities_hobbies.json
Original file line number Diff line number Diff line change
Expand Up @@ -741,10 +741,14 @@
{
"type": "item_group",
"id": "aspirin_bottle_plastic_pill_painkiller_1_20",
"subtype": "collection",
"subtype": "distribution",
gkarfakis19 marked this conversation as resolved.
Show resolved Hide resolved
"//": "This group was created automatically and may contain errors.",
"container-item": "bottle_plastic_pill_painkiller",
"entries": [ { "item": "aspirin", "container-item": "null", "count": [ 1, 20 ] } ]
"entries": [
{ "item": "aspirin", "container-item": "null", "count": [ 1, 20 ] },
{ "item": "ibuprofen", "container-item": "null", "count": [ 1, 20 ] },
{ "item": "acetaminophen", "container-item": "null", "count": [ 1, 20 ] }
]
},
{
"type": "item_group",
Expand Down
16 changes: 12 additions & 4 deletions data/json/itemgroups/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -978,18 +978,26 @@
{
"type": "item_group",
"id": "aspirin_bottle_plastic_pill_painkiller_10",
"subtype": "collection",
"subtype": "distribution",
"//": "This group was created automatically and may contain errors.",
"container-item": "bottle_plastic_pill_painkiller",
"entries": [ { "item": "aspirin", "container-item": "null", "count": 10 } ]
"entries": [
{ "item": "aspirin", "container-item": "null", "count": 10 },
{ "item": "acetaminophen", "container-item": "null", "count": 10 },
{ "item": "ibuprofen", "container-item": "null", "count": 10 }
]
},
{
"type": "item_group",
"id": "aspirin_bottle_plastic_pill_painkiller_0_10",
"subtype": "collection",
"subtype": "distribution",
"//": "This group was created automatically and may contain errors.",
"container-item": "bottle_plastic_pill_painkiller",
"entries": [ { "item": "aspirin", "container-item": "null", "count": [ 0, 10 ] } ]
"entries": [
{ "item": "aspirin", "container-item": "null", "count": [ 0, 10 ] },
{ "item": "acetaminophen", "container-item": "null", "count": [ 0, 10 ] },
{ "item": "ibuprofen", "container-item": "null", "count": [ 0, 10 ] }
]
},
{
"type": "item_group",
Expand Down
5 changes: 4 additions & 1 deletion data/json/items/comestibles/drink.json
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,10 @@
"description": "A bitter tea made by boiling willow bark in water, used since ancient times as a mild painkiller.",
"fun": -2,
"flags": [ "NO_AUTO_CONSUME" ],
"use_action": { "type": "consume_drug", "effects": [ { "id": "pkill1", "duration": 90 }, { "id": "nausea", "duration": "5 m" } ] }
"use_action": {
"type": "consume_drug",
"effects": [ { "id": "pkill1_nsaid", "duration": 90 }, { "id": "nausea", "duration": "5 m" } ]
}
},
{
"type": "COMESTIBLE",
Expand Down
Loading
Loading