mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-2025-11-12
This commit is contained in:
@@ -443,6 +443,8 @@
|
||||
frame = new /obj/item/wallframe/light_fixture(drop_point)
|
||||
if("bulb")
|
||||
frame = new /obj/item/wallframe/light_fixture/small(drop_point)
|
||||
if("floor bulb")
|
||||
frame = new /obj/item/wallframe/light_fixture/small(drop_point)
|
||||
if(!disassembled)
|
||||
frame.take_damage(frame.max_integrity * 0.5, sound_effect = FALSE)
|
||||
if(status != LIGHT_BROKEN)
|
||||
@@ -747,7 +749,7 @@
|
||||
layer = BELOW_CATWALK_LAYER
|
||||
plane = FLOOR_PLANE
|
||||
light_type = /obj/item/light/bulb
|
||||
fitting = "bulb"
|
||||
fitting = "floor bulb"
|
||||
nightshift_brightness = 4
|
||||
fire_brightness = 4.5
|
||||
|
||||
@@ -758,6 +760,15 @@
|
||||
status = LIGHT_BROKEN
|
||||
icon_state = "floor-broken"
|
||||
|
||||
/obj/machinery/light/floor/burned
|
||||
status = LIGHT_BURNED
|
||||
icon_state = "floor-burned"
|
||||
|
||||
/obj/machinery/light/floor/empty
|
||||
icon_state = "floor-empty"
|
||||
start_with_cell = FALSE
|
||||
status = LIGHT_EMPTY
|
||||
|
||||
/obj/machinery/light/floor/transport
|
||||
name = "transport light"
|
||||
break_if_moved = FALSE
|
||||
|
||||
@@ -141,9 +141,11 @@
|
||||
tool.play_tool_sound(src, 75)
|
||||
switch(fixture_type)
|
||||
if("tube")
|
||||
new_light = new /obj/machinery/light/built(loc)
|
||||
new_light = new /obj/machinery/light/empty(loc)
|
||||
if("bulb")
|
||||
new_light = new /obj/machinery/light/small/built(loc)
|
||||
new_light = new /obj/machinery/light/small/empty(loc)
|
||||
if("floor")
|
||||
new_light = new /obj/machinery/light/floor/empty(loc)
|
||||
new_light.setDir(dir)
|
||||
new_light.find_and_hang_on_wall()
|
||||
transfer_fingerprints_to(new_light)
|
||||
@@ -169,3 +171,9 @@
|
||||
icon_state = "bulb-construct-stage1"
|
||||
fixture_type = "bulb"
|
||||
sheets_refunded = 1
|
||||
|
||||
/obj/structure/light_construct/floor
|
||||
name = "floor light fixture frame"
|
||||
icon_state = "floor-construct-stage1"
|
||||
fixture_type = "floor"
|
||||
sheets_refunded = 1
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
status = LIGHT_BROKEN
|
||||
icon_state = "tube-broken"
|
||||
|
||||
/obj/machinery/light/built
|
||||
/obj/machinery/light/burned
|
||||
status = LIGHT_BURNED
|
||||
icon_state = "tube-burned"
|
||||
|
||||
/obj/machinery/light/empty
|
||||
icon_state = "tube-empty"
|
||||
start_with_cell = FALSE
|
||||
status = LIGHT_EMPTY
|
||||
@@ -68,7 +72,11 @@
|
||||
status = LIGHT_BROKEN
|
||||
icon_state = "bulb-broken"
|
||||
|
||||
/obj/machinery/light/small/built
|
||||
/obj/machinery/light/small/burned
|
||||
status = LIGHT_BURNED
|
||||
icon_state = "bulb-burned"
|
||||
|
||||
/obj/machinery/light/small/empty
|
||||
icon_state = "bulb-empty"
|
||||
start_with_cell = FALSE
|
||||
status = LIGHT_EMPTY
|
||||
@@ -105,7 +113,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/light/broken, 0)
|
||||
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/light_construct, 0)
|
||||
|
||||
// ---- Tube frames
|
||||
MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/light/built, 0)
|
||||
MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/light/empty, 0)
|
||||
|
||||
// ---- No nightlight tubes
|
||||
MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/light/no_nightlight, 0)
|
||||
@@ -148,7 +156,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/light/small, 0)
|
||||
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/light_construct/small, 0)
|
||||
|
||||
// ---- Bulb frames
|
||||
MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/light/small/built, 0)
|
||||
MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/light/small/empty, 0)
|
||||
|
||||
// ---- Broken bulbs
|
||||
MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/light/small/broken, 0)
|
||||
|
||||
@@ -20,3 +20,35 @@
|
||||
to_chat(user, span_warning("You cannot place [src] in this area!"))
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/wallframe/light_fixture/small/attack_self(mob/user)
|
||||
var/turf/local_turf = get_turf(user)
|
||||
var/area/local_area = get_area(user)
|
||||
if(!isturf(user.loc) || !isfloorturf(local_turf))
|
||||
balloon_alert(user, "cannot place here!")
|
||||
return
|
||||
if(local_area.always_unpowered || !local_area.static_lighting)
|
||||
balloon_alert(user, "cannot place in this area!")
|
||||
return
|
||||
for(var/obj/object in local_turf)
|
||||
if(object.density && !(object.obj_flags & IGNORE_DENSITY) || object.obj_flags & BLOCKS_CONSTRUCTION)
|
||||
balloon_alert(user, "something is in the way!")
|
||||
return
|
||||
if(local_turf.underfloor_accessibility < UNDERFLOOR_INTERACTABLE)
|
||||
balloon_alert(user, "remove the floor plating!")
|
||||
return
|
||||
if(locate(/obj/structure/light_construct/floor) in local_turf)
|
||||
balloon_alert(user, "already has a light!")
|
||||
return
|
||||
if(locate(/obj/machinery/light/floor) in local_turf)
|
||||
balloon_alert(user, "already has a light!")
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 75, TRUE)
|
||||
user.visible_message(span_notice("[user.name] attaches [src] to the floor."),
|
||||
span_notice("You attach [src] to the floor."),
|
||||
span_hear("You hear clicking."))
|
||||
|
||||
new /obj/structure/light_construct/floor(local_turf)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -146,14 +146,24 @@
|
||||
QDEL_NULL(sparks)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/emitter/update_overlays()
|
||||
. = ..()
|
||||
if(!active)
|
||||
return
|
||||
var/laser_color = COLOR_VIBRANT_LIME
|
||||
if (!powered)
|
||||
laser_color = COLOR_ORANGE //stank low power orange
|
||||
else if (diskie)
|
||||
laser_color = diskie.laser_color
|
||||
var/mutable_appearance/overlay = mutable_appearance(icon, "emitter_overlay")
|
||||
overlay.color = laser_color
|
||||
. += overlay
|
||||
|
||||
/obj/machinery/power/emitter/update_icon_state()
|
||||
if(!active || !powernet)
|
||||
icon_state = base_icon_state
|
||||
return ..()
|
||||
if(panel_open)
|
||||
icon_state = "[base_icon_state]_open"
|
||||
return ..()
|
||||
icon_state = avail(active_power_usage) ? icon_state_on : icon_state_underpowered
|
||||
else
|
||||
icon_state = base_icon_state
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/emitter/interact(mob/user)
|
||||
@@ -373,6 +383,7 @@
|
||||
no_shot_counter = diskie.no_shot_counter
|
||||
playsound(src, 'sound/machines/card_slide.ogg', 50)
|
||||
to_chat(user, span_notice("You update the [src]'s diode configuration with the [config_disk]."))
|
||||
update_appearance()
|
||||
if(diskie.consumable)
|
||||
qdel(diskie)
|
||||
return ..()
|
||||
@@ -412,6 +423,7 @@
|
||||
user.put_in_hands(diskie)
|
||||
diskie = null
|
||||
playsound(src, 'sound/machines/card_slide.ogg', 50, TRUE)
|
||||
update_appearance()
|
||||
set_projectile()
|
||||
return TRUE
|
||||
|
||||
@@ -620,6 +632,7 @@
|
||||
desc = "This disk can be used on an emitter with an open panel to reset its projectile. Unless this was handed to you by an admin, you should report this on github."
|
||||
icon = 'icons/obj/devices/circuitry_n_data.dmi'
|
||||
icon_state = "datadisk6"
|
||||
var/laser_color = COLOR_VIBRANT_LIME
|
||||
var/stored_proj = /obj/projectile/beam/emitter/hitscan
|
||||
var/stored_sound = 'sound/items/weapons/emitter.ogg'
|
||||
var/consumed_on_removal = TRUE
|
||||
@@ -633,6 +646,7 @@
|
||||
stored_proj = /obj/projectile/beam/emitter/hitscan/bluelens
|
||||
consumed_on_removal = FALSE
|
||||
consumable = FALSE
|
||||
laser_color = COLOR_TRUE_BLUE
|
||||
|
||||
/obj/item/emitter_disk/healing
|
||||
name = "\improper Diode Disk: Bioregenerative"
|
||||
@@ -640,6 +654,7 @@
|
||||
stored_proj = /obj/projectile/beam/emitter/hitscan/bioregen
|
||||
consumed_on_removal = FALSE
|
||||
consumable = FALSE
|
||||
laser_color = COLOR_YELLOW
|
||||
|
||||
/obj/item/emitter_disk/incendiary
|
||||
name = "\improper Diode Disk: Conflagratory"
|
||||
@@ -647,6 +662,8 @@
|
||||
stored_proj = /obj/projectile/beam/emitter/hitscan/incend
|
||||
consumed_on_removal = FALSE
|
||||
consumable = FALSE
|
||||
laser_color = COLOR_RED_LIGHT
|
||||
|
||||
|
||||
/obj/item/emitter_disk/sanity
|
||||
name = "\improper Diode Disk: Psychosiphoning"
|
||||
@@ -654,6 +671,8 @@
|
||||
stored_proj = /obj/projectile/beam/emitter/hitscan/psy
|
||||
consumed_on_removal = FALSE
|
||||
consumable = FALSE
|
||||
laser_color = COLOR_TONGUE_PINK
|
||||
|
||||
|
||||
/obj/item/emitter_disk/magnetic
|
||||
name = "\improper Diode Disk: Magnetogenerative"
|
||||
@@ -661,6 +680,7 @@
|
||||
stored_proj = /obj/projectile/beam/emitter/hitscan/magnetic
|
||||
consumed_on_removal = FALSE
|
||||
consumable = FALSE
|
||||
laser_color = COLOR_SILVER
|
||||
|
||||
/obj/item/emitter_disk/blast
|
||||
name = "\improper Diode Disk: Hyperconcussive"
|
||||
@@ -668,4 +688,5 @@
|
||||
stored_proj = /obj/projectile/beam/emitter/hitscan/blast
|
||||
consumed_on_removal = FALSE
|
||||
consumable = FALSE
|
||||
laser_color = COLOR_SYNDIE_RED //magnetic is already grey
|
||||
fire_rate_mod = 2
|
||||
|
||||
Reference in New Issue
Block a user