Skip to content

Commit

Permalink
Unhardcode climate control
Browse files Browse the repository at this point in the history
  • Loading branch information
actually-a-cat committed Sep 21, 2022
1 parent ad37eb7 commit 0d7e5a5
Show file tree
Hide file tree
Showing 25 changed files with 147 additions and 110 deletions.
2 changes: 1 addition & 1 deletion data/json/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@
"react_cost": "100 J",
"time": "1 s",
"flags": [ "BIONIC_TOGGLED" ],
"active_flags": [ "CLIMATE_CONTROL" ]
"enchantments": [ { "condition": "ACTIVE", "values": [ { "value": "CLIMATE_CONTROL", "add": 50 } ] } ]
},
{
"id": "bio_cloak",
Expand Down
2 changes: 1 addition & 1 deletion data/json/enchantments.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"type": "enchantment",
"id": "RM13",
"condition": "ACTIVE",
"values": [ { "value": "FOOTSTEP_NOISE", "multiply": -0.67 } ]
"values": [ { "value": "FOOTSTEP_NOISE", "multiply": -0.67 }, { "value": "CLIMATE_CONTROL", "add": 50 } ]
},
{
"type": "enchantment",
Expand Down
9 changes: 7 additions & 2 deletions data/json/items/armor/bespoke_armor/custom_bodysuits.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@
"warmth": 10,
"material_thickness": 4,
"valid_mods": [ "steel_padded" ],
"relic_data": { "passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "mutations": [ "well_distributed" ] } ] },
"relic_data": {
"passive_effects": [
{ "has": "WORN", "condition": "ALWAYS", "mutations": [ "well_distributed" ] },
{ "has": "WORN", "condition": "ACTIVE", "values": [ { "value": "CLIMATE_CONTROL", "add": 50 } ] }
]
},
"environmental_protection": 1,
"flags": [ "VARSIZE", "POCKETS", "STURDY", "USES_BIONIC_POWER", "MUNDANE" ]
},
Expand All @@ -117,7 +122,7 @@
"name": { "str": "advanced nomad jumpsuit (on)", "str_pl": "advanced nomad jumpsuits (on)" },
"description": "A reinforced but airy jumpsuit designed to survive the long-term wear and tear of exploring the apocalyptic wasteland. Its clever construction adds additional core support, helping you to carry more equipment. The internal cooling tubes are active and humming.",
"revert_to": "armor_nomad_advanced",
"flags": [ "VARSIZE", "POCKETS", "STURDY", "USES_BIONIC_POWER", "CLIMATE_CONTROL", "MUNDANE" ],
"flags": [ "VARSIZE", "POCKETS", "STURDY", "USES_BIONIC_POWER", "MUNDANE" ],
"power_draw": "100 J",
"use_action": {
"ammo_scale": 0,
Expand Down
15 changes: 12 additions & 3 deletions data/json/items/armor/power_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@
"symbol": "[",
"looks_like": "depowered_armor",
"color": "light_gray",
"relic_data": {
"passive_effects": [ { "has": "WORN", "condition": "ACTIVE", "values": [ { "value": "CLIMATE_CONTROL", "add": 50 } ] } ]
},
"pocket_data": [
{
"pocket_type": "CONTAINER",
Expand Down Expand Up @@ -234,7 +237,7 @@
"type": "TOOL_ARMOR",
"name": { "str": "combat exoskeleton (on)", "str_pl": "combat exoskeletons (on)" },
"description": "These were the second wave of military combat exoskeleton, and got a lot of media attention, with popular Navy commercials featuring them heavily. It consists of a muscle-boosting exoskeleton frame with overlaid segmented alloy plating. Despite advancements over the original bulky 'tank suits', the wearer still cannot easily fit through narrow spaces, or sit down comfortably (and it ruins upholstery). There is an integrated chemical-resistant bodyglove that precludes wearing other clothing. It is turned on and continually drawing power. Use it to turn it off.",
"flags": [ "USE_UPS", "WATERPROOF", "STURDY", "ELECTRIC_IMMUNE", "TRADER_AVOID", "CLIMATE_CONTROL", "COMBAT_TOGGLEABLE" ],
"flags": [ "USE_UPS", "WATERPROOF", "STURDY", "ELECTRIC_IMMUNE", "TRADER_AVOID", "COMBAT_TOGGLEABLE" ],
"power_draw": "4 kJ",
"revert_to": "power_armor_basic",
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "The %s armor disengages.", "target": "power_armor_basic" },
Expand Down Expand Up @@ -327,6 +330,9 @@
"symbol": "[",
"looks_like": "power_armor_basic",
"color": "dark_gray",
"relic_data": {
"passive_effects": [ { "has": "WORN", "condition": "ACTIVE", "values": [ { "value": "CLIMATE_CONTROL", "add": 50 } ] } ]
},
"pocket_data": [
{
"pocket_type": "CONTAINER",
Expand Down Expand Up @@ -422,7 +428,7 @@
"type": "TOOL_ARMOR",
"name": { "str": "heavy combat exoskeleton (on)", "str_pl": "heavy combat exoskeletons (on)" },
"description": "Colloquially known as a 'tank suit' in the media, these bulky exoskeletons, covered in thick segmented armor plates, were tested in military service a few years back and determined to be too heavy and expensive for regular use. Now that it's in your hands, though, you have a massive suit of power armor capable of resisting almost any small arms fire and most other forms of attack. On the other hand, it doubles your effective weight, and it's almost impossible not to bump into things. There is an integrated chemical-resistant bodyglove that precludes wearing other clothing. It is turned on and continually drawing power. Use it to turn it off.",
"flags": [ "USE_UPS", "WATERPROOF", "STURDY", "ELECTRIC_IMMUNE", "TRADER_AVOID", "CLIMATE_CONTROL", "COMBAT_TOGGLEABLE" ],
"flags": [ "USE_UPS", "WATERPROOF", "STURDY", "ELECTRIC_IMMUNE", "TRADER_AVOID", "COMBAT_TOGGLEABLE" ],
"power_draw": "4 kJ",
"revert_to": "power_armor_heavy",
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "The %s armor disengages.", "target": "power_armor_heavy" },
Expand Down Expand Up @@ -587,6 +593,9 @@
"symbol": "[",
"looks_like": "depowered_armor",
"color": "dark_gray",
"relic_data": {
"passive_effects": [ { "has": "WORN", "condition": "ACTIVE", "values": [ { "value": "CLIMATE_CONTROL", "add": 50 } ] } ]
},
"pocket_data": [
{
"pocket_type": "CONTAINER",
Expand Down Expand Up @@ -682,7 +691,7 @@
"type": "TOOL_ARMOR",
"name": { "str": "field combat exoskeleton (on)", "str_pl": "field combat exoskeletons (on)" },
"description": "The final iteration of military power armor before the fall of civilization, this type - a powered exoskeleton with high-tech segmented plating - was designed for actual widespread combat use and was seen on the front lines during the last days of the Cataclysm. Like the heavier suits, it is resistant to most modern weaponry, but it is light and maneuverable, and can fit into normal vehicles and doorways without fuss, a huge advantage over predecessors. Unfortunately, the world ended before it could roll out in significant numbers. There is an integrated chemical-resistant bodyglove that precludes wearing other clothing. It is turned on and continually drawing power. Use it to turn it off.",
"flags": [ "USE_UPS", "WATERPROOF", "STURDY", "ELECTRIC_IMMUNE", "TRADER_AVOID", "CLIMATE_CONTROL", "COMBAT_TOGGLEABLE" ],
"flags": [ "USE_UPS", "WATERPROOF", "STURDY", "ELECTRIC_IMMUNE", "TRADER_AVOID", "COMBAT_TOGGLEABLE" ],
"power_draw": "4 kJ",
"revert_to": "power_armor_light",
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "The %s armor disengages.", "target": "power_armor_light" },
Expand Down
24 changes: 18 additions & 6 deletions data/json/items/armor/suits_protection.json
Original file line number Diff line number Diff line change
Expand Up @@ -3042,7 +3042,12 @@
}
],
"extend": { "flags": [ "NORMAL", "MUNDANE", "USES_BIONIC_POWER" ] },
"relic_data": { "passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "mutations": [ "well_distributed" ] } ] },
"relic_data": {
"passive_effects": [
{ "has": "WORN", "condition": "ALWAYS", "mutations": [ "well_distributed" ] },
{ "has": "WORN", "condition": "ACTIVE", "values": [ { "value": "CLIMATE_CONTROL", "add": 50 } ] }
]
},
"use_action": {
"type": "transform",
"msg": "You turn the climate control on.",
Expand All @@ -3059,7 +3064,6 @@
"type": "TOOL_ARMOR",
"name": { "str": "nomad plate armor (on)", "str_pl": "nomad plate armors (on)" },
"revert_to": "armor_nomad_plate",
"extend": { "flags": [ "CLIMATE_CONTROL" ] },
"power_draw": "100 J",
"use_action": {
"ammo_scale": 0,
Expand Down Expand Up @@ -3110,7 +3114,12 @@
}
],
"extend": { "flags": [ "NORMAL", "MUNDANE", "USES_BIONIC_POWER" ] },
"relic_data": { "passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "mutations": [ "well_distributed" ] } ] },
"relic_data": {
"passive_effects": [
{ "has": "WORN", "condition": "ALWAYS", "mutations": [ "well_distributed" ] },
{ "has": "WORN", "condition": "ACTIVE", "values": [ { "value": "CLIMATE_CONTROL", "add": 50 } ] }
]
},
"use_action": {
"type": "transform",
"msg": "You turn the climate control on.",
Expand All @@ -3127,7 +3136,6 @@
"type": "TOOL_ARMOR",
"name": { "str": "nomad light plate armor (on)", "str_pl": "nomad light plate armors (on)" },
"revert_to": "armor_nomad_lightplate",
"extend": { "flags": [ "CLIMATE_CONTROL" ] },
"power_draw": "100 J",
"use_action": {
"ammo_scale": 0,
Expand Down Expand Up @@ -3178,7 +3186,12 @@
}
],
"extend": { "flags": [ "NORMAL", "MUNDANE", "USES_BIONIC_POWER" ] },
"relic_data": { "passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "mutations": [ "well_distributed" ] } ] },
"relic_data": {
"passive_effects": [
{ "has": "WORN", "condition": "ALWAYS", "mutations": [ "well_distributed" ] },
{ "has": "WORN", "condition": "ACTIVE", "values": [ { "value": "CLIMATE_CONTROL", "add": 50 } ] }
]
},
"use_action": {
"type": "transform",
"msg": "You turn the climate control on.",
Expand All @@ -3195,7 +3208,6 @@
"type": "TOOL_ARMOR",
"name": { "str": "nomad heavy plate armor (on)", "str_pl": "nomad heavy plate armors (on)" },
"revert_to": "armor_nomad_heavyplate",
"extend": { "flags": [ "CLIMATE_CONTROL" ] },
"power_draw": "100 J",
"use_action": {
"ammo_scale": 0,
Expand Down
5 changes: 3 additions & 2 deletions data/json/items/tool_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,6 @@
"ELECTRIC_IMMUNE",
"THERMOMETER",
"TRADER_AVOID",
"CLIMATE_CONTROL",
"NO_REPAIR",
"NANOFAB_REPAIR",
"PADDED",
Expand Down Expand Up @@ -1437,6 +1436,9 @@
"NANOFAB_REPAIR",
"PADDED"
],
"relic_data": {
"passive_effects": [ { "has": "WORN", "condition": "ACTIVE", "values": [ { "value": "CLIMATE_CONTROL", "add": 50 } ] } ]
},
"armor": [
{
"material": [ { "type": "lvl4ballisticglass", "covered_by_mat": 100, "thickness": 1.0 } ],
Expand Down Expand Up @@ -1533,7 +1535,6 @@
"TRADER_AVOID",
"PSYSHIELD_PARTIAL",
"GNV_EFFECT",
"CLIMATE_CONTROL",
"NO_REPAIR",
"NANOFAB_REPAIR",
"PADDED"
Expand Down
11 changes: 9 additions & 2 deletions data/mods/Aftershock/items/armor/exosuit/exosuit_frame.json
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,15 @@
],
"ammo": "battery",
"flags": [ "USE_UPS", "STURDY", "WATERPROOF", "ELECTRIC_IMMUNE", "COMBAT_TOGGLEABLE", "OUTER", "MUNDANE", "DEAF" ],
"relic_data": { "passive_effects": [ { "has": "WORN", "condition": "ACTIVE", "values": [ { "value": "STRENGTH", "add": 10 } ] } ] },
"relic_data": {
"passive_effects": [
{
"has": "WORN",
"condition": "ACTIVE",
"values": [ { "value": "STRENGTH", "add": 10 }, { "value": "CLIMATE_CONTROL", "add": 50 } ]
}
]
},
"use_action": [
{
"target": "modular_exosuit_on",
Expand Down Expand Up @@ -333,7 +341,6 @@
"ELECTRIC_IMMUNE",
"COMBAT_TOGGLEABLE",
"OUTER",
"CLIMATE_CONTROL",
"PARTIAL_DEAF",
"SUN_GLASSES",
"FLASH_PROTECTION"
Expand Down
34 changes: 24 additions & 10 deletions data/mods/Aftershock/items/armor/exosuit/exosuit_underlayers.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@
}
],
"warmth": 10,
"flags": [ "EXO_UNDERLAYER", "CANT_WEAR", "SKINTIGHT", "WATERPROOF", "POWERARMOR_COMPATIBLE", "SOFT", "CLIMATE_CONTROL" ],
"flags": [ "EXO_UNDERLAYER", "CANT_WEAR", "SKINTIGHT", "WATERPROOF", "POWERARMOR_COMPATIBLE", "SOFT" ],
"relic_data": {
"passive_effects": [
{
"has": "WORN",
"condition": "ALWAYS",
"values": [ { "value": "ITEM_ENCUMBRANCE", "add": -10 }, { "value": "ARMOR_COLD", "multiply": -0.25 } ]
"values": [
{ "value": "ITEM_ENCUMBRANCE", "add": -10 },
{ "value": "ARMOR_COLD", "multiply": -0.25 },
{ "value": "CLIMATE_CONTROL", "add": 50 }
]
}
]
}
Expand Down Expand Up @@ -76,13 +80,17 @@
}
],
"warmth": 10,
"flags": [ "EXO_UNDERLAYER", "CANT_WEAR", "SKINTIGHT", "WATERPROOF", "POWERARMOR_COMPATIBLE", "SOFT", "CLIMATE_CONTROL" ],
"flags": [ "EXO_UNDERLAYER", "CANT_WEAR", "SKINTIGHT", "WATERPROOF", "POWERARMOR_COMPATIBLE", "SOFT" ],
"relic_data": {
"passive_effects": [
{
"has": "WORN",
"condition": "ALWAYS",
"values": [ { "value": "ITEM_ENCUMBRANCE", "add": -10 }, { "value": "ARMOR_COLD", "multiply": -0.25 } ]
"values": [
{ "value": "ITEM_ENCUMBRANCE", "add": -10 },
{ "value": "ARMOR_COLD", "multiply": -0.25 },
{ "value": "CLIMATE_CONTROL", "add": 50 }
]
}
]
}
Expand Down Expand Up @@ -125,15 +133,18 @@
"SOFT",
"GAS_PROOF",
"RAD_RESIST",
"RAINPROOF",
"CLIMATE_CONTROL"
"RAINPROOF"
],
"relic_data": {
"passive_effects": [
{
"has": "WORN",
"condition": "ALWAYS",
"values": [ { "value": "ITEM_ENCUMBRANCE", "add": -10 }, { "value": "ARMOR_COLD", "multiply": -0.25 } ]
"values": [
{ "value": "ITEM_ENCUMBRANCE", "add": -10 },
{ "value": "ARMOR_COLD", "multiply": -0.25 },
{ "value": "CLIMATE_CONTROL", "add": 50 }
]
}
]
}
Expand Down Expand Up @@ -184,15 +195,18 @@
"SOFT",
"GAS_PROOF",
"RAD_RESIST",
"RAINPROOF",
"CLIMATE_CONTROL"
"RAINPROOF"
],
"relic_data": {
"passive_effects": [
{
"has": "WORN",
"condition": "ALWAYS",
"values": [ { "value": "ITEM_ENCUMBRANCE", "add": -10 }, { "value": "ARMOR_COLD", "multiply": -0.25 } ]
"values": [
{ "value": "ITEM_ENCUMBRANCE", "add": -10 },
{ "value": "ARMOR_COLD", "multiply": -0.25 },
{ "value": "CLIMATE_CONTROL", "add": 50 }
]
}
]
}
Expand Down
13 changes: 8 additions & 5 deletions data/mods/Aftershock/items/armor/winter_masks.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
{ "covers": [ "eyes" ], "rigid_layer_only": true, "coverage": 100, "encumbrance": 5 },
{ "covers": [ "mouth" ], "rigid_layer_only": true, "coverage": 100, "encumbrance": 15 }
],
"relic_data": {
"passive_effects": [ { "has": "WORN", "condition": "ACTIVE", "values": [ { "value": "CLIMATE_CONTROL", "add": 50 } ] } ]
},
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 1000 } } ],
"warmth": 10,
"material_thickness": 6,
Expand Down Expand Up @@ -60,9 +63,7 @@
"warmth": 150,
"revert_to": "afs_magellan_suit_helmet",
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Your %s deactivates.", "target": "afs_magellan_suit_helmet" },
"extend": {
"flags": [ "CLIMATE_CONTROL", "GAS_PROOF", "WATCH", "ALARMCLOCK", "THERMOMETER", "HYGROMETER", "PARTIAL_DEAF", "TRADER_AVOID" ]
},
"extend": { "flags": [ "GAS_PROOF", "WATCH", "ALARMCLOCK", "THERMOMETER", "HYGROMETER", "PARTIAL_DEAF", "TRADER_AVOID" ] },
"environmental_protection": 15
},
{
Expand Down Expand Up @@ -95,6 +96,9 @@
{ "covers": [ "eyes" ], "rigid_layer_only": true, "coverage": 100, "encumbrance": 15 },
{ "covers": [ "mouth" ], "rigid_layer_only": true, "coverage": 100, "encumbrance": 20 }
],
"relic_data": {
"passive_effects": [ { "has": "WORN", "condition": "ACTIVE", "values": [ { "value": "CLIMATE_CONTROL", "add": 50 } ] } ]
},
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
Expand All @@ -119,7 +123,6 @@
"power_draw": "6944 mJ",
"warmth": 150,
"revert_to": "afs_frontier_cryomask",
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Your %s deactivates.", "target": "afs_frontier_cryomask" },
"extend": { "flags": [ "CLIMATE_CONTROL" ] }
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Your %s deactivates.", "target": "afs_frontier_cryomask" }
}
]
12 changes: 8 additions & 4 deletions data/mods/Aftershock/items/armor/winter_suits.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
{ "covers": [ "hand_l", "hand_r" ], "coverage": 100, "encumbrance": 10 },
{ "covers": [ "foot_l", "foot_r" ], "coverage": 100, "encumbrance": 15 }
],
"relic_data": {
"passive_effects": [ { "has": "WORN", "condition": "ACTIVE", "values": [ { "value": "CLIMATE_CONTROL", "add": 50 } ] } ]
},
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 1000 } } ],
"warmth": 20,
"material_thickness": 2,
Expand Down Expand Up @@ -59,8 +62,7 @@
"power_draw": "8170 mJ",
"warmth": 150,
"revert_to": "afs_magellan_suit",
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Your %s deactivates.", "target": "afs_magellan_suit" },
"extend": { "flags": [ "CLIMATE_CONTROL" ] }
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Your %s deactivates.", "target": "afs_magellan_suit" }
},
{
"id": "afs_frontier_cryo",
Expand Down Expand Up @@ -93,6 +95,9 @@
{ "covers": [ "hand_l", "hand_r" ], "coverage": 100, "encumbrance": 25 },
{ "covers": [ "foot_l", "foot_r" ], "coverage": 100, "encumbrance": 15 }
],
"relic_data": {
"passive_effects": [ { "has": "WORN", "condition": "ACTIVE", "values": [ { "value": "CLIMATE_CONTROL", "add": 50 } ] } ]
},
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
Expand All @@ -118,7 +123,6 @@
"power_draw": "6944 mJ",
"warmth": 150,
"revert_to": "afs_frontier_cryo",
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Your %s deactivates.", "target": "afs_frontier_cryo" },
"extend": { "flags": [ "CLIMATE_CONTROL" ] }
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Your %s deactivates.", "target": "afs_frontier_cryo" }
}
]
Loading

0 comments on commit 0d7e5a5

Please sign in to comment.