mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
- Made legcuffs a thing. At the moment the only legcuff type is the beartrap, but it needs sprites before it can get added to the map. The bear-trap triggers when you arm it and then someone runs over it. It attaches to their leg, making them unable to run until they remove it. You remove a legcuff by resisting out of it or by getting someone else to do it for you in the same way that handcuffs are removed. Resisting out of a beartrap takes
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4164 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -158,6 +158,9 @@
|
||||
else if (W == handcuffed)
|
||||
handcuffed = null
|
||||
update_inv_handcuffed()
|
||||
else if (W == legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
else if (W == back)
|
||||
back = null
|
||||
update_inv_back()
|
||||
|
||||
@@ -470,6 +470,7 @@
|
||||
<BR><B>ID:</B> <A href='?src=\ref[src];item=id'>[(wear_id ? wear_id : "Nothing")]</A>
|
||||
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store ? s_store : "Nothing")]</A>
|
||||
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
|
||||
<BR>[(legcuffed ? text("<A href='?src=\ref[src];item=legcuff'>Legcuffed</A>") : text(""))]
|
||||
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
|
||||
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
|
||||
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
var/const/slot_r_store = 16
|
||||
var/const/slot_s_store = 17
|
||||
var/const/slot_in_backpack = 18
|
||||
var/const/slot_legcuffed = 19
|
||||
|
||||
/mob/living/carbon/human/proc/equip_in_one_of_slots(obj/item/W, list/slots, del_on_fail = 1)
|
||||
for (var/slot in slots)
|
||||
@@ -175,6 +176,11 @@
|
||||
src.handcuffed = W
|
||||
update_inv_handcuffed(0)
|
||||
equipped = 1
|
||||
if(slot_legcuffed)
|
||||
if(!src.legcuffed)
|
||||
src.legcuffed = W
|
||||
update_inv_legcuffed(0)
|
||||
equipped = 1
|
||||
if(slot_l_hand)
|
||||
if(!src.l_hand)
|
||||
src.l_hand = W
|
||||
@@ -360,6 +366,9 @@
|
||||
else if (W == handcuffed)
|
||||
handcuffed = null
|
||||
update_inv_handcuffed(0)
|
||||
else if (W == legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed(0)
|
||||
else if (W == r_hand)
|
||||
r_hand = null
|
||||
update_inv_r_hand(0)
|
||||
@@ -502,6 +511,8 @@
|
||||
message = text("\red <B>[] is trying to take off \a [] from []'s back!</B>", source, target.back, target)
|
||||
if("handcuff")
|
||||
message = text("\red <B>[] is trying to unhandcuff []!</B>", source, target)
|
||||
if("legcuff")
|
||||
message = text("\red <B>[] is trying to unlegcuff []!</B>", source, target)
|
||||
if("uniform")
|
||||
if(istype(target.w_uniform, /obj/item/clothing)&&!target.w_uniform:canremove)
|
||||
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.w_uniform, target)
|
||||
@@ -926,6 +937,23 @@ It can still be worn/put on as normal.
|
||||
target.handcuffed = item
|
||||
item.loc = target
|
||||
target.update_inv_handcuffed(0)
|
||||
if("legcuff")
|
||||
if (target.legcuffed)
|
||||
var/obj/item/W = target.legcuffed
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item/weapon/legcuffs))
|
||||
source.drop_item()
|
||||
target.legcuffed = item
|
||||
item.loc = target
|
||||
target.update_inv_legcuffed(0)
|
||||
if("CPR")
|
||||
if (target.cpr_time >= world.time + 30)
|
||||
//SN src = null
|
||||
|
||||
@@ -113,9 +113,10 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
#define FACEMASK_LAYER 15
|
||||
#define HEAD_LAYER 16
|
||||
#define HANDCUFF_LAYER 17
|
||||
#define L_HAND_LAYER 18
|
||||
#define R_HAND_LAYER 19
|
||||
#define TOTAL_LAYERS 19
|
||||
#define LEGCUFF_LAYER 18
|
||||
#define L_HAND_LAYER 19
|
||||
#define R_HAND_LAYER 20
|
||||
#define TOTAL_LAYERS 20
|
||||
//////////////////////////////////
|
||||
|
||||
/mob/living/carbon/human
|
||||
@@ -340,6 +341,7 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
update_inv_r_hand(0)
|
||||
update_inv_l_hand(0)
|
||||
update_inv_handcuffed(0)
|
||||
update_inv_legcuffed(0)
|
||||
update_inv_pockets(0)
|
||||
update_icons()
|
||||
//Hud Stuff
|
||||
@@ -592,6 +594,20 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
overlays_standing[HANDCUFF_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_legcuffed(var/update_icons=1)
|
||||
if(legcuffed)
|
||||
overlays_lying[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff2")
|
||||
overlays_standing[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1")
|
||||
if(src.m_intent != "walk")
|
||||
src.m_intent = "walk"
|
||||
if(src.hud_used && src.hud_used.move_intent)
|
||||
src.hud_used.move_intent.icon_state = "walking"
|
||||
|
||||
else
|
||||
overlays_lying[LEGCUFF_LAYER] = null
|
||||
overlays_standing[LEGCUFF_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1)
|
||||
if(r_hand)
|
||||
|
||||
@@ -111,7 +111,8 @@
|
||||
var/lastDblClick = 0
|
||||
var/lastKnownIP = null
|
||||
var/obj/structure/stool/bed/buckled = null//Living
|
||||
var/obj/item/weapon/handcuffs/handcuffed = null//Living
|
||||
var/obj/item/handcuffed = null//Living
|
||||
var/obj/item/legcuffed = null//Living
|
||||
var/obj/item/l_hand = null//Living
|
||||
var/obj/item/r_hand = null//Living
|
||||
var/obj/item/weapon/back = null//Human/Monkey
|
||||
|
||||
@@ -318,6 +318,11 @@
|
||||
usr.hud_used.action_intent.icon_state = "help"
|
||||
|
||||
if("mov_intent")
|
||||
if(usr.legcuffed)
|
||||
usr << "\red You are legcuffed! You cannot run until you get your cuffs removed!"
|
||||
usr.m_intent = "walk" //Just incase
|
||||
usr.hud_used.move_intent.icon_state = "walking"
|
||||
return
|
||||
switch(usr.m_intent)
|
||||
if("run")
|
||||
usr.m_intent = "walk"
|
||||
@@ -702,4 +707,41 @@
|
||||
CM << "\blue You successfully remove \the [CM.handcuffed]."
|
||||
CM.handcuffed.loc = usr.loc
|
||||
CM.handcuffed = null
|
||||
CM.update_inv_handcuffed()
|
||||
CM.update_inv_handcuffed()
|
||||
else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time))
|
||||
CM.next_move = world.time + 100
|
||||
CM.last_special = world.time + 100
|
||||
if(isalienadult(CM) || (HULK in usr.mutations) || (SUPRSTR in CM.augmentations))//Don't want to do a lot of logic gating here.
|
||||
usr << "\green You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)"
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message(text("\red <B>[] is trying to break the legcuffs!</B>", CM), 1)
|
||||
spawn(0)
|
||||
if(do_after(CM, 50))
|
||||
if(!CM.legcuffed || CM.buckled)
|
||||
return
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message(text("\red <B>[] manages to break the legcuffs!</B>", CM), 1)
|
||||
CM << "\green You successfully break your legcuffs."
|
||||
del(CM.legcuffed)
|
||||
CM.legcuffed = null
|
||||
CM.update_inv_legcuffed()
|
||||
else
|
||||
var/obj/item/weapon/legcuffs/HC = CM.legcuffed
|
||||
var/breakouttime = 1200 //A default in case you are somehow legcuffed with something that isn't an obj/item/weapon/legcuffs type
|
||||
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
|
||||
if(istype(HC)) //If you are legcuffed with actual legcuffs... Well what do I know, maybe someone will want to legcuff you with toilet paper in the future...
|
||||
breakouttime = HC.breakouttime
|
||||
displaytime = breakouttime / 600 //Minutes
|
||||
CM << "\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(CM))
|
||||
O.show_message( "\red <B>[usr] attempts to remove \the [HC]!</B>", 1)
|
||||
spawn(0)
|
||||
if(do_after(CM, breakouttime))
|
||||
if(!CM.legcuffed || CM.buckled)
|
||||
return // time leniency for lag which also might make this whole thing pointless but the server
|
||||
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
|
||||
O.show_message("\red <B>[CM] manages to remove the legcuffs!</B>", 1)
|
||||
CM << "\blue You successfully remove \the [CM.legcuffed]."
|
||||
CM.legcuffed.loc = usr.loc
|
||||
CM.legcuffed = null
|
||||
CM.update_inv_legcuffed()
|
||||
@@ -13,6 +13,9 @@
|
||||
/mob/proc/update_inv_handcuffed()
|
||||
return
|
||||
|
||||
/mob/proc/update_inv_legcuffed()
|
||||
return
|
||||
|
||||
/mob/proc/update_inv_back()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user