From c9dc0b7998e04635a75fd7ca7dd7764bbfeb2a20 Mon Sep 17 00:00:00 2001 From: AnturK Date: Sun, 15 Nov 2015 14:52:31 +0100 Subject: [PATCH] Makes turret control panels buildable --- code/game/machinery/portable_turret.dm | 17 +++++++++++++++-- .../research/designs/autolathe_designs.dm | 8 ++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index c81bfdf5c26..38c5b09d361 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -993,7 +993,7 @@ var/ailock = 0 // AI cannot use this req_access = list(access_ai_upload) -/obj/machinery/turretid/New() +/obj/machinery/turretid/New(loc, ndir = 0, built = 0) ..() if(!control_area) var/area/CA = get_area(src) @@ -1006,6 +1006,11 @@ if(A.name && A.name==control_area) control_area = A break + if(built) + dir = ndir + locked = 0 + pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24) + pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0 power_change() //Checks power and initial settings //don't have to check if control_area is path, since get_area_all_atoms can take path. return @@ -1121,4 +1126,12 @@ else icon_state = "control_stun" else - icon_state = "control_standby" \ No newline at end of file + icon_state = "control_standby" + +/obj/item/wallframe/turret_control + name = "turret control frame" + desc = "Used for building turret control panels" + icon = 'icons/obj/apc_repair.dmi' + icon_state = "apc_frame" + result_path = /obj/machinery/turretid + materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT) \ No newline at end of file diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index 0ed1120d503..23954283fd6 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -578,3 +578,11 @@ materials = list(MAT_METAL = 150, MAT_GLASS = 150) build_path = /obj/item/device/geiger_counter category = list("initial", "Tools") + +/datum/design/turret_control_frame + name = "Turret control frame" + id = "turret_control" + build_type = AUTOLATHE + materials = list(MAT_METAL = 12000) + build_path = /obj/item/wallframe/turret_control + category = list("initial", "Construction") \ No newline at end of file