Adds loadout capture crystals!

This commit is contained in:
TheGreatKitsune
2023-03-13 16:58:03 -05:00
parent af6e26cfe2
commit 97701e8b3f
6 changed files with 143 additions and 8 deletions
@@ -39,3 +39,27 @@ var/datum/gear_tweak/item_tf_spawn/gear_tweak_item_tf_spawn = new()
else if(metadata["state"] == "Only Specific Players")
I.item_tf_spawnpoint_set()
I.ckeys_allowed_itemspawn = metadata["valid"]
/datum/gear_tweak/simplemob_picker
var/list/simplemob_list
/datum/gear_tweak/simplemob_picker/New(var/list/valid_simplemobs)
src.simplemob_list = valid_simplemobs
..()
/datum/gear_tweak/simplemob_picker/get_contents(var/metadata)
return "Type: [metadata]"
/datum/gear_tweak/simplemob_picker/get_default()
return simplemob_list[1]
/datum/gear_tweak/simplemob_picker/get_metadata(var/user, var/metadata)
return tgui_input_list(user, "Choose a type.", "Character Preference", simplemob_list, metadata)
/datum/gear_tweak/simplemob_picker/tweak_item(var/obj/item/capture_crystal/I, var/metadata)
if(!(metadata in simplemob_list))
return
if(!istype(I))
return
I.spawn_mob_type = simplemob_list[metadata]
I.spawn_mob_name = metadata
@@ -15,4 +15,41 @@
for(var/implant in typesof(/obj/item/weapon/implant/reagent_generator/egg))
var/obj/item/weapon/implant/reagent_generator/egg/implant_type = implant
implants[initial(implant_type.name)] = implant_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(implants))
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(implants))
/datum/gear/utility/capture_crystal_crew
display_name = "Capture Crystal (crew)"
description = "A capture crystal already containing someone! (Item TF will need to be enabled for someone to join into this crystal)"
path = /obj/item/capture_crystal/loadout
cost = 2
/datum/gear/utility/capture_crystal_simplemob
display_name = "Capture Crystal (pet)"
description = "A capture crystal already containing a pet! (Item TF will need to be enabled for someone to join into this crystal)"
path = /obj/item/capture_crystal/loadout
cost = 2
/datum/gear/utility/capture_crystal_simplemob/New()
..()
var/list/mob_types = list(
"mouse" = /mob/living/simple_mob/animal/passive/mouse,
"rat" = /mob/living/simple_mob/animal/passive/mouse/rat,
"dust jumper" = /mob/living/simple_mob/vore/alienanimals/dustjumper,
"woof" = /mob/living/simple_mob/vore/woof,
"corgi" = /mob/living/simple_mob/animal/passive/dog/corgi,
"cat" = /mob/living/simple_mob/animal/passive/cat,
"chicken" = /mob/living/simple_mob/animal/passive/chicken,
"cow" = /mob/living/simple_mob/animal/passive/cow,
"lizard" = /mob/living/simple_mob/animal/passive/lizard,
"rabbit" = /mob/living/simple_mob/vore/rabbit,
"fox" = /mob/living/simple_mob/animal/passive/fox,
"fennec" = /mob/living/simple_mob/vore/fennec,
"cute fennec" = /mob/living/simple_mob/animal/passive/fennec,
"fennix" = /mob/living/simple_mob/vore/fennix,
"red panda" = /mob/living/simple_mob/vore/redpanda,
"opossum" = /mob/living/simple_mob/animal/passive/opossum,
"horse" = /mob/living/simple_mob/vore/horse,
"goose" = /mob/living/simple_mob/animal/space/goose,
"sheep" = /mob/living/simple_mob/vore/sheep
)
gear_tweaks += new/datum/gear_tweak/simplemob_picker(mob_types)