diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 6d7f103d802..0783273e3f5 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -33,6 +33,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("meatspike frame", /obj/structure/kitchenspike_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
+ new/datum/stack_recipe("reflector frame", /obj/structure/reflector, 5, time = 25, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
new/datum/stack_recipe("light fixture frame", /obj/item/wallframe/light_fixture, 2), \
diff --git a/code/game/objects/structures/reflector.dm b/code/game/objects/structures/reflector.dm
index b70c7ebf2d6..545ce8c6d99 100644
--- a/code/game/objects/structures/reflector.dm
+++ b/code/game/objects/structures/reflector.dm
@@ -1,25 +1,25 @@
/obj/structure/reflector
- name = "reflector"
- icon_state = "reflector"
- desc = "An angled mirror for reflecting lasers."
- anchored = 1
+ name = "reflector frame"
+ icon = 'icons/obj/stock_parts.dmi'
+ icon_state = "box_0"
+ desc = "An angled mirror for reflecting lasers. This one does so at a 90 degree angle."
+ anchored = 0
density = 1
layer = 2
- var/static/list/rotations = list("[NORTH]" = list("[SOUTH]" = WEST, "[EAST]" = NORTH),
-"[EAST]" = list("[SOUTH]" = EAST, "[WEST]" = NORTH),
-"[SOUTH]" = list("[NORTH]" = EAST, "[WEST]" = SOUTH),
-"[WEST]" = list("[NORTH]" = WEST, "[EAST]" = SOUTH) )
+ var/finished = 0
+
/obj/structure/reflector/bullet_act(obj/item/projectile/P)
- var/new_dir = 0
var/turf/reflector_turf = get_turf(src)
var/turf/reflect_turf
- new_dir = rotations["[src.dir]"]["[P.dir]"]
-
+ var/new_dir = get_reflection(src.dir,P.dir)
+ if(!istype(P, /obj/item/projectile/beam))
+ return..()
if(new_dir)
reflect_turf = get_step(reflect_turf, new_dir)
else
visible_message("[src] is hit by the [P]!")
+ new_dir = 0
return ..() //Hits as normal, explodes or emps or whatever
visible_message("[P] bounces off of the [src]")
@@ -31,4 +31,149 @@
P.yo = reflect_turf.y - reflector_turf.y
P.xo = reflect_turf.x - reflector_turf.x
P.kill_count = 50 //Keep the projectile healthy as long as its bouncing off things
- return - 1
\ No newline at end of file
+ new_dir = 0
+ return - 1
+
+
+/obj/structure/reflector/attackby(obj/item/weapon/W, mob/user, params)
+ if(istype(W, /obj/item/weapon/wrench))
+ if(anchored)
+ user << "Unweld the [src] first!"
+ if(do_after(user, 80, target = src))
+ playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
+ user << "You dismantle the [src]."
+ qdel(src)
+ if(istype(W, /obj/item/weapon/weldingtool))
+ var/obj/item/weapon/weldingtool/WT = W
+ switch(anchored)
+ if(0)
+ if (WT.remove_fuel(0,user))
+ playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
+ user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
+ "You start to weld \the [src] to the floor...", \
+ "You hear welding.")
+ if (do_after(user,20, target = src))
+ if(!src || !WT.isOn())
+ return
+ anchored = 1
+ user << "You weld \the [src] to the floor."
+ if(1)
+ if (WT.remove_fuel(0,user))
+ playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
+ user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
+ "You start to cut \the [src] free from the floor...", \
+ "You hear welding.")
+ if (do_after(user,20, target = src))
+ if(!src || !WT.isOn())
+ return
+ anchored = 0
+ user << "You cut \the [src] free from the floor."
+ //Finishing the frame
+ if(istype(W,/obj/item/stack/sheet))
+ if(finished)
+ return
+ var/obj/item/stack/sheet/S = W
+ switch(S.type)
+ if(/obj/item/stack/sheet/glass)
+ if(S.get_amount() < 5)
+ user << "You need five sheets of glass to create a reflector!"
+ return
+ else
+ S.use(5)
+ new /obj/structure/reflector/single (src.loc)
+ qdel(src)
+ if(/obj/item/stack/sheet/rglass)
+ if(S.get_amount() < 10)
+ user << "You need ten sheets of reinforced glass to create a double reflector!"
+ return
+ else
+ S.use(10)
+ new /obj/structure/reflector/double (src.loc)
+ qdel(src)
+ if(/obj/item/stack/sheet/mineral/diamond)
+ if(S.get_amount() < 1)
+ S.use(1)
+ new /obj/structure/reflector/box (src.loc)
+ qdel(src)
+
+/obj/structure/reflector/proc/get_reflection(srcdir,pdir)
+ return 0
+
+
+/obj/structure/reflector/verb/rotate()
+ set name = "Rotate"
+ set category = "Object"
+ set src in oview(1)
+
+ if(usr.stat || !usr.canmove || usr.restrained())
+ return
+ if (src.anchored)
+ usr << "It is fastened to the floor!"
+ return 0
+ src.dir = turn(src.dir, 270)
+ return 1
+
+
+/obj/structure/reflector/AltClick(mob/user)
+ ..()
+ if(!user.canUseTopic(user))
+ user << "You can't do that right now!"
+ return
+ if(!in_range(src, user))
+ return
+ else
+ rotate()
+
+
+//TYPES OF REFLECTORS, SINGLE, DOUBLE, BOX
+
+//SINGLE
+
+/obj/structure/reflector/single
+ name = "reflector"
+ icon = 'icons/obj/structures.dmi'
+ icon_state = "reflector"
+ desc = "A double sided angled mirror for reflecting lasers. This one does so at a 90 degree angle."
+ finished = 1
+ var/static/list/rotations = list("[NORTH]" = list("[SOUTH]" = WEST, "[EAST]" = NORTH),
+"[EAST]" = list("[SOUTH]" = EAST, "[WEST]" = NORTH),
+"[SOUTH]" = list("[NORTH]" = EAST, "[WEST]" = SOUTH),
+"[WEST]" = list("[NORTH]" = WEST, "[EAST]" = SOUTH) )
+
+/obj/structure/reflector/single/get_reflection(srcdir,pdir)
+ var/new_dir = rotations["[srcdir]"]["[pdir]"]
+ return new_dir
+
+//DOUBLE
+
+/obj/structure/reflector/double
+ name = "double sided reflector"
+ icon = 'icons/obj/structures.dmi'
+ icon_state = "reflector_double"
+ desc = "A double sided angled mirror for reflecting lasers. This one does so at a 90 degree angle."
+ finished = 1
+ var/static/list/double_rotations = list("[NORTH]" = list("[NORTH]" = WEST, "[EAST]" = SOUTH, "[SOUTH]" = EAST, "[WEST]" = NORTH),
+"[EAST]" = list("[NORTH]" = EAST, "[WEST]" = SOUTH, "[SOUTH]" = WEST, "[EAST]" = NORTH),
+"[SOUTH]" = list("[NORTH]" = EAST, "[WEST]" = SOUTH, "[SOUTH]" = WEST, "[EAST]" = NORTH),
+"[WEST]" = list("[NORTH]" = WEST, "[EAST]" = SOUTH, "[SOUTH]" = EAST, "[WEST]" = NORTH) )
+
+/obj/structure/reflector/double/get_reflection(srcdir,pdir)
+ var/new_dir = double_rotations["[srcdir]"]["[pdir]"]
+ return new_dir
+
+//BOX
+
+/obj/structure/reflector/box
+ name = "reflector box"
+ icon = 'icons/obj/structures.dmi'
+ icon_state = "reflector_box"
+ desc = "A box with an internal set of mirrors that reflects all laser fire in a single direction."
+ finished = 1
+ var/static/list/box_rotations = list("[NORTH]" = list("[SOUTH]" = NORTH, "[EAST]" = NORTH, "[WEST]" = NORTH, "[NORTH]" = NORTH),
+"[EAST]" = list("[SOUTH]" = EAST, "[EAST]" = EAST, "[WEST]" = EAST, "[NORTH]" = EAST),
+"[SOUTH]" = list("[SOUTH]" = SOUTH, "[EAST]" = SOUTH, "[WEST]" = SOUTH, "[NORTH]" = SOUTH),
+"[WEST]" = list("[SOUTH]" = WEST, "[EAST]" = WEST, "[WEST]" = WEST, "[NORTH]" = WEST) )
+
+/obj/structure/reflector/box/get_reflection(srcdir,pdir)
+ var/new_dir = box_rotations["[srcdir]"]["[pdir]"]
+ return new_dir
\ No newline at end of file
diff --git a/html/changelogs/Kor-Reflector.yml b/html/changelogs/Kor-Reflector.yml
new file mode 100644
index 00000000000..5256907676b
--- /dev/null
+++ b/html/changelogs/Kor-Reflector.yml
@@ -0,0 +1,40 @@
+################################
+# 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
+# spellcheck (typo fixes)
+# experiment
+# tgs (TG-ported fixes?)
+#################################
+
+# Your name.
+author: Kor and Remie
+
+# 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, this gets changed to [] after reading. Just remove the brackets when you add new shit.
+# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
+changes:
+ - rscadd: "Added as series of laser reflector structures, the frame of which can be built with 5 metal sheets."
+ - rscadd: "Completing the frame with 5 glass sheets creates a mirror that will reflect lasers at a 90 degree angle."
+ - rscadd: "Completing the frame with 10 reinforced glass sheets creates a double sided mirror that reflects lasers at a 90 degree angle."
+ - rscadd: "Completing the frame with a single diamond sheet creates a box that will redirect all lasers that hit it from any angle in a single direction."
+
diff --git a/icons/obj/structures.dmi b/icons/obj/structures.dmi
index 37dc77d2e79..f38bb22704a 100644
Binary files a/icons/obj/structures.dmi and b/icons/obj/structures.dmi differ