diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index b7cf5c333f4..d73f1bee222 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -161,6 +161,28 @@ Note: Once everything is added to the public areas, will add m_amt and g_amt to
to destroy them and players will be able to make replacements.
*/
+/obj/item/weapon/circuitboard/vendor
+ name = "circuit board (Booze-O-Mat Vendor)"
+ build_path = /obj/machinery/vending/boozeomat
+ board_type = "machine"
+ origin_tech = "programming=1"
+ req_components = list(
+ "/obj/item/weapon/vending_refill/boozeomat" = 3)
+
+/obj/item/weapon/circuitboard/vendor/attackby(obj/item/I, mob/user)
+ if(istype(I, /obj/item/weapon/screwdriver))
+ var/list/names = list(/obj/machinery/vending/boozeomat = "Booze-O-Mat",
+ /obj/machinery/vending/coffee = "Getmore Chocolate Corp",
+ /obj/machinery/vending/snack = "Hot Drinks",
+ /obj/machinery/vending/cola = "Robust Softdrinks",
+ /obj/machinery/vending/cigarette = "Cigarette",
+ /obj/machinery/vending/autodrobe = "AutoDrobe")
+
+ build_path = pick(names)
+ name = "circuit board ([names[build_path]] Vendor)"
+ user << "You set the board to [names[build_path]]."
+ req_components = list("/obj/item/weapon/vending_refill/[copytext("[build_path]", 24)]" = 3) //Never before has i used a method as horrible as this one, im so sorry
+
/obj/item/weapon/circuitboard/smes
name = "circuit board (SMES)"
build_path = /obj/machinery/power/smes
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 54266d31237..7ba89a5f65a 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -309,11 +309,11 @@ Class Procs:
return 1
return 0
-/obj/machinery/proc/default_unfasten_wrench(mob/user, obj/item/weapon/wrench/W)
+/obj/machinery/proc/default_unfasten_wrench(mob/user, obj/item/weapon/wrench/W, time = 20)
if(istype(W))
user << "Now [anchored ? "un" : ""]securing [name]"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, time))
anchored = !anchored
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
return 1
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index b04ecad5106..8258baa718f 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -47,6 +47,39 @@ var/datum/feed_network/news_network = new /datum/feed_network //The global n
var/list/obj/machinery/newscaster/allCasters = list() //Global list that will contain reference to all newscasters in existence.
+/obj/item/newscaster_frame
+ name = "newscaster frame"
+ desc = "Used to build newscasters, just secure to the wall."
+ icon_state = "newscaster"
+ item_state = "syringe_kit"
+ m_amt = 25000
+ g_amt = 15000
+
+/obj/item/newscaster_frame/proc/try_build(turf/on_wall)
+ if (get_dist(on_wall,usr)>1)
+ return
+ var/ndir = get_dir(usr,on_wall)
+ if (!(ndir in cardinal))
+ return
+ var/turf/loc = get_turf(usr)
+ var/area/A = loc.loc
+ if (!istype(loc, /turf/simulated/floor))
+ usr << "Newscaster cannot be placed on this spot."
+ return
+ if (A.requires_power == 0 || A.name == "Space")
+ usr << "Newscaster cannot be placed in this area."
+ return
+ for(var/obj/machinery/newscaster/T in loc)
+ usr << "There is another newscaster here."
+ return
+ var/obj/machinery/newscaster/N = new(loc)
+ N.pixel_y -= (loc.y - on_wall.y) * 32
+ N.pixel_x -= (loc.x - on_wall.x) * 32
+ del(src)
+
+
+
+
/obj/machinery/newscaster
name = "newscaster"
desc = "A standard Nanotrasen-licensed newsfeed handler for use in commercial space stations. All the news you absolutely have no use for, in one place!"
@@ -711,6 +744,15 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
src.scanned_user = text("[T.registered_name] ([T.assignment])")
src.screen=2*/ //Obsolete after autorecognition
+ if(istype(I, /obj/item/weapon/wrench))
+ user << "Now [anchored ? "un" : ""]securing [name]"
+ playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
+ if(do_after(user, 60))
+ new /obj/item/newscaster_frame(loc)
+ playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ del(src)
+ return
+
if (src.isbroken)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1)
for (var/mob/O in hearers(5, src.loc))
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 3d18107b529..9ce937285e8 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -48,6 +48,8 @@
/obj/machinery/vending/New()
..()
+ component_parts = list()
+ component_parts += new /obj/item/weapon/circuitboard/vendor(null)
wires = new(src)
spawn(4)
slogan_list = text2list(product_slogans, ";")
@@ -137,11 +139,19 @@
/obj/machinery/vending/attackby(obj/item/weapon/W, mob/user)
+ if(panel_open)
+ if(default_unfasten_wrench(user, W, time = 60))
+ return
+
+ if(istype(W, /obj/item/weapon/crowbar))
+ malfunction()
+ default_deconstruction_crowbar(W)
+
if(istype(W, /obj/item/weapon/card/emag))
emagged = 1
user << "You short out the product lock on [src]"
return
- else if(istype(W, /obj/item/weapon/screwdriver))
+ else if(istype(W, /obj/item/weapon/screwdriver) && anchored)
panel_open = !panel_open
user << "You [panel_open ? "open" : "close"] the maintenance panel."
overlays.Cut()
@@ -384,7 +394,7 @@
while(R.amount>0)
new dump_path(loc)
R.amount--
- break
+ continue
stat |= BROKEN
icon_state = "[initial(icon_state)]-broken"
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index ad5aa43c8a0..a836bede24e 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -247,6 +247,11 @@
AH.try_build(src)
return
+ else if(istype(W,/obj/item/newscaster_frame))
+ var/obj/item/newscaster_frame/AH = W
+ AH.try_build(src)
+ return
+
else if(istype(W,/obj/item/alarm_frame))
var/obj/item/alarm_frame/AH = W
AH.try_build(src)
diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm
index 057162717f3..403feb5ed34 100644
--- a/code/game/turfs/simulated/walls_reinforced.dm
+++ b/code/game/turfs/simulated/walls_reinforced.dm
@@ -237,6 +237,11 @@
var/obj/item/apc_frame/AH = W
AH.try_build(src)
+ else if(istype(W,/obj/item/newscaster_frame)) //Be damned the man who thought only mobs need attack() and walls dont need inheritance, hitler incarnate
+ var/obj/item/newscaster_frame/AH = W
+ AH.try_build(src)
+ return
+
else if( istype(W,/obj/item/alarm_frame) )
var/obj/item/alarm_frame/AH = W
AH.try_build(src)
diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi
index bf9bc35bc62..30bf098b43c 100644
Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