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
+8 -2
View File
@@ -886,10 +886,16 @@ proc/generate_image(var/tx as num, var/ty as num, var/tz as num, var/range as nu
//Capture includes non-existan turfs
if(!suppress_errors)
return
return generate_image_from_turfs(turfstocapture, range, cap_mode, user, lighting)
/proc/generate_image_from_turfs(turf/topleft, list/turf/turfstocapture, range as num, cap_mode = CAPTURE_MODE_PARTIAL, mob/living/user, lighting = TRUE)
var/tx = topleft.x
var/ty = topleft.y
//Lines below determine what objects will be rendered
var/list/atoms = list()
for(var/turf/T in turfstocapture)
atoms.Add(T)
atoms += T
for(var/atom/A in T)
if(istype(A, /atom/movable/lighting_overlay)) //Special case for lighting
continue
@@ -899,7 +905,7 @@ proc/generate_image(var/tx as num, var/ty as num, var/tz as num, var/range as nu
atoms += A
//Lines below actually render all colected data
//Lines below actually render all collected data
atoms = sort_atoms_by_layer(atoms)
var/icon/cap = icon('icons/effects/96x96.dmi', "")
cap.Scale(range*32, range*32)
@@ -32,7 +32,7 @@
cell = new/obj/item/weapon/cell() //comes with the crappy default power cell - high-capacity ones shouldn't be hard to find
cell.loc = src
// Checks whether the cooling unit is being worn on the back/suit slot.
// That way you can't carry it in your hands while it's running to cool yourself down.
/obj/item/device/suit_cooling_unit/proc/is_in_slot()
@@ -48,7 +48,7 @@
if (!is_in_slot())
return
var/mob/living/carbon/human/H = loc
var/efficiency = 1 - H.get_pressure_weakness() //you need to have a good seal for effective cooling
@@ -197,6 +197,10 @@
if (on)
if (attached_to_suit(src.loc))
user << "It's switched on and running."
else if (istype(src.loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src.loc
if (H.get_species()=="Industrial Frame")
user << "It's switched on and running, connected to the cooling systems of [H]."
else
user << "It's switched on, but not attached to anything."
else
+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)
+5
View File
@@ -63,6 +63,11 @@
<li class="bugfix">The lighting engine and cameras have settled their differences and will work properly together now.</li>
<li class="tweak">Made a few elements of camera code slightly less completely stupid, camera lag may be slightly lower.</li>
</ul>
<h3 class="author">MoondancerPony updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">Removed blind IPC clairvoyance. IPCs can no longer see when their optics have been removed.</li>
<li class="tweak">Industrial IPCs are now officially rated for low-pressure usage.</li>
</ul>
<h3 class="author">Nanako updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">Fixed a lot of missing safety checks in the kitchen that were allowing mice, ghosts and AIs to do things they shouldnt.</li>
+4
View File
@@ -4119,6 +4119,10 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
work properly together now.
- tweak: Made a few elements of camera code slightly less completely stupid, camera
lag may be slightly lower.
MoondancerPony:
- bugfix: Removed blind IPC clairvoyance. IPCs can no longer see when their optics
have been removed.
- tweak: Industrial IPCs are now officially rated for low-pressure usage.
Nanako:
- bugfix: Fixed a lot of missing safety checks in the kitchen that were allowing
mice, ghosts and AIs to do things they shouldnt.