mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-27 18:42:19 +00:00
Code cleanup.
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
icon_state = "night"
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=2"
|
||||
vision_flags = SEE_TURFS
|
||||
darkness_view = 3
|
||||
|
||||
/obj/item/clothing/glasses/eyepatch
|
||||
|
||||
@@ -1267,12 +1267,6 @@ mob/living/carbon/human/yank_out_object()
|
||||
|
||||
species = all_species[new_species]
|
||||
|
||||
see_in_dark = species.darksight
|
||||
if(see_in_dark > 2)
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_ONE
|
||||
else
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
spawn(0)
|
||||
update_icons()
|
||||
|
||||
|
||||
@@ -1173,6 +1173,8 @@
|
||||
if(healths) healths.icon_state = "health7" //DEAD healthmeter
|
||||
else
|
||||
sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
see_in_dark = species.darksight
|
||||
see_invisible = see_in_dark>2 ? SEE_INVISIBLE_LEVEL_ONE : SEE_INVISIBLE_LIVING
|
||||
if(dna)
|
||||
switch(dna.mutantrace)
|
||||
if("slime")
|
||||
@@ -1217,46 +1219,29 @@
|
||||
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if(glasses)
|
||||
if(istype(glasses, /obj/item/clothing/glasses/meson))
|
||||
sight |= SEE_TURFS
|
||||
if(!druggy)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/night))
|
||||
see_in_dark = 5
|
||||
if(!druggy)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/thermal))
|
||||
sight |= SEE_MOBS
|
||||
if(!druggy)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/material))
|
||||
sight |= SEE_OBJS
|
||||
if(!druggy)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
var/obj/item/clothing/glasses/G = glasses
|
||||
if(istype(G))
|
||||
see_in_dark += G.darkness_view
|
||||
if(G.vision_flags)
|
||||
sight |= G.vision_flags
|
||||
if(!druggy)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
/* HUD shit goes here, as long as it doesn't modify sight flags */
|
||||
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
|
||||
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/sunglasses))
|
||||
see_in_dark = 1
|
||||
if(istype(glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||
var/obj/item/clothing/glasses/sunglasses/sechud/O = glasses
|
||||
if(O.hud) O.hud.process_hud(src)
|
||||
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if(istype(glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||
var/obj/item/clothing/glasses/sunglasses/sechud/O = glasses
|
||||
if(O.hud) O.hud.process_hud(src)
|
||||
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/hud))
|
||||
var/obj/item/clothing/glasses/hud/O = glasses
|
||||
O.process_hud(src)
|
||||
if(!druggy)
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
else
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
else if(!seer) // this works on BYOND 500 +
|
||||
see_in_dark = species.darksight
|
||||
|
||||
else if(!seer)
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
/* else if(!glasses || !seer) // On previous tests, this worked, but as of BYOND 500, it works for all but sunglasses
|
||||
see_in_dark = species.darksight
|
||||
see_invisible = SEE_INVISIBLE_LIVING */
|
||||
|
||||
if(healths)
|
||||
if (analgesic)
|
||||
|
||||
Reference in New Issue
Block a user