Merge pull request #6669 from VOREStation/upstream-merge-6723

[MIRROR] Creates a preference for precise item placement
This commit is contained in:
Novacat
2020-02-24 20:25:39 -05:00
committed by GitHub
3 changed files with 36 additions and 15 deletions

View File

@@ -153,6 +153,12 @@ var/list/_client_preferences_by_type
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/precision_placement
description ="Precision Placement"
key = "PRECISE_PLACEMENT"
enabled_description = "Active"
disabled_description = "Inactive"
/datum/client_preference/hotkeys_default
description ="Hotkeys Default"
key = "HUD_HOTKEYS"

View File

@@ -89,6 +89,21 @@
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/toggle_precision_placement()
set name = "Enable/Disable Precision Placement"
set category = "Preferences"
set desc = "Toggles precise placement of objects on tables."
var/pref_path = /datum/client_preference/precision_placement
toggle_preference(pref_path)
to_chat(src,"You will [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] place items where your cursor is on the table.")
SScharacter_setup.queue_preferences_save(prefs)
feedback_add_details("admin_verb","TPIP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/toggle_typing()
set name = "Show/Hide Typing Indicator"
set category = "Preferences"

View File

@@ -140,7 +140,7 @@
return
// Placing stuff on tables
if(user.unEquip(W, 0, src.loc))
if(user.unEquip(W, 0, src.loc) && user.is_preference_enabled(/datum/client_preference/precision_placement))
auto_align(W, click_parameters)
return 1