mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Tape now does not stop anything like magical wall it used to be.
If someone with no access walks through it, it adds his fingerprints/fibers, gives him an omnious message and crumples the tape.
This commit is contained in:
@@ -14,7 +14,8 @@
|
|||||||
name = "tape"
|
name = "tape"
|
||||||
icon = 'icons/policetape.dmi'
|
icon = 'icons/policetape.dmi'
|
||||||
anchored = 1
|
anchored = 1
|
||||||
density = 1
|
var/lifted = 0
|
||||||
|
var/crumpled = 0
|
||||||
var/icon_base
|
var/icon_base
|
||||||
|
|
||||||
/obj/item/taperoll/police
|
/obj/item/taperoll/police
|
||||||
@@ -97,8 +98,8 @@
|
|||||||
//is_blocked_turf(var/turf/T)
|
//is_blocked_turf(var/turf/T)
|
||||||
usr << "\blue You finish placing the [src]." //Git Test
|
usr << "\blue You finish placing the [src]." //Git Test
|
||||||
|
|
||||||
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob, proximity)
|
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob)
|
||||||
if (proximity && istype(A, /obj/machinery/door/airlock))
|
if (istype(A, /obj/machinery/door/airlock))
|
||||||
var/turf/T = get_turf(A)
|
var/turf/T = get_turf(A)
|
||||||
var/obj/item/tape/P = new tape_type(T.x,T.y,T.z)
|
var/obj/item/tape/P = new tape_type(T.x,T.y,T.z)
|
||||||
P.loc = locate(T.x,T.y,T.z)
|
P.loc = locate(T.x,T.y,T.z)
|
||||||
@@ -106,19 +107,20 @@
|
|||||||
P.layer = 3.2
|
P.layer = 3.2
|
||||||
user << "\blue You finish placing the [src]."
|
user << "\blue You finish placing the [src]."
|
||||||
|
|
||||||
/obj/item/tape/Bumped(M as mob)
|
/obj/item/tape/proc/crumple()
|
||||||
if(src.allowed(M))
|
if(!crumpled)
|
||||||
var/turf/T = get_turf(src)
|
crumpled = 1
|
||||||
M:loc = T
|
icon_state = "[icon_state]_c"
|
||||||
|
name = "crumpled [name]"
|
||||||
|
|
||||||
/obj/item/tape/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/item/tape/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||||
if(!density) return 1
|
if(!lifted && ismob(mover))
|
||||||
if(air_group || (height==0)) return 1
|
var/mob/M = mover
|
||||||
|
add_fingerprint(M)
|
||||||
if ((mover.flags & 2 || istype(mover, /obj/effect/meteor) || mover.throwing == 1) )
|
if (!allowed(M)) //only select few learn art of not crumpling the tape
|
||||||
return 1
|
M << "<span class='warning'>You are not supposed to go past [src]...</span>"
|
||||||
else
|
crumple()
|
||||||
return 0
|
return ..(mover)
|
||||||
|
|
||||||
/obj/item/tape/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/item/tape/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
breaktape(W, user)
|
breaktape(W, user)
|
||||||
@@ -126,9 +128,10 @@
|
|||||||
/obj/item/tape/attack_hand(mob/user as mob)
|
/obj/item/tape/attack_hand(mob/user as mob)
|
||||||
if (user.a_intent == "help" && src.allowed(user))
|
if (user.a_intent == "help" && src.allowed(user))
|
||||||
user.show_viewers("\blue [user] lifts [src], allowing passage.")
|
user.show_viewers("\blue [user] lifts [src], allowing passage.")
|
||||||
src.density = 0
|
crumple()
|
||||||
|
lifted = 1
|
||||||
spawn(200)
|
spawn(200)
|
||||||
src.density = 1
|
lifted = 0
|
||||||
else
|
else
|
||||||
breaktape(null, user)
|
breaktape(null, user)
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.5 KiB |
Reference in New Issue
Block a user