From cb2481025a1e77f36285291b99c5a7271375a673 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Sun, 21 Apr 2024 14:25:26 +0300 Subject: [PATCH] [MIRROR] Adds `ALLOW_RESTING` to a bunch of items (#2108) (#2999) * Adds `ALLOW_RESTING` to a bunch of items (#82761) ## About The Pull Request Allows you to alt-click a bunch of items while resting. Fixes #82788 ## Why It's Good For The Game Some of these, such as storage, are bugfixes. You shouldn't need to be standing up to configure a spray can, or change the direction of your bedsheet Others are just sensible changes. ## Changelog :cl: Melbert fix: You can open bags with alt click while resting again qol: Many items which previously required you to stand to alt-click now don't, such as bedsheets and spray cans /:cl: * Adds `ALLOW_RESTING` to a bunch of items --------- Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- code/game/objects/items/crayons.dm | 2 +- code/game/objects/items/credit_holochip.dm | 2 +- code/game/objects/items/devices/desynchronizer.dm | 2 +- code/game/objects/items/devices/quantum_keycard.dm | 2 +- code/game/objects/items/devices/scanners/gas_analyzer.dm | 2 +- code/game/objects/items/devices/scanners/health_analyzer.dm | 2 +- code/game/objects/items/devices/swapper.dm | 2 +- code/game/objects/items/flamethrower.dm | 2 +- code/game/objects/items/implants/implantpad.dm | 2 +- code/game/objects/items/inspector.dm | 2 +- code/game/objects/items/storage/belt.dm | 2 +- code/game/objects/items/storage/storage.dm | 1 + code/game/objects/items/tanks/tank_types.dm | 2 +- code/game/objects/structures/bedsheet_bin.dm | 2 +- code/modules/cards/deck/deck.dm | 2 +- code/modules/cards/singlecard.dm | 2 +- code/modules/clothing/head/jobs.dm | 4 ++-- code/modules/clothing/head/soft_caps.dm | 2 +- code/modules/clothing/masks/bandana.dm | 2 +- code/modules/clothing/masks/breath.dm | 2 +- code/modules/clothing/spacesuits/_spacesuits.dm | 2 +- code/modules/paperwork/paper.dm | 2 +- code/modules/projectiles/guns/ballistic/shotgun.dm | 2 +- 23 files changed, 24 insertions(+), 23 deletions(-) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 996160f2b6b..aa4068d714a 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -759,7 +759,7 @@ pre_noise = TRUE post_noise = FALSE - interaction_flags_click = NEED_DEXTERITY|NEED_HANDS + interaction_flags_click = NEED_DEXTERITY|NEED_HANDS|ALLOW_RESTING /obj/item/toy/crayon/spraycan/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/credit_holochip.dm b/code/game/objects/items/credit_holochip.dm index c9b6fe4a134..7a57782dd39 100644 --- a/code/game/objects/items/credit_holochip.dm +++ b/code/game/objects/items/credit_holochip.dm @@ -7,7 +7,7 @@ throwforce = 0 force = 0 w_class = WEIGHT_CLASS_TINY - interaction_flags_click = NEED_DEXTERITY|FORBID_TELEKINESIS_REACH + interaction_flags_click = NEED_DEXTERITY|FORBID_TELEKINESIS_REACH|ALLOW_RESTING /// Amount on money on the card var/credits = 0 diff --git a/code/game/objects/items/devices/desynchronizer.dm b/code/game/objects/items/devices/desynchronizer.dm index c3e69a0103c..cd7c745a168 100644 --- a/code/game/objects/items/devices/desynchronizer.dm +++ b/code/game/objects/items/devices/desynchronizer.dm @@ -9,7 +9,7 @@ lefthand_file = 'icons/mob/inhands/items/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/items/devices_righthand.dmi' custom_materials = list(/datum/material/iron= SMALL_MATERIAL_AMOUNT * 2.5, /datum/material/glass= SMALL_MATERIAL_AMOUNT * 5) - interaction_flags_click = NEED_DEXTERITY + interaction_flags_click = NEED_DEXTERITY|ALLOW_RESTING /// Max time this can be set var/max_duration = 300 SECONDS /// Currently set time diff --git a/code/game/objects/items/devices/quantum_keycard.dm b/code/game/objects/items/devices/quantum_keycard.dm index 34b83a62092..ccaef00cfc6 100644 --- a/code/game/objects/items/devices/quantum_keycard.dm +++ b/code/game/objects/items/devices/quantum_keycard.dm @@ -10,7 +10,7 @@ righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi' w_class = WEIGHT_CLASS_TINY obj_flags = UNIQUE_RENAME - interaction_flags_click = NEED_DEXTERITY + interaction_flags_click = NEED_DEXTERITY|ALLOW_RESTING /// The linked quantum pad var/obj/machinery/quantumpad/qpad diff --git a/code/game/objects/items/devices/scanners/gas_analyzer.dm b/code/game/objects/items/devices/scanners/gas_analyzer.dm index 0f4ea8475a4..8341ad1753b 100644 --- a/code/game/objects/items/devices/scanners/gas_analyzer.dm +++ b/code/game/objects/items/devices/scanners/gas_analyzer.dm @@ -17,7 +17,7 @@ tool_behaviour = TOOL_ANALYZER custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT * 0.3, /datum/material/glass=SMALL_MATERIAL_AMOUNT * 0.2) grind_results = list(/datum/reagent/mercury = 5, /datum/reagent/iron = 5, /datum/reagent/silicon = 5) - interaction_flags_click = NEED_LITERACY|NEED_LIGHT + interaction_flags_click = NEED_LITERACY|NEED_LIGHT|ALLOW_RESTING /// Boolean whether this has a CD var/cooldown = FALSE /// The time in deciseconds diff --git a/code/game/objects/items/devices/scanners/health_analyzer.dm b/code/game/objects/items/devices/scanners/health_analyzer.dm index f671ca180cb..eb6e5bf9f76 100644 --- a/code/game/objects/items/devices/scanners/health_analyzer.dm +++ b/code/game/objects/items/devices/scanners/health_analyzer.dm @@ -20,7 +20,7 @@ throw_speed = 3 throw_range = 7 custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT *2) - interaction_flags_click = NEED_LITERACY|NEED_LIGHT + interaction_flags_click = NEED_LITERACY|NEED_LIGHT|ALLOW_RESTING /// Verbose/condensed var/mode = SCANNER_VERBOSE /// HEALTH/WOUND diff --git a/code/game/objects/items/devices/swapper.dm b/code/game/objects/items/devices/swapper.dm index 646bdc8b4a2..4353de68589 100644 --- a/code/game/objects/items/devices/swapper.dm +++ b/code/game/objects/items/devices/swapper.dm @@ -8,7 +8,7 @@ item_flags = NOBLUDGEON lefthand_file = 'icons/mob/inhands/items/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/items/devices_righthand.dmi' - interaction_flags_click = NEED_DEXTERITY + interaction_flags_click = NEED_DEXTERITY|ALLOW_RESTING /// Cooldown for usage var/cooldown = 30 SECONDS /// Next available time diff --git a/code/game/objects/items/flamethrower.dm b/code/game/objects/items/flamethrower.dm index d2f4b0cfc71..be89193ba7e 100644 --- a/code/game/objects/items/flamethrower.dm +++ b/code/game/objects/items/flamethrower.dm @@ -20,7 +20,7 @@ light_range = 2 light_power = 2 light_on = FALSE - interaction_flags_click = NEED_DEXTERITY|NEED_HANDS + interaction_flags_click = NEED_DEXTERITY|NEED_HANDS|ALLOW_RESTING var/status = FALSE var/lit = FALSE //on or off var/operating = FALSE//cooldown diff --git a/code/game/objects/items/implants/implantpad.dm b/code/game/objects/items/implants/implantpad.dm index 969a0d5fe52..028b9140dac 100644 --- a/code/game/objects/items/implants/implantpad.dm +++ b/code/game/objects/items/implants/implantpad.dm @@ -10,7 +10,7 @@ throw_speed = 3 throw_range = 5 w_class = WEIGHT_CLASS_SMALL - interaction_flags_click = FORBID_TELEKINESIS_REACH + interaction_flags_click = FORBID_TELEKINESIS_REACH|ALLOW_RESTING ///The implant case currently inserted into the pad. var/obj/item/implantcase/inserted_case diff --git a/code/game/objects/items/inspector.dm b/code/game/objects/items/inspector.dm index 1d186ddcb96..ab5db9b65ce 100644 --- a/code/game/objects/items/inspector.dm +++ b/code/game/objects/items/inspector.dm @@ -373,7 +373,7 @@ */ /obj/item/paper/fake_report/water grind_results = list(/datum/reagent/water = 5) - interaction_flags_click = NEED_DEXTERITY|NEED_HANDS + interaction_flags_click = NEED_DEXTERITY|NEED_HANDS|ALLOW_RESTING /obj/item/paper/fake_report/water/click_alt(mob/living/user) var/datum/action/innate/origami/origami_action = locate() in user.actions diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 3ec1683b6d5..2e662011d48 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -821,7 +821,7 @@ inhand_icon_state = "sheath" worn_icon_state = "sheath" w_class = WEIGHT_CLASS_BULKY - interaction_flags_click = NEED_DEXTERITY|NEED_HANDS + interaction_flags_click = parent_type::interaction_flags_click | NEED_DEXTERITY | NEED_HANDS /obj/item/storage/belt/sabre/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/storage/storage.dm b/code/game/objects/items/storage/storage.dm index 8631d62e79e..75ca06ff0ff 100644 --- a/code/game/objects/items/storage/storage.dm +++ b/code/game/objects/items/storage/storage.dm @@ -2,6 +2,7 @@ name = "storage" icon = 'icons/obj/storage/storage.dmi' w_class = WEIGHT_CLASS_NORMAL + interaction_flags_click = ALLOW_RESTING|FORBID_TELEKINESIS_REACH var/rummage_if_nodrop = TRUE /// Should we preload the contents of this type? /// BE CAREFUL, THERE'S SOME REALLY NASTY SHIT IN THIS TYPEPATH diff --git a/code/game/objects/items/tanks/tank_types.dm b/code/game/objects/items/tanks/tank_types.dm index b21deb35581..70c0ea0822a 100644 --- a/code/game/objects/items/tanks/tank_types.dm +++ b/code/game/objects/items/tanks/tank_types.dm @@ -8,7 +8,7 @@ * Generic */ /obj/item/tank/internals - interaction_flags_click = FORBID_TELEKINESIS_REACH|NEED_HANDS + interaction_flags_click = FORBID_TELEKINESIS_REACH|NEED_HANDS|ALLOW_RESTING /// Allows carbon to toggle internals via AltClick of the equipped tank. diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 8b4fef65293..ba2a8685b8b 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -20,7 +20,7 @@ LINEN BINS w_class = WEIGHT_CLASS_TINY resistance_flags = FLAMMABLE dying_key = DYE_REGISTRY_BEDSHEET - interaction_flags_click = NEED_DEXTERITY + interaction_flags_click = NEED_DEXTERITY|ALLOW_RESTING dog_fashion = /datum/dog_fashion/head/ghost /// Custom nouns to act as the subject of dreams diff --git a/code/modules/cards/deck/deck.dm b/code/modules/cards/deck/deck.dm index d142692776c..5fc280f5b19 100644 --- a/code/modules/cards/deck/deck.dm +++ b/code/modules/cards/deck/deck.dm @@ -11,7 +11,7 @@ hitsound = null attack_verb_continuous = list("attacks") attack_verb_simple = list("attack") - interaction_flags_click = NEED_DEXTERITY|FORBID_TELEKINESIS_REACH + interaction_flags_click = NEED_DEXTERITY|FORBID_TELEKINESIS_REACH|ALLOW_RESTING /// The amount of time it takes to shuffle var/shuffle_time = DECK_SHUFFLE_TIME /// Deck shuffling cooldown. diff --git a/code/modules/cards/singlecard.dm b/code/modules/cards/singlecard.dm index e03c5800346..0c228fbbb17 100644 --- a/code/modules/cards/singlecard.dm +++ b/code/modules/cards/singlecard.dm @@ -14,7 +14,7 @@ throw_range = 7 attack_verb_continuous = list("attacks") attack_verb_simple = list("attack") - interaction_flags_click = NEED_DEXTERITY|FORBID_TELEKINESIS_REACH + interaction_flags_click = NEED_DEXTERITY|FORBID_TELEKINESIS_REACH|ALLOW_RESTING /// Artistic style of the deck var/deckstyle = "nanotrasen" /// If the cards in the deck have different icon states (blank and CAS decks do not) diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index b300ff99179..4f5d377ddac 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -173,7 +173,7 @@ armor_type = /datum/armor/fedora_det_hat icon_state = "detective" inhand_icon_state = "det_hat" - interaction_flags_click = NEED_DEXTERITY|NEED_HANDS + interaction_flags_click = NEED_DEXTERITY|NEED_HANDS|ALLOW_RESTING /// Cooldown for retrieving precious candy corn on alt click var/candy_cooldown = 0 dog_fashion = /datum/dog_fashion/head/detective @@ -222,7 +222,7 @@ icon_state = "detective" inhand_icon_state = "det_hat" dog_fashion = /datum/dog_fashion/head/detective - interaction_flags_click = FORBID_TELEKINESIS_REACH + interaction_flags_click = FORBID_TELEKINESIS_REACH|ALLOW_RESTING ///prefix our phrases must begin with var/prefix = "go go gadget" ///an assoc list of phrase = item (like gun = revolver) diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm index 92517d4a7dd..3003e9a76ee 100644 --- a/code/modules/clothing/head/soft_caps.dm +++ b/code/modules/clothing/head/soft_caps.dm @@ -5,7 +5,7 @@ worn_icon = 'icons/mob/clothing/head/hats.dmi' icon_state = "cargosoft" inhand_icon_state = "greyscale_softcap" //todo wip - interaction_flags_click = NEED_DEXTERITY + interaction_flags_click = NEED_DEXTERITY|ALLOW_RESTING /// For setting icon archetype var/soft_type = "cargo" /// If there is a suffix to append diff --git a/code/modules/clothing/masks/bandana.dm b/code/modules/clothing/masks/bandana.dm index e5b57be59f7..4a46fa0b1f3 100644 --- a/code/modules/clothing/masks/bandana.dm +++ b/code/modules/clothing/masks/bandana.dm @@ -231,7 +231,7 @@ greyscale_config_inhand_left = /datum/greyscale_config/facescarf/inhands_left greyscale_config_inhand_right = /datum/greyscale_config/facescarf/inhands_right flags_1 = IS_PLAYER_COLORABLE_1 - interaction_flags_click = NEED_DEXTERITY + interaction_flags_click = NEED_DEXTERITY|ALLOW_RESTING /obj/item/clothing/mask/facescarf/attack_self(mob/user) adjustmask(user) diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index 0249f0b1321..524b3bde6f2 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -12,7 +12,7 @@ flags_cover = MASKCOVERSMOUTH visor_flags_cover = MASKCOVERSMOUTH resistance_flags = NONE - interaction_flags_click = NEED_DEXTERITY + interaction_flags_click = NEED_DEXTERITY|ALLOW_RESTING /datum/armor/mask_breath bio = 50 diff --git a/code/modules/clothing/spacesuits/_spacesuits.dm b/code/modules/clothing/spacesuits/_spacesuits.dm index a6bbde2998b..3a2191c3dc4 100644 --- a/code/modules/clothing/spacesuits/_spacesuits.dm +++ b/code/modules/clothing/spacesuits/_spacesuits.dm @@ -58,7 +58,7 @@ equip_delay_other = 80 resistance_flags = NONE actions_types = list(/datum/action/item_action/toggle_spacesuit) - interaction_flags_click = NEED_DEXTERITY + interaction_flags_click = NEED_DEXTERITY|ALLOW_RESTING /// The default temperature setting var/temperature_setting = BODYTEMP_NORMAL /// If this is a path, this gets created as an object in Initialize. diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index e1bddd6feff..605e88f1e48 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -30,7 +30,7 @@ grind_results = list(/datum/reagent/cellulose = 3) color = COLOR_WHITE item_flags = SKIP_FANTASY_ON_SPAWN - interaction_flags_click = NEED_DEXTERITY|NEED_HANDS + interaction_flags_click = NEED_DEXTERITY|NEED_HANDS|ALLOW_RESTING /// Lazylist of raw, unsanitised, unparsed text inputs that have been made to the paper. var/list/datum/paper_input/raw_text_inputs diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm index ea438e4e03a..5471b20f512 100644 --- a/code/modules/projectiles/guns/ballistic/shotgun.dm +++ b/code/modules/projectiles/guns/ballistic/shotgun.dm @@ -85,7 +85,7 @@ w_class = WEIGHT_CLASS_HUGE semi_auto = TRUE accepted_magazine_type = /obj/item/ammo_box/magazine/internal/shot/tube - interaction_flags_click = NEED_DEXTERITY|NEED_HANDS + interaction_flags_click = NEED_DEXTERITY|NEED_HANDS|ALLOW_RESTING /// If defined, the secondary tube is this type, if you want different shell loads var/alt_mag_type /// If TRUE, we're drawing from the alternate_magazine