From bf6002605e2329279fdfa2498afac98d5952c35e Mon Sep 17 00:00:00 2001 From: MarinaGryphon Date: Fri, 14 Apr 2017 11:05:12 -0500 Subject: [PATCH 1/3] No More Psyborgs (Fixes #2077, adds Industrial Frame functionality requested by Cake) (#2090) Stopped IPCs from being able to see without optics installed. Made Industrial Frames actually pressure-proof, which allows them to use suit coolers on their back. (Apologies for accidentally including some old commits. They've already been merged, anyway, so I hope it's not too much trouble.) --- .../objects/items/devices/suit_cooling.dm | 8 +++++-- code/modules/mob/living/carbon/human/life.dm | 22 +++++++++++++------ html/changelogs/Moondancer-PR-2087.yml | 5 +++++ 3 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 html/changelogs/Moondancer-PR-2087.yml diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index 7a871283433..95937c01185 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index c2df63f5463..08edfe79077 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -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 diff --git a/html/changelogs/Moondancer-PR-2087.yml b/html/changelogs/Moondancer-PR-2087.yml new file mode 100644 index 00000000000..38ff41ded13 --- /dev/null +++ b/html/changelogs/Moondancer-PR-2087.yml @@ -0,0 +1,5 @@ +author: MoondancerPony +delete-after: True +changes: + - 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." From 2ed8a41d79b48ba3c93adbc54a2aa6d827932e45 Mon Sep 17 00:00:00 2001 From: Lohikar Date: Fri, 14 Apr 2017 13:50:49 -0500 Subject: [PATCH 2/3] Fix wallhack cameras (#2093) changes: Fixed cameras' visibility calculations. Possibly made cameras slightly faster. --- code/_helpers/icons.dm | 10 ++++++++-- code/modules/paperwork/photography.dm | 17 ++++++++++++----- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/code/_helpers/icons.dm b/code/_helpers/icons.dm index 783b83acba4..22ffb95a20a 100644 --- a/code/_helpers/icons.dm +++ b/code/_helpers/icons.dm @@ -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) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index d1b5d0ad594..23226c295d9 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -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) From 549c847d07c549affc027e8cad62df94693161ba Mon Sep 17 00:00:00 2001 From: skull132 Date: Fri, 14 Apr 2017 21:52:32 +0300 Subject: [PATCH 3/3] Changelogs, 14APR2017 II --- html/changelog.html | 5 +++++ html/changelogs/.all_changelog.yml | 4 ++++ html/changelogs/Moondancer-PR-2087.yml | 5 ----- 3 files changed, 9 insertions(+), 5 deletions(-) delete mode 100644 html/changelogs/Moondancer-PR-2087.yml diff --git a/html/changelog.html b/html/changelog.html index 678c271687c..d8c5873886f 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -63,6 +63,11 @@
  • The lighting engine and cameras have settled their differences and will work properly together now.
  • Made a few elements of camera code slightly less completely stupid, camera lag may be slightly lower.
  • +

    MoondancerPony updated:

    +
      +
    • Removed blind IPC clairvoyance. IPCs can no longer see when their optics have been removed.
    • +
    • Industrial IPCs are now officially rated for low-pressure usage.
    • +

    Nanako updated:

    • Fixed a lot of missing safety checks in the kitchen that were allowing mice, ghosts and AIs to do things they shouldnt.
    • diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index d19014fa3d2..14220a86d69 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -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. diff --git a/html/changelogs/Moondancer-PR-2087.yml b/html/changelogs/Moondancer-PR-2087.yml deleted file mode 100644 index 38ff41ded13..00000000000 --- a/html/changelogs/Moondancer-PR-2087.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: MoondancerPony -delete-after: True -changes: - - 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."