From aff56113a4642f623c049da07b00516dbd51893a Mon Sep 17 00:00:00 2001 From: "daniel.cf.hultgren@gmail.com" Date: Sun, 27 May 2012 13:45:01 +0000 Subject: [PATCH] Made you able to disassemble a few more computers. These are: * Arcade * Prison Shuttle Console * Area Air Control * Atmos Alert Computer * Mining Shuttle Console If anybody is not okay with this, feel free to comment out the attackby code of that computer. But keep the circuitboard for future reference. This should make all computers on the station be able to be disassembled. Fixed some error message for cellchargers. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3683 316c924e-a436-60f5-8080-3fe189b3f50e --- .../atmoalter/area_atmos_computer.dm | 26 ++++++++++++++++++- code/game/machinery/cell_charger.dm | 2 +- code/game/machinery/computer/arcade.dm | 21 +++++++++++++++ code/game/machinery/computer/atmos_alert.dm | 24 +++++++++++++++++ .../game/machinery/computer/buildandrepair.dm | 22 ++++++++++++++-- code/game/machinery/recharger.dm | 2 +- code/game/prisonshuttle.dm | 24 ++++++++++++++++- code/modules/mining/mine_items.dm | 23 ++++++++++++++++ 8 files changed, 138 insertions(+), 6 deletions(-) diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm index d0efba6c0e1..9e1ba43370b 100644 --- a/code/game/machinery/atmoalter/area_atmos_computer.dm +++ b/code/game/machinery/atmoalter/area_atmos_computer.dm @@ -2,6 +2,7 @@ name = "Area Air Control" desc = "A computer used to control the stationary scrubbers and pumps in the area." icon_state = "computer_generic" + circuit = "/obj/item/weapon/circuitboard/area_atmos" var/scrubber_state = 0 //0 = off; 1 = on @@ -39,4 +40,27 @@ var/area/A2 = T2.loc if ( istype(A2) && A2.master && A2.master == A ) SCRUBBER.on = scrubber_state - SCRUBBER.update_icon() \ No newline at end of file + SCRUBBER.update_icon() + + attackby(I as obj, user as mob) + if(istype(I, /obj/item/weapon/screwdriver)) + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + if(do_after(user, 20)) + var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) + var/obj/item/weapon/circuitboard/area_atmos/M = new /obj/item/weapon/circuitboard/area_atmos( A ) + for (var/obj/C in src) + C.loc = src.loc + A.circuit = M + A.anchored = 1 + + if (src.stat & BROKEN) + user << "\blue The broken glass falls out." + new /obj/item/weapon/shard( src.loc ) + A.state = 3 + A.icon_state = "3" + else + user << "\blue You disconnect the monitor." + A.state = 4 + A.icon_state = "4" + + del(src) \ No newline at end of file diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 74411352a48..a082a54a129 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -50,7 +50,7 @@ if(!isarea(a)) return if(a.power_equip == 0) // There's no APC in this area, don't try to cheat power! - user << "\red The charger rejects the cell!" + user << "\red The [name] blinks red as you try to insert the cell!" return user.drop_item() diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index a7755fe06ae..8b4416cc41d 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -234,3 +234,24 @@ src.updateUsrDialog() + else if(istype(I, /obj/item/weapon/screwdriver)) + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + if(do_after(user, 20)) + var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) + var/obj/item/weapon/circuitboard/arcade/M = new /obj/item/weapon/circuitboard/arcade( A ) + for (var/obj/C in src) + C.loc = src.loc + A.circuit = M + A.anchored = 1 + + if (src.stat & BROKEN) + user << "\blue The broken glass falls out." + new /obj/item/weapon/shard( src.loc ) + A.state = 3 + A.icon_state = "3" + else + user << "\blue You disconnect the monitor." + A.state = 4 + A.icon_state = "4" + + del(src) diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index ad411729ed5..aa3a5eed2a8 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -4,6 +4,7 @@ /obj/machinery/computer/atmos_alert name = "Atmospheric Alert Computer" desc = "Used to access the station's atmospheric sensors." + circuit = "/obj/item/weapon/circuitboard/atmos_alert" icon_state = "alert:0" var/list/priority_alarms = list() var/list/minor_alarms = list() @@ -104,3 +105,26 @@ minor_alarms -= zone update_icon() return + + attackby(I as obj, user as mob) + if(istype(I, /obj/item/weapon/screwdriver)) + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + if(do_after(user, 20)) + var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) + var/obj/item/weapon/circuitboard/atmos_alert/M = new /obj/item/weapon/circuitboard/atmos_alert( A ) + for (var/obj/C in src) + C.loc = src.loc + A.circuit = M + A.anchored = 1 + + if (src.stat & BROKEN) + user << "\blue The broken glass falls out." + new /obj/item/weapon/shard( src.loc ) + A.state = 3 + A.icon_state = "3" + else + user << "\blue You disconnect the monitor." + A.state = 4 + A.icon_state = "4" + + del(src) diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 7c6b785adbd..df0ea43e15d 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -167,7 +167,6 @@ name = "Circuit board (Telecommunications Server Monitor)" build_path = "/obj/machinery/computer/telecomms/server" origin_tech = "programming=3" - /obj/item/weapon/circuitboard/comm_traffic name = "Circuitboard (Telecommunications Traffic Control)" build_path = "/obj/machinery/computer/telecomms/traffic" @@ -176,11 +175,30 @@ /obj/item/weapon/circuitboard/curefab name = "Circuit board (Cure fab)" build_path = "/obj/machinery/computer/curer" - /obj/item/weapon/circuitboard/splicer name = "Circuit board (Disease Splicer)" build_path = "/obj/machinery/computer/diseasesplicer" +/obj/item/weapon/circuitboard/mining_shuttle + name = "Circuit board (Mining Shuttle)" + build_path = "/obj/machinery/computer/mining_shuttle" + origin_tech = "programming=2" +/obj/item/weapon/circuitboard/HolodeckControl // Not going to let people get this, but it's just here for future + name = "Circuit board (Holodeck Control)" + build_path = "/obj/machinery/computer/HolodeckControl" + origin_tech = "programming=4" +/obj/item/weapon/circuitboard/aifixer + name = "Circuit board (AI Integrity Fixer)" + build_path = "/obj/machinery/computer/aifixer" + origin_tech = "programming=3;biotech=2" +/obj/item/weapon/circuitboard/area_atmos + name = "Circuit board (Area Air Control)" + build_path = "/obj/machinery/computer/area_atmos" + origin_tech = "programming=2" +/obj/item/weapon/circuitboard/prison_shuttle + name = "Circuit board (Prison Shuttle)" + build_path = "/obj/machinery/computer/prison_shuttle" + origin_tech = "programming=2" /obj/item/weapon/circuitboard/supplycomp/attackby(obj/item/I as obj, mob/user as mob) diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 732f4a901e0..1990e844525 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -26,7 +26,7 @@ obj/machinery/recharger if(!isarea(a)) return if(a.power_equip == 0) // There's no APC in this area, don't try to cheat power! - user << "\red The recharger rejects the weapon!" + user << "\red The [name] blinks red as you try to insert the item!" return user.drop_item() G.loc = src diff --git a/code/game/prisonshuttle.dm b/code/game/prisonshuttle.dm index dd01888d035..7c544853321 100644 --- a/code/game/prisonshuttle.dm +++ b/code/game/prisonshuttle.dm @@ -15,6 +15,7 @@ var/prison_shuttle_timeleft = 0 icon = 'computer.dmi' icon_state = "shuttle" req_access = list(access_security) + circuit = "/obj/item/weapon/circuitboard/prison_shuttle" var/temp = null var/hacked = 0 var/allowedtocall = 0 @@ -34,7 +35,28 @@ var/prison_shuttle_timeleft = 0 attackby(I as obj, user as mob) - if(istype(I,/obj/item/weapon/card/emag) && (!hacked)) + if(istype(I, /obj/item/weapon/screwdriver)) + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + if(do_after(user, 20)) + var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) + var/obj/item/weapon/circuitboard/prison_shuttle/M = new /obj/item/weapon/circuitboard/prison_shuttle( A ) + for (var/obj/C in src) + C.loc = src.loc + A.circuit = M + A.anchored = 1 + + if (src.stat & BROKEN) + user << "\blue The broken glass falls out." + new /obj/item/weapon/shard( src.loc ) + A.state = 3 + A.icon_state = "3" + else + user << "\blue You disconnect the monitor." + A.state = 4 + A.icon_state = "4" + + del(src) + else if(istype(I,/obj/item/weapon/card/emag) && (!hacked)) hacked = 1 user << "\blue You disable the lock." else diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index a2eb23859be..55532c15f64 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -96,6 +96,7 @@ proc/move_mining_shuttle() icon = 'computer.dmi' icon_state = "shuttle" req_access = list(access_mining) + circuit = "/obj/item/weapon/circuitboard/mining_shuttle" var/hacked = 0 var/location = 0 //0 = station, 1 = mining base @@ -129,6 +130,28 @@ proc/move_mining_shuttle() hacked = 1 usr << "You fried the consoles ID checking system. It's now available to everyone!" + else if(istype(W, /obj/item/weapon/screwdriver)) + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + if(do_after(user, 20)) + var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) + var/obj/item/weapon/circuitboard/mining_shuttle/M = new /obj/item/weapon/circuitboard/mining_shuttle( A ) + for (var/obj/C in src) + C.loc = src.loc + A.circuit = M + A.anchored = 1 + + if (src.stat & BROKEN) + user << "\blue The broken glass falls out." + new /obj/item/weapon/shard( src.loc ) + A.state = 3 + A.icon_state = "3" + else + user << "\blue You disconnect the monitor." + A.state = 4 + A.icon_state = "4" + + del(src) + /******************************Lantern*******************************/ /obj/item/device/flashlight/lantern