Laser pointers (#5257)

* Laser pointers

Adds laser pointers, ported from tg/oldaurora (but heavily modified). They can be found in the loadout, as well as made by science. Science can also upgrade them, which makes them occasionally useful for blinding people, too.

The bugfixes which make several of the features work properly will come in a separate commit.

* Three fixes

Cats now have resting sprites for all 4 directions, instead of just east. This was needed to make cats look like they're pouncing on the laser dot.

Cameras can now be EMPed more than once, and EMPs actually are able to disable them now. This was needed for the shining lasers into cameras feature.

Flash_eyes() now actually displays a flashing animation on your screen when you get flashed (except for silicons, who for some reason are excluded from this unless EMPed). This was needed for laser pointers to have a temporary "blinding" effect when shone into someone's eyes.

(removes errant debug message too, whoops)

* Nerf

Reduced chances of laser pointers doing anything useful on silicons.

Also, fixes a duplicated proc, oops.

* Requested changes

Minor changes as requested - 'cell' to 'diode', view() to viewers(), range() to viewers().

Stops buckled or dead cats from reacting to laser pointers. Zombie cats are fun, but no.

Also, does another small nerf to the effects on silicons.
This commit is contained in:
PrismaticGynoid
2018-05-14 15:22:19 -07:00
committed by Atermonera
parent 5d73584fa3
commit eabfa03891
12 changed files with 259 additions and 3 deletions
@@ -79,6 +79,11 @@
path =/obj/item/weapon/storage/secure/briefcase
cost = 2
/datum/gear/utility/laserpointer
display_name = "laser pointer"
path =/obj/item/device/laser_pointer
cost = 2
/datum/gear/utility/flashlight
display_name = "flashlight"
path = /obj/item/device/flashlight
@@ -145,4 +150,4 @@
/datum/gear/utility/umbrella/New()
..()
gear_tweaks = list(gear_tweak_free_color_choice)
gear_tweaks = list(gear_tweak_free_color_choice)
+4
View File
@@ -266,6 +266,10 @@
/mob/living/carbon/proc/eyecheck()
return 0
/mob/living/carbon/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash)
if(eyecheck() < intensity || override_blindness_check)
return ..()
// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching.
// Stop! ... Hammertime! ~Carn
@@ -670,6 +670,12 @@
I.additional_flash_effects(number)
return number
/mob/living/carbon/human/flash_eyes(var/intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash)
if(internal_organs_by_name[O_EYES]) // Eyes are fucked, not a 'weak point'.
var/obj/item/organ/internal/eyes/I = internal_organs_by_name[O_EYES]
I.additional_flash_effects(intensity)
return ..()
#define add_clothing_protection(A) \
var/obj/item/clothing/C = A; \
flash_protection += C.flash_protection; \
+9
View File
@@ -866,6 +866,15 @@ default behaviour is:
to_chat(src, "<span class='notice'>You are now [resting ? "resting" : "getting up"]</span>")
update_canmove()
//called when the mob receives a bright flash
/mob/living/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash)
if(override_blindness_check || !(disabilities & BLIND))
overlay_fullscreen("flash", type)
spawn(25)
if(src)
clear_fullscreen("flash", 25)
return 1
/mob/living/proc/cannot_use_vents()
if(mob_size > MOB_SMALL)
return "You can't fit into that vent."
+9
View File
@@ -751,6 +751,15 @@ other types of metals and chemistry for reagents).
build_path = /obj/item/device/lightreplacer
sort_string = "VAAAH"
datum/design/item/laserpointer
name = "laser pointer"
desc = "Don't shine it in your eyes!"
id = "laser_pointer"
req_tech = list(TECH_MAGNET = 3)
materials = list(DEFAULT_WALL_MATERIAL = 100, "glass" = 50)
build_path = /obj/item/device/laser_pointer
sort_string = "VAAAI"
/datum/design/item/paicard
name = "'pAI', personal artificial intelligence device"
id = "paicard"