Cameras can now be constructed, courtesy of some cool guys that run Powerful Station 13.

Start with a grenade casing
1)Wrench it into position
2)Stuff a multitool in it
3)Screwdrive the multitool into place
4)Add wire
5)Stuff a remote signaling device in it
Optional)If you want a motion camera (mostly useless), stuff a prox sensor in it
6)Add some glass
7)Secure glass with screwdriver
8)Set camera network
9)Set camera sprite direction

To start dismantling a camera, disable it, then use a wrench on it. from there;
1)Crowbar to remove glass
Optional) Crowbar to remove prox sensor
2)Crowbar to remove signaler
3)Wirecutter to remove wire
4)Screwdriver to unsecure multitool
5)Crowbar to remove multitool
6)Wrench to unsecure casing


Also from Powerful Station 13, the AI's change camera network verb is more robust, allowing for use of any new camera networks created by the crew.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1249 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
n3ophyt3@gmail.com
2011-03-23 18:21:13 +00:00
parent 45086d8f09
commit d714b3eef7
3 changed files with 177 additions and 50 deletions
+139 -25
View File
@@ -3,8 +3,9 @@
// Bandaid fix using spawn - very ugly, need to fix this.
///////////////////////////////Grenades
//Includes changes by Mord_Sith to allow for buildable cameras
/obj/item/weapon/chem_grenade
name = "grenade"
name = "Grenade Casing"
icon_state = "chemg"
icon = 'chemical.dmi'
item_state = "flashbang"
@@ -12,6 +13,10 @@
force = 2.0
var/stage = 0
var/state = 0
var/path = 0
var/motion = 0
var/direct = "SOUTH"
var/obj/item/weapon/circuitboard/circuit = null
var/list/beakers = new/list()
var/list/allowed_containers = list("/obj/item/weapon/reagent_containers/glass/beaker", "/obj/item/weapon/reagent_containers/glass/dispenser")
var/list/disallowed_container = "/obj/item/weapon/reagent_containers/glass/large"
@@ -25,41 +30,147 @@
R.my_atom = src
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/assembly/time_ignite) && !stage)
if(istype(W,/obj/item/assembly/time_ignite) && !stage && path != 2)
path = 1
user << "\blue You add [W] to the metal casing."
playsound(src.loc, 'Screwdriver2.ogg', 25, -3)
del(W) //Okay so we're not really adding anything here. cheating.
icon_state = initial(icon_state)+"_ass"
icon_state = "chemg2"
name = "unsecured grenade"
stage = 1
else if(istype(W,/obj/item/weapon/screwdriver) && stage == 1)
else if(istype(W,/obj/item/weapon/screwdriver) && stage == 1 && path != 2)
path = 1
if(beakers.len)
user << "\blue You lock the assembly."
playsound(src.loc, 'Screwdriver.ogg', 25, -3)
icon_state = initial(icon_state)+"_locked"
name = "grenade"
icon_state = "chemg3"
stage = 2
else
user << "\red You need to add at least one beaker before locking the assembly."
else
var/found = 0
for(var/container_type in allowed_containers)
if(istype(W, text2path(container_type)))
found = 1
break
if(disallowed_container)
if(istype(W, disallowed_container))
return
if(found)
if(beakers.len == 2)
user << "\red The grenade can not hold more containers."
return
else if (istype(W,/obj/item/weapon/reagent_containers/glass/beaker) && stage == 1 && path != 2)
path = 1
if(beakers.len == 2)
user << "\red The grenade can not hold more containers."
return
else
if(W.reagents.total_volume)
user << "\blue You add \the [W] to the assembly."
user.drop_item()
W.loc = src
beakers += W
else
if(W.reagents.total_volume)
user << "\blue You add \the [W] to the assembly."
user.drop_item()
W.loc = src
beakers += W
else
user << "\red \the [W] is empty."
user << "\red \the [W] is empty."
else if(path != 1)
if(!istype(src.loc,/turf))
user << "\red You need to put the canister on the ground to do that!"
else
switch(state)
if(0)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'Ratchet.ogg', 50, 1)
if(do_after(user, 20))
user << "\blue You wrench the canister in place."
src.name = "Camera Assembly"
src.anchored = 1
src.state = 1
path = 2
if(1)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'Ratchet.ogg', 50, 1)
if(do_after(user, 20))
user << "\blue You unfasten the canister."
src.name = "Grenade Casing"
src.anchored = 0
src.state = 0
path = 0
if(istype(W, /obj/item/device/multitool))
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
user << "\blue You place the electronics inside the canister."
src.circuit = W
user.drop_item()
W.loc = src
if(istype(W, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
user << "\blue You screw the circuitry into place."
src.state = 2
if(istype(W, /obj/item/weapon/crowbar) && circuit)
playsound(src.loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the circuitry."
src.state = 1
circuit.loc = src.loc
src.circuit = null
if(2)
if(istype(W, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
user << "\blue You unfasten the circuitry."
src.state = 1
if(istype(W, /obj/item/weapon/cable_coil))
if(W:amount >= 1)
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
W:amount -= 1
if(!W:amount) del(W)
user << "\blue You add cabling to the canister."
src.state = 3
if(3)
if(istype(W, /obj/item/weapon/wirecutters))
playsound(src.loc, 'wirecutter.ogg', 50, 1)
user << "\blue You remove the cabling."
src.state = 2
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
A.amount = 1
if(istype(W, /obj/item/device/radio/signaler))
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
user << "\blue You attach the wireless signaller unit to the circutry."
user.drop_item()
W.loc = src
src.state = 4
if(4)
if(istype(W, /obj/item/weapon/crowbar) && !motion)
playsound(src.loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the remote signalling device."
src.state = 3
new /obj/item/device/radio/signaler( src.loc, 1 )
if(istype(W, /obj/item/device/prox_sensor) && motion == 0)
// if(W:amount >= 1)
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
// W:use(1)
user << "\blue You attach the proximity sensor."
motion = 1
if(istype(W, /obj/item/weapon/crowbar) && motion)
playsound(src.loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the proximity sensor."
new /obj/item/device/prox_sensor( src.loc, 1 )
motion = 0
if(istype(W, /obj/item/stack/sheet/glass))
if(W:amount >= 1)
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
W:use(1)
user << "\blue You put in the glass lens."
src.state = 5
if(5)
if(istype(W, /obj/item/weapon/crowbar))
playsound(src.loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the glass lens."
src.state = 4
new /obj/item/stack/sheet/glass( src.loc, 2 )
if(istype(W, /obj/item/weapon/screwdriver))
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
user << "\blue You connect the lense."
var/B
if(motion == 1)
B = new /obj/machinery/camera/motion( src.loc )
else
B = new /obj/machinery/camera( src.loc )
B:network = "SS13"
B:network = input(usr, "Which network would you like to connect this camera to?", "Set Network", "SS13")
direct = input(user, "Direction?", "Assembling Camera", null) in list( "NORTH", "EAST", "SOUTH", "WEST" )
B:dir = text2dir(direct)
del(src)
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if (istype(target, /obj/item/weapon/storage)) return ..()
@@ -144,6 +255,7 @@
/obj/item/weapon/chem_grenade/metalfoam
name = "Metal-Foam Grenade"
desc = "Used for emergency sealing of air breaches."
path = 1
stage = 2
New()
@@ -162,6 +274,7 @@
/obj/item/weapon/chem_grenade/incendiary
name = "Incendiary Grenade"
desc = "Used for clearing rooms of living things."
path = 1
stage = 2
New()
@@ -181,6 +294,7 @@
name = "Cleaner Grenade"
desc = "BLAM!-brand foaming space cleaner. In a special applicator for rapid cleaning of wide areas."
stage = 2
path = 1
New()
..()