From 5560a92ee8063813ca8e6ffdf877d9124cad418d Mon Sep 17 00:00:00 2001 From: anothersimulacrum Date: Wed, 22 Jan 2020 20:01:31 -0800 Subject: [PATCH] Mainline sleep deprivation --- data/json/bionics.json | 11 ++++++++ data/json/effects.json | 20 ++++++++++++++ data/json/game_balance.json | 2 +- data/json/item_actions.json | 5 ++++ data/json/itemgroups/bionics.json | 1 + data/json/itemgroups/locations.json | 1 + data/json/items/bionics.json | 9 +++++++ data/json/items/comestibles/med.json | 15 +++++++++++ data/json/monsterdrops/zombie_lab.json | 1 + data/mods/Sleep_Deprivation/bionics.json | 13 --------- data/mods/Sleep_Deprivation/effects.json | 22 --------------- data/mods/Sleep_Deprivation/game_balance.json | 8 ------ data/mods/Sleep_Deprivation/item_actions.json | 7 ----- data/mods/Sleep_Deprivation/item_groups.json | 27 ------------------- .../Sleep_Deprivation/itemgroups/drugs.json | 8 ------ .../mods/Sleep_Deprivation/items/bionics.json | 11 -------- .../items/comestibles/med.json | 18 ------------- data/mods/Sleep_Deprivation/modinfo.json | 1 + 18 files changed, 65 insertions(+), 115 deletions(-) delete mode 100644 data/mods/Sleep_Deprivation/bionics.json delete mode 100644 data/mods/Sleep_Deprivation/effects.json delete mode 100644 data/mods/Sleep_Deprivation/game_balance.json delete mode 100644 data/mods/Sleep_Deprivation/item_actions.json delete mode 100644 data/mods/Sleep_Deprivation/item_groups.json delete mode 100644 data/mods/Sleep_Deprivation/itemgroups/drugs.json delete mode 100644 data/mods/Sleep_Deprivation/items/bionics.json delete mode 100644 data/mods/Sleep_Deprivation/items/comestibles/med.json diff --git a/data/json/bionics.json b/data/json/bionics.json index 405ff9a667ebb..d5de08d3e99ee 100644 --- a/data/json/bionics.json +++ b/data/json/bionics.json @@ -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", diff --git a/data/json/effects.json b/data/json/effects.json index f2bd4fc08b407..301dc1663216b 100644 --- a/data/json/effects.json +++ b/data/json/effects.json @@ -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", diff --git a/data/json/game_balance.json b/data/json/game_balance.json index df8a8a0226738..7628961159695 100644 --- a/data/json/game_balance.json +++ b/data/json/game_balance.json @@ -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", diff --git a/data/json/item_actions.json b/data/json/item_actions.json index ede621ccbe690..a4afa5e6edc72 100644 --- a/data/json/item_actions.json +++ b/data/json/item_actions.json @@ -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", diff --git a/data/json/itemgroups/bionics.json b/data/json/itemgroups/bionics.json index 4e065cccad334..5c1620b230f50 100644 --- a/data/json/itemgroups/bionics.json +++ b/data/json/itemgroups/bionics.json @@ -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 ], diff --git a/data/json/itemgroups/locations.json b/data/json/itemgroups/locations.json index f687265f18b55..0980f9349585c 100644 --- a/data/json/itemgroups/locations.json +++ b/data/json/itemgroups/locations.json @@ -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 ], diff --git a/data/json/items/bionics.json b/data/json/items/bionics.json index 26e58bd1dc69e..f650fe720f951 100644 --- a/data/json/items/bionics.json +++ b/data/json/items/bionics.json @@ -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", diff --git a/data/json/items/comestibles/med.json b/data/json/items/comestibles/med.json index 55a6593610172..48afb9df99cb4 100644 --- a/data/json/items/comestibles/med.json +++ b/data/json/items/comestibles/med.json @@ -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", diff --git a/data/json/monsterdrops/zombie_lab.json b/data/json/monsterdrops/zombie_lab.json index 46e5ab4e4542d..c970a6c719651 100644 --- a/data/json/monsterdrops/zombie_lab.json +++ b/data/json/monsterdrops/zombie_lab.json @@ -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 ], diff --git a/data/mods/Sleep_Deprivation/bionics.json b/data/mods/Sleep_Deprivation/bionics.json deleted file mode 100644 index 5cea5a3c4c517..0000000000000 --- a/data/mods/Sleep_Deprivation/bionics.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "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, - "time": 100 - } -] diff --git a/data/mods/Sleep_Deprivation/effects.json b/data/mods/Sleep_Deprivation/effects.json deleted file mode 100644 index 727018df54fd9..0000000000000 --- a/data/mods/Sleep_Deprivation/effects.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "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": 1440, - "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" - } -] diff --git a/data/mods/Sleep_Deprivation/game_balance.json b/data/mods/Sleep_Deprivation/game_balance.json deleted file mode 100644 index 594bb55a809b3..0000000000000 --- a/data/mods/Sleep_Deprivation/game_balance.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "type": "EXTERNAL_OPTION", - "name": "SLEEP_DEPRIVATION", - "stype": "bool", - "value": true - } -] diff --git a/data/mods/Sleep_Deprivation/item_actions.json b/data/mods/Sleep_Deprivation/item_actions.json deleted file mode 100644 index 34981463ca9cc..0000000000000 --- a/data/mods/Sleep_Deprivation/item_actions.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "type": "item_action", - "id": "MAGNESIUM_TABLET", - "name": "Take a magnesium tablet" - } -] diff --git a/data/mods/Sleep_Deprivation/item_groups.json b/data/mods/Sleep_Deprivation/item_groups.json deleted file mode 100644 index e1b7bba825253..0000000000000 --- a/data/mods/Sleep_Deprivation/item_groups.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "type": "item_group", - "id": "bionics", - "items": [ [ "bio_synaptic_regen", 10 ] ] - }, - { - "type": "item_group", - "id": "bionics_sci", - "items": [ [ "bio_synaptic_regen", 8 ] ] - }, - { - "type": "item_group", - "id": "bionics_mil", - "items": [ [ "bio_synaptic_regen", 12 ] ] - }, - { - "type": "item_group", - "id": "softdrugs", - "items": [ [ "magnesium_tablet", 75 ] ] - }, - { - "type": "item_group", - "id": "shelter", - "items": [ [ "magnesium_tablet", 75 ] ] - } -] diff --git a/data/mods/Sleep_Deprivation/itemgroups/drugs.json b/data/mods/Sleep_Deprivation/itemgroups/drugs.json deleted file mode 100644 index 14a5db899f6a2..0000000000000 --- a/data/mods/Sleep_Deprivation/itemgroups/drugs.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "id": "drugs_rare", - "type": "item_group", - "//": "Rare and/or valuable drugs excluding painkillers", - "items": [ [ "magnesium_tablet", 100 ] ] - } -] diff --git a/data/mods/Sleep_Deprivation/items/bionics.json b/data/mods/Sleep_Deprivation/items/bionics.json deleted file mode 100644 index f1e44329e3ae3..0000000000000 --- a/data/mods/Sleep_Deprivation/items/bionics.json +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "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 - } -] diff --git a/data/mods/Sleep_Deprivation/items/comestibles/med.json b/data/mods/Sleep_Deprivation/items/comestibles/med.json deleted file mode 100644 index b46ca75e7ea59..0000000000000 --- a/data/mods/Sleep_Deprivation/items/comestibles/med.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "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, - "charges": 1, - "stack_size": 30, - "symbol": "!", - "color": "yellow", - "use_action": "MAGNESIUM_TABLET" - } -] diff --git a/data/mods/Sleep_Deprivation/modinfo.json b/data/mods/Sleep_Deprivation/modinfo.json index e484c731eec3d..8b93a9054215c 100644 --- a/data/mods/Sleep_Deprivation/modinfo.json +++ b/data/mods/Sleep_Deprivation/modinfo.json @@ -7,6 +7,7 @@ "maintainers": [ "Kevin Giovinazzo" ], "description": "Enables sleep deprivation mechanics independently of a player's fatigue.", "category": "rebalance", + "obsolete": true, "dependencies": [ "dda" ] } ]