mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-25 01:31:58 +00:00
Fixes sending pod pilots to the void when the pod explodes/is destroyed, as well as giving them damage warnings, just like passengers get. Also fixes it so if a guardian traps something, then dies, doesn't runtime. Lastly, fixes it so there isn't a randomly runtime from opening a critter crate, as well as cleaning up a little snowflake code, thanks to Crazylemon.
87 lines
2.1 KiB
Plaintext
87 lines
2.1 KiB
Plaintext
/obj/structure/closet/critter
|
|
name = "critter crate"
|
|
desc = "A crate designed for safe transport of animals. Only openable from the the outside."
|
|
icon_state = "critter"
|
|
icon_opened = "critteropen"
|
|
icon_closed = "critter"
|
|
var/already_opened = 0
|
|
var/content_mob = null
|
|
var/amount = 1
|
|
|
|
/obj/structure/closet/critter/can_open()
|
|
if(welded)
|
|
return 0
|
|
return 1
|
|
|
|
/obj/structure/closet/critter/open()
|
|
if(!can_open())
|
|
return 0
|
|
|
|
if(content_mob == null) //making sure we don't spawn anything too eldritch
|
|
already_opened = 1
|
|
return ..()
|
|
|
|
if(content_mob != null && already_opened == 0)
|
|
for(var/i = 1, i <= amount, i++)
|
|
new content_mob(loc)
|
|
already_opened = 1
|
|
. = ..()
|
|
|
|
/obj/structure/closet/critter/close()
|
|
..()
|
|
return 1
|
|
|
|
/obj/structure/closet/critter/corgi
|
|
name = "corgi crate"
|
|
content_mob = /mob/living/simple_animal/pet/corgi
|
|
|
|
/obj/structure/closet/critter/corgi/New()
|
|
if(prob(50))
|
|
content_mob = /mob/living/simple_animal/pet/corgi/Lisa
|
|
..()
|
|
|
|
/obj/structure/closet/critter/cow
|
|
name = "cow crate"
|
|
content_mob = /mob/living/simple_animal/cow
|
|
|
|
/obj/structure/closet/critter/goat
|
|
name = "goat crate"
|
|
content_mob = /mob/living/simple_animal/hostile/retaliate/goat
|
|
|
|
/obj/structure/closet/critter/turkey
|
|
name = "turkey crate"
|
|
content_mob = /mob/living/simple_animal/turkey
|
|
|
|
/obj/structure/closet/critter/chick
|
|
name = "chicken crate"
|
|
content_mob = /mob/living/simple_animal/chick
|
|
|
|
/obj/structure/closet/critter/chick/New()
|
|
amount = rand(1, 3)
|
|
..()
|
|
|
|
/obj/structure/closet/critter/cat
|
|
name = "cat crate"
|
|
content_mob = /mob/living/simple_animal/pet/cat
|
|
|
|
/obj/structure/closet/critter/cat/New()
|
|
if(prob(50))
|
|
content_mob = /mob/living/simple_animal/pet/cat/Proc
|
|
..()
|
|
|
|
/obj/structure/closet/critter/pug
|
|
name = "pug crate"
|
|
content_mob = /mob/living/simple_animal/pet/pug
|
|
|
|
/obj/structure/closet/critter/fox
|
|
name = "fox crate"
|
|
content_mob = /mob/living/simple_animal/pet/fox
|
|
|
|
/obj/structure/closet/critter/butterfly
|
|
name = "butterflies crate"
|
|
content_mob = /mob/living/simple_animal/butterfly
|
|
amount = 50
|
|
|
|
/obj/structure/closet/critter/deer
|
|
name = "deer crate"
|
|
content_mob = /mob/living/simple_animal/deer |