mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 20:23:26 +00:00
Working on some suit bugs, attempted to fix the welding overlay issue with no success.
This commit is contained in:
@@ -661,7 +661,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
|||||||
usr << "You are unable to focus through the [devicename]"
|
usr << "You are unable to focus through the [devicename]"
|
||||||
cannotzoom = 1
|
cannotzoom = 1
|
||||||
else if(!zoom && global_hud.darkMask[1] in usr.client.screen)
|
else if(!zoom && global_hud.darkMask[1] in usr.client.screen)
|
||||||
usr << "Your welding equipment gets in the way of you looking through the [devicename]"
|
usr << "Your visor gets in the way of looking through the [devicename]"
|
||||||
cannotzoom = 1
|
cannotzoom = 1
|
||||||
else if(!zoom && usr.get_active_hand() != src)
|
else if(!zoom && usr.get_active_hand() != src)
|
||||||
usr << "You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better"
|
usr << "You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better"
|
||||||
|
|||||||
@@ -254,12 +254,19 @@ BLIND // can't see anything
|
|||||||
|
|
||||||
/obj/item/clothing/head/attack_self(mob/user)
|
/obj/item/clothing/head/attack_self(mob/user)
|
||||||
if(brightness_on)
|
if(brightness_on)
|
||||||
|
|
||||||
if(!isturf(user.loc))
|
if(!isturf(user.loc))
|
||||||
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||||
return
|
return
|
||||||
|
|
||||||
on = !on
|
on = !on
|
||||||
|
update_icon()
|
||||||
|
if(on)
|
||||||
|
user.SetLuminosity(user.luminosity + brightness_on)
|
||||||
|
else
|
||||||
|
user.SetLuminosity(user.luminosity - brightness_on)
|
||||||
|
else
|
||||||
|
return ..(user)
|
||||||
|
|
||||||
|
/obj/item/clothing/head/update_icon(var/mob/user)
|
||||||
|
|
||||||
overlays.Cut()
|
overlays.Cut()
|
||||||
if(on)
|
if(on)
|
||||||
@@ -268,17 +275,10 @@ BLIND // can't see anything
|
|||||||
if(!light_overlay_cache["[light_overlay]"])
|
if(!light_overlay_cache["[light_overlay]"])
|
||||||
light_overlay_cache["[light_overlay]"] = image("icon" = 'icons/mob/light_overlays.dmi', "icon_state" = "[light_overlay]")
|
light_overlay_cache["[light_overlay]"] = image("icon" = 'icons/mob/light_overlays.dmi', "icon_state" = "[light_overlay]")
|
||||||
overlays |= light_overlay_cache["[light_overlay]_icon"]
|
overlays |= light_overlay_cache["[light_overlay]_icon"]
|
||||||
user.SetLuminosity(user.luminosity + brightness_on)
|
|
||||||
else
|
|
||||||
user.SetLuminosity(user.luminosity - brightness_on)
|
|
||||||
|
|
||||||
if(istype(user,/mob/living/carbon/human))
|
if(istype(user,/mob/living/carbon/human))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
H.update_inv_head()
|
H.update_inv_head()
|
||||||
|
|
||||||
else
|
|
||||||
return ..(user)
|
|
||||||
|
|
||||||
/obj/item/clothing/head/proc/update_light(mob/user)
|
/obj/item/clothing/head/proc/update_light(mob/user)
|
||||||
|
|
||||||
if(!brightness_on)
|
if(!brightness_on)
|
||||||
|
|||||||
@@ -204,13 +204,14 @@
|
|||||||
if(!M)
|
if(!M)
|
||||||
failed_to_seal = 1
|
failed_to_seal = 1
|
||||||
else
|
else
|
||||||
for(var/list/piece_data in list(list(M.shoes,boots,"boots"),list(M.gloves,gloves,"gloves"),list(M.head,helmet,"helmet"),list(M.wear_suit,chest,"chest")))
|
for(var/list/piece_data in list(list(M.shoes,boots,"boots",boot_type),list(M.gloves,gloves,"gloves",glove_type),list(M.head,helmet,"helmet",helm_type),list(M.wear_suit,chest,"chest",chest_type)))
|
||||||
|
|
||||||
var/obj/item/piece = piece_data[1]
|
var/obj/item/piece = piece_data[1]
|
||||||
var/obj/item/compare_piece = piece_data[2]
|
var/obj/item/compare_piece = piece_data[2]
|
||||||
var/msg_type = piece_data[3]
|
var/msg_type = piece_data[3]
|
||||||
|
var/piece_type = piece_data[4]
|
||||||
|
|
||||||
if(!piece)
|
if(!piece || !piece_type)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if(!istype(M) || !istype(piece) || !istype(compare_piece) || !msg_type)
|
if(!istype(M) || !istype(piece) || !istype(compare_piece) || !msg_type)
|
||||||
|
|||||||
@@ -16,4 +16,4 @@
|
|||||||
icon_state = "breacher_rig"
|
icon_state = "breacher_rig"
|
||||||
armor = list(melee = 90, bullet = 90, laser = 90, energy = 90, bomb = 90, bio = 100, rad = 80)
|
armor = list(melee = 90, bullet = 90, laser = 90, energy = 90, bomb = 90, bio = 100, rad = 80)
|
||||||
vision_restriction = 0
|
vision_restriction = 0
|
||||||
offline_vision_restriction = 2
|
slowdown = 4
|
||||||
@@ -1245,7 +1245,7 @@
|
|||||||
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
|
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
|
||||||
client.images.Remove(hud)
|
client.images.Remove(hud)
|
||||||
|
|
||||||
client.screen.Remove(global_huds)
|
client.screen -= global_huds
|
||||||
|
|
||||||
update_action_buttons()
|
update_action_buttons()
|
||||||
|
|
||||||
@@ -1484,19 +1484,22 @@
|
|||||||
if(eye_blurry) client.screen += global_hud.blurry
|
if(eye_blurry) client.screen += global_hud.blurry
|
||||||
if(druggy) client.screen += global_hud.druggy
|
if(druggy) client.screen += global_hud.druggy
|
||||||
|
|
||||||
var/masked = 0
|
if(tinted_weldhelh)
|
||||||
|
var/found_welder
|
||||||
if(!masked && istype(glasses, /obj/item/clothing/glasses/welding))
|
if(istype(glasses, /obj/item/clothing/glasses/welding))
|
||||||
var/obj/item/clothing/glasses/welding/O = glasses
|
var/obj/item/clothing/glasses/welding/O = glasses
|
||||||
if(!O.up && tinted_weldhelh)
|
if(!O.up)
|
||||||
client.screen |= global_hud.darkMask
|
found_welder = 1
|
||||||
masked = 1
|
else if(istype(head, /obj/item/clothing/head/welding))
|
||||||
|
var/obj/item/clothing/head/welding/O = head
|
||||||
if(!masked && istype(back, /obj/item/weapon/rig))
|
if(!O.up)
|
||||||
|
found_welder = 1
|
||||||
|
else if(istype(back, /obj/item/weapon/rig))
|
||||||
var/obj/item/weapon/rig/O = back
|
var/obj/item/weapon/rig/O = back
|
||||||
// Ugh, why is this done on a case by case basis? Why is there no flag for causing weldervision?
|
|
||||||
if(O.helmet && O.helmet == head && (O.helmet.body_parts_covered & EYES))
|
if(O.helmet && O.helmet == head && (O.helmet.body_parts_covered & EYES))
|
||||||
if((O.offline && O.offline_vision_restriction == 1) || (!O.offline && O.vision_restriction == 1))
|
if((O.offline && O.offline_vision_restriction == 1) || (!O.offline && O.vision_restriction == 1))
|
||||||
|
found_welder = 1
|
||||||
|
if(found_welder)
|
||||||
client.screen |= global_hud.darkMask
|
client.screen |= global_hud.darkMask
|
||||||
|
|
||||||
if(machine)
|
if(machine)
|
||||||
|
|||||||
Reference in New Issue
Block a user