mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Add random critter crate, remove the unused crate subtype and tweak the animal hospital lavaland ruin to use new random crate (#17536)
* Let's stick with the closet * Update crittercrate.dm
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
/obj/structure/closet/crate/critter
|
||||
name = "critter crate"
|
||||
desc = "A crate which can sustain life for a while."
|
||||
icon_state = "critter"
|
||||
open_door_sprite = null
|
||||
material_drop = /obj/item/stack/sheet/wood
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_opened = "critter_open"
|
||||
icon_closed = "critter"
|
||||
open_door_sprite = null
|
||||
var/already_opened = 0
|
||||
var/already_opened = FALSE
|
||||
var/content_mob = null
|
||||
var/amount = 1
|
||||
open_sound = 'sound/machines/wooden_closet_open.ogg'
|
||||
@@ -15,26 +15,44 @@
|
||||
|
||||
/obj/structure/closet/critter/can_open()
|
||||
if(welded)
|
||||
return 0
|
||||
return 1
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/critter/open()
|
||||
if(!can_open())
|
||||
return 0
|
||||
return
|
||||
|
||||
if(content_mob == null) //making sure we don't spawn anything too eldritch
|
||||
already_opened = 1
|
||||
already_opened = TRUE
|
||||
return ..()
|
||||
|
||||
if(content_mob != null && already_opened == 0)
|
||||
for(var/i = 1, i <= amount, i++)
|
||||
new content_mob(loc)
|
||||
already_opened = 1
|
||||
already_opened = TRUE
|
||||
. = ..()
|
||||
|
||||
/obj/structure/closet/critter/close()
|
||||
..()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/critter/random
|
||||
name = "unmarked crate"
|
||||
desc = "A crate designed for safe transport of animals. The contents are a mystery."
|
||||
|
||||
/obj/structure/closet/critter/random/populate_contents()
|
||||
content_mob = pick(/mob/living/simple_animal/pet/dog/corgi,
|
||||
/mob/living/simple_animal/pet/dog/corgi/Lisa,
|
||||
/mob/living/simple_animal/cow,
|
||||
/mob/living/simple_animal/pig,
|
||||
/mob/living/simple_animal/hostile/retaliate/goat,
|
||||
/mob/living/simple_animal/turkey,
|
||||
/mob/living/simple_animal/chick,
|
||||
/mob/living/simple_animal/pet/cat,
|
||||
/mob/living/simple_animal/pet/dog/pug,
|
||||
/mob/living/simple_animal/pet/dog/fox,
|
||||
/mob/living/simple_animal/deer,
|
||||
/mob/living/simple_animal/bunny)
|
||||
|
||||
/obj/structure/closet/critter/corgi
|
||||
name = "corgi crate"
|
||||
|
||||
Reference in New Issue
Block a user