Skip to content

Commit

Permalink
Mainline sleep deprivation
Browse files Browse the repository at this point in the history
  • Loading branch information
anothersimulacrum committed Jan 23, 2020
1 parent 3e11834 commit 5560a92
Show file tree
Hide file tree
Showing 18 changed files with 65 additions and 115 deletions.
11 changes: 11 additions & 0 deletions data/json/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,17 @@
"occupied_bodyparts": [ [ "TORSO", 1 ], [ "ARM_L", 2 ], [ "ARM_R", 2 ], [ "LEG_L", 3 ], [ "LEG_R", 3 ] ],
"flags": [ "BIONIC_FAULTY" ]
},
{
"id": "bio_synaptic_regen",
"type": "bionic",
"name": "Synaptic Regeneration System",
"description": "An electromagnetic stimulator has been surgically implanted on the back of your head and along your spine, continually draining power. As long as it's active, you won't become sleep deprived; and if you're sleep deprived already, it will boost the rate of recovery while you sleep.",
"flags": [ "BIONIC_TOGGLED" ],
"occupied_bodyparts": [ [ "HEAD", 1 ], [ "TORSO", 1 ] ],
"act_cost": 0,
"react_cost": "1 kJ",
"time": 100
},
{
"id": "bio_shock",
"type": "bionic",
Expand Down
20 changes: 20 additions & 0 deletions data/json/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,26 @@
"max_duration": "15 m",
"base_mods": { "vomit_chance": [ 60 ] }
},
{
"type": "effect_type",
"id": "sleep_deprived",
"name": [ "Sleep Deprived" ],
"desc": [ "Your sleep debt has been steadily increasing for a while. You should get some rest." ],
"rating": "bad",
"max_intensity": 20160,
"int_dur_factor": 240,
"base_mods": { "speed_mod": [ -5 ] },
"scaling_mods": { "speed_mod": [ -1 ], "int_mod": [ -0.33 ], "per_mod": [ -0.33 ], "str_mod": [ -0.17 ], "dex_mod": [ -0.17 ] },
"apply_message": "You feel weary, your body tired from lack of quality sleep.",
"remove_message": "You have finally caught up with your lost sleep, and you feel refreshed and awake for a change."
},
{
"type": "effect_type",
"id": "magnesium",
"name": [ "Magnesium Supplements" ],
"desc": [ "You took some magnesium supplements. These will help with sleep deprivation." ],
"rating": "good"
},
{
"type": "effect_type",
"id": "beartrap",
Expand Down
2 changes: 1 addition & 1 deletion data/json/game_balance.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"name": "SLEEP_DEPRIVATION",
"info": "Enables sleep deprivation mechanics. If true, stimulants will only help you so far, and you might have to enforce proper sleep hygiene for a while.",
"stype": "bool",
"value": false
"value": true
},
{
"type": "EXTERNAL_OPTION",
Expand Down
5 changes: 5 additions & 0 deletions data/json/item_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@
"id": "PICKAXE",
"name": "Dig through rock"
},
{
"type": "item_action",
"id": "MAGNESIUM_TABLET",
"name": "Take a magnesium tablet"
},
{
"type": "item_action",
"id": "PACK_CBM",
Expand Down
1 change: 1 addition & 0 deletions data/json/itemgroups/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
[ "bio_face_mask", 10 ],
[ "bio_scent_mask", 10 ],
[ "bio_cloak", 10 ],
[ "bio_synaptic_regen", 12 ],
[ "bio_fingerhack", 10 ],
[ "bio_lockpick", 10 ],
[ "bio_night", 10 ],
Expand Down
1 change: 1 addition & 0 deletions data/json/itemgroups/locations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2114,6 +2114,7 @@
[ "con_milk", 20 ],
[ "milk_evap", 15 ],
[ "milk_UHT", 10 ],
[ "magnesium_tablet", 20 ],
[ "can_spam", 30 ],
[ "can_tuna", 35 ],
[ "can_salmon", 25 ],
Expand Down
9 changes: 9 additions & 0 deletions data/json/items/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,15 @@
"weight": "100 g",
"difficulty": 11
},
{
"id": "bio_synaptic_regen",
"copy-from": "bionic_general",
"type": "BIONIC_ITEM",
"name": "Synaptic Regeneration System CBM",
"description": "An electromagnetic stimulator has been surgically implanted on the back of your head and along your spine, continually draining power. As long as it's active, you won't become sleep deprived; and if you're sleep deprived already, it will boost the rate of recovery.",
"price": 10000,
"difficulty": 8
},
{
"id": "bio_spasm",
"copy-from": "bionic_general_faulty",
Expand Down
15 changes: 15 additions & 0 deletions data/json/items/comestibles/med.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@
"use_action": "DISASSEMBLE",
"flags": [ "NO_REPAIR" ]
},
{
"id": "magnesium_tablet",
"type": "COMESTIBLE",
"comestible_type": "MED",
"name": "magnesium tablet",
"description": "Over-the-counter magnesium supplements, commonly prescribed to treat sleep deprivation and to mitigate its effects. One tablet a day combined with a good night's sleep will help you recover faster.",
"weight": "1 g",
"volume": "250 ml",
"price": 400,
"price_postapoc": 4000,
"stack_size": 30,
"symbol": "!",
"color": "yellow",
"use_action": "MAGNESIUM_TABLET"
},
{
"id": "adderall",
"type": "COMESTIBLE",
Expand Down
1 change: 1 addition & 0 deletions data/json/monsterdrops/zombie_lab.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
[ "bio_night_vision", 1 ],
[ "bio_infrared", 2 ],
[ "bio_scent_vision", 5 ],
[ "bio_synaptic_regen", 12 ],
[ "bio_gills", 5 ],
[ "bio_climate", 2 ],
[ "bio_heatsink", 2 ],
Expand Down
13 changes: 0 additions & 13 deletions data/mods/Sleep_Deprivation/bionics.json

This file was deleted.

22 changes: 0 additions & 22 deletions data/mods/Sleep_Deprivation/effects.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/mods/Sleep_Deprivation/game_balance.json

This file was deleted.

7 changes: 0 additions & 7 deletions data/mods/Sleep_Deprivation/item_actions.json

This file was deleted.

27 changes: 0 additions & 27 deletions data/mods/Sleep_Deprivation/item_groups.json

This file was deleted.

8 changes: 0 additions & 8 deletions data/mods/Sleep_Deprivation/itemgroups/drugs.json

This file was deleted.

11 changes: 0 additions & 11 deletions data/mods/Sleep_Deprivation/items/bionics.json

This file was deleted.

18 changes: 0 additions & 18 deletions data/mods/Sleep_Deprivation/items/comestibles/med.json

This file was deleted.

1 change: 1 addition & 0 deletions data/mods/Sleep_Deprivation/modinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"maintainers": [ "Kevin Giovinazzo" ],
"description": "Enables sleep deprivation mechanics independently of a player's fatigue.",
"category": "rebalance",
"obsolete": true,
"dependencies": [ "dda" ]
}
]

0 comments on commit 5560a92

Please sign in to comment.