abstract types
This commit is contained in:
@@ -31,7 +31,8 @@
|
||||
var/normal_desc
|
||||
//--end of love :'(--
|
||||
|
||||
var/snowflake_id //if we set from a config snowflake plushie.
|
||||
var/snowflake_id //if we set from a config snowflake plushie.
|
||||
var/abstract_type = /obj/item/toy/plush //to prevent us from spawning "base" plushies. set this to a plush's own type. only use this if a plush is not meant to be standalone/spawned, ever.
|
||||
|
||||
/obj/item/toy/plush/random_snowflake/Initialize(mapload, set_snowflake_id)
|
||||
. = ..()
|
||||
@@ -127,6 +128,7 @@
|
||||
squeak_override = P.squeak_override
|
||||
attack_verb = P.attack_verb
|
||||
gender = P.gender
|
||||
qdel(P)
|
||||
if(jsonlist["name"])
|
||||
name = jsonlist["name"]
|
||||
if(jsonlist["desc"])
|
||||
@@ -415,13 +417,22 @@
|
||||
if(mood_message)
|
||||
desc += mood_message
|
||||
|
||||
GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths())
|
||||
/proc/valid_plushie_paths()
|
||||
. = list()
|
||||
for(var/i in subtypesof(/obj/item/toy/plush))
|
||||
var/obj/item/toy/plush/abstract = i
|
||||
if(initial(abstract.abstract_type) == i)
|
||||
continue
|
||||
. += i
|
||||
|
||||
/obj/item/toy/plush/random
|
||||
name = "Illegal plushie"
|
||||
desc = "Something fucked up"
|
||||
var/blacklisted_plushes = list(/obj/item/toy/plush/carpplushie/dehy_carp, /obj/item/toy/plush/awakenedplushie, /obj/item/toy/plush/random)
|
||||
|
||||
/obj/item/toy/plush/random/Initialize()
|
||||
var/newtype = prob(CONFIG_GET(number/snowflake_plushie_prob))? /obj/item/toy/plush/random_snowflake : (pick(subtypesof(/obj/item/toy/plush) - typecacheof(blacklisted_plushes)))
|
||||
var/newtype = prob(CONFIG_GET(number/snowflake_plushie_prob))? /obj/item/toy/plush/random_snowflake : pick(GLOB.valid_plushie_paths)
|
||||
new newtype(loc)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
@@ -676,6 +687,7 @@
|
||||
/obj/item/toy/plush/mammal
|
||||
name = "mammal plushie"
|
||||
desc = "An adorable stuffed toy resembling some sort of crew member."
|
||||
abstract_type = /obj/item/toy/plush/mammal
|
||||
|
||||
/obj/item/toy/plush/catgirl/fermis
|
||||
name = "medcat plushie"
|
||||
@@ -689,17 +701,20 @@
|
||||
name = "xenohybrid plushie"
|
||||
desc = "An adorable stuffed toy that resmembles a xenomorphic crewmember."
|
||||
squeak_override = list('sound/voice/hiss2.ogg' = 1)
|
||||
abstract_type = /obj/item/toy/plush/xeno
|
||||
|
||||
/obj/item/toy/plush/bird
|
||||
name = "bird plushie"
|
||||
desc = "An adorable stuffed plushie that resembles an avian."
|
||||
attack_verb = list("peeped", "beeped", "poofed")
|
||||
squeak_override = list('modular_citadel/sound/voice/peep.ogg' = 1)
|
||||
abstract_type = /obj/item/toy/plush/bird
|
||||
|
||||
/obj/item/toy/plush/sergal
|
||||
name = "sergal plushie"
|
||||
desc = "An adorable stuffed plushie that resembles a sagaru."
|
||||
squeak_override = list('modular_citadel/sound/voice/merp.ogg' = 1)
|
||||
abstract_type = /obj/item/toy/plush/sergal
|
||||
|
||||
/obj/item/toy/plush/mammal/dog
|
||||
desc = "An adorable stuffed toy that resembles a canine."
|
||||
@@ -708,9 +723,11 @@
|
||||
'modular_citadel/sound/voice/bark1.ogg' = 1,
|
||||
'modular_citadel/sound/voice/bark2.ogg' = 1
|
||||
)
|
||||
abstract_type = /obj/item/toy/plush/mammal/dog
|
||||
|
||||
/obj/item/toy/plush/catgirl
|
||||
name = "feline plushie"
|
||||
desc = "An adorable stuffed toy that resembles a feline."
|
||||
attack_verb = list("headbutt", "scritched", "bit")
|
||||
squeak_override = list('modular_citadel/sound/voice/nya.ogg' = 1)
|
||||
abstract_type = /obj/item/toy/plush/catgirl
|
||||
|
||||
Reference in New Issue
Block a user