Merge branch 'master' into development

This commit is contained in:
skull132
2017-04-14 22:54:12 +03:00
6 changed files with 50 additions and 16 deletions
+15 -7
View File
@@ -133,6 +133,9 @@
pressure_adjustment_coefficient = min(1,max(pressure_adjustment_coefficient,0)) // So it isn't less than 0 or larger than 1.
if(src.get_species() == "Industrial Frame")
pressure_adjustment_coefficient = 0 // woo, back-mounted cooling!
return pressure_adjustment_coefficient
// Calculate how much of the enviroment pressure-difference affects the human.
@@ -169,13 +172,18 @@
if(species.vision_organ)
vision = internal_organs_by_name[species.vision_organ]
if(!vision) // Presumably if a species has no vision organs, they see via some other means.
eye_blind = 0
blinded = 0
eye_blurry = 0
else if(vision.is_broken()) // Vision organs cut out or broken? Permablind.
eye_blind = 1
blinded = 1
if (!vision)
if (species.vision_organ) // if they should have eyes but don't, they can't see
eye_blind = 1
blinded = 1
eye_blurry = 1
else // if they're not supposed to have a vision organ, then they must see by some other means
eye_blind = 0
blinded = 0
eye_blurry = 0
else if (vision.is_broken()) // if their eyes have been damaged or detached, they're blinded
eye_blind = 1
blinded = 1
eye_blurry = 1
else
//blindness
+12 -5
View File
@@ -204,22 +204,29 @@ var/global/photo_count = 0
return TRUE // DVIEW will do sanity checks, we've got no special checks.
/obj/item/device/camera/proc/captureimage(atom/target, mob/living/user, flag)
var/obj/item/weapon/photo/p = createpicture(target, user, flag)
printpicture(user, p)
/obj/item/device/camera/proc/createpicture(atom/target, mob/living/user, flag)
var/mobs = ""
var/list/turfs = list()
FOR_DVIEW(var/turf/T, size, target, INVISIBILITY_LIGHTING)
if (user.can_capture_turf(T))
mobs += get_mobs(T)
turfs += T
END_FOR_DVIEW
var/obj/item/weapon/photo/p = createpicture(target, user, mobs, flag)
printpicture(user, p)
/obj/item/device/camera/proc/createpicture(atom/target, mob/user, mobs, flag)
var/x_c = target.x - (size-1)/2
var/y_c = target.y - (size-1)/2
var/z_c = target.z
var/icon/photoimage = generate_image(x_c, y_c, z_c, size, CAPTURE_MODE_REGULAR, user)
var/turf/topleft = locate(x_c, y_c, z_c)
if (!topleft)
return null
var/icon/photoimage = generate_image_from_turfs(topleft, turfs, size, CAPTURE_MODE_REGULAR, user)
var/icon/small_img = icon(photoimage)
var/icon/tiny_img = icon(photoimage)