Event stuff, but also Squeak component (#7285)

This commit is contained in:
BlackMajor
2023-12-11 14:40:47 +13:00
committed by GitHub
parent 835e207c5c
commit 92c744dfec
32 changed files with 831 additions and 78 deletions
@@ -0,0 +1,42 @@
/obj/structure/closet/secure_closet/mind
name = "mind secured locker"
var/datum/mind/owner
var/self_del = 1
anchored = 0
/obj/structure/closet/secure_closet/mind/New(var/datum/mind/mind_target, var/del_self = 1)
.=..()
self_del = del_self
if(mind_target)
owner = mind_target
name = "Owned by [owner.name]"
if(owner.current)
var/icon/I = get_flat_icon(owner.current, dir=SOUTH, no_anim=TRUE)
var/image/IM = image(I, pixel_x = (32 - I.Width()))
//icon2base64(get_flat_icon(owner.current,dir=SOUTH,no_anim=TRUE))
/*
I.appearance_flags |= (RESET_COLOR|PIXEL_SCALE)
I.plane = MOB_PLANE
I.layer = MOB_LAYER
*/
add_overlay(IM)
qdel(I)
/obj/structure/closet/secure_closet/mind/allowed(mob/user)
if(user.mind == owner)
return TRUE
else
return FALSE
/obj/structure/closet/secure_closet/mind/open()
.=..()
if(self_del)
qdel(src)
/obj/structure/closet/secure_closet/mind/LateInitialize()
if(ispath(closet_appearance))
closet_appearance = GLOB.closet_appearances[closet_appearance]
if(istype(closet_appearance))
icon = closet_appearance.icon
color = null
update_icon()
@@ -216,3 +216,14 @@
B.digest_brute = 20
B.special_entrance_sound = 'sound/machines/blender.ogg'
B.recycling = TRUE
/obj/structure/toilet/item/Initialize(mapload)
..()
return INITIALIZE_HINT_LATELOAD
/obj/structure/toilet/item/LateInitialize()
if(istype(loc, /mob/living)) return
var/obj/item/I
for(I in loc)
if(I.density || I.anchored || I == src) continue
I.forceMove(src)