Skip to content

Commit

Permalink
Temporary solution for enabling/disabling the aiming cross
Browse files Browse the repository at this point in the history
So everyone can shut the fuck up now.
  • Loading branch information
savethetreez committed May 28, 2024
1 parent 90f54cb commit f8865bc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
8 changes: 2 additions & 6 deletions code/_onclick/hud/base_screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -508,24 +508,20 @@

/obj/screen/aiming_cross/update_icon()
..()

if(!usr || !usr.client)
return
if(!istype(usr.get_active_hand(), /obj/item/weapon/gun))
if(!istype(usr.get_active_hand(), /obj/item/weapon/gun) || !usr.client.is_preference_enabled(/datum/client_preference/dynamic_aiming_cross))
alpha = 0
return

alpha = 255

icon_state = "cross[clamp(round(usr.get_active_hand().get_dispersion_range(usr), 3), 3, 30)]"

screen_loc = "[usr.client.mouse_screen_x]:[usr.client.mouse_screen_pixel_x - 16],[usr.client.mouse_screen_y]:[usr.client.mouse_screen_pixel_y - 16]"

/obj/screen/aiming_cross/proc/update()
update_icon()
spawn(0.2)
update()
return

//--------------------------------------------------health---------------------------------------------------------
/obj/screen/health
name = "health"
Expand Down
8 changes: 4 additions & 4 deletions code/_onclick/hud/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ var/list/global_huds = list(
fov.layer = 18

aim_cross = new /obj/screen/aiming_cross()
fov.name = " "
fov.screen_loc = "1,1"
fov.mouse_opacity = FALSE
fov.layer = 21
aim_cross.name = " "
aim_cross.screen_loc = "1,1"
aim_cross.mouse_opacity = FALSE
aim_cross.layer = 21

cover = new /obj/screen/cover()
noise = new /obj/screen/noise()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ var/list/_client_preferences_by_type
if (!enabled)
preference_mob.set_typing_indicator(0)

/*/datum/client_preference/dynamic_aiming_cross
/datum/client_preference/dynamic_aiming_cross
description = "Dynamic aiming cross"
key = "SHOW_DYN_CROSS"
enabled_description = "Show"
disabled_description = "Hide"*/
disabled_description = "Hide"

/datum/client_preference/show_ooc
description ="OOC chat"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/client/preferencesSQLite/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var/list/preferences_datums = list()

var/list/preferences_enabled = list("CHAT_OVERLAY","CHAT_TIPS","SOUND_MIDI", "SOUND_LOBBY", "SOUND_AMBIENCE",
"CHAT_GHOSTEARS", "CHAT_GHOSTSIGHT", "CHAT_GHOSTRADIO", "CHAT_SHOWICONS",
"SHOW_TYPING", "CHAT_OOC", "CHAT_LOOC", "CHAT_DEAD", "SHOW_PROGRESS",
"SHOW_TYPING", "SHOW_DYN_CROSS", "CHAT_OOC", "CHAT_LOOC", "CHAT_DEAD", "SHOW_PROGRESS",
"FIT_VIEWPORT", "CHAT_DEBUGLOGS", "CHAT_PRAYER", "SOUND_ADMINHELP")

var/list/preferences_disabled = list("CHAT_TTS")
Expand Down

0 comments on commit f8865bc

Please sign in to comment.