Skip to content

Commit

Permalink
[MIRROR] Adds ALLOW_RESTING to a bunch of items (#2108)
Browse files Browse the repository at this point in the history
* 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: MrMelbert <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Apr 21, 2024
1 parent a82655b commit af5bacc
Show file tree
Hide file tree
Showing 23 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion code/game/objects/items/crayons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
. = ..()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/credit_holochip.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/desynchronizer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/quantum_keycard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/scanners/gas_analyzer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/swapper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/flamethrower.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/implants/implantpad.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/inspector.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
. = ..()
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/tanks/tank_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/bedsheet_bin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/cards/deck/deck.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion code/modules/cards/singlecard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/clothing/head/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/head/soft_caps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/masks/bandana.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/masks/breath.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/spacesuits/_spacesuits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion code/modules/paperwork/paper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/ballistic/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit af5bacc

Please sign in to comment.