mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-27 23:29:10 +01:00
[MIRROR] rework appearance changer (#9588)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Heroman3003
Kashargul
parent
d3976b78a3
commit
983664d462
@@ -26,6 +26,14 @@
|
||||
toggle()
|
||||
..()
|
||||
|
||||
/obj/structure/curtain/attack_ai(mob/user)
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
if(!isrobot((user)))
|
||||
return
|
||||
playsound(src, "rustle", 15, 1, -5)
|
||||
toggle()
|
||||
|
||||
/obj/structure/curtain/proc/toggle()
|
||||
set_opacity(!opacity)
|
||||
if(opacity)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/glass = 1
|
||||
var/datum/tgui_module/appearance_changer/mirror/M
|
||||
|
||||
/obj/structure/mirror/Initialize(mapload, var/dir, var/building = 0, mob/user as mob)
|
||||
/obj/structure/mirror/Initialize(mapload, var/dir, var/building = 0)
|
||||
M = new(src, null)
|
||||
if(building)
|
||||
glass = 0
|
||||
@@ -24,12 +24,18 @@
|
||||
QDEL_NULL(M)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/mirror/attack_hand(mob/user as mob)
|
||||
/obj/structure/mirror/attack_hand(mob/user)
|
||||
if(!glass) return
|
||||
if(shattered) return
|
||||
|
||||
if(ishuman(user))
|
||||
M.tgui_interact(user)
|
||||
M.tgui_interact(user)
|
||||
|
||||
/obj/structure/mirror/attack_ai(mob/user)
|
||||
if(!glass) return
|
||||
if(shattered) return
|
||||
if(!Adjacent(user)) return
|
||||
|
||||
M.tgui_interact(user)
|
||||
|
||||
/obj/structure/mirror/proc/shatter()
|
||||
if(!glass) return
|
||||
|
||||
Reference in New Issue
Block a user