Brass light fixtures (#27312)

* add brass lights

* start adding clockwork floor lights

* implement floor lights

* fix an error and add missing brass light sprites
This commit is contained in:
Paul
2024-11-13 14:14:31 -05:00
committed by GitHub
parent 37412b2c95
commit bd7cbb1a54
6 changed files with 136 additions and 0 deletions
@@ -9,6 +9,8 @@
var/metal_sheets_refunded = 2
///amount of glass sheets returned upon the frame being wrenched
var/glass_sheets_refunded = 0
///amount of brass sheets returned upon the frame being wrenched
var/brass_sheets_refunded = 0
///The requirements for this frame to be placed, uses bit flags
var/mount_requirements = 0
@@ -18,6 +20,8 @@
new /obj/item/stack/sheet/metal(user_turf, metal_sheets_refunded)
if(glass_sheets_refunded)
new /obj/item/stack/sheet/glass(user_turf, glass_sheets_refunded)
if(brass_sheets_refunded)
new /obj/item/stack/tile/brass(user_turf, brass_sheets_refunded)
qdel(src)
/obj/item/mounted/frame/try_build(turf/on_wall, mob/user)
@@ -24,6 +24,12 @@
newlight = new /obj/machinery/light_construct(constrloc)
if("floor")
newlight = new /obj/machinery/light_construct/floor(on_wall)
if("clockwork_bulb")
newlight = new /obj/machinery/light_construct/clockwork/small(constrloc)
if("clockwork_tube")
newlight = new /obj/machinery/light_construct/clockwork(constrloc)
if("clockwork_floor")
newlight = new /obj/machinery/light_construct/clockwork/floor(on_wall)
else
newlight = new /obj/machinery/light_construct/small(constrloc)
newlight.dir = constrdir
@@ -52,3 +58,31 @@
metal_sheets_refunded = 3
buildon_types = list(/turf/simulated/floor)
allow_floor_mounting = TRUE
/obj/item/mounted/frame/light_fixture/clockwork
name = "brass light fixture frame"
desc = "Used for building brass lights."
icon_state = "clockwork_tube-construct-item"
fixture_type = "clockwork_tube"
metal_sheets_refunded = 0
brass_sheets_refunded = 2
/obj/item/mounted/frame/light_fixture/clockwork/small
name = "brass small light fixture frame"
desc = "Used for building small brass lights."
icon = 'icons/obj/lighting.dmi'
icon_state = "clockwork_bulb-construct-item"
fixture_type = "clockwork_bulb"
metal_sheets_refunded = 0
brass_sheets_refunded = 1
/obj/item/mounted/frame/light_fixture/clockwork/floor
name = "brass floor light fixture frame"
desc = "Used for building brass floor lights."
icon = 'icons/obj/lighting.dmi'
icon_state = "clockwork_floor-construct-item"
fixture_type = "clockwork_floor"
metal_sheets_refunded = 0
brass_sheets_refunded = 3
buildon_types = list(/turf/simulated/floor)
allow_floor_mounting = TRUE
@@ -612,6 +612,9 @@ GLOBAL_LIST_INIT(brass_recipes, list (
new /datum/stack_recipe/window("fulltile brass window", /obj/structure/window/reinforced/clockwork/fulltile, 2, time = 0 SECONDS, on_floor = TRUE, window_checks = TRUE),
new /datum/stack_recipe("brass chair", /obj/structure/chair/brass, 1, time = 0 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("brass table frame", /obj/structure/table_frame/brass, 1, time = 0.5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("brass light fixture frame", /obj/item/mounted/frame/light_fixture/clockwork, 2, time = 0 SECONDS, one_per_turf = FALSE, on_floor = FALSE),
new /datum/stack_recipe("small brass light fixture frame", /obj/item/mounted/frame/light_fixture/clockwork/small, 1, time = 0 SECONDS, one_per_turf = FALSE, on_floor = FALSE),
new /datum/stack_recipe("brass floor light fixture frame", /obj/item/mounted/frame/light_fixture/clockwork/floor, 3, time = 0 SECONDS, one_per_turf = FALSE, on_floor = FALSE),
))
/obj/item/stack/tile/brass
+95
View File
@@ -128,6 +128,41 @@
return
icon_state = "[fixture_type]-construct-stage[stage]"
/**
* # Brass fixture frame
*
* Incomplete brass light tube fixture
*
* Becomes a [Brass light fixture] when completed
*/
/obj/machinery/light_construct/clockwork
name = "brass light fixture frame"
desc = "A brass light fixture under construction."
icon_state = "clockwork_tube-construct-stage1"
construct_type = /obj/machinery/light/clockwork/built
fixture_type = "clockwork_tube"
/obj/machinery/light_construct/clockwork/wrench_act(mob/living/user, obj/item/I)
. = TRUE
switch(stage)
if(1)
to_chat(user, "<span class='notice'>You begin to dismantle [src].</span>")
if(!I.use_tool(src, user, 30, volume = I.tool_volume))
return
new /obj/item/stack/tile/brass(get_turf(loc), sheets_refunded)
TOOL_DISMANTLE_SUCCESS_MESSAGE
qdel(src)
if(2)
to_chat(user, "<span class='warning'>You have to remove the wires first.</span>")
if(3)
to_chat(user, "<span class='warning'>You have to unscrew the case first.</span>")
/obj/machinery/light_construct/clockwork/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new /obj/item/stack/tile/brass(loc, sheets_refunded)
qdel(src)
/**
* # Small light fixture frame
*
@@ -156,6 +191,28 @@
sheets_refunded = 3
construct_type = /obj/machinery/light/floor/built
/obj/machinery/light_construct/clockwork/small
name = "small brass light fixture frame"
desc = "A small brass light fixture under construction."
icon = 'icons/obj/lighting.dmi'
icon_state = "clockwork_bulb-construct-stage1"
anchored = TRUE
layer = 5
stage = 1
fixture_type = "clockwork_bulb"
sheets_refunded = 1
construct_type = /obj/machinery/light/clockwork/small/built
/obj/machinery/light_construct/clockwork/floor
name = "brass floor light fixture frame"
desc = "A brass floor light fixture under construction."
icon_state = "clockwork_floor-construct-stage1"
anchored = TRUE
layer = ABOVE_OPEN_TURF_LAYER
plane = FLOOR_PLANE
fixture_type = "clockwork_floor"
sheets_refunded = 3
construct_type = /obj/machinery/light/clockwork/floor/built
#undef LIGHT_CONSTRUCT_EMPTY_FRAME
#undef LIGHT_CONSTRUCT_WIRED
@@ -268,6 +325,36 @@
layer = ABOVE_OPEN_TURF_LAYER
plane = FLOOR_PLANE
/obj/machinery/light/clockwork
icon_state = "clockwork_tube1"
desc = "An industrial brass light fixture."
glow_icon_state = "clockwork_tube"
base_state = "clockwork_tube"
deconstruct_type = /obj/machinery/light_construct/clockwork
/obj/machinery/light/clockwork/small
icon_state = "clockwork_bulb1"
desc = "A brass light fixture."
glow_icon_state = "clockwork_bulb"
base_state = "clockwork_bulb"
fitting = "bulb"
light_type = /obj/item/light/bulb
deconstruct_type = /obj/machinery/light_construct/clockwork/small
/obj/machinery/light/clockwork/floor
name = "brass floor light"
desc = "A brass floor light."
icon_state = "clockwork_floor1"
glow_icon_state = "clockwork_floor"
base_state = "clockwork_floor"
fitting = "bulb"
light_type = /obj/item/light/bulb
deconstruct_type = /obj/machinery/light_construct/clockwork/floor
brightness_range = 6
nightshift_light_range = 6
layer = ABOVE_OPEN_TURF_LAYER
plane = FLOOR_PLANE
/obj/machinery/light/built
status = LIGHT_EMPTY
@@ -277,6 +364,14 @@
/obj/machinery/light/floor/built
status = LIGHT_EMPTY
/obj/machinery/light/clockwork/built
status = LIGHT_EMPTY
/obj/machinery/light/clockwork/small/built
status = LIGHT_EMPTY
/obj/machinery/light/clockwork/floor/built
status = LIGHT_EMPTY
// create a new lighting fixture
/obj/machinery/light/Initialize(mapload)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 B

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 99 KiB