mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 13:42:44 +00:00
Adds Preference for Graffiti Engraving + Alt-click engraving option
This commit is contained in:
@@ -9,8 +9,11 @@
|
|||||||
attack_tile(C, L) // Be on help intent if you want to decon something.
|
attack_tile(C, L) // Be on help intent if you want to decon something.
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!(C.is_screwdriver() && flooring && (flooring.flags & TURF_REMOVE_SCREWDRIVER)) && try_graffiti(user, C))
|
if(!(C.has_tool_quality(TOOL_SCREWDRIVER) && flooring && (flooring.flags & TURF_REMOVE_SCREWDRIVER)))
|
||||||
return
|
if(isliving(user))
|
||||||
|
var/mob/living/L = user
|
||||||
|
if(L.a_intent == I_HELP && L.is_preference_enabled(/datum/client_preference/engrave_graffiti))
|
||||||
|
try_graffiti(L, C)
|
||||||
|
|
||||||
if(istype(C, /obj/item/stack/tile/roofing))
|
if(istype(C, /obj/item/stack/tile/roofing))
|
||||||
var/expended_tile = FALSE // To track the case. If a ceiling is built in a multiz zlevel, it also necessarily roofs it against weather
|
var/expended_tile = FALSE // To track the case. If a ceiling is built in a multiz zlevel, it also necessarily roofs it against weather
|
||||||
@@ -161,3 +164,10 @@
|
|||||||
if(flooring)
|
if(flooring)
|
||||||
return
|
return
|
||||||
attackby(T, user)
|
attackby(T, user)
|
||||||
|
|
||||||
|
/turf/simulated/floor/AltClick(mob/user)
|
||||||
|
if(isliving(user))
|
||||||
|
var/mob/living/livingUser = user
|
||||||
|
if(try_graffiti(livingUser, livingUser.get_active_hand()))
|
||||||
|
return
|
||||||
|
. = ..()
|
||||||
@@ -131,7 +131,8 @@
|
|||||||
|
|
||||||
user.setClickCooldown(user.get_attack_speed(W))
|
user.setClickCooldown(user.get_attack_speed(W))
|
||||||
|
|
||||||
if(!construction_stage && try_graffiti(user, W))
|
if(!construction_stage && user.a_intent == I_HELP && user.is_preference_enabled(/datum/client_preference/engrave_graffiti))
|
||||||
|
if(try_graffiti(user,W))
|
||||||
return
|
return
|
||||||
|
|
||||||
if (!user.IsAdvancedToolUser())
|
if (!user.IsAdvancedToolUser())
|
||||||
@@ -407,3 +408,9 @@
|
|||||||
return attack_hand(user)
|
return attack_hand(user)
|
||||||
|
|
||||||
|
|
||||||
|
/turf/simulated/wall/AltClick(mob/user)
|
||||||
|
if(isliving(user))
|
||||||
|
var/mob/living/livingUser = user
|
||||||
|
if(try_graffiti(livingUser, livingUser.get_active_hand()))
|
||||||
|
return
|
||||||
|
. = ..()
|
||||||
@@ -298,6 +298,13 @@ var/list/_client_preferences_by_type
|
|||||||
enabled_description = "Popup New On Login"
|
enabled_description = "Popup New On Login"
|
||||||
disabled_description = "Do Nothing"
|
disabled_description = "Do Nothing"
|
||||||
|
|
||||||
|
/datum/client_preference/engrave_graffiti
|
||||||
|
description = "Engrave Graffiti with Sharp Objects"
|
||||||
|
key = "ENGRAVE_GRAFFITI"
|
||||||
|
enabled_by_default = TRUE
|
||||||
|
enabled_description = "Enabled"
|
||||||
|
disabled_description = "Disabled"
|
||||||
|
|
||||||
/********************
|
/********************
|
||||||
* Staff Preferences *
|
* Staff Preferences *
|
||||||
********************/
|
********************/
|
||||||
|
|||||||
@@ -391,6 +391,19 @@
|
|||||||
|
|
||||||
feedback_add_details("admin_verb","TRadioSounds")
|
feedback_add_details("admin_verb","TRadioSounds")
|
||||||
|
|
||||||
|
/client/verb/toggle_graffiti_engraving()
|
||||||
|
set name = "Toggle Graffiti Engraving"
|
||||||
|
set category = "Preferences"
|
||||||
|
set desc = "Enable/Disable engraving messages on hard surfaces with sharp objects on help intent."
|
||||||
|
|
||||||
|
var/pref_path = /datum/client_preference/engrave_graffiti
|
||||||
|
toggle_preference(pref_path)
|
||||||
|
SScharacter_setup.queue_preferences_save(prefs)
|
||||||
|
|
||||||
|
to_chat(src, "You will now [(is_preference_enabled(/datum/client_preference/TEngraveGraffiti)) ? "engrave" : "not engrave"] graffiti.")
|
||||||
|
|
||||||
|
feedback_add_details("admin_verb","TEngraveGraffiti")
|
||||||
|
|
||||||
// Not attached to a pref datum because those are strict binary toggles
|
// Not attached to a pref datum because those are strict binary toggles
|
||||||
/client/verb/toggle_examine_mode()
|
/client/verb/toggle_examine_mode()
|
||||||
set name = "Toggle Examine Mode"
|
set name = "Toggle Examine Mode"
|
||||||
|
|||||||
Reference in New Issue
Block a user