mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
Sending a message should no longer work if you are incapacitated. Fixes issue 1120.
Moved some mob vars to carbon: mob/var/handcuffed -> mob/living/carbon/var/handcuffed mob/var/legcuffed -> mob/living/carbon/var/legcuffed As a result, I've turned some procs into pure virtual procs and moved their code into carbon.dm. mob/proc/restrained() -> mob/living/carbon/restrained() mob/proc/can_use_hands() -> mob/living/carbon/can_use_hands() The hand and legcuff portion of mob/proc/u_equip() was moved into mob/living/carbon/u_equip(). The handcuffed portion of mob/proc/show_inv() was moved into mob/living/carbon/show_inv(). Fixes issue 1114. Made parrots immune to bear traps since parrots should be flying over them anyway. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5184 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 <B>[user] is trying to put handcuffs on [M]!</B>", 1)
|
||||
O.show_message("\red <B>[user] is trying to put handcuffs on [C]!</B>", 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()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [M.name] ([M.ckey])</font>")
|
||||
if (istype(C, /mob/living/carbon/human))
|
||||
if(!C.handcuffed)
|
||||
C.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [C.name] ([C.ckey])</font>")
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) Attempted to handcuff [M.name] ([M.ckey])</font>")
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) Attempted to handcuff [C.name] ([C.ckey])</font>")
|
||||
|
||||
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)
|
||||
|
||||
@@ -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, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
|
||||
source << "The implanted freedom implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
|
||||
return 1
|
||||
|
||||
@@ -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
|
||||
..()
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user