Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tint balance #60461

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@
#define HEADCOVERSMOUTH (1<<4)
#define PEPPERPROOF (1<<5) //protects against pepperspray

#define TINT_NONE 0
#define TINT_LIGHTER 1
#define TINT_DARKENED 2 //Threshold of tint level to apply weld mask overlay
#define TINT_BLIND 3 //Threshold of tint level to obscure vision fully

Expand Down
5 changes: 4 additions & 1 deletion code/_onclick/hud/fullscreen.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/mob/proc/overlay_fullscreen(category, type, severity)
/mob/proc/overlay_fullscreen(category, type, severity, overlay_alpha)
if(!overlay_alpha)
overlay_alpha = 255
var/atom/movable/screen/fullscreen/screen = screens[category]
if (!screen || screen.type != type)
// needs to be recreated
Expand All @@ -9,6 +11,7 @@
return screen

screen.icon_state = "[initial(screen.icon_state)][severity]"
screen.alpha = overlay_alpha
screen.severity = severity
if (client && screen.should_show_to(src))
screen.update_for_view(client.view)
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items/holy_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
strip_delay = 8 SECONDS
dog_fashion = null
tint = 0.9

/obj/item/clothing/suit/armor/riot/chaplain/clock
name = "forgotten armour"
Expand All @@ -30,6 +31,7 @@
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
strip_delay = 80
dog_fashion = null
tint = 0.9

/obj/item/clothing/suit/armor/riot/chaplain
name = "crusader armour"
Expand Down
1 change: 1 addition & 0 deletions code/modules/antagonists/changeling/powers/mutations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@
item_flags = DROPDEL
armor = list(MELEE = 40, BULLET = 40, LASER = 40, ENERGY = 50, BOMB = 10, BIO = 4, RAD = 0, FIRE = 90, ACID = 90)
flags_inv = HIDEEARS|HIDEHAIR|HIDEEYES|HIDEFACIALHAIR|HIDEFACE|HIDESNOUT
tint = 0.9

/obj/item/clothing/head/helmet/changeling/Initialize()
. = ..()
Expand Down
1 change: 1 addition & 0 deletions code/modules/antagonists/cult/cult_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@
flags_inv = HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDEEARS|HIDEEYES|HIDESNOUT
armor = list(MELEE = 50, BULLET = 30, LASER = 50,ENERGY = 50, BOMB = 25, BIO = 10, RAD = 0, FIRE = 10, ACID = 10)
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
tint = 0.9

/obj/item/clothing/suit/magusred
name = "magus robes"
Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/chameleon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@
permeability_coefficient = 0.01
flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH
w_class = WEIGHT_CLASS_SMALL
tint = 0.9

var/voice_change = 1 ///This determines if the voice changer is on or off.

Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/glasses/_glasses.dm
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
inhand_icon_state = "sunglasses"
darkness_view = 1
flash_protect = FLASH_PROTECTION_FLASH
tint = 1
tint = 0.9
glass_colour_type = /datum/client_colour/glass_colour/gray
dog_fashion = /datum/dog_fashion/head

Expand Down
8 changes: 4 additions & 4 deletions code/modules/clothing/glasses/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
icon_state = "sunhudmed"
darkness_view = 1
flash_protect = FLASH_PROTECTION_FLASH
tint = 1
tint = 0.9
glass_colour_type = /datum/client_colour/glass_colour/blue

/obj/item/clothing/glasses/hud/diagnostic
Expand All @@ -92,7 +92,7 @@
icon_state = "sunhuddiag"
inhand_icon_state = "glasses"
flash_protect = FLASH_PROTECTION_FLASH
tint = 1
tint = 0.9

/obj/item/clothing/glasses/hud/security
name = "security HUD"
Expand Down Expand Up @@ -137,7 +137,7 @@
icon_state = "sunhudsec"
darkness_view = 1
flash_protect = FLASH_PROTECTION_FLASH
tint = 1
tint = 0.9
glass_colour_type = /datum/client_colour/glass_colour/darkred

/obj/item/clothing/glasses/hud/security/night
Expand Down Expand Up @@ -233,7 +233,7 @@
hud_type = ANTAG_HUD_GANGSTER
darkness_view = 1
flash_protect = FLASH_PROTECTION_FLASH
tint = 1
tint = 0.9
glass_colour_type = /datum/client_colour/glass_colour/gray


Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/head/hardhat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
cold_protection = HEAD
min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF
tint = 0.5

/obj/item/clothing/head/hardhat/weldhat
name = "welding hard hat"
Expand Down
7 changes: 6 additions & 1 deletion code/modules/clothing/head/helmet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
/obj/item/clothing/head/helmet/old
name = "degrading helmet"
desc = "Standard issue security helmet. Due to degradation the helmet's visor obstructs the users ability to see long distances."
tint = 2
tint = 1.5

