diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index ce4b7fd4a17..d05d407f36f 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -739,16 +739,16 @@
var/mob/living/carbon/H = AM
if(H.m_intent == "run")
armed = 0
- usr.legcuffed = src
- src.loc = usr
- usr.update_inv_legcuffed()
+ H.legcuffed = src
+ src.loc = H
+ H.update_inv_legcuffed()
H << "\red You step on \the [src]!"
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
for(var/mob/O in viewers(H, null))
if(O == H)
continue
O.show_message("\red [H] steps on \the [src].", 1)
- if(isanimal(AM))
+ if(isanimal(AM) && !istype(AM, /mob/living/simple_animal/parrot))
armed = 0
var/mob/living/simple_animal/SA = AM
SA.health = 0
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index 6612a3acfd5..269e1aa5dd9 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -755,7 +755,7 @@ var/list/sacrificed = list()
if(iscultist(C) && !C.stat)
users+=C
if(users.len>=3)
- var/mob/cultist = input("Choose the one who you want to free", "Followers of Geometer") as null|anything in (cultists - users)
+ var/mob/living/carbon/cultist = input("Choose the one who you want to free", "Followers of Geometer") as null|anything in (cultists - users)
if(!cultist)
return fizzle()
if (cultist == user) //just to be sure.
@@ -805,7 +805,7 @@ var/list/sacrificed = list()
if(iscultist(C) && !C.stat)
users+=C
if(users.len>=3)
- var/mob/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - user)
+ var/mob/living/carbon/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - user)
if(!cultist)
return fizzle()
if (cultist == user) //just to be sure.
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index 394622fca86..b7cc8fd9fe2 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -703,6 +703,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (last_text && world.time < last_text + 5)
return
+ if(!can_use())
+ return
+
last_text = world.time
// check if telecomms I/O route 1459 is stable
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm
index 2527ec086aa..17b578461a7 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -1,22 +1,22 @@
-/obj/item/weapon/handcuffs/attack(mob/M as mob, mob/user as mob)
+/obj/item/weapon/handcuffs/attack(mob/living/carbon/C as mob, mob/user as mob)
if(istype(src, /obj/item/weapon/handcuffs/cyborg) && isrobot(user))
- if(!M.handcuffed)
+ if(!C.handcuffed)
var/turf/p_loc = user.loc
- var/turf/p_loc_m = M.loc
+ var/turf/p_loc_m = C.loc
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
for(var/mob/O in viewers(user, null))
- O.show_message("\red [user] is trying to put handcuffs on [M]!", 1)
+ O.show_message("\red [user] is trying to put handcuffs on [C]!", 1)
spawn(30)
- if(!M) return
- if(p_loc == user.loc && p_loc_m == M.loc)
- M.handcuffed = new /obj/item/weapon/handcuffs(M)
- M.update_inv_handcuffed()
+ if(!C) return
+ if(p_loc == user.loc && p_loc_m == C.loc)
+ C.handcuffed = new /obj/item/weapon/handcuffs(C)
+ C.update_inv_handcuffed()
else
if ((CLUMSY in usr.mutations) && prob(50))
usr << "\red Uh ... how do those things work?!"
- if (istype(M, /mob/living/carbon/human))
- if(!M.handcuffed)
+ if (istype(C, /mob/living/carbon/human))
+ if(!C.handcuffed)
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
O.target = user
@@ -24,7 +24,7 @@
O.s_loc = user.loc
O.t_loc = user.loc
O.place = "handcuff"
- M.requests += O
+ C.requests += O
spawn( 0 )
O.process()
return
@@ -32,21 +32,21 @@
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "\red You don't have the dexterity to do this!"
return
- if (istype(M, /mob/living/carbon/human))
- if(!M.handcuffed)
- M.attack_log += text("\[[time_stamp()]\] Has been handcuffed (attempt) by [user.name] ([user.ckey])")
- user.attack_log += text("\[[time_stamp()]\] Attempted to handcuff [M.name] ([M.ckey])")
+ if (istype(C, /mob/living/carbon/human))
+ if(!C.handcuffed)
+ C.attack_log += text("\[[time_stamp()]\] Has been handcuffed (attempt) by [user.name] ([user.ckey])")
+ user.attack_log += text("\[[time_stamp()]\] Attempted to handcuff [C.name] ([C.ckey])")
- log_attack("[user.name] ([user.ckey]) Attempted to handcuff [M.name] ([M.ckey])")
+ log_attack("[user.name] ([user.ckey]) Attempted to handcuff [C.name] ([C.ckey])")
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
- O.target = M
+ O.target = C
O.item = user.get_active_hand()
O.s_loc = user.loc
- O.t_loc = M.loc
+ O.t_loc = C.loc
O.place = "handcuff"
- M.requests += O
+ C.requests += O
spawn( 0 )
if(istype(src, /obj/item/weapon/handcuffs/cable))
feedback_add_details("handcuffs","C")
@@ -57,15 +57,15 @@
O.process()
return
else
- if(!M.handcuffed)
+ if(!C.handcuffed)
var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( )
O.source = user
- O.target = M
+ O.target = C
O.item = user.get_active_hand()
O.s_loc = user.loc
- O.t_loc = M.loc
+ O.t_loc = C.loc
O.place = "handcuff"
- M.requests += O
+ C.requests += O
spawn( 0 )
if(istype(src, /obj/item/weapon/handcuffs/cable))
playsound(src.loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
diff --git a/code/game/objects/items/weapons/implants/implantfreedom.dm b/code/game/objects/items/weapons/implants/implantfreedom.dm
index df1fd274cae..26edf0b29cb 100644
--- a/code/game/objects/items/weapons/implants/implantfreedom.dm
+++ b/code/game/objects/items/weapons/implants/implantfreedom.dm
@@ -15,7 +15,7 @@
return
- trigger(emote, mob/source as mob)
+ trigger(emote, mob/living/carbon/source as mob)
if (src.uses < 1) return 0
if (emote == src.activation_emote)
src.uses--
@@ -45,7 +45,7 @@
return
- implanted(mob/source)
+ implanted(mob/living/carbon/source)
source.mind.store_memory("Freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0)
source << "The implanted freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate."
return 1
diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm
index 867ba310534..fd141b01b76 100644
--- a/code/game/objects/items/weapons/tools.dm
+++ b/code/game/objects/items/weapons/tools.dm
@@ -90,13 +90,13 @@
icon_state = "cutters-y"
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)))
- usr.visible_message("\The [usr] cuts \the [M]'s restraints with \the [src]!",\
- "You cut \the [M]'s restraints with \the [src]!",\
+/obj/item/weapon/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob)
+ if((C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/handcuffs/cable)))
+ usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\
+ "You cut \the [C]'s restraints with \the [src]!",\
"You hear cable being cut.")
- M.handcuffed = null
- M.update_inv_handcuffed()
+ C.handcuffed = null
+ C.update_inv_handcuffed()
return
else
..()
diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm
index 85afd003b54..027f9f647da 100644
--- a/code/game/objects/structures/mineral_doors.dm
+++ b/code/game/objects/structures/mineral_doors.dm
@@ -56,8 +56,13 @@
if(ismob(user))
var/mob/M = user
if(world.time - user.last_bumped <= 60) return //NOTE do we really need that?
- if(M.client && !M:handcuffed)
- SwitchState()
+ if(M.client)
+ if(iscarbon(M))
+ var/mob/living/carbon/C = M
+ if(!C.handcuffed)
+ SwitchState()
+ else
+ SwitchState()
else if(istype(user, /obj/mecha))
SwitchState()
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index 5bc421dee4d..dd860bc5a7f 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -157,12 +157,6 @@
else if (W == l_hand)
l_hand = null
update_inv_l_hand(0)
- else if (W == handcuffed)
- handcuffed = null
- update_inv_handcuffed(0)
- else if (W == legcuffed)
- legcuffed = null
- update_inv_legcuffed()
else if (W == back)
back = null
update_inv_back(0)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 100bf060663..e761b40673d 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -437,4 +437,50 @@
/mob/living/carbon/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > CARBON_LIFEFORM_FIRE_RESISTANCE)
adjustFireLoss(CARBON_LIFEFORM_FIRE_DAMAGE)
- ..()
\ No newline at end of file
+ ..()
+
+/mob/living/carbon/can_use_hands()
+ if(handcuffed)
+ return 0
+ if(buckled && ! istype(buckled, /obj/structure/stool/bed/chair)) // buckling does not restrict hands
+ return 0
+ return 1
+
+/mob/living/carbon/restrained()
+ if (handcuffed)
+ return 1
+ return
+
+/mob/living/carbon/u_equip(obj/item/W as obj)
+ if(!W) return 0
+
+ else if (W == handcuffed)
+ handcuffed = null
+ update_inv_handcuffed()
+
+ else if (W == legcuffed)
+ legcuffed = null
+ update_inv_legcuffed()
+ else
+ ..()
+
+ return
+
+/mob/living/carbon/show_inv(mob/living/carbon/user as mob)
+ user.set_machine(src)
+ var/dat = {"
+
[name]
+