Gasmaks tint and tint calculation update (Oranges approved edition) (#62947)

About The Pull Request

Gasmaks apply a darkening overlay similar to the welding one but much lighter and open.
Without mask
nomask
With mask
covid
With mask and sunglasses
image

Note that other items that apply tint haven't been changed if worn on their own (sunglasses don't darken the vision) but will increase the darkening effect if staked (mask + sunglasses will give an even darker overlay).

Oranges' approval
dad2
Why It's Good For The Game

All upside and no downside are no fun.
Changelog

cl
balance: gasmasks give a slightly darkening overlay, effect will stack with other items that have tint.
code: tint code has been updated to properly work.
/cl
This commit is contained in:
Ghilker
2021-12-01 23:19:09 +01:00
committed by GitHub
parent 3f90a33c7a
commit 11b6072074
12 changed files with 52 additions and 17 deletions
+3 -1
View File
@@ -134,7 +134,9 @@
#define HEADCOVERSMOUTH (1<<4)
#define PEPPERPROOF (1<<5) //protects against pepperspray
#define TINT_DARKENED 2 //Threshold of tint level to apply weld mask overlay
#define TINT_MINIMAL 0.25
#define TINT_LIGHTER 1.5
#define TINT_DARKENED 2.5 //Threshold of tint level to apply weld mask overlay
#define TINT_BLIND 3 //Threshold of tint level to obscure vision fully
// defines for AFK theft
+2 -1
View File
@@ -1,4 +1,4 @@
/mob/proc/overlay_fullscreen(category, type, severity)
/mob/proc/overlay_fullscreen(category, type, severity, overlay_alpha = 255)
var/atom/movable/screen/fullscreen/screen = screens[category]
if (!screen || screen.type != type)
// needs to be recreated
@@ -9,6 +9,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)
+2 -2
View File
@@ -289,7 +289,7 @@
inhand_icon_state = "sunglasses"
darkness_view = 1
flash_protect = FLASH_PROTECTION_FLASH
tint = 1
tint = 0.25
glass_colour_type = /datum/client_colour/glass_colour/gray
dog_fashion = /datum/dog_fashion/head
@@ -349,7 +349,7 @@
actions_types = list(/datum/action/item_action/toggle)
flash_protect = FLASH_PROTECTION_WELDER
custom_materials = list(/datum/material/iron = 250)
tint = 2
tint = 2.75
visor_vars_to_toggle = VISOR_FLASHPROTECT | VISOR_TINT
flags_cover = GLASSESCOVERSEYES
glass_colour_type = /datum/client_colour/glass_colour/gray
+4 -4
View File
@@ -65,7 +65,7 @@
icon_state = "sunhudmed"
darkness_view = 1
flash_protect = FLASH_PROTECTION_FLASH
tint = 1
tint = 0.25
glass_colour_type = /datum/client_colour/glass_colour/blue
/obj/item/clothing/glasses/hud/diagnostic
@@ -92,7 +92,7 @@
icon_state = "sunhuddiag"
inhand_icon_state = "glasses"
flash_protect = FLASH_PROTECTION_FLASH
tint = 1
tint = 0.25
/obj/item/clothing/glasses/hud/security
name = "security HUD"
@@ -137,7 +137,7 @@
icon_state = "sunhudsec"
darkness_view = 1
flash_protect = FLASH_PROTECTION_FLASH
tint = 1
tint = 0.25
glass_colour_type = /datum/client_colour/glass_colour/darkred
/obj/item/clothing/glasses/hud/security/night
@@ -232,7 +232,7 @@
icon_state = "bigsunglasses"
darkness_view = 1
flash_protect = FLASH_PROTECTION_FLASH
tint = 1
tint = 0.25
glass_colour_type = /datum/client_colour/glass_colour/gray
+1 -1
View File
@@ -118,7 +118,7 @@
dog_fashion = null
actions_types = list(/datum/action/item_action/toggle_helmet_light, /datum/action/item_action/toggle_welding_screen)
flash_protect = FLASH_PROTECTION_WELDER
tint = 2
tint = 2.75
flags_inv = HIDEEYES | HIDEFACE | HIDESNOUT
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
visor_vars_to_toggle = VISOR_FLASHPROTECT | VISOR_TINT
+1 -1
View File
@@ -6,7 +6,7 @@
inhand_icon_state = "welding"
custom_materials = list(/datum/material/iron=1750, /datum/material/glass=400)
flash_protect = FLASH_PROTECTION_WELDER
tint = 2
tint = 2.75
armor = list(MELEE = 10, BULLET = 0, LASER = 0,ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 100, ACID = 60)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDESNOUT
actions_types = list(/datum/action/item_action/toggle)
+21 -1
View File
@@ -9,6 +9,7 @@
permeability_coefficient = 0.01
flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH | PEPPERPROOF
resistance_flags = NONE
tint = 1.5
///Max numbers of installable filters
var/max_filters = 1
///List to keep track of each filter
@@ -122,7 +123,7 @@
icon_state = "weldingmask"
flash_protect = FLASH_PROTECTION_WELDER
custom_materials = list(/datum/material/iron=4000, /datum/material/glass=2000)
tint = 2
tint = 2.75
armor = list(MELEE = 10, BULLET = 0, LASER = 0,ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 100, ACID = 55)
actions_types = list(/datum/action/item_action/toggle)
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDESNOUT
@@ -149,6 +150,8 @@
icon_state = "plaguedoctor"
inhand_icon_state = "gas_mask"
armor = list(MELEE = 0, BULLET = 0, LASER = 2,ENERGY = 2, BOMB = 0, BIO = 75, FIRE = 0, ACID = 0)
flags_cover = MASKCOVERSEYES
tint = 0
/obj/item/clothing/mask/gas/syndicate
name = "syndicate mask"
@@ -157,6 +160,7 @@
resistance_flags = FIRE_PROOF | ACID_PROOF
strip_delay = 60
w_class = WEIGHT_CLASS_SMALL
tint = 0.25
/obj/item/clothing/mask/gas/clown_hat
name = "clown wig and mask"
@@ -171,6 +175,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/plasmaman
@@ -216,6 +221,7 @@
icon_state = "sexyclown"
inhand_icon_state = "sexyclown"
flags_cover = MASKCOVERSEYES
tint = 0
resistance_flags = FLAMMABLE
species_exception = list(/datum/species/golem/bananium)
@@ -227,6 +233,7 @@
inhand_icon_state = "mime"
w_class = WEIGHT_CLASS_SMALL
flags_cover = MASKCOVERSEYES
tint = 0
resistance_flags = FLAMMABLE
actions_types = list(/datum/action/item_action/adjust)
species_exception = list(/datum/species/golem)
@@ -272,6 +279,7 @@
icon_state = "monkeymask"
inhand_icon_state = "monkeymask"
flags_cover = MASKCOVERSEYES
tint = 0
resistance_flags = FLAMMABLE
/obj/item/clothing/mask/gas/sexymime
@@ -281,6 +289,7 @@
icon_state = "sexymime"
inhand_icon_state = "sexymime"
flags_cover = MASKCOVERSEYES
tint = 0
resistance_flags = FLAMMABLE
species_exception = list(/datum/species/golem)
@@ -289,6 +298,8 @@
desc = "Beep boop."
icon_state = "death"
resistance_flags = FLAMMABLE
flags_cover = MASKCOVERSEYES
tint = 0
/obj/item/clothing/mask/gas/owl_mask
name = "owl mask"
@@ -296,12 +307,15 @@
icon_state = "owl"
clothing_flags = MASKINTERNALS
flags_cover = MASKCOVERSEYES
tint = 0
resistance_flags = FLAMMABLE
/obj/item/clothing/mask/gas/carp
name = "carp mask"
desc = "Gnash gnash."
icon_state = "carp_mask"
flags_cover = MASKCOVERSEYES
tint = 0
/obj/item/clothing/mask/gas/tiki_mask
name = "tiki mask"
@@ -314,6 +328,8 @@
actions_types = list(/datum/action/item_action/adjust)
dog_fashion = null
species_exception = list(/datum/species/golem/wood)
flags_cover = MASKCOVERSEYES
tint = 0
var/list/tikimask_designs = list()
/obj/item/clothing/mask/gas/tiki_mask/Initialize(mapload)
@@ -355,6 +371,8 @@
inhand_icon_state = "hunter"
resistance_flags = FIRE_PROOF | ACID_PROOF
flags_inv = HIDEFACIALHAIR|HIDEFACE|HIDEEYES|HIDEEARS|HIDEHAIR|HIDESNOUT
flags_cover = MASKCOVERSEYES
tint = 0
/obj/item/clothing/mask/gas/driscoll
name = "driscoll mask"
@@ -363,3 +381,5 @@
flags_inv = HIDEFACIALHAIR
w_class = WEIGHT_CLASS_NORMAL
inhand_icon_state = "driscoll_mask"
flags_cover = MASKCOVERSEYES
tint = 0
@@ -43,7 +43,7 @@
inhand_icon_state = "plasmaman-helm"
strip_delay = 80
flash_protect = FLASH_PROTECTION_WELDER
tint = 2
tint = 2.75
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 100, ACID = 75)
resistance_flags = FIRE_PROOF
light_system = MOVABLE_LIGHT_DIRECTIONAL
@@ -45,6 +45,7 @@
actions_types = list(/datum/action/item_action/adjust)
armor = list(MELEE = 10, BULLET = 5, LASER = 5, ENERGY = 5, BOMB = 0, BIO = 50, FIRE = 20, ACID = 40, WOUND = 5)
resistance_flags = FIRE_PROOF
tint = 0.25
/obj/item/clothing/mask/gas/explorer/attack_self(mob/user)
adjustmask(user)
+15 -5
View File
@@ -584,6 +584,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)
@@ -606,13 +611,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 * 150, 0, 255))
else if(tinttotal > TINT_MINIMAL && tinttotal <= TINT_LIGHTER)
overlay_fullscreen("tint", /atom/movable/screen/fullscreen/impaired, 0, clamp(tinttotal * 200, 0, 255))
else if(tinttotal <= TINT_MINIMAL)
clear_fullscreen("tint", 0)
/mob/living/carbon/proc/get_total_tint()
+1
View File
@@ -13,3 +13,4 @@
inhand_icon_state = "s-ninja_mask"
strip_delay = 120
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
tint = 0.25
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 MiB

After

Width:  |  Height:  |  Size: 5.1 MiB