Update to restraints (#25831)

* Update carbon_procs.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update items.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update handcuffs.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update humanoid.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update human_mob.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update status_effects.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update neutral.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update blood_magic.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update abduction_gear.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update items.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update abduction_gear.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update code/game/objects/items/weapons/handcuffs.dm

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update code/game/objects/items/weapons/handcuffs.dm

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update code/modules/mob/living/carbon/alien/humanoid/humanoid.dm

Co-authored-by: Matt <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update code/game/objects/items.dm

Co-authored-by: Matt <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update code/game/gamemodes/cult/blood_magic.dm

Woops.

Co-authored-by: chuga-git <98280110+chuga-git@users.noreply.github.com>
Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update items.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update handcuffs.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update handcuffs.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update handcuffs.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update handcuffs.dm

The consequences of my actions

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update humanoid.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update carbon_procs.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update clothing.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update human_mob.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update code/modules/mob/living/carbon/alien/humanoid/humanoid.dm

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update code/modules/mob/living/carbon/human/human_mob.dm

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update carbon_procs.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

* Update handcuffs.dm

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>

---------

Signed-off-by: Faron  <171642577+FaronCD@users.noreply.github.com>
Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Co-authored-by: Matt <116982774+Burzah@users.noreply.github.com>
Co-authored-by: chuga-git <98280110+chuga-git@users.noreply.github.com>
Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
Faron
2024-07-01 02:14:52 +00:00
committed by GitHub
co-authored by 1080pCat Matt chuga-git Ryan
parent 82d3a22167
commit 340d8a3731
10 changed files with 127 additions and 129 deletions
-2
View File
@@ -103,8 +103,6 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
var/strip_delay = DEFAULT_ITEM_STRIP_DELAY
/// How long it takes to put an item onto somebody. IE. clothing
var/put_on_delay = DEFAULT_ITEM_PUTON_DELAY
/// How long it takes to resist out of restraints, like cuffs, and whatnot.
var/breakouttime = 0
/// For flags that define what areas an item cover
var/flags_cover = 0
@@ -3,6 +3,34 @@
desc = "Should not exist. Report me to a(n) coder/admin!"
icon = 'icons/obj/restraints.dmi'
var/cuffed_state = "handcuff"
///How long it will take to break out of restraints
var/breakouttime
/obj/item/restraints/proc/attempt_resist_restraints(mob/living/carbon/user, break_cuffs, effective_breakout_time, silent)
if(effective_breakout_time)
if(!silent)
user.visible_message("<span class='warning'>[user] attempts to [break_cuffs ? "break" : "remove"] [src]!</span>", "<span class='notice'>You attempt to [break_cuffs ? "break" : "remove"] [src]...</span>")
to_chat(user, "<span class='notice'>(This will take around [DisplayTimeText(effective_breakout_time)] and you need to stand still.)</span>")
if(!do_after(user, effective_breakout_time, FALSE, user))
user.remove_status_effect(STATUS_EFFECT_REMOVE_CUFFS)
to_chat(user, "<span class='warning'>You fail to [break_cuffs ? "break" : "remove"] [src]!</span>")
return
user.remove_status_effect(STATUS_EFFECT_REMOVE_CUFFS)
if(loc != user || user.buckled)
return
finish_resist_restraints(user, break_cuffs)
/obj/item/restraints/proc/finish_resist_restraints(mob/living/carbon/user, break_cuffs, silent)
if(!silent)
user.visible_message("<span class='danger'>[user] manages to [break_cuffs ? "break" : "remove"] [src]!</span>", "<span class='notice'>You successfully [break_cuffs ? "break" : "remove"] [src].</span>")
user.unEquip(src)
if(break_cuffs)
qdel(src)
return TRUE
//////////////////////////////
// MARK: HANDCUFFS
@@ -219,6 +247,22 @@
breakouttime = 0
cuffsound = 'sound/weapons/cablecuff.ogg'
/obj/item/restraints/handcuffs/twimsts/finish_resist_restraints(mob/living/carbon/user, break_cuffs)
if(ishuman(user))
var/mob/living/carbon/human/human_user = user
if(!human_user.check_has_mouth()) // I have no mouth but I must eat twimsts
break_cuffs = TRUE
return ..()
visible_message("<span class='danger'>[user] manages to eat through [src]!</span>", "<span class='notice'>You successfully eat through [src].</span>")
playsound(loc, 'sound/items/eatfood.ogg', 50, FALSE)
if(reagents && length(reagents.reagent_list))
user.taste(reagents)
reagents.reaction(user, REAGENT_INGEST)
reagents.trans_to(user, reagents.total_volume)
qdel(src)
//////////////////////////////
// MARK: CRAFTING
//////////////////////////////