mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 22:42:26 +01:00
Added floor lighting fixtures, and tweaked the light sprites (#16671)
* Added floor lighting fixtures * Fix stray pixels in floor tube fixture * RM railing lights at stargazer * Remove superfluous light fixtures * Added Gem's light sprites, created a new sprite for the spotlight, and made spotlights buildable. * Remove more railing lights * Fixed up the skrell light fixture sprites * Made floor lights buildable * Fixed the burnt and broken spotlight tubes * New small floor light by atteria
This commit is contained in:
@@ -59,7 +59,10 @@
|
||||
new /datum/stack_recipe("computer frame", /obj/structure/computerframe, BUILD_AMT, time = 25, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("machine blueprint", /obj/machinery/constructable_frame/machine_frame, 2, time = 25, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("light fixture frame", /obj/item/frame/light, 2),
|
||||
new /datum/stack_recipe("floor light fixture frame", /obj/item/floor_frame/light, 2),
|
||||
new /datum/stack_recipe("small light fixture frame", /obj/item/frame/light/small, 1),
|
||||
new /datum/stack_recipe("small floor light fixture frame", /obj/item/floor_frame/light/small, 1),
|
||||
new /datum/stack_recipe("spotlight fixture frame", /obj/item/frame/light/spot, 3),
|
||||
new /datum/stack_recipe("apc frame", /obj/item/frame/apc, 2),
|
||||
new /datum/stack_recipe("air alarm frame", /obj/item/frame/air_alarm, 2),
|
||||
new /datum/stack_recipe("fire alarm frame", /obj/item/frame/fire_alarm, 2)
|
||||
@@ -303,4 +306,4 @@
|
||||
/material/wood/branch/generate_recipes()
|
||||
recipes = list()
|
||||
recipes += new/datum/stack_recipe("bonfire", /obj/structure/bonfire, 10, time = 50, one_per_turf = 1, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe("torch handle", /obj/item/torch, 1, time = 15, one_per_turf = 0, on_floor = 0)
|
||||
recipes += new/datum/stack_recipe("torch handle", /obj/item/torch, 1, time = 15, one_per_turf = 0, on_floor = 0)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// will fit into empty /obj/machinery/light of the corresponding type
|
||||
|
||||
/obj/item/light
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon = 'icons/obj/lights.dmi'
|
||||
force = 2
|
||||
throwforce = 5
|
||||
w_class = ITEMSIZE_TINY
|
||||
@@ -140,9 +140,12 @@
|
||||
/obj/item/light/tube/large
|
||||
w_class = ITEMSIZE_SMALL
|
||||
name = "large light tube"
|
||||
desc = "A replacement large light tube."
|
||||
icon_state = "lstube_preset"
|
||||
brightness_range = 15
|
||||
brightness_power = 0.75
|
||||
randomize_range = FALSE
|
||||
lighttype = "stube"
|
||||
|
||||
/obj/item/light/bulb
|
||||
name = "light bulb"
|
||||
@@ -189,14 +192,3 @@
|
||||
/obj/item/light/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
shatter()
|
||||
|
||||
/obj/item/light/bulb/fire
|
||||
name = "fire bulb"
|
||||
desc = "A replacement fire bulb."
|
||||
icon_state = "flight"
|
||||
item_state = "egg_red"
|
||||
matter = list(MATERIAL_GLASS = 100)
|
||||
brightness_range = 8
|
||||
brightness_power = 0.45
|
||||
randomize_range = FALSE
|
||||
randomize_color = FALSE
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/obj/machinery/light_construct
|
||||
name = "light fixture frame"
|
||||
desc = "A light fixture under construction."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon = 'icons/obj/lights.dmi'
|
||||
icon_state = "tube-construct-stage1"
|
||||
anchored = TRUE
|
||||
layer = 5
|
||||
@@ -17,6 +17,12 @@
|
||||
. = ..()
|
||||
if (fixture_type == "bulb")
|
||||
icon_state = "bulb-construct-stage1"
|
||||
if (fixture_type == "spotlight")
|
||||
icon_state = "slight-construct-stage1"
|
||||
if (fixture_type == "floorbulb")
|
||||
icon_state = "floor-construct-stage1"
|
||||
if (fixture_type == "floorlight")
|
||||
icon_state = "floortube-construct-stage1"
|
||||
|
||||
/obj/machinery/light_construct/Destroy()
|
||||
QDEL_NULL(cell)
|
||||
@@ -72,6 +78,12 @@
|
||||
icon_state = "tube-construct-stage1"
|
||||
if("bulb")
|
||||
icon_state = "bulb-construct-stage1"
|
||||
if("spotlight")
|
||||
icon_state = "slight-construct-stage1"
|
||||
if ("floorbulb")
|
||||
icon_state = "floor-construct-stage1"
|
||||
if ("floorlight")
|
||||
icon_state = "floortube-construct-stage1"
|
||||
new /obj/item/stack/cable_coil(get_turf(src), 1, "red")
|
||||
user.visible_message(SPAN_NOTICE("\The [user] removes the wiring from \the [src]."), SPAN_NOTICE("You remove the wiring from [src]."), SPAN_WARNING("You hear something being cut."))
|
||||
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 100, TRUE)
|
||||
@@ -87,6 +99,12 @@
|
||||
icon_state = "tube-construct-stage2"
|
||||
if("bulb")
|
||||
icon_state = "bulb-construct-stage2"
|
||||
if("spotlight")
|
||||
icon_state = "slight-construct-stage2"
|
||||
if ("floorbulb")
|
||||
icon_state = "floor-construct-stage2"
|
||||
if ("floorlight")
|
||||
icon_state = "floortube-construct-stage2"
|
||||
stage = 2
|
||||
user.visible_message(SPAN_NOTICE("\The [user] adds wires to \the [src]."), SPAN_NOTICE("You add wires to \the [src]."))
|
||||
return
|
||||
@@ -98,6 +116,12 @@
|
||||
icon_state = "tube_empty"
|
||||
if("bulb")
|
||||
icon_state = "bulb_empty"
|
||||
if("slight")
|
||||
icon_state = "slight_empty"
|
||||
if ("floorbulb")
|
||||
icon_state = "floor_empty"
|
||||
if ("floorlight")
|
||||
icon_state = "floortube_empty"
|
||||
stage = 3
|
||||
user.visible_message(SPAN_NOTICE("\The [user] closes \the [src]'s casing."), SPAN_NOTICE("You close \the [src]'s casing."), SPAN_WARNING("You hear something being screwed in."))
|
||||
playsound(get_turf(src), W.usesound, 75, TRUE)
|
||||
@@ -107,6 +131,12 @@
|
||||
newlight = new /obj/machinery/light/built(get_turf(src))
|
||||
if("bulb")
|
||||
newlight = new /obj/machinery/light/small/built(get_turf(src))
|
||||
if("slight")
|
||||
newlight = new /obj/machinery/light/spot/built(get_turf(src))
|
||||
if("floorbulb")
|
||||
newlight = new /obj/machinery/light/small/floor/built(get_turf(src))
|
||||
if("floorlight")
|
||||
newlight = new /obj/machinery/light/floor/built(get_turf(src))
|
||||
|
||||
newlight.dir = src.dir
|
||||
if(cell)
|
||||
@@ -155,10 +185,42 @@
|
||||
/obj/machinery/light_construct/small
|
||||
name = "small light fixture frame"
|
||||
desc = "A small light fixture under construction."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon = 'icons/obj/lights.dmi'
|
||||
icon_state = "bulb-construct-stage1"
|
||||
anchored = TRUE
|
||||
layer = 5
|
||||
stage = 1
|
||||
fixture_type = "bulb"
|
||||
sheets_refunded = 1
|
||||
|
||||
/obj/machinery/light_construct/spot
|
||||
name = "spotlight fixture frame"
|
||||
desc = "A spotlight fixture under construction."
|
||||
icon = 'icons/obj/lights.dmi'
|
||||
icon_state = "slight-construct-stage1"
|
||||
anchored = TRUE
|
||||
layer = 5
|
||||
stage = 1
|
||||
fixture_type = "spotlight"
|
||||
sheets_refunded = 3
|
||||
|
||||
/obj/machinery/light_construct/small/floor
|
||||
name = "small floor light fixture frame"
|
||||
desc = "A small floor light fixture under construction."
|
||||
icon = 'icons/obj/lights.dmi'
|
||||
icon_state = "floor-construct-stage1"
|
||||
anchored = TRUE
|
||||
layer = 2.5
|
||||
stage = 1
|
||||
fixture_type = "floorbulb"
|
||||
sheets_refunded = 1
|
||||
|
||||
/obj/machinery/light_construct/floor
|
||||
name = "floor light fixture frame"
|
||||
desc = "A floor light fixture under construction."
|
||||
icon = 'icons/obj/lights.dmi'
|
||||
icon_state = "floortube-construct-stage1"
|
||||
anchored = TRUE
|
||||
layer = 2.5
|
||||
stage = 1
|
||||
fixture_type = "floorlight"
|
||||
|
||||
@@ -3,13 +3,12 @@
|
||||
// consists of light fixtures (/obj/machinery/light) and light tube/bulb items (/obj/item/light)
|
||||
|
||||
#define LIGHTING_POWER_FACTOR 40 //20W per unit luminosity
|
||||
#define LIGHT_BULB_TEMPERATURE 400 //K - used value for a 60W bulb
|
||||
// the standard tube light fixture
|
||||
/obj/machinery/light
|
||||
name = "light fixture"
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
var/base_state = "tube" // base description and icon_state
|
||||
icon_state = "tube_empty"
|
||||
icon = 'icons/obj/lights.dmi'
|
||||
var/base_state = "tube"
|
||||
icon_state = "tube_example"
|
||||
desc = "A lighting fixture."
|
||||
desc_info = "Use grab intent when interacting with a working light to take it out of its fixture."
|
||||
anchored = TRUE
|
||||
@@ -48,6 +47,9 @@
|
||||
|
||||
var/bulb_is_noisy = TRUE
|
||||
|
||||
var/fitting_has_empty_icon = FALSE
|
||||
var/fitting_is_on_floor = FALSE
|
||||
|
||||
var/previous_stat
|
||||
var/randomize_color = TRUE
|
||||
var/default_color
|
||||
@@ -62,17 +64,27 @@
|
||||
base_state = "skrell"
|
||||
icon_state = "skrell_empty"
|
||||
supports_nightmode = FALSE
|
||||
fitting= "skrell"
|
||||
fitting = "skrell"
|
||||
bulb_is_noisy = FALSE
|
||||
light_type = /obj/item/light/tube
|
||||
inserted_light = /obj/item/light/tube
|
||||
brightness_power = 0.45
|
||||
brightness_color = LIGHT_COLOR_PURPLE
|
||||
|
||||
/obj/machinery/light/floor
|
||||
name = "floor lighting fixture"
|
||||
icon_state = "floortube_example"
|
||||
base_state = "floortube"
|
||||
desc = "A lighting fixture. This one is set into the floor."
|
||||
layer = 2.5
|
||||
fitting_has_empty_icon = TRUE
|
||||
fitting_is_on_floor = TRUE
|
||||
|
||||
// the smaller bulb light fixture
|
||||
|
||||
/obj/machinery/light/small
|
||||
icon_state = "bulb1"
|
||||
name = "small light fixture"
|
||||
icon_state = "bulb_example"
|
||||
base_state = "bulb"
|
||||
fitting = "bulb"
|
||||
brightness_range = 5
|
||||
@@ -84,6 +96,14 @@
|
||||
supports_nightmode = FALSE
|
||||
bulb_is_noisy = FALSE
|
||||
|
||||
/obj/machinery/light/small/floor
|
||||
name = "small floor lighting fixture"
|
||||
icon_state = "floor_example"
|
||||
base_state = "floor"
|
||||
desc = "A small lighting fixture. This one is set into the floor."
|
||||
layer = 2.5
|
||||
fitting_is_on_floor = TRUE
|
||||
|
||||
/obj/machinery/light/small/emergency
|
||||
brightness_range = 6
|
||||
brightness_power = 0.45
|
||||
@@ -113,7 +133,10 @@
|
||||
randomize_color = FALSE
|
||||
|
||||
/obj/machinery/light/spot
|
||||
name = "spotlight"
|
||||
name = "spotlight fixture"
|
||||
icon_state = "slight_example"
|
||||
base_state = "slight"
|
||||
desc = "An extremely powerful lighting fixture."
|
||||
fitting = "large tube"
|
||||
light_type = /obj/item/light/tube/large
|
||||
inserted_light = /obj/item/light/tube/large
|
||||
@@ -121,11 +144,6 @@
|
||||
brightness_power = 3.5
|
||||
supports_nightmode = FALSE
|
||||
|
||||
/obj/machinery/light/spot/weak
|
||||
name = "low-intensity spotlight"
|
||||
brightness_range = 12
|
||||
brightness_power = 1.2
|
||||
|
||||
/obj/machinery/light/built
|
||||
start_with_cell = FALSE
|
||||
|
||||
@@ -134,11 +152,26 @@
|
||||
stat |= MAINT
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/light/floor/built/Initialize()
|
||||
status = LIGHT_EMPTY
|
||||
stat |= MAINT
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/light/small/built/Initialize()
|
||||
status = LIGHT_EMPTY
|
||||
stat |= MAINT
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/light/small/floor/built/Initialize()
|
||||
status = LIGHT_EMPTY
|
||||
stat |= MAINT
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/light/spot/built/Initialize()
|
||||
status = LIGHT_EMPTY
|
||||
stat |= MAINT
|
||||
. = ..()
|
||||
|
||||
// create a new lighting fixture
|
||||
/obj/machinery/light/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -155,6 +188,9 @@
|
||||
if("bulb")
|
||||
if(prob(5))
|
||||
broken(1)
|
||||
if("large tube")
|
||||
if(prob(1))
|
||||
broken(1)
|
||||
|
||||
if(randomize_color)
|
||||
brightness_color = pick(randomized_colors)
|
||||
@@ -167,7 +203,11 @@
|
||||
|
||||
/obj/machinery/light/update_icon()
|
||||
cut_overlays()
|
||||
icon_state = "[base_state]_empty"
|
||||
if ((status == LIGHT_EMPTY) || !fitting_has_empty_icon)
|
||||
icon_state = "[base_state]_empty"
|
||||
else
|
||||
icon_state = "[base_state]"
|
||||
var/on = emergency_mode || !stat
|
||||
switch(status) // set icon_states
|
||||
if(LIGHT_OK)
|
||||
var/target_color
|
||||
@@ -176,11 +216,17 @@
|
||||
else
|
||||
target_color = brightness_color
|
||||
if (supports_nightmode && nightmode && !stat)
|
||||
target_color = BlendRGB("#d2d2d2", target_color, 0.25)
|
||||
target_color = BlendRGB("#D2D2D2", target_color, 0.25)
|
||||
|
||||
var/on = emergency_mode || !stat
|
||||
|
||||
add_overlay(LIGHT_FIXTURE_CACHE(icon, "[base_state][on]", target_color))
|
||||
if (on)
|
||||
var/image/I = LIGHT_FIXTURE_CACHE(icon, "[base_state]_on", target_color)
|
||||
if (!fitting_is_on_floor)
|
||||
I.layer = EFFECTS_ABOVE_LIGHTING_LAYER
|
||||
else
|
||||
I.layer = layer
|
||||
add_overlay(I)
|
||||
else
|
||||
add_overlay(LIGHT_FIXTURE_CACHE(icon, "[base_state]_off", target_color))
|
||||
|
||||
if(LIGHT_BURNED)
|
||||
add_overlay(LIGHT_FIXTURE_CACHE(icon, "[base_state]_burned", brightness_color))
|
||||
@@ -400,6 +446,10 @@
|
||||
if("bulb")
|
||||
newlight = new /obj/machinery/light_construct/small(get_turf(src))
|
||||
newlight.icon_state = "bulb-construct-stage2"
|
||||
|
||||
if("large tube")
|
||||
newlight = new /obj/machinery/light_construct/spot(get_turf(src))
|
||||
newlight.icon_state = "slight-construct-stage2"
|
||||
newlight.dir = src.dir
|
||||
newlight.stage = 2
|
||||
newlight.fingerprints = src.fingerprints
|
||||
|
||||
Reference in New Issue
Block a user