mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-16 05:02:42 +00:00
Merge pull request #6669 from VOREStation/upstream-merge-6723
[MIRROR] Creates a preference for precise item placement
This commit is contained in:
@@ -153,6 +153,12 @@ var/list/_client_preferences_by_type
|
|||||||
enabled_description = "Show"
|
enabled_description = "Show"
|
||||||
disabled_description = "Hide"
|
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
|
/datum/client_preference/hotkeys_default
|
||||||
description ="Hotkeys Default"
|
description ="Hotkeys Default"
|
||||||
key = "HUD_HOTKEYS"
|
key = "HUD_HOTKEYS"
|
||||||
|
|||||||
@@ -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!
|
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()
|
/client/verb/toggle_typing()
|
||||||
set name = "Show/Hide Typing Indicator"
|
set name = "Show/Hide Typing Indicator"
|
||||||
set category = "Preferences"
|
set category = "Preferences"
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
// Placing stuff on tables
|
// 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)
|
auto_align(W, click_parameters)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user