mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +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]"
|
||||
cannotzoom = 1
|
||||
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
|
||||
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"
|
||||
|
||||
@@ -254,31 +254,31 @@ BLIND // can't see anything
|
||||
|
||||
/obj/item/clothing/head/attack_self(mob/user)
|
||||
if(brightness_on)
|
||||
|
||||
if(!isturf(user.loc))
|
||||
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||
return
|
||||
|
||||
on = !on
|
||||
|
||||
overlays.Cut()
|
||||
update_icon()
|
||||
if(on)
|
||||
if(!light_overlay_cache["[light_overlay]_icon"])
|
||||
light_overlay_cache["[light_overlay]_icon"] = image("icon" = 'icons/obj/light_overlays.dmi', "icon_state" = "[light_overlay]")
|
||||
if(!light_overlay_cache["[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"]
|
||||
user.SetLuminosity(user.luminosity + brightness_on)
|
||||
else
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_head()
|
||||
|
||||
else
|
||||
return ..(user)
|
||||
|
||||
/obj/item/clothing/head/update_icon(var/mob/user)
|
||||
|
||||
overlays.Cut()
|
||||
if(on)
|
||||
if(!light_overlay_cache["[light_overlay]_icon"])
|
||||
light_overlay_cache["[light_overlay]_icon"] = image("icon" = 'icons/obj/light_overlays.dmi', "icon_state" = "[light_overlay]")
|
||||
if(!light_overlay_cache["[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"]
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_head()
|
||||
|
||||
/obj/item/clothing/head/proc/update_light(mob/user)
|
||||
|
||||
if(!brightness_on)
|
||||
|
||||
@@ -204,13 +204,14 @@
|
||||
if(!M)
|
||||
failed_to_seal = 1
|
||||
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/compare_piece = piece_data[2]
|
||||
var/msg_type = piece_data[3]
|
||||
var/piece_type = piece_data[4]
|
||||
|
||||
if(!piece)
|
||||
if(!piece || !piece_type)
|
||||
continue
|
||||
|
||||
if(!istype(M) || !istype(piece) || !istype(compare_piece) || !msg_type)
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
icon_state = "breacher_rig"
|
||||
armor = list(melee = 90, bullet = 90, laser = 90, energy = 90, bomb = 90, bio = 100, rad = 80)
|
||||
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
|
||||
client.images.Remove(hud)
|
||||
|
||||
client.screen.Remove(global_huds)
|
||||
client.screen -= global_huds
|
||||
|
||||
update_action_buttons()
|
||||
|
||||
@@ -1484,20 +1484,23 @@
|
||||
if(eye_blurry) client.screen += global_hud.blurry
|
||||
if(druggy) client.screen += global_hud.druggy
|
||||
|
||||
var/masked = 0
|
||||
|
||||
if(!masked && istype(glasses, /obj/item/clothing/glasses/welding))
|
||||
var/obj/item/clothing/glasses/welding/O = glasses
|
||||
if(!O.up && tinted_weldhelh)
|
||||
if(tinted_weldhelh)
|
||||
var/found_welder
|
||||
if(istype(glasses, /obj/item/clothing/glasses/welding))
|
||||
var/obj/item/clothing/glasses/welding/O = glasses
|
||||
if(!O.up)
|
||||
found_welder = 1
|
||||
else if(istype(head, /obj/item/clothing/head/welding))
|
||||
var/obj/item/clothing/head/welding/O = head
|
||||
if(!O.up)
|
||||
found_welder = 1
|
||||
else if(istype(back, /obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/O = back
|
||||
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))
|
||||
found_welder = 1
|
||||
if(found_welder)
|
||||
client.screen |= global_hud.darkMask
|
||||
masked = 1
|
||||
|
||||
if(!masked && istype(back, /obj/item/weapon/rig))
|
||||
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.offline && O.offline_vision_restriction == 1) || (!O.offline && O.vision_restriction == 1))
|
||||
client.screen |= global_hud.darkMask
|
||||
|
||||
if(machine)
|
||||
if(!machine.check_eye(src))
|
||||
|
||||
Reference in New Issue
Block a user