mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
An assortment of Lighting Stuff
This commit is contained in:
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
#define LIGHTING_SOFT_THRESHOLD 0.05 // If the max of the lighting lumcounts of each spectrum drops below this, disable luminosity on the lighting overlays. This also should be the transparancy of the "soft_dark" icon state.
|
#define LIGHTING_SOFT_THRESHOLD 0.05 // If the max of the lighting lumcounts of each spectrum drops below this, disable luminosity on the lighting overlays. This also should be the transparancy of the "soft_dark" icon state.
|
||||||
|
|
||||||
|
#define LIGHTING_MULT_FACTOR 0.5
|
||||||
|
|
||||||
// If I were you I'd leave this alone.
|
// If I were you I'd leave this alone.
|
||||||
#define LIGHTING_BASE_MATRIX \
|
#define LIGHTING_BASE_MATRIX \
|
||||||
list \
|
list \
|
||||||
@@ -77,7 +79,7 @@
|
|||||||
//Lighting values used by the station lights
|
//Lighting values used by the station lights
|
||||||
#define LIGHT_COLOR_FLUORESCENT_TUBE "#E0EFFF"
|
#define LIGHT_COLOR_FLUORESCENT_TUBE "#E0EFFF"
|
||||||
#define LIGHT_COLOR_FLUORESCENT_FLASHLIGHT "#CDDDFF"
|
#define LIGHT_COLOR_FLUORESCENT_FLASHLIGHT "#CDDDFF"
|
||||||
#define LIGHT_COLOR_INCANDESCENT_TUBE "#FFEEDD"
|
#define LIGHT_COLOR_INCANDESCENT_TUBE "#FFFEB8"
|
||||||
#define LIGHT_COLOR_INCANDESCENT_BULB "#FFDDBB"
|
#define LIGHT_COLOR_INCANDESCENT_BULB "#FFDDBB"
|
||||||
#define LIGHT_COLOR_INCANDESCENT_FLASHLIGHT "#FFCC66"
|
#define LIGHT_COLOR_INCANDESCENT_FLASHLIGHT "#FFCC66"
|
||||||
|
|
||||||
|
|||||||
@@ -121,48 +121,18 @@
|
|||||||
|
|
||||||
/obj/item/device/lightreplacer/proc/ReplaceLight(var/obj/machinery/light/target, var/mob/living/U)
|
/obj/item/device/lightreplacer/proc/ReplaceLight(var/obj/machinery/light/target, var/mob/living/U)
|
||||||
|
|
||||||
if(target.status != LIGHT_OK)
|
if(target.status == LIGHT_OK)
|
||||||
if(CanUse(U))
|
to_chat(U, "There is a working [target.get_fitting_name()] already inserted.")
|
||||||
if(!Use(U)) return
|
else if(!CanUse(U))
|
||||||
U << "<span class='notice'>You replace the [target.fitting] with the [src].</span>"
|
to_chat(U, failmsg)
|
||||||
|
else if(Use(U))
|
||||||
|
to_chat(U, "<span class='notice'>You replace the [target.get_fitting_name()] with the [src].</span>")
|
||||||
|
|
||||||
if(target.status != LIGHT_EMPTY)
|
if(target.status != LIGHT_EMPTY)
|
||||||
|
target.remove_bulb()
|
||||||
|
|
||||||
var/obj/item/weapon/light/L1 = new target.light_type(target.loc)
|
var/obj/item/weapon/light/L = new target.light_type()
|
||||||
L1.status = target.status
|
target.insert_bulb(L)
|
||||||
L1.rigged = target.rigged
|
|
||||||
L1.brightness_range = target.brightness_range
|
|
||||||
L1.brightness_power = target.brightness_power
|
|
||||||
L1.brightness_color = target.brightness_color
|
|
||||||
L1.switchcount = target.switchcount
|
|
||||||
target.switchcount = 0
|
|
||||||
L1.update()
|
|
||||||
|
|
||||||
target.status = LIGHT_EMPTY
|
|
||||||
target.update()
|
|
||||||
|
|
||||||
var/obj/item/weapon/light/L2 = new target.light_type()
|
|
||||||
|
|
||||||
target.status = L2.status
|
|
||||||
target.switchcount = L2.switchcount
|
|
||||||
target.rigged = emagged
|
|
||||||
target.brightness_range = L2.brightness_range
|
|
||||||
target.brightness_power = L2.brightness_power
|
|
||||||
target.brightness_color = L2.brightness_color
|
|
||||||
target.on = target.has_power()
|
|
||||||
target.update()
|
|
||||||
qdel(L2)
|
|
||||||
|
|
||||||
if(target.on && target.rigged)
|
|
||||||
target.explode()
|
|
||||||
return
|
|
||||||
|
|
||||||
else
|
|
||||||
U << failmsg
|
|
||||||
return
|
|
||||||
else
|
|
||||||
U << "There is a working [target.fitting] already inserted."
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/emag_act(var/remaining_charges, var/mob/user)
|
/obj/item/device/lightreplacer/emag_act(var/remaining_charges, var/mob/user)
|
||||||
emagged = !emagged
|
emagged = !emagged
|
||||||
|
|||||||
@@ -99,9 +99,9 @@
|
|||||||
|
|
||||||
/datum/lighting_corner/proc/update_overlays()
|
/datum/lighting_corner/proc/update_overlays()
|
||||||
// Cache these values a head of time so 4 individual lighting overlays don't all calculate them individually.
|
// Cache these values a head of time so 4 individual lighting overlays don't all calculate them individually.
|
||||||
var/lum_r = src.lum_r
|
var/lum_r = src.lum_r > 0 ? LIGHTING_MULT_FACTOR * sqrt(src.lum_r) : src.lum_r
|
||||||
var/lum_g = src.lum_g
|
var/lum_g = src.lum_g > 0 ? LIGHTING_MULT_FACTOR * sqrt(src.lum_g) : src.lum_g
|
||||||
var/lum_b = src.lum_b
|
var/lum_b = src.lum_b > 0 ? LIGHTING_MULT_FACTOR * sqrt(src.lum_b) : src.lum_b
|
||||||
var/mx = max(lum_r, lum_g, lum_b) // Scale it so 1 is the strongest lum, if it is above 1.
|
var/mx = max(lum_r, lum_g, lum_b) // Scale it so 1 is the strongest lum, if it is above 1.
|
||||||
. = 1 // factor
|
. = 1 // factor
|
||||||
if (mx > 1)
|
if (mx > 1)
|
||||||
|
|||||||
@@ -189,7 +189,7 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
// This is the define used to calculate falloff.
|
// This is the define used to calculate falloff.
|
||||||
#define LUM_FALLOFF(C, T)(1 - CLAMP01(sqrt((C.x - T.x) ** 2 +(C.y - T.y) ** 2 + LIGHTING_HEIGHT) / max(1, light_range)))
|
#define LUM_FALLOFF(C, T)(1 - CLAMP01(((C.x - T.x) ** 2 +(C.y - T.y) ** 2 + LIGHTING_HEIGHT) ** 0.6 / max(1, light_range)))
|
||||||
|
|
||||||
/datum/light_source/proc/apply_lum()
|
/datum/light_source/proc/apply_lum()
|
||||||
var/static/update_gen = 1
|
var/static/update_gen = 1
|
||||||
|
|||||||
@@ -9,6 +9,14 @@
|
|||||||
#define LIGHT_BROKEN 2
|
#define LIGHT_BROKEN 2
|
||||||
#define LIGHT_BURNED 3
|
#define LIGHT_BURNED 3
|
||||||
#define LIGHT_BULB_TEMPERATURE 400 //K - used value for a 60W bulb
|
#define LIGHT_BULB_TEMPERATURE 400 //K - used value for a 60W bulb
|
||||||
|
#define LIGHTING_POWER_FACTOR 5 //5W per luminosity * range
|
||||||
|
|
||||||
|
var/global/list/light_type_cache = list()
|
||||||
|
/proc/get_light_type_instance(var/light_type)
|
||||||
|
. = light_type_cache[light_type]
|
||||||
|
if(!.)
|
||||||
|
. = new light_type
|
||||||
|
light_type_cache[light_type] = .
|
||||||
|
|
||||||
/obj/machinery/light_construct
|
/obj/machinery/light_construct
|
||||||
name = "light fixture frame"
|
name = "light fixture frame"
|
||||||
@@ -19,16 +27,26 @@
|
|||||||
plane = MOB_PLANE
|
plane = MOB_PLANE
|
||||||
layer = ABOVE_MOB_LAYER
|
layer = ABOVE_MOB_LAYER
|
||||||
var/stage = 1
|
var/stage = 1
|
||||||
var/fixture_type = "tube"
|
var/fixture_type = /obj/machinery/light
|
||||||
var/sheets_refunded = 2
|
var/sheets_refunded = 2
|
||||||
var/obj/machinery/light/newlight = null
|
|
||||||
|
|
||||||
/obj/machinery/light_construct/New()
|
/obj/machinery/light_construct/New(atom/newloc, obj/machinery/light/fixture = null)
|
||||||
..()
|
..(newloc)
|
||||||
if (fixture_type == "bulb")
|
if(fixture)
|
||||||
icon_state = "bulb-construct-stage1"
|
fixture_type = fixture.type
|
||||||
if (fixture_type == "flamp")
|
fixture.transfer_fingerprints_to(src)
|
||||||
icon_state = "flamp-construct-stage1"
|
set_dir(fixture.dir)
|
||||||
|
stage = 2
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
/obj/machinery/light_construct/update_icon()
|
||||||
|
switch(stage)
|
||||||
|
if(1)
|
||||||
|
icon_state = "tube-construct-stage1"
|
||||||
|
if(2)
|
||||||
|
icon_state = "tube-construct-stage2"
|
||||||
|
if(3)
|
||||||
|
icon_state = "tube-empty"
|
||||||
|
|
||||||
/obj/machinery/light_construct/examine(mob/user)
|
/obj/machinery/light_construct/examine(mob/user)
|
||||||
if(!..(user, 2))
|
if(!..(user, 2))
|
||||||
@@ -36,21 +54,18 @@
|
|||||||
|
|
||||||
switch(src.stage)
|
switch(src.stage)
|
||||||
if(1)
|
if(1)
|
||||||
user << "It's an empty frame."
|
to_chat(user, "It's an empty frame.")
|
||||||
return
|
|
||||||
if(2)
|
if(2)
|
||||||
user << "It's wired."
|
to_chat(user, "It's wired.")
|
||||||
return
|
|
||||||
if(3)
|
if(3)
|
||||||
user << "The casing is closed."
|
to_chat(user, "The casing is closed.")
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/light_construct/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/machinery/light_construct/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
if (W.is_wrench())
|
if (W.is_wrench())
|
||||||
if (src.stage == 1)
|
if (src.stage == 1)
|
||||||
playsound(src, W.usesound, 75, 1)
|
playsound(src, W.usesound, 75, 1)
|
||||||
usr << "You begin deconstructing [src]."
|
to_chat(usr, "You begin deconstructing [src].")
|
||||||
if (!do_after(usr, 30 * W.toolspeed))
|
if (!do_after(usr, 30 * W.toolspeed))
|
||||||
return
|
return
|
||||||
new /obj/item/stack/material/steel( get_turf(src.loc), sheets_refunded )
|
new /obj/item/stack/material/steel( get_turf(src.loc), sheets_refunded )
|
||||||
@@ -59,23 +74,17 @@
|
|||||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1)
|
playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
if (src.stage == 2)
|
if (src.stage == 2)
|
||||||
usr << "You have to remove the wires first."
|
to_chat(usr, "You have to remove the wires first.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if (src.stage == 3)
|
if (src.stage == 3)
|
||||||
usr << "You have to unscrew the case first."
|
to_chat(usr, "You have to unscrew the case first.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if(W.is_wirecutter())
|
if(W.is_wirecutter())
|
||||||
if (src.stage != 2) return
|
if (src.stage != 2) return
|
||||||
src.stage = 1
|
src.stage = 1
|
||||||
switch(fixture_type)
|
src.update_icon()
|
||||||
if ("tube")
|
|
||||||
src.icon_state = "tube-construct-stage1"
|
|
||||||
if("bulb")
|
|
||||||
src.icon_state = "bulb-construct-stage1"
|
|
||||||
if("flamp")
|
|
||||||
src.icon_state = "flamp-construct-stage1"
|
|
||||||
new /obj/item/stack/cable_coil(get_turf(src.loc), 1, "red")
|
new /obj/item/stack/cable_coil(get_turf(src.loc), 1, "red")
|
||||||
user.visible_message("[user.name] removes the wiring from [src].", \
|
user.visible_message("[user.name] removes the wiring from [src].", \
|
||||||
"You remove the wiring from [src].", "You hear a noise.")
|
"You remove the wiring from [src].", "You hear a noise.")
|
||||||
@@ -86,42 +95,22 @@
|
|||||||
if (src.stage != 1) return
|
if (src.stage != 1) return
|
||||||
var/obj/item/stack/cable_coil/coil = W
|
var/obj/item/stack/cable_coil/coil = W
|
||||||
if (coil.use(1))
|
if (coil.use(1))
|
||||||
switch(fixture_type)
|
|
||||||
if ("tube")
|
|
||||||
src.icon_state = "tube-construct-stage2"
|
|
||||||
if("bulb")
|
|
||||||
src.icon_state = "bulb-construct-stage2"
|
|
||||||
if("flamp")
|
|
||||||
src.icon_state = "flamp-construct-stage2"
|
|
||||||
src.stage = 2
|
src.stage = 2
|
||||||
|
src.update_icon()
|
||||||
user.visible_message("[user.name] adds wires to [src].", \
|
user.visible_message("[user.name] adds wires to [src].", \
|
||||||
"You add wires to [src].")
|
"You add wires to [src].")
|
||||||
return
|
return
|
||||||
|
|
||||||
if(W.is_screwdriver())
|
if(W.is_screwdriver())
|
||||||
if (src.stage == 2)
|
if (src.stage == 2)
|
||||||
switch(fixture_type)
|
|
||||||
if ("tube")
|
|
||||||
src.icon_state = "tube-empty"
|
|
||||||
if("bulb")
|
|
||||||
src.icon_state = "bulb-empty"
|
|
||||||
if("flamp")
|
|
||||||
src.icon_state = "flamp-empty"
|
|
||||||
src.stage = 3
|
src.stage = 3
|
||||||
|
src.update_icon()
|
||||||
user.visible_message("[user.name] closes [src]'s casing.", \
|
user.visible_message("[user.name] closes [src]'s casing.", \
|
||||||
"You close [src]'s casing.", "You hear a noise.")
|
"You close [src]'s casing.", "You hear a noise.")
|
||||||
playsound(src, W.usesound, 75, 1)
|
playsound(src, W.usesound, 75, 1)
|
||||||
|
|
||||||
switch(fixture_type)
|
var/obj/machinery/light/newlight = new fixture_type(src.loc, src)
|
||||||
|
newlight.set_dir(src.dir)
|
||||||
if("tube")
|
|
||||||
newlight = new /obj/machinery/light/built(src.loc)
|
|
||||||
if ("bulb")
|
|
||||||
newlight = new /obj/machinery/light/small/built(src.loc)
|
|
||||||
if ("flamp")
|
|
||||||
newlight = new /obj/machinery/light/flamp/built(src.loc)
|
|
||||||
|
|
||||||
newlight.dir = src.dir
|
|
||||||
src.transfer_fingerprints_to(newlight)
|
src.transfer_fingerprints_to(newlight)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
return
|
return
|
||||||
@@ -134,9 +123,18 @@
|
|||||||
icon_state = "bulb-construct-stage1"
|
icon_state = "bulb-construct-stage1"
|
||||||
anchored = 1
|
anchored = 1
|
||||||
stage = 1
|
stage = 1
|
||||||
fixture_type = "bulb"
|
fixture_type = /obj/machinery/light/small
|
||||||
sheets_refunded = 1
|
sheets_refunded = 1
|
||||||
|
|
||||||
|
/obj/machinery/light_construct/small/update_icon()
|
||||||
|
switch(stage)
|
||||||
|
if(1)
|
||||||
|
icon_state = "bulb-construct-stage1"
|
||||||
|
if(2)
|
||||||
|
icon_state = "bulb-construct-stage2"
|
||||||
|
if(3)
|
||||||
|
icon_state = "bulb-empty"
|
||||||
|
|
||||||
/obj/machinery/light_construct/flamp
|
/obj/machinery/light_construct/flamp
|
||||||
name = "floor light fixture frame"
|
name = "floor light fixture frame"
|
||||||
desc = "A floor light fixture under construction."
|
desc = "A floor light fixture under construction."
|
||||||
@@ -146,9 +144,18 @@
|
|||||||
plane = OBJ_PLANE
|
plane = OBJ_PLANE
|
||||||
layer = OBJ_LAYER
|
layer = OBJ_LAYER
|
||||||
stage = 1
|
stage = 1
|
||||||
fixture_type = "flamp"
|
fixture_type = /obj/machinery/light/flamp
|
||||||
sheets_refunded = 2
|
sheets_refunded = 2
|
||||||
|
|
||||||
|
/obj/machinery/light_construct/flamp/update_icon()
|
||||||
|
switch(stage)
|
||||||
|
if(1)
|
||||||
|
icon_state = "flamp-construct-stage1"
|
||||||
|
if(2)
|
||||||
|
icon_state = "flamp-construct-stage2"
|
||||||
|
if(3)
|
||||||
|
icon_state = "flamp-empty"
|
||||||
|
|
||||||
// the standard tube light fixture
|
// the standard tube light fixture
|
||||||
/obj/machinery/light
|
/obj/machinery/light
|
||||||
name = "light fixture"
|
name = "light fixture"
|
||||||
@@ -164,13 +171,19 @@
|
|||||||
active_power_usage = 20 // VOREStation Edit - Keep lights at 20 power
|
active_power_usage = 20 // VOREStation Edit - Keep lights at 20 power
|
||||||
power_channel = LIGHT //Lights are calc'd via area so they dont need to be in the machine list
|
power_channel = LIGHT //Lights are calc'd via area so they dont need to be in the machine list
|
||||||
var/on = 0 // 1 if on, 0 if off
|
var/on = 0 // 1 if on, 0 if off
|
||||||
|
<<<<<<< HEAD
|
||||||
var/brightness_range = 10 // luminosity when on, also used in power calculation //VOREStation Edit - 8->10
|
var/brightness_range = 10 // luminosity when on, also used in power calculation //VOREStation Edit - 8->10
|
||||||
var/brightness_power = 0.8
|
var/brightness_power = 0.8
|
||||||
var/brightness_color = LIGHT_COLOR_FLUORESCENT_TUBE //VOREStation Edit - Our tubes are whiter
|
var/brightness_color = LIGHT_COLOR_FLUORESCENT_TUBE //VOREStation Edit - Our tubes are whiter
|
||||||
|
=======
|
||||||
|
var/brightness_range
|
||||||
|
var/brightness_power
|
||||||
|
var/brightness_color
|
||||||
|
>>>>>>> 584a9a4... An assortment of Lighting Stuff (#6196)
|
||||||
var/status = LIGHT_OK // LIGHT_OK, _EMPTY, _BURNED or _BROKEN
|
var/status = LIGHT_OK // LIGHT_OK, _EMPTY, _BURNED or _BROKEN
|
||||||
var/flickering = 0
|
var/flickering = 0
|
||||||
var/light_type = /obj/item/weapon/light/tube // the type of light item
|
var/light_type = /obj/item/weapon/light/tube // the type of light item
|
||||||
var/fitting = "tube"
|
var/construct_type = /obj/machinery/light_construct
|
||||||
var/switchcount = 0 // count of number of times switched on/off
|
var/switchcount = 0 // count of number of times switched on/off
|
||||||
// this is used to calc the probability the light burns out
|
// this is used to calc the probability the light burns out
|
||||||
|
|
||||||
@@ -189,12 +202,18 @@
|
|||||||
/obj/machinery/light/small
|
/obj/machinery/light/small
|
||||||
icon_state = "bulb1"
|
icon_state = "bulb1"
|
||||||
base_state = "bulb"
|
base_state = "bulb"
|
||||||
|
<<<<<<< HEAD
|
||||||
fitting = "bulb"
|
fitting = "bulb"
|
||||||
brightness_range = 5 //VOREStation Edit - 4->5
|
brightness_range = 5 //VOREStation Edit - 4->5
|
||||||
brightness_color = LIGHT_COLOR_INCANDESCENT_BULB
|
brightness_color = LIGHT_COLOR_INCANDESCENT_BULB
|
||||||
desc = "A small lighting fixture."
|
desc = "A small lighting fixture."
|
||||||
light_type = /obj/item/weapon/light/bulb
|
light_type = /obj/item/weapon/light/bulb
|
||||||
shows_alerts = FALSE
|
shows_alerts = FALSE
|
||||||
|
=======
|
||||||
|
desc = "A small lighting fixture."
|
||||||
|
light_type = /obj/item/weapon/light/bulb
|
||||||
|
construct_type = /obj/machinery/light_construct/small
|
||||||
|
>>>>>>> 584a9a4... An assortment of Lighting Stuff (#6196)
|
||||||
|
|
||||||
/obj/machinery/light/small/flicker
|
/obj/machinery/light/small/flicker
|
||||||
auto_flicker = TRUE
|
auto_flicker = TRUE
|
||||||
@@ -203,14 +222,20 @@
|
|||||||
icon = 'icons/obj/lighting.dmi'
|
icon = 'icons/obj/lighting.dmi'
|
||||||
icon_state = "flamp1"
|
icon_state = "flamp1"
|
||||||
base_state = "flamp"
|
base_state = "flamp"
|
||||||
|
<<<<<<< HEAD
|
||||||
fitting = "bulb"
|
fitting = "bulb"
|
||||||
brightness_range = 8 //VOREStation Edit - 4->8
|
brightness_range = 8 //VOREStation Edit - 4->8
|
||||||
|
=======
|
||||||
|
>>>>>>> 584a9a4... An assortment of Lighting Stuff (#6196)
|
||||||
plane = OBJ_PLANE
|
plane = OBJ_PLANE
|
||||||
layer = OBJ_LAYER
|
layer = OBJ_LAYER
|
||||||
brightness_color = LIGHT_COLOR_INCANDESCENT_BULB
|
|
||||||
desc = "A floor lamp."
|
desc = "A floor lamp."
|
||||||
light_type = /obj/item/weapon/light/bulb
|
light_type = /obj/item/weapon/light/bulb
|
||||||
|
<<<<<<< HEAD
|
||||||
shows_alerts = FALSE
|
shows_alerts = FALSE
|
||||||
|
=======
|
||||||
|
construct_type = /obj/machinery/light_construct/flamp
|
||||||
|
>>>>>>> 584a9a4... An assortment of Lighting Stuff (#6196)
|
||||||
var/lamp_shade = 1
|
var/lamp_shade = 1
|
||||||
|
|
||||||
/obj/machinery/light/flamp/flicker
|
/obj/machinery/light/flamp/flicker
|
||||||
@@ -218,8 +243,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/machinery/light/small/emergency
|
/obj/machinery/light/small/emergency
|
||||||
brightness_range = 4
|
light_type = /obj/item/weapon/light/bulb/red
|
||||||
brightness_color = "#da0205"
|
|
||||||
|
|
||||||
/obj/machinery/light/small/emergency/flicker
|
/obj/machinery/light/small/emergency/flicker
|
||||||
auto_flicker = TRUE
|
auto_flicker = TRUE
|
||||||
@@ -227,15 +251,18 @@
|
|||||||
|
|
||||||
/obj/machinery/light/spot
|
/obj/machinery/light/spot
|
||||||
name = "spotlight"
|
name = "spotlight"
|
||||||
fitting = "large tube"
|
|
||||||
light_type = /obj/item/weapon/light/tube/large
|
light_type = /obj/item/weapon/light/tube/large
|
||||||
|
<<<<<<< HEAD
|
||||||
shows_alerts = FALSE
|
shows_alerts = FALSE
|
||||||
brightness_range = 12
|
brightness_range = 12
|
||||||
brightness_power = 0.9
|
brightness_power = 0.9
|
||||||
|
=======
|
||||||
|
>>>>>>> 584a9a4... An assortment of Lighting Stuff (#6196)
|
||||||
|
|
||||||
/obj/machinery/light/spot/flicker
|
/obj/machinery/light/spot/flicker
|
||||||
auto_flicker = TRUE
|
auto_flicker = TRUE
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
/obj/machinery/light/built/New()
|
/obj/machinery/light/built/New()
|
||||||
status = LIGHT_EMPTY
|
status = LIGHT_EMPTY
|
||||||
@@ -258,21 +285,24 @@
|
|||||||
update(0)
|
update(0)
|
||||||
..()
|
..()
|
||||||
//VOREStation Add End
|
//VOREStation Add End
|
||||||
|
=======
|
||||||
|
>>>>>>> 584a9a4... An assortment of Lighting Stuff (#6196)
|
||||||
// create a new lighting fixture
|
// create a new lighting fixture
|
||||||
/obj/machinery/light/New()
|
/obj/machinery/light/New(atom/newloc, obj/machinery/light_construct/construct = null)
|
||||||
..()
|
..(newloc)
|
||||||
|
|
||||||
spawn(2)
|
if(construct)
|
||||||
on = has_power()
|
status = LIGHT_EMPTY
|
||||||
|
construct_type = construct.type
|
||||||
|
construct.transfer_fingerprints_to(src)
|
||||||
|
set_dir(construct.dir)
|
||||||
|
else
|
||||||
|
var/obj/item/weapon/light/L = get_light_type_instance(light_type)
|
||||||
|
update_from_bulb(L)
|
||||||
|
if(prob(L.broken_chance))
|
||||||
|
broken(1)
|
||||||
|
|
||||||
switch(fitting)
|
on = powered()
|
||||||
if("tube")
|
|
||||||
if(prob(2))
|
|
||||||
broken(1)
|
|
||||||
if("bulb")
|
|
||||||
if(prob(5))
|
|
||||||
broken(1)
|
|
||||||
spawn(1)
|
|
||||||
update(0)
|
update(0)
|
||||||
|
|
||||||
/obj/machinery/light/Destroy()
|
/obj/machinery/light/Destroy()
|
||||||
@@ -342,7 +372,7 @@
|
|||||||
if(on)
|
if(on)
|
||||||
update()
|
update()
|
||||||
|
|
||||||
// update the icon_state and luminosity of the light depending on its state
|
// update lighting
|
||||||
/obj/machinery/light/proc/update(var/trigger = 1)
|
/obj/machinery/light/proc/update(var/trigger = 1)
|
||||||
update_icon()
|
update_icon()
|
||||||
if(!on)
|
if(!on)
|
||||||
@@ -375,14 +405,14 @@
|
|||||||
use_power = 1
|
use_power = 1
|
||||||
set_light(0)
|
set_light(0)
|
||||||
|
|
||||||
active_power_usage = light_range * light_power
|
active_power_usage = ((light_range * light_power) * LIGHTING_POWER_FACTOR)
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/light/attack_generic(var/mob/user, var/damage)
|
/obj/machinery/light/attack_generic(var/mob/user, var/damage)
|
||||||
if(!damage)
|
if(!damage)
|
||||||
return
|
return
|
||||||
if(status == LIGHT_EMPTY||status == LIGHT_BROKEN)
|
if(status == LIGHT_EMPTY||status == LIGHT_BROKEN)
|
||||||
user << "That object is useless to you."
|
to_chat(user, "That object is useless to you.")
|
||||||
return
|
return
|
||||||
if(!(status == LIGHT_OK||status == LIGHT_BURNED))
|
if(!(status == LIGHT_OK||status == LIGHT_BURNED))
|
||||||
return
|
return
|
||||||
@@ -402,20 +432,52 @@
|
|||||||
|
|
||||||
// examine verb
|
// examine verb
|
||||||
/obj/machinery/light/examine(mob/user)
|
/obj/machinery/light/examine(mob/user)
|
||||||
|
var/fitting = get_fitting_name()
|
||||||
switch(status)
|
switch(status)
|
||||||
if(LIGHT_OK)
|
if(LIGHT_OK)
|
||||||
user << "[desc] It is turned [on? "on" : "off"]."
|
to_chat(user, "[desc] It is turned [on? "on" : "off"].")
|
||||||
if(LIGHT_EMPTY)
|
if(LIGHT_EMPTY)
|
||||||
user << "[desc] The [fitting] has been removed."
|
to_chat(user, "[desc] The [fitting] has been removed.")
|
||||||
if(LIGHT_BURNED)
|
if(LIGHT_BURNED)
|
||||||
user << "[desc] The [fitting] is burnt out."
|
to_chat(user, "[desc] The [fitting] is burnt out.")
|
||||||
if(LIGHT_BROKEN)
|
if(LIGHT_BROKEN)
|
||||||
user << "[desc] The [fitting] has been smashed."
|
to_chat(user, "[desc] The [fitting] has been smashed.")
|
||||||
|
|
||||||
|
/obj/machinery/light/proc/get_fitting_name()
|
||||||
|
var/obj/item/weapon/light/L = light_type
|
||||||
|
return initial(L.name)
|
||||||
|
|
||||||
|
/obj/machinery/light/proc/update_from_bulb(obj/item/weapon/light/L)
|
||||||
|
status = L.status
|
||||||
|
switchcount = L.switchcount
|
||||||
|
rigged = L.rigged
|
||||||
|
brightness_range = L.brightness_range
|
||||||
|
brightness_power = L.brightness_power
|
||||||
|
brightness_color = L.brightness_color
|
||||||
|
|
||||||
// attack with item - insert light (if right type), otherwise try to break the light
|
// attack with item - insert light (if right type), otherwise try to break the light
|
||||||
|
|
||||||
|
/obj/machinery/light/proc/insert_bulb(obj/item/weapon/light/L)
|
||||||
|
update_from_bulb(L)
|
||||||
|
qdel(L)
|
||||||
|
|
||||||
|
on = powered()
|
||||||
|
update()
|
||||||
|
|
||||||
|
if(on && rigged)
|
||||||
|
|
||||||
|
log_admin("LOG: Rigged light explosion, last touched by [fingerprintslast]")
|
||||||
|
message_admins("LOG: Rigged light explosion, last touched by [fingerprintslast]")
|
||||||
|
|
||||||
|
explode()
|
||||||
|
|
||||||
|
/obj/machinery/light/proc/remove_bulb()
|
||||||
|
. = new light_type(src.loc, src)
|
||||||
|
|
||||||
|
switchcount = 0
|
||||||
|
status = LIGHT_EMPTY
|
||||||
|
update()
|
||||||
|
|
||||||
/obj/machinery/light/attackby(obj/item/W, mob/user)
|
/obj/machinery/light/attackby(obj/item/W, mob/user)
|
||||||
|
|
||||||
//Light replacer code
|
//Light replacer code
|
||||||
@@ -429,34 +491,15 @@
|
|||||||
// attempt to insert light
|
// attempt to insert light
|
||||||
if(istype(W, /obj/item/weapon/light))
|
if(istype(W, /obj/item/weapon/light))
|
||||||
if(status != LIGHT_EMPTY)
|
if(status != LIGHT_EMPTY)
|
||||||
user << "There is a [fitting] already inserted."
|
to_chat(user, "There is a [get_fitting_name()] already inserted.")
|
||||||
return
|
return
|
||||||
else
|
if(!istype(W, light_type))
|
||||||
|
to_chat(user, "This type of light requires a [get_fitting_name()].")
|
||||||
|
return
|
||||||
|
|
||||||
|
to_chat(user, "You insert [W].")
|
||||||
|
insert_bulb(W)
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
var/obj/item/weapon/light/L = W
|
|
||||||
if(istype(L, light_type))
|
|
||||||
status = L.status
|
|
||||||
user << "You insert the [L.name]."
|
|
||||||
switchcount = L.switchcount
|
|
||||||
rigged = L.rigged
|
|
||||||
brightness_range = L.brightness_range
|
|
||||||
brightness_power = L.brightness_power
|
|
||||||
brightness_color = L.brightness_color
|
|
||||||
on = has_power()
|
|
||||||
update()
|
|
||||||
|
|
||||||
user.drop_item() //drop the item to update overlays and such
|
|
||||||
qdel(L)
|
|
||||||
|
|
||||||
if(on && rigged)
|
|
||||||
|
|
||||||
log_admin("LOG: Rigged light explosion, last touched by [fingerprintslast]")
|
|
||||||
message_admins("LOG: Rigged light explosion, last touched by [fingerprintslast]")
|
|
||||||
|
|
||||||
explode()
|
|
||||||
else
|
|
||||||
user << "This type of light requires a [fitting]."
|
|
||||||
return
|
|
||||||
|
|
||||||
// attempt to break the light
|
// attempt to break the light
|
||||||
//If xenos decide they want to smash a light bulb with a toolbox, who am I to stop them? /N
|
//If xenos decide they want to smash a light bulb with a toolbox, who am I to stop them? /N
|
||||||
@@ -466,7 +509,7 @@
|
|||||||
|
|
||||||
if(prob(1+W.force * 5))
|
if(prob(1+W.force * 5))
|
||||||
|
|
||||||
user << "You hit the light, and it smashes!"
|
to_chat(user, "You hit the light, and it smashes!")
|
||||||
for(var/mob/M in viewers(src))
|
for(var/mob/M in viewers(src))
|
||||||
if(M == user)
|
if(M == user)
|
||||||
continue
|
continue
|
||||||
@@ -478,7 +521,7 @@
|
|||||||
broken()
|
broken()
|
||||||
|
|
||||||
else
|
else
|
||||||
user << "You hit the light!"
|
to_chat(user, "You hit the light!")
|
||||||
|
|
||||||
// attempt to stick weapon into light socket
|
// attempt to stick weapon into light socket
|
||||||
else if(status == LIGHT_EMPTY)
|
else if(status == LIGHT_EMPTY)
|
||||||
@@ -486,29 +529,11 @@
|
|||||||
playsound(src, W.usesound, 75, 1)
|
playsound(src, W.usesound, 75, 1)
|
||||||
user.visible_message("[user.name] opens [src]'s casing.", \
|
user.visible_message("[user.name] opens [src]'s casing.", \
|
||||||
"You open [src]'s casing.", "You hear a noise.")
|
"You open [src]'s casing.", "You hear a noise.")
|
||||||
var/obj/machinery/light_construct/newlight = null
|
new construct_type(src.loc, src)
|
||||||
switch(fitting)
|
|
||||||
if("tube")
|
|
||||||
newlight = new /obj/machinery/light_construct(src.loc)
|
|
||||||
newlight.icon_state = "tube-construct-stage2"
|
|
||||||
|
|
||||||
if("bulb")
|
|
||||||
newlight = new /obj/machinery/light_construct/small(src.loc)
|
|
||||||
newlight.icon_state = "bulb-construct-stage2"
|
|
||||||
|
|
||||||
if("flamp")
|
|
||||||
newlight = new /obj/machinery/light_construct/flamp(src.loc)
|
|
||||||
newlight.icon_state = "flamp-construct-stage2"
|
|
||||||
|
|
||||||
newlight.dir = src.dir
|
|
||||||
newlight.stage = 2
|
|
||||||
newlight.fingerprints = src.fingerprints
|
|
||||||
newlight.fingerprintshidden = src.fingerprintshidden
|
|
||||||
newlight.fingerprintslast = src.fingerprintslast
|
|
||||||
qdel(src)
|
qdel(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
user << "You stick \the [W] into the light socket!"
|
to_chat(user, "You stick \the [W] into the light socket!")
|
||||||
if(has_power() && !(W.flags & NOCONDUCT))
|
if(has_power() && !(W.flags & NOCONDUCT))
|
||||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||||
s.set_up(3, 1, src)
|
s.set_up(3, 1, src)
|
||||||
@@ -521,7 +546,7 @@
|
|||||||
if(W.is_wrench())
|
if(W.is_wrench())
|
||||||
anchored = !anchored
|
anchored = !anchored
|
||||||
playsound(src, W.usesound, 50, 1)
|
playsound(src, W.usesound, 50, 1)
|
||||||
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
|
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
|
||||||
|
|
||||||
if(!lamp_shade)
|
if(!lamp_shade)
|
||||||
if(istype(W, /obj/item/weapon/lampshade))
|
if(istype(W, /obj/item/weapon/lampshade))
|
||||||
@@ -586,7 +611,7 @@
|
|||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
|
|
||||||
if(status == LIGHT_EMPTY)
|
if(status == LIGHT_EMPTY)
|
||||||
user << "There is no [fitting] in this light."
|
to_chat(user, "There is no [get_fitting_name()] in this light.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if(istype(user,/mob/living/carbon/human))
|
if(istype(user,/mob/living/carbon/human))
|
||||||
@@ -615,39 +640,22 @@
|
|||||||
prot = 1
|
prot = 1
|
||||||
|
|
||||||
if(prot > 0 || (COLD_RESISTANCE in user.mutations))
|
if(prot > 0 || (COLD_RESISTANCE in user.mutations))
|
||||||
user << "You remove the light [fitting]"
|
to_chat(user, "You remove the light [get_fitting_name()]")
|
||||||
else if(TK in user.mutations)
|
else if(TK in user.mutations)
|
||||||
user << "You telekinetically remove the light [fitting]."
|
to_chat(user, "You telekinetically remove the light [get_fitting_name()].")
|
||||||
else
|
else
|
||||||
user << "You try to remove the light [fitting], but it's too hot and you don't want to burn your hand."
|
to_chat(user, "You try to remove the light [get_fitting_name()], but it's too hot and you don't want to burn your hand.")
|
||||||
return // if burned, don't remove the light
|
return // if burned, don't remove the light
|
||||||
else
|
else
|
||||||
user << "You remove the light [fitting]."
|
to_chat(user, "You remove the light [get_fitting_name()].")
|
||||||
|
|
||||||
// create a light tube/bulb item and put it in the user's hand
|
// create a light tube/bulb item and put it in the user's hand
|
||||||
var/obj/item/weapon/light/L = new light_type()
|
user.put_in_active_hand(remove_bulb()) //puts it in our active hand
|
||||||
L.status = status
|
|
||||||
L.rigged = rigged
|
|
||||||
L.brightness_range = brightness_range
|
|
||||||
L.brightness_power = brightness_power
|
|
||||||
L.brightness_color = brightness_color
|
|
||||||
|
|
||||||
// light item inherits the switchcount, then zero it
|
|
||||||
L.switchcount = switchcount
|
|
||||||
switchcount = 0
|
|
||||||
|
|
||||||
L.update()
|
|
||||||
L.add_fingerprint(user)
|
|
||||||
|
|
||||||
user.put_in_active_hand(L) //puts it in our active hand
|
|
||||||
|
|
||||||
status = LIGHT_EMPTY
|
|
||||||
update()
|
|
||||||
|
|
||||||
/obj/machinery/light/flamp/attack_hand(mob/user)
|
/obj/machinery/light/flamp/attack_hand(mob/user)
|
||||||
if(lamp_shade)
|
if(lamp_shade)
|
||||||
if(status == LIGHT_EMPTY)
|
if(status == LIGHT_EMPTY)
|
||||||
user << "There is no [fitting] in this light."
|
to_chat(user, "There is no [get_fitting_name()] in this light.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if(on)
|
if(on)
|
||||||
@@ -662,28 +670,11 @@
|
|||||||
|
|
||||||
/obj/machinery/light/attack_tk(mob/user)
|
/obj/machinery/light/attack_tk(mob/user)
|
||||||
if(status == LIGHT_EMPTY)
|
if(status == LIGHT_EMPTY)
|
||||||
user << "There is no [fitting] in this light."
|
to_chat(user, "There is no [get_fitting_name()] in this light.")
|
||||||
return
|
return
|
||||||
|
|
||||||
user << "You telekinetically remove the light [fitting]."
|
to_chat(user, "You telekinetically remove the light [get_fitting_name()].")
|
||||||
// create a light tube/bulb item and put it in the user's hand
|
remove_bulb()
|
||||||
var/obj/item/weapon/light/L = new light_type()
|
|
||||||
L.status = status
|
|
||||||
L.rigged = rigged
|
|
||||||
L.brightness_range = brightness_range
|
|
||||||
L.brightness_power = brightness_power
|
|
||||||
L.brightness_color = brightness_color
|
|
||||||
|
|
||||||
// light item inherits the switchcount, then zero it
|
|
||||||
L.switchcount = switchcount
|
|
||||||
switchcount = 0
|
|
||||||
|
|
||||||
L.update()
|
|
||||||
L.add_fingerprint(user)
|
|
||||||
L.loc = loc
|
|
||||||
|
|
||||||
status = LIGHT_EMPTY
|
|
||||||
update()
|
|
||||||
|
|
||||||
// break the light and make sparks if was on
|
// break the light and make sparks if was on
|
||||||
|
|
||||||
@@ -730,13 +721,7 @@
|
|||||||
// timed process
|
// timed process
|
||||||
// use power
|
// use power
|
||||||
|
|
||||||
#define LIGHTING_POWER_FACTOR 20 //20W per unit luminosity
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/light/process()
|
/obj/machinery/light/process()
|
||||||
if(on)
|
|
||||||
use_power(light_range * LIGHTING_POWER_FACTOR, LIGHT)
|
|
||||||
|
|
||||||
if(auto_flicker && !flickering)
|
if(auto_flicker && !flickering)
|
||||||
if(check_for_player_proximity(src, radius = 12, ignore_ghosts = FALSE, ignore_afk = TRUE))
|
if(check_for_player_proximity(src, radius = 12, ignore_ghosts = FALSE, ignore_afk = TRUE))
|
||||||
seton(TRUE) // Lights must be on to flicker.
|
seton(TRUE) // Lights must be on to flicker.
|
||||||
@@ -744,7 +729,6 @@
|
|||||||
else
|
else
|
||||||
seton(FALSE) // Otherwise keep it dark and spooky for when someone shows up.
|
seton(FALSE) // Otherwise keep it dark and spooky for when someone shows up.
|
||||||
|
|
||||||
|
|
||||||
// called when area power state changes
|
// called when area power state changes
|
||||||
/obj/machinery/light/power_change()
|
/obj/machinery/light/power_change()
|
||||||
spawn(10)
|
spawn(10)
|
||||||
@@ -781,8 +765,10 @@
|
|||||||
var/switchcount = 0 // number of times switched
|
var/switchcount = 0 // number of times switched
|
||||||
matter = list(DEFAULT_WALL_MATERIAL = 60)
|
matter = list(DEFAULT_WALL_MATERIAL = 60)
|
||||||
var/rigged = 0 // true if rigged to explode
|
var/rigged = 0 // true if rigged to explode
|
||||||
|
var/broken_chance = 2
|
||||||
|
|
||||||
var/brightness_range = 2 //how much light it gives off
|
var/brightness_range = 2 //how much light it gives off
|
||||||
var/brightness_power = 0.8
|
var/brightness_power = 1
|
||||||
var/brightness_color = LIGHT_COLOR_INCANDESCENT_TUBE
|
var/brightness_color = LIGHT_COLOR_INCANDESCENT_TUBE
|
||||||
|
|
||||||
/obj/item/weapon/light/tube
|
/obj/item/weapon/light/tube
|
||||||
@@ -792,13 +778,14 @@
|
|||||||
base_state = "ltube"
|
base_state = "ltube"
|
||||||
item_state = "c_tube"
|
item_state = "c_tube"
|
||||||
matter = list("glass" = 100)
|
matter = list("glass" = 100)
|
||||||
brightness_range = 8
|
brightness_range = 6 // luminosity when on, also used in power calculation
|
||||||
|
brightness_power = 6
|
||||||
|
|
||||||
/obj/item/weapon/light/tube/large
|
/obj/item/weapon/light/tube/large
|
||||||
w_class = ITEMSIZE_SMALL
|
w_class = ITEMSIZE_SMALL
|
||||||
name = "large light tube"
|
name = "large light tube"
|
||||||
brightness_range = 15
|
brightness_range = 15
|
||||||
brightness_power = 0.9
|
brightness_power = 9
|
||||||
|
|
||||||
/obj/item/weapon/light/bulb
|
/obj/item/weapon/light/bulb
|
||||||
name = "light bulb"
|
name = "light bulb"
|
||||||
@@ -808,12 +795,18 @@
|
|||||||
item_state = "contvapour"
|
item_state = "contvapour"
|
||||||
matter = list("glass" = 100)
|
matter = list("glass" = 100)
|
||||||
brightness_range = 5
|
brightness_range = 5
|
||||||
|
brightness_power = 4
|
||||||
brightness_color = LIGHT_COLOR_INCANDESCENT_BULB
|
brightness_color = LIGHT_COLOR_INCANDESCENT_BULB
|
||||||
|
|
||||||
/obj/item/weapon/light/throw_impact(atom/hit_atom)
|
/obj/item/weapon/light/throw_impact(atom/hit_atom)
|
||||||
..()
|
..()
|
||||||
shatter()
|
shatter()
|
||||||
|
|
||||||
|
/obj/item/weapon/light/bulb/red
|
||||||
|
brightness_range = 4
|
||||||
|
color = "#da0205"
|
||||||
|
brightness_color = "#da0205"
|
||||||
|
|
||||||
/obj/item/weapon/light/bulb/fire
|
/obj/item/weapon/light/bulb/fire
|
||||||
name = "fire bulb"
|
name = "fire bulb"
|
||||||
desc = "A replacement fire bulb."
|
desc = "A replacement fire bulb."
|
||||||
@@ -821,11 +814,9 @@
|
|||||||
base_state = "fbulb"
|
base_state = "fbulb"
|
||||||
item_state = "egg4"
|
item_state = "egg4"
|
||||||
matter = list("glass" = 100)
|
matter = list("glass" = 100)
|
||||||
brightness_range = 5
|
|
||||||
|
|
||||||
// update the icon state and description of the light
|
// update the icon state and description of the light
|
||||||
|
/obj/item/weapon/light/update_icon()
|
||||||
/obj/item/weapon/light/proc/update()
|
|
||||||
switch(status)
|
switch(status)
|
||||||
if(LIGHT_OK)
|
if(LIGHT_OK)
|
||||||
icon_state = base_state
|
icon_state = base_state
|
||||||
@@ -838,14 +829,19 @@
|
|||||||
desc = "A broken [name]."
|
desc = "A broken [name]."
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/light/New()
|
/obj/item/weapon/light/New(atom/newloc, obj/machinery/light/fixture = null)
|
||||||
..()
|
..()
|
||||||
switch(name)
|
if(fixture)
|
||||||
if("light tube")
|
status = fixture.status
|
||||||
brightness_range = rand(6,9)
|
rigged = fixture.rigged
|
||||||
if("light bulb")
|
switchcount = fixture.switchcount
|
||||||
brightness_range = rand(4,6)
|
fixture.transfer_fingerprints_to(src)
|
||||||
update()
|
|
||||||
|
//shouldn't be necessary to copy these unless someone varedits stuff, but just in case
|
||||||
|
brightness_range = fixture.brightness_range
|
||||||
|
brightness_power = fixture.brightness_power
|
||||||
|
brightness_color = fixture.brightness_color
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
|
||||||
// attack bulb/tube with object
|
// attack bulb/tube with object
|
||||||
@@ -855,7 +851,7 @@
|
|||||||
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
|
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
|
||||||
var/obj/item/weapon/reagent_containers/syringe/S = I
|
var/obj/item/weapon/reagent_containers/syringe/S = I
|
||||||
|
|
||||||
user << "You inject the solution into the [src]."
|
to_chat(user, "You inject the solution into the [src].")
|
||||||
|
|
||||||
if(S.reagents.has_reagent("phoron", 5))
|
if(S.reagents.has_reagent("phoron", 5))
|
||||||
|
|
||||||
@@ -889,7 +885,7 @@
|
|||||||
force = 5
|
force = 5
|
||||||
sharp = 1
|
sharp = 1
|
||||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||||
update()
|
update_icon()
|
||||||
|
|
||||||
//Lamp Shade
|
//Lamp Shade
|
||||||
/obj/item/weapon/lampshade
|
/obj/item/weapon/lampshade
|
||||||
|
|||||||
37
html/changelogs/Novacat - Lighting.yml
Normal file
37
html/changelogs/Novacat - Lighting.yml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
################################
|
||||||
|
# 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: Novacat
|
||||||
|
|
||||||
|
# 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: "Attempts to make lighting less uniform"
|
||||||
|
- tweak: "Cleans up lighting code"
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
"j" = (/obj/structure/table/steel,/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
"j" = (/obj/structure/table/steel,/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
||||||
"k" = (/obj/structure/loot_pile/maint/technical,/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
"k" = (/obj/structure/loot_pile/maint/technical,/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
||||||
"l" = (/obj/item/weapon/material/shard,/turf/simulated/floor/plating,/area/submap/cave/deadBeacon)
|
"l" = (/obj/item/weapon/material/shard,/turf/simulated/floor/plating,/area/submap/cave/deadBeacon)
|
||||||
"m" = (/obj/structure/table/steel,/obj/item/weapon/circuitboard/comm_server,/obj/machinery/light/built{dir = 8; fitting = ""},/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
"m" = (/obj/structure/table/steel,/obj/item/weapon/circuitboard/comm_server,/obj/machinery/light{dir = 8; status = LIGHT_EMPTY},/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
||||||
"n" = (/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
"n" = (/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
||||||
"o" = (/obj/item/weapon/paper/crumpled{info = "Sampatti Relay Sif-833 <BR> Decryption Key for 12-04-2488: <BR> 849B0022FBA920C244 <BR> Eyes Only. <BR> The insider who knows all the secrets can bring down Lanka."; name = "Dusty Note"},/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
"o" = (/obj/item/weapon/paper/crumpled{info = "Sampatti Relay Sif-833 <BR> Decryption Key for 12-04-2488: <BR> 849B0022FBA920C244 <BR> Eyes Only. <BR> The insider who knows all the secrets can bring down Lanka."; name = "Dusty Note"},/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
||||||
"p" = (/obj/structure/door_assembly/door_assembly_ext,/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
"p" = (/obj/structure/door_assembly/door_assembly_ext,/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"A" = (/obj/item/weapon/circuitboard/broken,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/deadBeacon)
|
"A" = (/obj/item/weapon/circuitboard/broken,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/deadBeacon)
|
||||||
"B" = (/obj/structure/grille/broken,/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating,/area/submap/cave/deadBeacon)
|
"B" = (/obj/structure/grille/broken,/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating,/area/submap/cave/deadBeacon)
|
||||||
"C" = (/obj/structure/loot_pile/maint/junk,/turf/simulated/floor/plating,/area/submap/cave/deadBeacon)
|
"C" = (/obj/structure/loot_pile/maint/junk,/turf/simulated/floor/plating,/area/submap/cave/deadBeacon)
|
||||||
"D" = (/obj/item/weapon/cigbutt,/obj/item/weapon/tool/wrench,/obj/machinery/light/built,/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
"D" = (/obj/item/weapon/cigbutt,/obj/item/weapon/tool/wrench,/obj/machinery/light,/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
||||||
"E" = (/obj/item/weapon/material/shard,/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
"E" = (/obj/item/weapon/material/shard,/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
||||||
"F" = (/obj/machinery/recharge_station,/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
"F" = (/obj/machinery/recharge_station,/turf/simulated/floor/tiled/asteroid_steel,/area/submap/cave/deadBeacon)
|
||||||
"G" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced,/turf/simulated/floor/plating,/area/submap/cave/deadBeacon)
|
"G" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced,/turf/simulated/floor/plating,/area/submap/cave/deadBeacon)
|
||||||
|
|||||||
Reference in New Issue
Block a user