Merge pull request #1627 from Yoshax/lights

Lights changes and additions
This commit is contained in:
Datraen
2016-05-12 21:58:52 -04:00
7 changed files with 71 additions and 13 deletions
+8 -3
View File
@@ -13,6 +13,7 @@
var/on = 1
var/area/area = null
var/otherarea = null
var/image/overlay
/obj/machinery/light_switch/New()
..()
@@ -31,14 +32,18 @@
/obj/machinery/light_switch/proc/updateicon()
if(!overlay)
overlay = image(icon, "light1-overlay", LIGHTING_LAYER+0.1)
overlays.Cut()
if(stat & NOPOWER)
icon_state = "light-p"
set_light(0)
layer = OBJ_LAYER
else
icon_state = "light[on]"
set_light(2, 1.5, on ? "#82FF4C" : "#F86060")
layer = LIGHTING_LAYER+0.1
overlay.icon_state = "light[on]-overlay"
overlays += overlay
set_light(2, 0.1, on ? "#82FF4C" : "#F86060")
/obj/machinery/light_switch/examine(mob/user)
if(..(user, 1))
+2 -2
View File
@@ -213,10 +213,10 @@ steam.start() -- spawns the effect
icon = 'icons/effects/effects.dmi'
icon_state = "sparks"
/obj/effect/effect/smoke/illumination/New(var/newloc, var/brightness=15, var/lifetime=10)
/obj/effect/effect/smoke/illumination/New(var/newloc, var/lifetime=10, var/range=null, var/power=null, var/color=null)
time_to_live=lifetime
..()
set_light(brightness)
set_light(range, power, color)
/////////////////////////////////////////////
// Bad smoke
+6
View File
@@ -60,6 +60,10 @@
else //can only use it 5 times a minute
user << "<span class='warning'>*click* *click*</span>"
return
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.do_attack_animation(M)
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
var/flashfail = 0
@@ -112,6 +116,7 @@
/obj/item/device/flash/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
if(!user || !clown_check(user)) return
if(broken)
user.show_message("<span class='warning'>The [src.name] is broken</span>", 2)
return
@@ -131,6 +136,7 @@
else //can only use it 5 times a minute
user.show_message("<span class='warning'>*click* *click*</span>", 2)
return
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
flick("flash2", src)
if(user && isrobot(user))
@@ -22,13 +22,13 @@
B.update_icon()
new/obj/effect/effect/sparks(src.loc)
new/obj/effect/effect/smoke/illumination(src.loc, brightness=15)
new/obj/effect/effect/smoke/illumination(src.loc, 5, range=30, power=30, color="#FFFFFF")
qdel(src)
return
proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
M << "<span class='danger'>BANG</span>" // Called during the loop that bangs people in lockers/containers and when banging
playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 5) // people in normal view. Could theroetically be called during other explosions.
playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 30) // people in normal view. Could theroetically be called during other explosions.
// -- Polymorph
//Checking for protections
+15 -6
View File
@@ -14,7 +14,7 @@
kill_count = 15 //if the shell hasn't hit anything after travelling this far it just explodes.
var/flash_range = 0
var/brightness = 7
var/light_duration = 5
var/light_colour = "#ffffff"
/obj/item/projectile/energy/flash/on_impact(var/atom/A)
var/turf/T = flash_range? src.loc : get_turf(A)
@@ -29,16 +29,25 @@
playsound(src, 'sound/effects/snap.ogg', 50, 1)
src.visible_message("<span class='warning'>\The [src] explodes in a bright flash!</span>")
new /obj/effect/decal/cleanable/ash(src.loc) //always use src.loc so that ash doesn't end up inside windows
new /obj/effect/effect/sparks(T)
new /obj/effect/effect/smoke/illumination(T, brightness=max(flash_range*2, brightness), lifetime=light_duration)
var/datum/effect/effect/system/spark_spread/sparks = PoolOrNew(/datum/effect/effect/system/spark_spread)
sparks.set_up(2, 1, T)
sparks.start()
new /obj/effect/decal/cleanable/ash(src.loc) //always use src.loc so that ash doesn't end up inside windows
new /obj/effect/effect/smoke/illumination(T, 5, brightness, brightness, light_colour)
//blinds people like the flash round, but can also be used for temporary illumination
/obj/item/projectile/energy/flash/flare
damage = 10
flash_range = 1
brightness = 9 //similar to a flare
light_duration = 200
brightness = 15
/obj/item/projectile/energy/flash/flare/on_impact(var/atom/A)
light_colour = pick("#e58775", "#ffffff", "#90ff90", "#a09030")
..() //initial flash
//residual illumination
new /obj/effect/effect/smoke/illumination(src.loc, rand(190,240) SECONDS, range=8, power=3, color=light_colour) //same lighting power as flare
/obj/item/projectile/energy/electrode
name = "electrode"
@@ -0,0 +1,38 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
#################################
# Your name.
author: HarpyEagle
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- tweak: "Shotgun flare illumination now lasts longer, around 3-4 minutes."
- bugfix: "Fixed attack animation playing when using flashes even if the flash was not actually used due to being broken or recharging."
- bugfix: "Fixed lightswitches layering over darkness. Now only the light layers above shadow. Lightswitch illumination is now much more subtle."
Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB