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

Item power_draw in units::power #62363

Merged
merged 8 commits into from
Dec 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion data/json/items/armor/bespoke_armor/custom_bodysuits.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"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", "MUNDANE" ],
"power_draw": "100 J",
"power_draw": "100 W",
"use_action": {
"ammo_scale": 0,
"type": "transform",
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/armor/bespoke_armor/custom_storage.json
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@
"copy-from": "nomad_rig",
"type": "TOOL_ARMOR",
"name": { "str": "nomad harness (on)", "str_pl": "nomad harnesses (on)" },
"power_draw": "15 J",
"power_draw": "15 W",
"revert_to": "nomad_rig",
"use_action": {
"ammo_scale": 0,
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/armor/cloaks.json
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
"name": { "str": "FB51 optical cloak (on)", "str_pl": "FB51 optical cloaks (on)" },
"description": "A plastic cloak embedded with cameras and LEDs that will render you fully invisible to normal vision when powered and worn. It is turned on, and continually draining power from a UPS. Use it to turn it off.",
"flags": [ "USE_UPS", "OVERSIZE", "HOOD", "WATERPROOF", "OUTER", "VARSIZE", "ACTIVE_CLOAKING", "TRADER_AVOID", "SOFT" ],
"power_draw": "20 kJ",
"power_draw": "20 kW",
"revert_to": "optical_cloak",
"use_action": {
"ammo_scale": 0,
Expand Down
12 changes: 6 additions & 6 deletions data/json/items/armor/power_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
"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", "COMBAT_TOGGLEABLE" ],
"power_draw": "4 kJ",
"power_draw": "4 kW",
"revert_to": "power_armor_basic",
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "The %s armor disengages.", "target": "power_armor_basic" },
"armor": [
Expand Down Expand Up @@ -441,7 +441,7 @@
"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", "COMBAT_TOGGLEABLE" ],
"power_draw": "4 kJ",
"power_draw": "4 kW",
"revert_to": "power_armor_heavy",
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "The %s armor disengages.", "target": "power_armor_heavy" },
"armor": [
Expand Down Expand Up @@ -492,7 +492,7 @@
"looks_like": "power_armor_helmet_basic",
"name": { "str": "environmental combat helmet (on)", "str_pl": "environmental combat helmets (on)" },
"description": "A fully enclosed combat helmet for hazardous environments, this was designed to fit with a powered exoskeleton, using cameras to expand visual range. In practice, the cameras were unreliable and easily fouled. The environmental controls function best with direct-skin contact. The environmental controls function best with direct-skin contact. It is turned on and continually drawing power. Use it to turn it off.",
"power_draw": "435 mJ",
"power_draw": "435 mW",
"revert_to": "power_armor_helmet_basic",
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "The %s disengages.", "target": "power_armor_helmet_basic" },
"extend": { "flags": [ "USE_UPS" ] },
Expand Down Expand Up @@ -538,7 +538,7 @@
"looks_like": "power_armor_helmet_heavy",
"name": { "str": "heavy environmental combat helmet (on)", "str_pl": "heavy environmental combat helmets (on)" },
"description": "An extremely heavy-duty fully enclosed combat helmet for hazardous environments, this was designed to fit with a powered exoskeleton. In the field, soldiers reported that the protection was not worth the awkward size and limited visuals. The environmental controls function best with direct-skin contact. It is turned on and continually drawing power. Use it to turn it off.",
"power_draw": "435 mJ",
"power_draw": "435 mW",
"revert_to": "power_armor_helmet_heavy",
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "The %s disengages.", "target": "power_armor_helmet_heavy" },
"extend": { "flags": [ "USE_UPS" ] },
Expand Down Expand Up @@ -583,7 +583,7 @@
"looks_like": "power_armor_helmet_light",
"name": { "str": "light environmental combat helmet (on)", "str_pl": "light environmental combat helmets (on)" },
"description": "This full-enclosure helmet was designed based on commercial diving equipment, in response to complaints that earlier designs were impossible to use in combat. While still a little more restrictive than regular combat headgear - and frustrating should your nose itch - this one received far better reviews from soldiers. Sadly, civilization ended before they could roll out in significant numbers. The environmental controls function best with direct-skin contact. It is turned on and continually drawing power. Use it to turn it off.",
"power_draw": "435 mJ",
"power_draw": "435 mW",
"revert_to": "power_armor_helmet_light",
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "The %s disengages.", "target": "power_armor_helmet_light" },
"extend": { "flags": [ "USE_UPS" ] },
Expand Down Expand Up @@ -710,7 +710,7 @@
"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", "COMBAT_TOGGLEABLE" ],
"power_draw": "4 kJ",
"power_draw": "4 kW",
"revert_to": "power_armor_light",
"use_action": { "type": "transform", "menu_text": "Turn off", "msg": "The %s armor disengages.", "target": "power_armor_light" },
"armor": [
Expand Down
4 changes: 2 additions & 2 deletions data/json/items/armor/robofac_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
"description": "Heavy duty hooded headwear for the true frontier explorer. The visor has been lowered over the eyes, and is drawing low power to provide light amplification by way of an infrared illuminator and detector. Activate to switch to full IR scanning.",
"copy-from": "robofac_head_rig",
"extend": { "flags": [ "GNV_EFFECT" ] },
"power_draw": "375 mJ",
"power_draw": "375 mW",
"revert_to": "robofac_head_rig",
"use_action": [
{
Expand Down Expand Up @@ -342,7 +342,7 @@
"description": "Heavy duty hooded headwear for the true frontier explorer. The visor has been lowered over the eyes, and is drawing moderate power to provide full infra-red scanning, allowing you to see warm blooded creatures in the dark. Activate to turn the visor off again.",
"copy-from": "robofac_head_rig",
"extend": { "flags": [ "IR_EFFECT" ] },
"power_draw": "1 J",
"power_draw": "1 W",
"revert_to": "robofac_head_rig",
"use_action": [
{
Expand Down
6 changes: 3 additions & 3 deletions data/json/items/armor/suits_protection.json
Original file line number Diff line number Diff line change
Expand Up @@ -3094,7 +3094,7 @@
"type": "TOOL_ARMOR",
"name": { "str": "nomad plate armor (on)", "str_pl": "nomad plate armors (on)" },
"revert_to": "armor_nomad_plate",
"power_draw": "100 J",
"power_draw": "100 W",
"use_action": {
"ammo_scale": 0,
"type": "transform",
Expand Down Expand Up @@ -3170,7 +3170,7 @@
"type": "TOOL_ARMOR",
"name": { "str": "nomad light plate armor (on)", "str_pl": "nomad light plate armors (on)" },
"revert_to": "armor_nomad_lightplate",
"power_draw": "100 J",
"power_draw": "100 W",
"use_action": {
"ammo_scale": 0,
"type": "transform",
Expand Down Expand Up @@ -3246,7 +3246,7 @@
"type": "TOOL_ARMOR",
"name": { "str": "nomad heavy plate armor (on)", "str_pl": "nomad heavy plate armors (on)" },
"revert_to": "armor_nomad_heavyplate",
"power_draw": "100 J",
"power_draw": "100 W",
"use_action": {
"ammo_scale": 0,
"type": "transform",
Expand Down
8 changes: 4 additions & 4 deletions data/json/items/melee/bludgeons.json
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
"type": "TOOL",
"name": { "str": "cheap wizard cane (on)", "str_pl": "cheap wizard canes (on)" },
"color": "blue",
"power_draw": "1 J",
"power_draw": "1 W",
"revert_to": "wizard_cane_cheap",
"use_action": {
"menu_text": "Turn off",
Expand Down Expand Up @@ -446,7 +446,7 @@
"type": "TOOL",
"name": { "str": "wizard cane (on)", "str_pl": "wizard canes (on)" },
"color": "blue",
"power_draw": "10 J",
"power_draw": "10 W",
"revert_to": "wizard_cane",
"use_action": {
"menu_text": "Turn off",
Expand Down Expand Up @@ -817,7 +817,7 @@
"description": "Produced by the Light corporation, this stylish staff functions not just as a light source, but also a lightweight weapon thanks to its superalloy construction. Due to proprietary efficiency improvements over standard light sources, batteries last longer in the L-stick. The staff is glowing brightly, which is slowly draining the batteries.",
"material": [ "superalloy", "steel" ],
"revert_to": "l-stick",
"power_draw": "5 J",
"power_draw": "5 W",
"use_action": {
"ammo_scale": 0,
"target": "l-stick",
Expand Down Expand Up @@ -1420,7 +1420,7 @@
"type": "TOOL",
"name": { "str": "tactical tonfa (on)", "str_pl": "tactical tonfas (on)" },
"description": "A reinforced plastic tonfa; the core is filled with capacitors and a high-yield rechargeable storage battery. When a switch on the handle is pressed, a high-voltage current is transmitted to the two electrodes mounted in the end of the weapon, and by extension to anyone unfortunate enough to be in contact with them. The integral flashlight is turned on, continually draining power and lighting the surrounding area.",
"power_draw": "15 J",
"power_draw": "15 W",
"to_hit": { "grip": "weapon", "length": "short", "surface": "every", "balance": "good" },
"revert_to": "shocktonfa_off",
"use_action": [ "SHOCKTONFA_ON" ],
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/melee/swords_and_blades.json
Original file line number Diff line number Diff line change
Expand Up @@ -3322,7 +3322,7 @@
"description": "This electric combat chainsaw is on, and is continuously draining power. Use it to turn it off.",
"cutting": 50,
"to_hit": { "grip": "weapon", "length": "short", "surface": "every", "balance": "neutral" },
"power_draw": "2 kJ",
"power_draw": "2 kW",
"charges_per_use": 0,
"revert_to": "e_combatsaw_off",
"qualities": [ [ "AXE", 3 ] ],
Expand Down
4 changes: 2 additions & 2 deletions data/json/items/tool/cooking.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"description": "This carver is on and the blades are buzzing. Use it to turn it off.",
"cutting": 30,
"to_hit": 1,
"power_draw": "150 J",
"power_draw": "150 W",
"charges_per_use": 0,
"revert_to": "carver_off",
"qualities": [ [ "CUT", 2 ], [ "BUTCHER", 25 ] ],
Expand Down Expand Up @@ -674,7 +674,7 @@
"color": "red",
"ammo": [ "battery" ],
"flags": [ "WATER_BREAK", "ELECTRONIC" ],
"power_draw": "100 J",
"power_draw": "100 W",
"qualities": [ [ "CONTAIN", 1 ] ],
"use_action": [ "MULTICOOKER" ],
"pocket_data": [
Expand Down
20 changes: 10 additions & 10 deletions data/json/items/tool/electronics.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"copy-from": "cell_phone",
"type": "TOOL",
"name": { "str": "cellphone - Flashlight", "str_pl": "cellphones - Flashlight" },
"power_draw": "500 mJ",
"power_draw": "500 mW",
"revert_to": "cell_phone",
"use_action": {
"ammo_scale": 0,
Expand Down Expand Up @@ -188,7 +188,7 @@
"id": "eink_tablet_pc_on",
"copy-from": "eink_tablet_pc",
"name": { "str": "e-ink tablet PC (on)", "str_pl": "e-ink tablet PCs (on)" },
"power_draw": "2 J",
"power_draw": "2 W",
"revert_to": "eink_tablet_pc",
"use_action": [
"EINKTABLETPC",
Expand Down Expand Up @@ -265,7 +265,7 @@
"type": "TOOL",
"name": { "str": "geiger counter (on)", "str_pl": "geiger counters (on)" },
"description": "This is a tool for measuring radiation. It is in continuous scan mode, and will produce quiet clicking sounds in the presence of ambient radiation. Using it allows you to turn it off, or scan yourself or the ground. It is currently on.",
"power_draw": "200 mJ",
"power_draw": "200 mW",
"revert_to": "geiger_off",
"use_action": [ "GEIGER" ],
"flags": [ "TRADER_AVOID", "WATER_BREAK" ]
Expand Down Expand Up @@ -379,7 +379,7 @@
"copy-from": "laptop",
"type": "TOOL",
"name": { "str": "laptop computer - lit screen", "str_pl": "laptop computers - lit screen" },
"power_draw": "1 J",
"power_draw": "1 W",
"revert_to": "laptop",
"use_action": [
"EINKTABLETPC",
Expand Down Expand Up @@ -428,7 +428,7 @@
"type": "TOOL",
"name": { "str": "mp3 player (on)", "str_pl": "mp3 players (on)" },
"description": "This mp3 player is turned on and playing some great tunes, raising your morale steadily while on your person. It runs through batteries quickly; you can turn it off by using it. It also obscures your hearing.",
"power_draw": "1 J",
"power_draw": "1 W",
"revert_to": "mp3",
"use_action": [ "MP3_ON" ],
"flags": [ "TRADER_AVOID", "WATER_BREAK", "ELECTRONIC" ]
Expand Down Expand Up @@ -466,7 +466,7 @@
"type": "TOOL",
"name": { "str": "noise emitter (on)", "str_pl": "noise emitters (on)" },
"description": "This device has been turned on and is emitting horrible crackles, pops and other static sounds. Quick, get away from it before it draws zombies to you!",
"power_draw": "10 J",
"power_draw": "10 W",
"revert_to": "noise_emitter",
"use_action": [ "NOISE_EMITTER_ON" ],
"flags": [ "RADIO_MODABLE", "RADIO_INVOKE_PROC", "TRADER_AVOID", "WATER_BREAK" ]
Expand Down Expand Up @@ -506,7 +506,7 @@
"name": { "str": "EMF detector (on)", "str_pl": "EMF detectors (on)" },
"description": "This device detects and reads out different wave lengths. It currently is humming and beeps with proximity. It is sensitive enough you could use it to get a sense of direction.",
"//": "lasts 12 hours with backlight off",
"power_draw": "6 J",
"power_draw": "6 W",
"revert_to": "emf_detector",
"use_action": [ "EMF_PASSIVE_ON" ],
"flags": [ "TRADER_AVOID", "WATER_BREAK", "ELECTRONIC" ]
Expand Down Expand Up @@ -588,7 +588,7 @@
"type": "TOOL",
"name": { "str": "smartphone - music", "str_pl": "smartphones - music" },
"description": "This phone is playing music, steadily raising your morale. You can't hear anything else while you're listening.",
"power_draw": "300 mJ",
"power_draw": "300 mW",
"revert_to": "smart_phone",
"use_action": [ "MP3_ON", "PORTABLE_GAME", "EINKTABLETPC", "EBOOKSAVE", "EBOOKREAD" ],
"extend": { "flags": [ "TRADER_AVOID" ] }
Expand All @@ -598,7 +598,7 @@
"copy-from": "smart_phone",
"type": "TOOL",
"name": { "str": "smartphone - Flashlight", "str_pl": "smartphones - Flashlight" },
"power_draw": "1500 mJ",
"power_draw": "1500 mW",
"revert_to": "smart_phone",
"use_action": [
"PORTABLE_GAME",
Expand Down Expand Up @@ -722,7 +722,7 @@
"type": "TOOL",
"name": { "str": "gas-powered UPS (on)", "str_pl": "gas-powered UPSes (on)" },
"description": "This is a compact thermoelectric generator. When connected to a fuel tank, it will slowly charge UPS-compatible devices.",
"power_draw": "60 mJ",
"power_draw": "60 mW",
"revert_to": "gas_charger",
"use_action": {
"ammo_scale": 0,
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/tool/landscaping.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@
"name": { "str": "hedge trimmer (on)", "str_pl": "hedge trimmers (on)" },
"description": "A cordless, double-sided, gasoline-powered hedge trimmer. It is currently on, ready to do some zombie topiary; use this item to turn it off.",
"cutting": 40,
"power_draw": "500 J",
"power_draw": "500 W",
"charges_per_use": 0,
"revert_to": "trimmer_off",
"use_action": [ "TRIMMER_ON" ],
Expand Down
14 changes: 7 additions & 7 deletions data/json/items/tool/lighting.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
"copy-from": "electric_lantern",
"type": "TOOL",
"name": { "str": "electric lantern (on)", "str_pl": "electric lanterns (on)" },
"power_draw": "1 J",
"power_draw": "1 W",
"revert_to": "electric_lantern",
"use_action": { "menu_text": "Turn off", "type": "transform", "target": "electric_lantern", "msg": "You turn the lamp off." },
"flags": [ "RADIO_MODABLE", "RADIO_INVOKE_PROC", "LIGHT_15", "TRADER_AVOID", "ALLOWS_REMOTE_USE" ]
Expand Down Expand Up @@ -214,7 +214,7 @@
"copy-from": "flashlight",
"type": "TOOL",
"name": { "str": "flashlight (on)", "str_pl": "flashlights (on)" },
"power_draw": "10 J",
"power_draw": "10 W",
"revert_to": "flashlight",
"use_action": {
"menu_text": "Turn off",
Expand Down Expand Up @@ -406,7 +406,7 @@
"copy-from": "heavy_flashlight",
"type": "TOOL",
"name": { "str": "heavy-duty flashlight (on)", "str_pl": "heavy-duty flashlights (on)" },
"power_draw": "15 J",
"power_draw": "15 W",
"revert_to": "heavy_flashlight",
"use_action": {
"ammo_scale": 0,
Expand Down Expand Up @@ -437,7 +437,7 @@
"copy-from": "lightstrip_base",
"description": "This is a light-emitting circuit that has been wired directly to a battery. It provides some weak light and can't be turned off until the battery dies.",
"color": "green",
"power_draw": "1 J",
"power_draw": "1 W",
"revert_to": "lightstrip_inactive",
"revert_msg": "The lightstrip dies.",
"flags": [ "LIGHT_4", "NO_UNLOAD", "NO_RELOAD", "WATER_BREAK" ],
Expand Down Expand Up @@ -647,7 +647,7 @@
"type": "TOOL",
"name": { "str": "reading light (active)", "str_pl": "reading lights (active)" },
"description": "A little clip-on LED light, meant for reading books in the dark. This one is turned on.",
"power_draw": "1 J",
"power_draw": "1 W",
"revert_to": "reading_light",
"use_action": {
"ammo_scale": 0,
Expand Down Expand Up @@ -698,7 +698,7 @@
"type": "TOOL",
"name": { "str": "smart lamp (on)", "str_pl": "smart lamps (on)" },
"description": "This is a smart lamp, this smart lamp is turned on. It can be deactivated remotely.",
"power_draw": "10 J",
"power_draw": "10 W",
"revert_to": "smart_lamp",
"use_action": {
"ammo_scale": 0,
Expand Down Expand Up @@ -808,7 +808,7 @@
"type": "TOOL",
"name": { "str": "propane lantern (on)", "str_pl": "propane lanterns (on)" },
"description": "This is a small propane powered lantern. It does not provide much light, but it lasts a long time. It is turned on. Use it to turn it off.",
"power_draw": "60 mJ",
"power_draw": "60 mW",
"revert_to": "propane_lantern",
"use_action": [
{
Expand Down
Loading