mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
Legcuff Tweaks (#10769)
This commit is contained in:
@@ -444,7 +444,7 @@ var/list/global/slot_flags_enumeration = list(
|
||||
if(!istype(src, /obj/item/handcuffs))
|
||||
return 0
|
||||
if(slot_legcuffed)
|
||||
if(!istype(src, /obj/item/legcuffs))
|
||||
if(!istype(src, /obj/item/handcuffs))
|
||||
return 0
|
||||
if(slot_in_backpack) //used entirely for equipping spawned mobs or at round start
|
||||
var/allow = 0
|
||||
|
||||
@@ -13,16 +13,16 @@
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500)
|
||||
recyclable = TRUE
|
||||
var/elastic
|
||||
var/legcuff = FALSE
|
||||
var/elastic = FALSE
|
||||
var/dispenser = 0
|
||||
var/breakouttime = 1200 //Deciseconds = 120s = 2 minutes
|
||||
var/breakouttime = 2 MINUTES
|
||||
var/cuff_sound = 'sound/weapons/handcuffs.ogg'
|
||||
var/cuff_type = "handcuffs"
|
||||
drop_sound = 'sound/items/drop/accessory.ogg'
|
||||
pickup_sound = 'sound/items/pickup/accessory.ogg'
|
||||
|
||||
/obj/item/handcuffs/attack(var/mob/living/carbon/C, var/mob/living/user)
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
place_handcuffs(user, user)
|
||||
return
|
||||
|
||||
if(!C.handcuffed)
|
||||
if((!legcuff && !C.handcuffed) || (legcuff && !C.legcuffed))
|
||||
if (C == user)
|
||||
place_handcuffs(user, user)
|
||||
return
|
||||
@@ -57,15 +57,20 @@
|
||||
if(!istype(H))
|
||||
return FALSE
|
||||
|
||||
if (!H.has_organ_for_slot(slot_handcuffed))
|
||||
if((!legcuff && !H.has_organ_for_slot(slot_handcuffed)) || (legcuff && !H.has_organ_for_slot(slot_legcuffed)))
|
||||
if(user)
|
||||
to_chat(user, SPAN_DANGER("\The [H] needs at least two wrists before you can cuff them together!"))
|
||||
to_chat(user, SPAN_DANGER("\The [H] needs at least two [legcuff ? "ankles" : "wrists"] before you can cuff them together!"))
|
||||
return FALSE
|
||||
|
||||
if(istype(H.gloves,/obj/item/clothing/gloves/rig) && !elastic) // Can't cuff someone who's in a deployed hardsuit.
|
||||
if(user)
|
||||
to_chat(user, SPAN_DANGER("\The [src] won't fit around \the [H.gloves]!"))
|
||||
return FALSE
|
||||
if(!elastic) // Can't cuff someone who's in a deployed hardsuit.
|
||||
if(!legcuff && istype(H.gloves, /obj/item/clothing/gloves/rig))
|
||||
if(user)
|
||||
to_chat(user, SPAN_DANGER("\The [src] won't fit around \the [H.gloves]!"))
|
||||
return FALSE
|
||||
if(legcuff && istype(H.shoes, /obj/item/clothing/shoes/magboots/rig))
|
||||
if(user)
|
||||
to_chat(user, SPAN_DANGER("\The [src] won't fit around \the [H.shoes]!"))
|
||||
return FALSE
|
||||
|
||||
if(user)
|
||||
user.visible_message(SPAN_DANGER("\The [user] is attempting to put [cuff_type] on \the [H]!"))
|
||||
@@ -85,8 +90,9 @@
|
||||
user.do_attack_animation(H)
|
||||
user.visible_message(SPAN_DANGER("\The [user] has put [cuff_type] on \the [H]!"))
|
||||
|
||||
target.drop_r_hand()
|
||||
target.drop_l_hand()
|
||||
if(!legcuff)
|
||||
target.drop_r_hand()
|
||||
target.drop_l_hand()
|
||||
|
||||
// Apply cuffs.
|
||||
var/obj/item/handcuffs/cuffs = src
|
||||
@@ -96,8 +102,13 @@
|
||||
user.drop_from_inventory(cuffs,target)
|
||||
else
|
||||
cuffs.forceMove(target)
|
||||
target.handcuffed = cuffs
|
||||
target.update_inv_handcuffed()
|
||||
|
||||
if(!legcuff)
|
||||
target.handcuffed = cuffs
|
||||
target.update_inv_handcuffed()
|
||||
else
|
||||
target.legcuffed = cuffs
|
||||
target.update_inv_legcuffed()
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/RestrainedClickOn(var/atom/A)
|
||||
@@ -137,9 +148,9 @@
|
||||
slot_l_hand_str = 'icons/mob/items/stacks/lefthand_materials.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/stacks/righthand_materials.dmi',
|
||||
)
|
||||
breakouttime = 300 //Deciseconds = 30s
|
||||
breakouttime = 30 SECONDS
|
||||
cuff_sound = 'sound/weapons/cablecuff.ogg'
|
||||
cuff_type = "cable restraints"
|
||||
cuff_type = "cable restraint handcuffs"
|
||||
var/can_be_cut = TRUE
|
||||
elastic = TRUE
|
||||
build_from_parts = TRUE
|
||||
@@ -155,6 +166,13 @@
|
||||
color = pick(COLOR_RED, COLOR_BLUE, COLOR_LIME, COLOR_ORANGE, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
|
||||
add_overlay(overlay_image(icon, "[initial(icon_state)]_end", flags=RESET_COLOR))
|
||||
|
||||
/obj/item/handcuffs/cable/attack_self(mob/user)
|
||||
legcuff = !legcuff
|
||||
cuff_type = "cable restraint [legcuff ? "leg" : "hand"]cuffs"
|
||||
to_chat(user, SPAN_NOTICE("You twist the cable into [cuff_type]."))
|
||||
icon_state = "cable[legcuff ? "leg" : ""]cuff"
|
||||
breakouttime = legcuff ? 10 SECONDS : 30 SECONDS
|
||||
|
||||
/obj/item/handcuffs/cable/yellow
|
||||
color = COLOR_YELLOW
|
||||
|
||||
@@ -169,6 +187,9 @@
|
||||
desc = "A set of handcuffs made out of vines. How devilish!"
|
||||
can_be_cut = FALSE
|
||||
|
||||
/obj/item/handcuffs/cable/green/vines/attack_self(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/handcuffs/cable/pink
|
||||
color = COLOR_PINK
|
||||
|
||||
@@ -211,14 +232,22 @@
|
||||
icon_state = "tape_cross"
|
||||
item_state = null
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
breakouttime = 200
|
||||
breakouttime = 20 SECONDS
|
||||
cuff_type = "duct tape"
|
||||
|
||||
/obj/item/handcuffs/ziptie
|
||||
name = "ziptie"
|
||||
desc = " A sturdy and reliable plastic ziptie for binding the wrists."
|
||||
icon_state = "ziptie"
|
||||
breakouttime = 600
|
||||
breakouttime = 1 MINUTE
|
||||
cuff_sound = 'sound/weapons/cablecuff.ogg'
|
||||
cuff_type = "zipties"
|
||||
elastic = TRUE
|
||||
|
||||
/obj/item/handcuffs/legcuffs
|
||||
name = "legcuffs"
|
||||
desc = "Use this to keep prisoners in line."
|
||||
icon_state = "legcuff"
|
||||
legcuff = TRUE
|
||||
breakouttime = 30 SECONDS
|
||||
cuff_type = "legcuffs"
|
||||
@@ -198,7 +198,7 @@
|
||||
/obj/item/clothing/gloves/brassknuckles = 3,
|
||||
/obj/item/reagent_containers/syringe/drugs = 3,
|
||||
/obj/item/handcuffs = 2,
|
||||
/obj/item/legcuffs = 2,
|
||||
/obj/item/handcuffs/legcuffs = 2,
|
||||
/obj/item/grenade/chem_grenade/gas = 2,
|
||||
/obj/item/clothing/suit/storage/vest/heavy = 1,
|
||||
/obj/item/device/radiojammer = 1,
|
||||
|
||||
Reference in New Issue
Block a user