/obj/item/clothing/head/helmet/blueshirt
name = "blue helmet"
Expand Down Expand Up @@ -299,6 +299,7 @@
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR
flags_cover = HEADCOVERSEYES
dog_fashion = null
tint = 0.2

/obj/item/clothing/head/helmet/redtaghelm
name = "red laser tag helmet"
Expand Down Expand Up @@ -330,6 +331,7 @@
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
strip_delay = 80
dog_fashion = null
tint = 0.5

/obj/item/clothing/head/helmet/knight/blue
icon_state = "knight_blue"
Expand Down Expand Up @@ -360,6 +362,7 @@
icon_state = "skull"
inhand_icon_state = "skull"
strip_delay = 100
tint = 0.2

/obj/item/clothing/head/helmet/durathread
name = "durathread helmet"
Expand Down Expand Up @@ -399,6 +402,7 @@
flags_inv = HIDEHAIR|HIDEFACIALHAIR|HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDESNOUT
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF
strip_delay = 80
tint = 0.5

/obj/item/clothing/head/helmet/elder_atmosian
name = "\improper Elder Atmosian Helmet"
Expand All @@ -409,6 +413,7 @@
material_flags = MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS //Can change color and add prefix
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
tint = 0.2

//monkey sentience caps

Expand Down
8 changes: 8 additions & 0 deletions code/modules/clothing/head/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
desc = "A plastic replica of a Syndicate agent's space helmet. You'll look just like a real murderous Syndicate agent in this! This is a toy, it is not made for use in space!"
clothing_flags = SNUG_FIT
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
tint = 0.3

/obj/item/clothing/head/cueball
name = "cueball helmet"
Expand All @@ -115,6 +116,7 @@
clothing_flags = SNUG_FIT
flags_cover = HEADCOVERSEYES|HEADCOVERSMOUTH
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
tint = 0.9

/obj/item/clothing/head/snowman
name = "snowman head"
Expand All @@ -124,6 +126,7 @@
clothing_flags = SNUG_FIT
flags_cover = HEADCOVERSEYES
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
tint = 0.3

/obj/item/clothing/head/justice
name = "justice hat"
Expand All @@ -133,6 +136,7 @@
clothing_flags = SNUG_FIT
flags_inv = HIDEHAIR|HIDEEARS|HIDEEYES|HIDEFACE|HIDEFACIALHAIR|HIDESNOUT
flags_cover = HEADCOVERSEYES
tint = 0.3

/obj/item/clothing/head/justice/blue
icon_state = "justiceblue"
Expand Down Expand Up @@ -228,6 +232,7 @@
inhand_icon_state = "chickensuit"
clothing_flags = SNUG_FIT
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
tint = 0.3

/obj/item/clothing/head/griffin
name = "griffon head"
Expand All @@ -236,6 +241,7 @@
inhand_icon_state = "griffinhat"
clothing_flags = SNUG_FIT
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
tint = 0.3

/obj/item/clothing/head/bearpelt
name = "bear pelt hat"
Expand All @@ -251,6 +257,7 @@
clothing_flags = SNUG_FIT
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
tint = 0.3

/obj/item/clothing/head/fedora
name = "fedora"
Expand Down Expand Up @@ -411,6 +418,7 @@
icon_state = "lobster_hat"
clothing_flags = SNUG_FIT
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
tint = 0.1

/obj/item/clothing/head/drfreezehat
name = "doctor freeze's wig"
Expand Down
2 changes: 2 additions & 0 deletions code/modules/clothing/head/misc_special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
flags_cover = HEADCOVERSEYES
light_color = "#fff2bf"
worn_y_offset = 1
tint = 0.4


/obj/item/clothing/head/hardhat/pumpkinhead/set_light_on(new_value)
Expand Down Expand Up @@ -227,6 +228,7 @@
clothing_flags = SNUG_FIT
flags_cover = HEADCOVERSEYES
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
tint = 0.2

