mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-14 01:33:28 +01:00
f192cfd812
* Repaths badges, ribbons, pins and permits to /medal. * Drakes can now wear pride pins. * Updates xenofauna map, repaths some accessories. * Added fence door interaction for drakes (open but not close) * Adds stasis cages to the Xenofauna lab. * Corrects some Cynosure badge paths. * Allows mobs to climb into stasis cages themselves. * Added lower temperature sensor alarms to xenofauna.
85 lines
2.4 KiB
Plaintext
85 lines
2.4 KiB
Plaintext
/obj/structure/stasis_cage
|
|
name = "stasis cage"
|
|
desc = "A high-tech animal cage, designed to keep contained fauna docile and safe."
|
|
icon = 'icons/obj/storage.dmi'
|
|
icon_state = "critteropen"
|
|
density = 1
|
|
|
|
var/mob/living/simple_mob/contained
|
|
|
|
/obj/structure/stasis_cage/Initialize()
|
|
. = ..()
|
|
|
|
var/mob/living/simple_mob/A = locate() in loc
|
|
if(A)
|
|
contain(A)
|
|
|
|
/obj/structure/stasis_cage/attack_hand(var/mob/user)
|
|
release()
|
|
|
|
/obj/structure/stasis_cage/attack_robot(var/mob/user)
|
|
if(Adjacent(user))
|
|
release()
|
|
|
|
/obj/structure/stasis_cage/proc/contain(var/mob/living/simple_mob/animal)
|
|
if(contained || !istype(animal))
|
|
return
|
|
contained = animal
|
|
animal.forceMove(src)
|
|
animal.in_stasis = 1
|
|
if(animal.buckled && istype(animal.buckled, /obj/effect/energy_net))
|
|
animal.buckled.forceMove(animal.loc)
|
|
icon_state = "critter"
|
|
desc = initial(desc) + " \The [contained] is kept inside."
|
|
|
|
/obj/structure/stasis_cage/proc/release()
|
|
if(!contained)
|
|
return
|
|
contained.dropInto(src)
|
|
if(contained.buckled && istype(contained.buckled, /obj/effect/energy_net))
|
|
contained.buckled.dropInto(src)
|
|
contained.in_stasis = 0
|
|
contained = null
|
|
icon_state = "critteropen"
|
|
underlays.Cut()
|
|
desc = initial(desc)
|
|
|
|
/obj/structure/stasis_cage/Destroy()
|
|
release()
|
|
return ..()
|
|
|
|
/mob/living/simple_mob/MouseDrop(var/obj/structure/stasis_cage/over_object)
|
|
if(!istype(over_object) || !Adjacent(over_object) || !CanMouseDrop(over_object, usr))
|
|
return ..()
|
|
|
|
if(src != usr && !(sleeping || lying) && !istype(buckled, /obj/effect/energy_net))
|
|
to_chat(usr, SPAN_WARNING("It's going to be difficult to load \the [src] into \the [over_object] without putting it to sleep or capturing it in a net."))
|
|
return
|
|
|
|
if(usr == src)
|
|
usr.visible_message(
|
|
SPAN_NOTICE("\The [src] starts climbing into [src] \the [over_object]."),
|
|
SPAN_NOTICE("You start climbing into \the [over_object].")
|
|
)
|
|
else
|
|
usr.visible_message(
|
|
SPAN_NOTICE("\The [usr] begins loading \the [src] into \the [over_object]."),
|
|
SPAN_NOTICE("You begin loading \the [src] into \the [over_object].")
|
|
)
|
|
|
|
Bumped(usr)
|
|
if(!do_after(usr, 20, over_object))
|
|
return
|
|
|
|
if(usr == src)
|
|
usr.visible_message(
|
|
SPAN_NOTICE("\The [usr] climbs into \the [over_object]."),
|
|
SPAN_NOTICE("You climb into \the [over_object].")
|
|
)
|
|
else
|
|
usr.visible_message(
|
|
SPAN_NOTICE("\The [usr] finishes loading \the [src] into \the [over_object]."),
|
|
SPAN_NOTICE("You finish loading \the [src] into \the [over_object].")
|
|
)
|
|
over_object.contain(src)
|