diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 6cde7921d7c..ed6ce312f8e 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -544,6 +544,22 @@ color="blue" icon = 'power_cond_blue.dmi' +/obj/structure/cable/pink + color="pink" + icon = 'power_cond_pink.dmi' + +/obj/structure/cable/orange + color="orange" + icon = 'power_cond_orange.dmi' + +/obj/structure/cable/cyan + color="cyan" + icon = 'power_cond_cyan.dmi' + +/obj/structure/cable/white + color="white" + icon = 'power_cond_white.dmi' + /obj/effect/manifest name = "manifest" icon = 'screen1.dmi' diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 40b79643cb6..602b16d5f9f 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -573,8 +573,24 @@ color = "green" icon_state = "coil_green" +/obj/item/weapon/cable_coil/pink + color = "pink" + icon_state = "coil_pink" + +/obj/item/weapon/cable_coil/orange + color = "orange" + icon_state = "coil_orange" + +/obj/item/weapon/cable_coil/cyan + color = "cyan" + icon_state = "coil_cyan" + +/obj/item/weapon/cable_coil/white + color = "white" + icon_state = "coil_white" + /obj/item/weapon/cable_coil/random/New() - color = pick("red","yellow","green","blue") + color = pick("red","yellow","green","blue","pink") icon_state = "coil_[color]" ..() @@ -753,6 +769,37 @@ m_amt = 500 origin_tech = "materials=1" var/dispenser = 0 + var/breakouttime = 1200 //Deciseconds = 120s = 2 minutes + +/obj/item/weapon/handcuffs/cable + name = "cable restraints" + desc = "Looks like some cables tied together. Could be used to tie something up." + icon_state = "cuff_red" + breakouttime = 300 //Deciseconds = 30s + +/obj/item/weapon/handcuffs/cable/red + icon_state = "cuff_red" + +/obj/item/weapon/handcuffs/cable/yellow + icon_state = "cuff_yellow" + +/obj/item/weapon/handcuffs/cable/blue + icon_state = "cuff_blue" + +/obj/item/weapon/handcuffs/cable/green + icon_state = "cuff_green" + +/obj/item/weapon/handcuffs/cable/pink + icon_state = "cuff_pink" + +/obj/item/weapon/handcuffs/cable/orange + icon_state = "cuff_orange" + +/obj/item/weapon/handcuffs/cable/cyan + icon_state = "cuff_cyan" + +/obj/item/weapon/handcuffs/cable/white + icon_state = "cuff_white" /obj/item/weapon/handcuffs/cyborg dispenser = 1 diff --git a/code/game/objects/closets/firecloset.dm b/code/game/objects/closets/firecloset.dm index fd6bdfbfc2f..3cff6a76c83 100644 --- a/code/game/objects/closets/firecloset.dm +++ b/code/game/objects/closets/firecloset.dm @@ -60,11 +60,11 @@ if(prob(20)) new /obj/item/weapon/storage/belt/utility(src) if(prob(30)) - new /obj/item/weapon/cable_coil(src) + new /obj/item/weapon/cable_coil/random(src) if(prob(30)) - new /obj/item/weapon/cable_coil(src) + new /obj/item/weapon/cable_coil/random(src) if(prob(30)) - new /obj/item/weapon/cable_coil(src) + new /obj/item/weapon/cable_coil/random(src) if(prob(20)) new /obj/item/device/multitool(src) if(prob(5)) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 2d4af182787..1de1ed8a881 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -62,7 +62,10 @@ O.place = "handcuff" M.requests += O spawn( 0 ) - playsound(src.loc, 'handcuffs.ogg', 30, 1, -2) + if(istype(src, /obj/item/weapon/handcuffs/cable)) + playsound(src.loc, 'cablecuff.ogg', 30, 1, -2) + else + playsound(src.loc, 'handcuffs.ogg', 30, 1, -2) O.process() return else @@ -76,7 +79,10 @@ O.place = "handcuff" M.requests += O spawn( 0 ) - playsound(src.loc, 'handcuffs.ogg', 30, 1, -2) + if(istype(src, /obj/item/weapon/handcuffs/cable)) + playsound(src.loc, 'cablecuff.ogg', 30, 1, -2) + else + playsound(src.loc, 'handcuffs.ogg', 30, 1, -2) O.process() return return diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 029b7930104..df925f64b88 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -372,4 +372,15 @@ WELDINGTOOOL /obj/item/weapon/wirecutters/New() if(prob(50)) icon_state = "cutters-y" - item_state = "cutters_yellow" \ No newline at end of file + item_state = "cutters_yellow" + +/obj/item/weapon/wirecutters/attack(mob/M as mob, mob/user as mob) + if((M.handcuffed) && (istype(M:handcuffed, /obj/item/weapon/handcuffs/cable))) + M.visible_message("You cut \the [M]'s restraints with \the [src]!",\ + "\The [usr] cuts \the [M]'s restraints with \the [src]!",\ + "You hear cable being cut.") + M.handcuffed = null + M.update_clothing() + return + else + ..() \ No newline at end of file diff --git a/code/game/objects/storage/belt.dm b/code/game/objects/storage/belt.dm index d8c5528b1c5..03775bfafa9 100644 --- a/code/game/objects/storage/belt.dm +++ b/code/game/objects/storage/belt.dm @@ -8,33 +8,33 @@ slot_flags = SLOT_BELT - proc/can_use() - if(!ismob(loc)) return 0 - var/mob/M = loc - if(src in M.get_equipped_items()) - return 1 +/obj/item/weapon/storage/belt/proc/can_use() + if(!ismob(loc)) return 0 + var/mob/M = loc + if(src in M.get_equipped_items()) + return 1 + else + return 0 + + +/obj/item/weapon/storage/belt/MouseDrop(obj/over_object as obj, src_location, over_location) + var/mob/M = usr + if(!istype(over_object, /obj/screen)) + return ..() + playsound(src.loc, "rustle", 50, 1, -5) + if (!M.restrained() && !M.stat && can_use()) + if (over_object.name == "r_hand") + if (!( M.r_hand )) + M.u_equip(src) + M.r_hand = src else - return 0 - - - MouseDrop(obj/over_object as obj, src_location, over_location) - var/mob/M = usr - if(!istype(over_object, /obj/screen)) - return ..() - playsound(src.loc, "rustle", 50, 1, -5) - if (!M.restrained() && !M.stat && can_use()) - if (over_object.name == "r_hand") - if (!( M.r_hand )) + if (over_object.name == "l_hand") + if (!( M.l_hand )) M.u_equip(src) - M.r_hand = src - else - if (over_object.name == "l_hand") - if (!( M.l_hand )) - M.u_equip(src) - M.l_hand = src - M.update_clothing() - src.add_fingerprint(usr) - return + M.l_hand = src + M.update_clothing() + src.add_fingerprint(usr) + return @@ -63,7 +63,7 @@ new /obj/item/weapon/weldingtool(src) new /obj/item/weapon/crowbar(src) new /obj/item/weapon/wirecutters(src) - new /obj/item/weapon/cable_coil(src,30,pick("red","yellow")) + new /obj/item/weapon/cable_coil(src,30,pick("red","yellow","orange")) /obj/item/weapon/storage/belt/utility/atmostech/New() diff --git a/code/game/objects/storage/toolbox.dm b/code/game/objects/storage/toolbox.dm index 691bffb9a51..c09391151cf 100644 --- a/code/game/objects/storage/toolbox.dm +++ b/code/game/objects/storage/toolbox.dm @@ -23,7 +23,7 @@ /obj/item/weapon/storage/toolbox/electrical/New() ..() - var/color = pick("red","yellow","green","blue") + var/color = pick("red","yellow","green","blue","pink","orange","cyan","white") new /obj/item/weapon/screwdriver(src) new /obj/item/weapon/wirecutters(src) new /obj/item/device/t_scanner(src) @@ -37,7 +37,7 @@ /obj/item/weapon/storage/toolbox/syndicate/New() ..() - var/color = pick("red","yellow","green","blue") + var/color = pick("red","yellow","green","blue","pink","orange","cyan","white") new /obj/item/weapon/screwdriver(src) new /obj/item/weapon/wrench(src) new /obj/item/weapon/weldingtool(src) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 528f719d81a..8168aa73407 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -114,9 +114,14 @@ else if (src.blood_DNA) msg += "[t_He] [t_has] blood-stained hands!\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 += "[t_He] [t_is] \icon[src.handcuffed] restrained with cable!\n" + else + msg += "[t_He] [t_is] \icon[src.handcuffed] handcuffed!\n" //belt if (src.belt) diff --git a/code/modules/mob/screen.dm b/code/modules/mob/screen.dm index 40ee58331db..976e52a4619 100644 --- a/code/modules/mob/screen.dm +++ b/code/modules/mob/screen.dm @@ -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 [] attempts to remove the handcuffs!", usr), 1) + O.show_message( "\red [usr] attempts to remove \the [HC]!", 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 [] manages to remove the handcuffs!", 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 diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index bc5e765cab7..1ab650124a9 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -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' diff --git a/html/changelog.html b/html/changelog.html index f888c530a40..dc49df2180f 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -46,6 +46,16 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit tho. Thanks. --> + +