mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Fixes #5190
This commit is contained in:
@@ -550,6 +550,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
|
||||
//Will return the location of the turf an atom is ultimatly sitting on
|
||||
//isn't this just a null-reference-vulnerable copy of /proc/get_turf()?
|
||||
/proc/get_turf_loc(var/atom/movable/M) //gets the location of the turf that the atom is on, or what the atom is in is on, etc
|
||||
//in case they're in a closet or sleeper or something
|
||||
var/atom/loc = M.loc
|
||||
|
||||
@@ -172,7 +172,6 @@ BLIND // can't see anything
|
||||
icon = 'icons/obj/clothing/shoes.dmi'
|
||||
desc = "Comfortable-looking shoes."
|
||||
gender = PLURAL //Carn: for grammarically correct text-parsing
|
||||
var/chained = 0
|
||||
siemens_coefficient = 0.9
|
||||
body_parts_covered = FEET
|
||||
slot_flags = SLOT_FEET
|
||||
|
||||
@@ -84,22 +84,31 @@
|
||||
name = "orange shoes"
|
||||
icon_state = "orange"
|
||||
item_color = "orange"
|
||||
var/chained = null
|
||||
|
||||
/obj/item/clothing/shoes/orange/proc/attach_cuffs(/obj/item/weapon/handcuffs/cuffs)
|
||||
if (src.chained) return
|
||||
|
||||
cuffs.loc = src
|
||||
src.chained = cuffs
|
||||
src.slowdown = 15
|
||||
src.icon_state = "orange1"
|
||||
|
||||
/obj/item/clothing/shoes/orange/proc/remove_cuffs()
|
||||
if (!src.chained) return
|
||||
|
||||
src.chained.loc = get_turf(src)
|
||||
src.slowdown = initial(slowdown)
|
||||
src.icon_state = "orange"
|
||||
src.chained = null
|
||||
|
||||
/obj/item/clothing/shoes/orange/attack_self(mob/user as mob)
|
||||
if (src.chained)
|
||||
src.chained = null
|
||||
src.slowdown = SHOES_SLOWDOWN
|
||||
new /obj/item/weapon/handcuffs( user.loc )
|
||||
src.icon_state = "orange"
|
||||
return
|
||||
|
||||
/obj/item/clothing/shoes/orange/attackby(H as obj, loc)
|
||||
..()
|
||||
if ((istype(H, /obj/item/weapon/handcuffs) && !( src.chained )))
|
||||
//H = null
|
||||
if (src.icon_state != "orange") return
|
||||
del(H)
|
||||
src.chained = 1
|
||||
src.slowdown = 15
|
||||
src.icon_state = "orange1"
|
||||
return
|
||||
remove_cuffs()
|
||||
|
||||
/obj/item/clothing/shoes/orange/attackby(H as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(H, /obj/item/weapon/handcuffs))
|
||||
attach_cuffs(H)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user