Thermal/NVG changes.

Thermals/NVGs can now be toggled on/off from the GUI action bar, same as mesons.
Adds charge sound for special goggles.
This commit is contained in:
PsiOmega
2015-04-05 09:52:18 +02:00
parent c7a4a77f50
commit d3a1ddfa09
6 changed files with 34 additions and 20 deletions

View File

@@ -30,8 +30,8 @@ var/datum/antagonist/raider/raiders
var/list/raider_glasses = list(
/obj/item/clothing/glasses/thermal,
/obj/item/clothing/glasses/thermal/eyepatch,
/obj/item/clothing/glasses/thermal/monocle
/obj/item/clothing/glasses/thermal/plain/eyepatch,
/obj/item/clothing/glasses/thermal/plain/monocle
)
var/list/raider_helmets = list(

View File

@@ -590,7 +590,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/det_suit(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/plain/monocle(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/head/det_hat(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/cloaking_device(M), slot_r_store)
@@ -660,7 +660,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/chaplain_hood(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/plain/monocle(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/chaplain_hoodie(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(M), slot_r_store)
@@ -681,7 +681,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/welding(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/plain/monocle(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/kitchenknife(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/scalpel(M), slot_r_store)
@@ -832,7 +832,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/plain/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/smokable/cigarette/cigar/havana(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/M1911(M), slot_belt)
@@ -888,7 +888,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/plain/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/hgpirate(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(M), slot_belt)

View File

@@ -10,7 +10,9 @@
//var/invisa_view = 0
var/prescription = 0
var/toggleable = 0
var/off_state = "degoggles"
var/active = 1
var/activation_sound = 'sound/items/goggles_charge.ogg'
var/obj/screen/overlay = null
body_parts_covered = EYES
@@ -18,13 +20,15 @@
if(toggleable)
if(active)
active = 0
icon_state = "degoggles"
icon_state = off_state
user.update_inv_glasses()
usr << "You deactivate the optical matrix on the [src]."
else
active = 1
icon_state = initial(icon_state)
user.update_inv_glasses()
if(activation_sound)
usr << activation_sound
usr << "You activate the optical matrix on the [src]."
/obj/item/clothing/glasses/meson
@@ -51,6 +55,8 @@
desc = "The goggles do nothing!"
icon_state = "purple"
item_state = "glasses"
toggleable = 1
icon_action_button = "action_science"
/obj/item/clothing/glasses/science/New()
..()
@@ -63,6 +69,9 @@
item_state = "glasses"
origin_tech = "magnets=2"
darkness_view = 7
toggleable = 1
icon_action_button = "action_nvg"
off_state = "denight"
/obj/item/clothing/glasses/night/New()
..()
@@ -208,6 +217,7 @@
item_state = "glasses"
origin_tech = "magnets=3"
toggleable = 1
icon_action_button = "action_thermal"
vision_flags = SEE_MOBS
invisa_view = 2
@@ -218,9 +228,11 @@
if(M.glasses == src)
M.eye_blind = 3
M.eye_blurry = 5
M.disabilities |= NEARSIGHTED
spawn(100)
M.disabilities &= ~NEARSIGHTED
// Don't cure being nearsighted
if(!(M.disabilities & NEARSIGHTED))
M.disabilities |= NEARSIGHTED
spawn(100)
M.disabilities &= ~NEARSIGHTED
..()
/obj/item/clothing/glasses/thermal/New()
@@ -231,28 +243,30 @@
name = "Optical Meson Scanner"
desc = "Used for seeing walls, floors, and stuff through anything."
icon_state = "meson"
icon_action_button = "action_meson"
origin_tech = "magnets=3;syndicate=4"
/obj/item/clothing/glasses/thermal/monocle
/obj/item/clothing/glasses/thermal/plain
toggleable = 0
activation_sound = null
icon_action_button = ""
/obj/item/clothing/glasses/thermal/plain/monocle
name = "Thermoncle"
desc = "A monocle thermal."
icon_state = "thermoncle"
flags = null //doesn't protect eyes because it's a monocle, duh
toggleable = 0
body_parts_covered = 0
/obj/item/clothing/glasses/thermal/eyepatch
/obj/item/clothing/glasses/thermal/plain/eyepatch
name = "Optical Thermal Eyepatch"
desc = "An eyepatch with built-in thermal optics"
icon_state = "eyepatch"
item_state = "eyepatch"
toggleable = 0
body_parts_covered = 0
/obj/item/clothing/glasses/thermal/jensen
/obj/item/clothing/glasses/thermal/plain/jensen
name = "Optical Thermal Implants"
desc = "A set of implantable lenses designed to augment your vision"
icon_state = "thermalimplants"
item_state = "syringe_kit"
toggleable = 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@@ -1888,7 +1888,7 @@
"Kp" = (/turf/unsimulated/floor{icon_state = "grass1"; name = "grass"},/area/wizard_station)
"Kq" = (/obj/structure/flora/ausbushes/fullgrass,/turf/unsimulated/floor{icon_state = "grass1"; name = "grass"},/area/wizard_station)
"Kr" = (/obj/effect/decal/cleanable/blood,/turf/unsimulated/floor{icon_state = "freezerfloor"; dir = 2},/area/wizard_station)
"Ks" = (/obj/structure/table/rack,/obj/item/clothing/suit/space/vox/stealth,/obj/item/clothing/head/helmet/space/vox/stealth,/obj/item/clothing/shoes/magboots/vox,/obj/item/clothing/gloves/yellow/vox,/obj/item/clothing/glasses/thermal/monocle,/obj/item/clothing/under/vox/vox_robes,/turf/unsimulated/floor{tag = "icon-asteroid"; icon_state = "asteroid"},/area/syndicate_mothership{name = "\improper Raider Base"})
"Ks" = (/obj/structure/table/rack,/obj/item/clothing/suit/space/vox/stealth,/obj/item/clothing/head/helmet/space/vox/stealth,/obj/item/clothing/shoes/magboots/vox,/obj/item/clothing/gloves/yellow/vox,/obj/item/clothing/glasses/thermal/plain/monocle,/obj/item/clothing/under/vox/vox_robes,/turf/unsimulated/floor{tag = "icon-asteroid"; icon_state = "asteroid"},/area/syndicate_mothership{name = "\improper Raider Base"})
"Kt" = (/turf/unsimulated/floor{icon_state = "freezerfloor"; dir = 2},/area/wizard_station)
"Ku" = (/obj/effect/landmark{name = "voxstart"},/turf/unsimulated/floor{tag = "icon-cult"; name = "plating"; icon_state = "cult"},/area/syndicate_mothership{name = "\improper Raider Base"})
"Kv" = (/obj/machinery/porta_turret{anchored = 0; check_records = 0; enabled = 0; req_one_access = list(103); use_power = 0},/turf/unsimulated/floor{icon_state = "bot"},/area/centcom/evac)
@@ -1975,7 +1975,7 @@
"LY" = (/obj/machinery/atmospherics/pipe/manifold/visible{dir = 8},/turf/simulated/shuttle/plating/vox,/area/shuttle/skipjack/station)
"LZ" = (/turf/simulated/shuttle/floor{icon_state = "floor4"; oxygen = 0},/area/shuttle/skipjack/station)
"Ma" = (/turf/unsimulated/wall{icon_state = "iron9"},/area/shuttle/skipjack/station)
"Mb" = (/obj/structure/bed/chair{dir = 1},/obj/item/clothing/glasses/thermal/monocle,/obj/item/clothing/head/pirate,/turf/simulated/shuttle/floor{icon_state = "floor4"; oxygen = 0},/area/shuttle/skipjack/station)
"Mb" = (/obj/structure/bed/chair{dir = 1},/obj/item/clothing/glasses/thermal/plain/monocle,/obj/item/clothing/head/pirate,/turf/simulated/shuttle/floor{icon_state = "floor4"; oxygen = 0},/area/shuttle/skipjack/station)
"Mc" = (/obj/structure/bed/chair{dir = 1},/turf/simulated/shuttle/floor{icon_state = "floor4"; oxygen = 0},/area/shuttle/skipjack/station)
"Md" = (/turf/unsimulated/wall{icon_state = "iron5"},/area/shuttle/skipjack/station)
"Me" = (/obj/machinery/embedded_controller/radio/airlock/airlock_controller{tag_airpump = "vox_east_vent"; tag_exterior_door = "vox_northeast_lock"; frequency = 1331; id_tag = "vox_east_control"; tag_interior_door = "vox_southeast_lock"; pixel_x = -24; req_access = list(150); tag_chamber_sensor = "vox_east_sensor"},/obj/machinery/atmospherics/unary/vent_pump/high_volume{dir = 4; frequency = 1331; id_tag = "vox_east_vent"},/turf/simulated/shuttle/plating/vox,/area/shuttle/skipjack/station)

Binary file not shown.