dog_fashion = /datum/dog_fashion/head/cardborg

Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/masks/animal_masks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ GLOBAL_LIST_INIT(cursed_animal_masks, list(
animal_sounds = list("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
flags_inv = HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDEEYES|HIDEEARS|HIDESNOUT
curse_spawn_sound = 'sound/magic/horsehead_curse.ogg'
tint = 0.5

/obj/item/clothing/mask/animal/horsehead/cursed
cursed = TRUE
Expand Down
3 changes: 3 additions & 0 deletions code/modules/clothing/masks/gasmask.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
permeability_coefficient = 0.01
flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH | PEPPERPROOF
resistance_flags = NONE
tint = 0.9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

///Max numbers of installable filters
var/max_filters = 1
///List to keep track of each filter
Expand Down Expand Up @@ -145,6 +146,7 @@
actions_types = list(/datum/action/item_action/adjust)
dog_fashion = /datum/dog_fashion/head/clown
species_exception = list(/datum/species/golem/bananium)
tint = 0
var/list/clownmask_designs = list()

/obj/item/clothing/mask/gas/clown_hat/Initialize(mapload)
Expand Down Expand Up @@ -201,6 +203,7 @@
resistance_flags = FLAMMABLE
actions_types = list(/datum/action/item_action/adjust)
species_exception = list(/datum/species/golem)
tint = 0
var/list/mimemask_designs = list()

/obj/item/clothing/mask/gas/mime/Initialize(mapload)
Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/masks/hailer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ GLOBAL_LIST_INIT(hailer_phrases, list(
aggressiveness = AGGR_SHIT_COP
flags_inv = HIDEFACIALHAIR | HIDEFACE | HIDEEYES | HIDEEARS | HIDEHAIR | HIDESNOUT
visor_flags_inv = 0
tint = 0.3

/obj/item/clothing/mask/gas/sechailer/swat/spacepol
name = "spacepol mask"
Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/spacesuits/_spacesuits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF
resistance_flags = NONE
dog_fashion = null
tint = 0.3

/obj/item/clothing/suit/space
name = "space suit"
Expand Down
2 changes: 2 additions & 0 deletions code/modules/clothing/spacesuits/hardsuit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
actions_types = list(/datum/action/item_action/toggle_helmet_mode)
visor_flags_inv = HIDEMASK|HIDEEYES|HIDEFACE|HIDEFACIALHAIR|HIDESNOUT
visor_flags = STOPSPRESSUREDAMAGE
tint = 0.3

/obj/item/clothing/head/helmet/space/hardsuit/syndi/Initialize()
. = ..()
Expand Down Expand Up @@ -650,6 +651,7 @@
heat_protection = HEAD
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
actions_types = list()
tint = 0.5

/obj/item/clothing/head/helmet/space/hardsuit/swat/attack_self()

Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/suits/bio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDEFACE|HIDESNOUT
resistance_flags = ACID_PROOF
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF
tint = 0.3

/obj/item/clothing/suit/bio_suit
name = "bio suit"
Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/suits/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@
body_parts_covered = HEAD
flags_cover = HEADCOVERSEYES
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
tint = 0.3

/obj/item/clothing/suit/security/officer/russian
name = "\improper Russian officer's jacket"
Expand Down
3 changes: 2 additions & 1 deletion code/modules/clothing/suits/utility.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
equip_delay_other = 70
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF
resistance_flags = NONE

tint = 0.3

/obj/item/clothing/suit/bomb_suit
name = "bomb suit"
Expand Down Expand Up @@ -127,6 +127,7 @@
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF
resistance_flags = NONE
flags_1 = RAD_PROTECT_CONTENTS_1
tint = 0.2

/obj/item/clothing/suit/radiation
name = "radiation suit"
Expand Down
1 change: 1 addition & 0 deletions code/modules/holiday/easter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
slowdown = -0.3
clothing_flags = THICKMATERIAL | SNUG_FIT
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
tint = 0.3

/obj/item/clothing/suit/bunnysuit
name = "Easter Bunny Suit"
Expand Down
20 changes: 15 additions & 5 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,11 @@
if(!isnull(G.lighting_alpha))
lighting_alpha = min(lighting_alpha, G.lighting_alpha)

if(wear_mask)
var/obj/item/clothing/mask/dressed_mask = wear_mask
if(dressed_mask.tint || initial(dressed_mask.tint))
update_tint()

if(HAS_TRAIT(src, TRAIT_THERMAL_VISION))
sight |= (SEE_MOBS)
lighting_alpha = min(lighting_alpha, LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE)
Expand All @@ -586,13 +591,18 @@
if(!GLOB.tinted_weldhelh)
return
tinttotal = get_total_tint()
clear_fullscreen("tint", 0)
if(tinttotal >= TINT_BLIND)
become_blind(EYES_COVERED)
else if(tinttotal >= TINT_DARKENED)
cure_blind(EYES_COVERED)
overlay_fullscreen("tint", /atom/movable/screen/fullscreen/impaired, 2)
else
cure_blind(EYES_COVERED)
return
cure_blind(EYES_COVERED)
if(tinttotal >= TINT_DARKENED && tinttotal < TINT_BLIND)
overlay_fullscreen("tint", /atom/movable/screen/fullscreen/impaired, 2, clamp(tinttotal * 100, 0, 255))
else if(tinttotal >= TINT_LIGHTER && tinttotal < TINT_DARKENED)
overlay_fullscreen("tint", /atom/movable/screen/fullscreen/impaired, 1, clamp(tinttotal * 100, 0, 255))
else if(tinttotal > TINT_NONE && tinttotal < TINT_LIGHTER)
overlay_fullscreen("tint", /atom/movable/screen/fullscreen/impaired, 0, clamp(tinttotal * 100, 0, 255))
else if(tinttotal <= TINT_NONE)
clear_fullscreen("tint", 0)

/mob/living/carbon/proc/get_total_tint()
Expand Down