RCD Disabler malf module now properly disables RCDs.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@544 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
n3ophyt3@gmail.com
2010-12-05 21:12:25 +00:00
parent 5ec1135aef
commit 3a11f5828c
3 changed files with 61 additions and 66 deletions
+58 -51
View File
@@ -48,86 +48,93 @@ RCD
if (istype(A, /turf) && mode == 1)
if (istype(A, /turf/space) && matter >= 1)
user << "Building Floor (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."
if (!disabled)
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))
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."
if (!disabled)
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))
spark_system.set_up(5, 0, src)
src.spark_system.start()
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock( A )
matter -= 10
T.autoclose = 1
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
playsound(src.loc, 'sparks2.ogg', 50, 1)
if (!disabled)
spark_system.set_up(5, 0, src)
src.spark_system.start()
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock( A )
matter -= 10
T.autoclose = 1
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
playsound(src.loc, 'sparks2.ogg', 50, 1)
return
else if (mode == 3 && (istype(A, /turf) || istype(A, /obj/machinery/door/airlock) ) )
if (istype(A, /turf/simulated/wall) && matter >= 5)
user << "Deconstructing Wall (5)..."
playsound(src.loc, 'click.ogg', 50, 1)
if(do_after(user, 50))
spark_system.set_up(5, 0, src)
src.spark_system.start()
matter -= 5
A:ReplaceWithFloor()
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
if (!disabled)
spark_system.set_up(5, 0, src)
src.spark_system.start()
matter -= 5
A:ReplaceWithFloor()
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
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 >= 5)
user << "Deconstructing RWall (5)..."
playsound(src.loc, 'click.ogg', 50, 1)
if(do_after(user, 50))
spark_system.set_up(5, 0, src)
src.spark_system.start()
matter -= 5
A:ReplaceWithWall()
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
if (!disabled)
spark_system.set_up(5, 0, src)
src.spark_system.start()
matter -= 5
A:ReplaceWithWall()
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
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))
spark_system.set_up(5, 0, src)
src.spark_system.start()
matter -= 5
A:ReplaceWithSpace()
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
if (!disabled)
spark_system.set_up(5, 0, src)
src.spark_system.start()
matter -= 5
A:ReplaceWithSpace()
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
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))
spark_system.set_up(5, 0, src)
src.spark_system.start()
matter -= 10
del(A)
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
if (!disabled)
spark_system.set_up(5, 0, src)
src.spark_system.start()
matter -= 10
del(A)
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
user << "The RCD now holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/30 matter-units."
return