- Ported cable restraints from Bay12. You make them by using a verb on cable coils. Takes 15 lengths to make, applied the same way as handcuffs, they have the same effects as handcuffs, but only take 30s to remove if you resist. They can also be removed by using wirecutters on a handcuffed mob.

- Added 4 new cable colors. Pink (ported from Bay12), orange, cyan and white.
- Engineer tool belts can now also spawn with orange wire, in addition to yellow and red.
- Tool closets and electrical toolboxes can now spawn with cables in any of the 8 colors.
- Added cablecuff.ogg from bay12, played when you apply cable cuffs on someone
- Added this stuff to the changelog

So yeah, some stuff is credited to bay12, tho some of it was nearly enough completely recoded.

Screenshots: 
http://www.kamletos.si/wire%20colors.png
http://www.kamletos.si/cuff%20restraints.png


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3770 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2012-06-09 07:29:12 +00:00
parent 2c2002214a
commit e47f25ee09
19 changed files with 169 additions and 41 deletions
@@ -114,9 +114,14 @@
else if (src.blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] blood-stained hands!</span>\n"
//handcuffed?
//handcuffed?
if (src.handcuffed)
msg += "[t_He] [t_is] \icon[src.handcuffed] handcuffed!\n"
if(istype(src.handcuffed, /obj/item/weapon/handcuffs/cable))
msg += "<span class='warning'>[t_He] [t_is] \icon[src.handcuffed] restrained with cable!</span>\n"
else
msg += "<span class='warning'>[t_He] [t_is] \icon[src.handcuffed] handcuffed!</span>\n"
//belt
if (src.belt)
+11 -5
View File
@@ -589,17 +589,23 @@
del(usr:handcuffed)
usr:handcuffed = null
else
usr << "\red You attempt to remove your handcuffs. (This will take around 2 minutes and you need to stand still)"
var/obj/item/weapon/handcuffs/HC = usr:handcuffed
var/breakouttime = 1200 //A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
if(istype(HC)) //If you are handcuffed with actual handcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future...
breakouttime = HC.breakouttime
displaytime = breakouttime / 600 //Minutes
usr << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)"
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] attempts to remove the handcuffs!</B>", usr), 1)
O.show_message( "\red <B>[usr] attempts to remove \the [HC]!</B>", 1)
spawn(0)
if(do_after(usr, 1200))
if(do_after(usr, breakouttime))
if(!usr:handcuffed || usr:buckled)
return // time leniency for lag which also might make this whole thing pointless but the server
for(var/mob/O in viewers(usr))// lags so hard that 40s isn't lenient enough - Quarxink
O.show_message(text("\red <B>[] manages to remove the handcuffs!</B>", usr), 1)
usr << "\blue You successfully remove your handcuffs."
usr:handcuffed:loc = usr:loc
usr << "\blue You successfully remove \the [usr:handcuffed]."
usr:handcuffed.loc = usr.loc
usr:handcuffed = null
if(usr:handcuffed && (usr.last_special <= world.time) && usr:buckled)
usr.next_move = world.time + 100
+26
View File
@@ -242,6 +242,24 @@
else
usr << "A coil of power cable. There are [amount] lengths of cable in the coil."
/obj/item/weapon/cable_coil/verb/make_restraint()
set name = "Make Cable Restraints"
set category = "Object"
var/mob/M = usr
if(ishuman(M) && !M.restrained() && !M.stat && !M.paralysis && ! M.stunned)
if(!istype(usr.loc,/turf)) return
if(src.amount <= 14)
usr << "\red You need at least 15 lengths to make restraints!"
return
src.use(15)
var/obj/item/weapon/handcuffs/cable/B = new /obj/item/weapon/handcuffs/cable(usr.loc)
B.icon_state = "cuff_[color]"
usr << "\blue You wind some cable together to make some restraints."
else
usr << "\blue You cannot do that."
..()
/obj/item/weapon/cable_coil/attackby(obj/item/weapon/W, mob/user)
..()
if( istype(W, /obj/item/weapon/wirecutters) && src.amount > 1)
@@ -542,3 +560,11 @@ obj/structure/cable/proc/cableColor(var/colorC)
icon = 'power_cond_green.dmi'
if("blue")
icon = 'power_cond_blue.dmi'
if("pink")
icon = 'power_cond_pink.dmi'
if("orange")
icon = 'power_cond_orange.dmi'
if("cyan")
icon = 'power_cond_cyan.dmi'
if("white")
icon = 'power_cond_white.dmi'