Merge pull request #6723 from Heroman3003/placementpref

Creates a preference for precise item placement
This commit is contained in:
Atermonera
2020-02-24 13:09:54 -08:00
committed by VirgoBot
parent bfa123c1f0
commit 89a32f867f
3 changed files with 36 additions and 15 deletions

View File

@@ -135,11 +135,11 @@ var/list/_client_preferences_by_type
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/air_pump_noise
description ="Air Pump Ambient Noise"
key = "SOUND_AIRPUMP"
enabled_description = "Audible"
disabled_description = "Silent"
/datum/client_preference/air_pump_noise
description ="Air Pump Ambient Noise"
key = "SOUND_AIRPUMP"
enabled_description = "Audible"
disabled_description = "Silent"
/datum/client_preference/mob_tooltips
description ="Mob tooltips"
@@ -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"
@@ -224,20 +239,20 @@
feedback_add_details("admin_verb","TBeSpecial") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/toggle_air_pump_hum()
set name = "Toggle Air Pump Noise"
set category = "Preferences"
set desc = "Toggles Air Pumps humming"
/client/verb/toggle_air_pump_hum()
set name = "Toggle Air Pump Noise"
set category = "Preferences"
set desc = "Toggles Air Pumps humming"
var/pref_path = /datum/client_preference/air_pump_noise
var/pref_path = /datum/client_preference/air_pump_noise
toggle_preference(pref_path)
toggle_preference(pref_path)
to_chat(src, "You will [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] hear air pumps hum, start, and stop.")
to_chat(src, "You will [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] hear air pumps hum, start, and stop.")
SScharacter_setup.queue_preferences_save(prefs)
SScharacter_setup.queue_preferences_save(prefs)
feedback_add_details("admin_verb","TAirPumpNoise")
feedback_add_details("admin_verb","TAirPumpNoise")
/client/verb/toggle_safe_firing()
set name = "Toggle Gun Firing Intent Requirement"

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