Files
Paradise/code/game/objects/items/weapons/RCD.dm
mport2004@gmail.com 9ca449bf7a New WIP TK system added. To activate your TK click the throw button with an empty hand. This will bring up a tkgrab item. Click on a non-anchored (currently) non mob Object to select it as your "focus". Once a focus is selected so long as you are in range of the focus you can now click somewhere to throw the focus at the target. To quit using TK just drop the tkgrab item.
The captains laser, aegun, and xbow recharge a bit slower now, they recharged so fast that you almost never had to stop shooting. 
Cleaned up the cyborg_modules file
Medical and Security borgs have a hud item.
Medical bots bottles hold 60 of their chemical (up from 30).
Medical bots now have three syringes that are labeled "Syringe-(Inaprovaline)", "Syringe-(Anti-Toxin)",  and "Syringe-(Mixed)".
Medical bots now have two kelotane/dexalin pills (up from 1/ea).
Engineering bots got a new RCD thats just like the old one but the code is cleaner and meant for borgs only.
Husks brains can no longer be cut out.
Healing hands code has been removed till whoever wants to finish it adds it to a place that is NOT the base click procs.
Added veyveyr's nuke team weapon.  Its more or less the Uzi with a new icon.
Nuke teams also got a bit of extra ammo and a few more pinpointers/eguns in their locker.
Glass doors will not set opacity to 1 after they close.



git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2431 316c924e-a436-60f5-8080-3fe189b3f50e
2011-10-27 08:37:40 +00:00

172 lines
5.6 KiB
Plaintext

/*
CONTAINS:
RCD
*/
/obj/item/weapon/rcd
name = "rapid-construction-device (RCD)"
desc = "A device used to rapidly build walls/floor."
icon = 'items.dmi'
icon_state = "rcd"
opacity = 0
density = 0
anchored = 0.0
flags = FPRINT | TABLEPASS| CONDUCT
force = 10.0
throwforce = 10.0
throw_speed = 1
throw_range = 5
w_class = 3.0
m_amt = 50000
origin_tech = "engineering=4;materials=2"
var
datum/effect/effect/system/spark_spread/spark_system
matter = 0
working = 0
mode = 1
disabled = 0
New()
desc = "A RCD. It currently holds [matter]/30 matter-units."
src.spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
return
attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/rcd_ammo))
if((matter + 10) > 30)
user << "The RCD cant hold any more matter."
return
del(W)
matter += 10
playsound(src.loc, 'click.ogg', 50, 1)
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
return
attack_self(mob/user as mob)
//Change the mode
playsound(src.loc, 'pop.ogg', 50, 0)
if(mode == 1)
mode = 2
user << "Changed mode to 'Airlock'"
src.spark_system.start()
return
if(mode == 2)
mode = 3
user << "Changed mode to 'Deconstruct'"
src.spark_system.start()
return
if(mode == 3)
mode = 1
user << "Changed mode to 'Floor & Walls'"
src.spark_system.start()
return
afterattack(atom/A, mob/user as mob)
if(!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock)))
return
if(istype(A, /turf) && mode == 1)
if(istype(A, /turf/space) && matter >= 1)
user << "Building Floor (1)..."
if(!disabled && matter >= 1)
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
spark_system.set_up(5, 0, src)
src.spark_system.start()
A:ReplaceWithFloor()
matter--
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
return
if(istype(A, /turf/simulated/floor) && matter >= 3)
user << "Building Wall (3)..."
playsound(src.loc, 'click.ogg', 50, 1)
if(do_after(user, 20))
if(!disabled && matter >= 3)
spark_system.set_up(5, 0, src)
src.spark_system.start()
A:ReplaceWithWall()
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
matter -= 3
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
return
else if(istype(A, /turf/simulated/floor) && mode == 2 && matter >= 10)
user << "Building Airlock (10)..."
playsound(src.loc, 'click.ogg', 50, 1)
if(do_after(user, 50))
if(!disabled && matter >= 10)
spark_system.set_up(5, 0, src)
src.spark_system.start()
if(locate(/obj/machinery/door) in get_turf(src)) return
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock( A )
var/obj/structure/window/killthis = (locate(/obj/structure/window) in get_turf(src))
if(killthis)
killthis.ex_act(2)//Smashin windows
T.autoclose = 1
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
playsound(src.loc, 'sparks2.ogg', 50, 1)
matter -= 10
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
return
else if(mode == 3 && (istype(A, /turf) || istype(A, /obj/machinery/door/airlock) ) )
if(istype(A, /turf/simulated/wall) && matter >= 4)
user << "Deconstructing Wall (4)..."
playsound(src.loc, 'click.ogg', 50, 1)
if(do_after(user, 40))
if(!disabled && matter >= 4)
spark_system.set_up(5, 0, src)
src.spark_system.start()
A:ReplaceWithFloor()
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
matter -= 4
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
return
if(istype(A, /turf/simulated/wall/r_wall) && matter >= 8)
user << "Deconstructing RWall (8)..."
playsound(src.loc, 'click.ogg', 50, 1)
if(do_after(user, 60))
if(!disabled && matter >= 8)
spark_system.set_up(5, 0, src)
src.spark_system.start()
A:ReplaceWithWall()
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
matter -= 8
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
return
if(istype(A, /turf/simulated/floor) && matter >= 5)
user << "Deconstructing Floor (5)..."
playsound(src.loc, 'click.ogg', 50, 1)
if(do_after(user, 50))
if(!disabled && matter >= 5)
spark_system.set_up(5, 0, src)
src.spark_system.start()
A:ReplaceWithSpace()
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
matter -= 5
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
return
if(istype(A, /obj/machinery/door/airlock) && matter >= 10)
user << "Deconstructing Airlock (10)..."
playsound(src.loc, 'click.ogg', 50, 1)
if(do_after(user, 50))
if(!disabled && matter >= 10)
spark_system.set_up(5, 0, src)
src.spark_system.start()
del(A)
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
matter -= 10
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
return