From 0588dfa08134da47e7e3319002037e575f02a7d3 Mon Sep 17 00:00:00 2001 From: FartMaster69420 <78667902+FartMaster69420@users.noreply.github.com> Date: Wed, 4 May 2022 13:42:20 -0400 Subject: [PATCH] Cocoons Adds a cocoon spinner trait, allowing for characters to place themselves into a little cacoon and transform their appearance. --- .../station/station_special_abilities_vr.dm | 25 +++++++++++++++++++ .../species/station/traits_vr/neutral.dm | 10 ++++++++ .../tgui/modules/appearance_changer.dm | 7 ++++++ 3 files changed, 42 insertions(+) diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm index 23605b10676..97a3cd7cdc6 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm @@ -1037,3 +1037,28 @@ species.has_glowing_eyes = !species.has_glowing_eyes update_eyes() to_chat(src, "Your eyes [species.has_glowing_eyes ? "are now" : "are no longer"] glowing.") + + + +/mob/living/carbon/human/proc/enter_cocoon() + set name = "Spin Cocoon" + set category = "Abilities" + if(!isturf(loc)) + to_chat(src, "You don't have enough space to spin a cocoon!") + return + + if(do_after(src, 25, exclusive = TASK_USER_EXCLUSIVE)) + var/obj/item/weapon/storage/vore_egg/bugcocoon/C = new(loc) + forceMove(C) + var/datum/tgui_module/appearance_changer/V = new(src, src) + V.tgui_interact(src) + + var/mob_holder_type = src.holder_type || /obj/item/weapon/holder + C.w_class = src.size_multiplier * 4 //Egg size and weight scaled to match occupant. + var/obj/item/weapon/holder/H = new mob_holder_type(C, src) + C.max_storage_space = H.w_class + C.icon_scale_x = 0.25 * C.w_class + C.icon_scale_y = 0.25 * C.w_class + C.update_transform() + //egg_contents -= src + C.contents -= src \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm index a96772a5172..34ffe8fb4b6 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm @@ -528,3 +528,13 @@ /datum/trait/neutral/submit_to_prey/apply(var/datum/species/S,var/mob/living/carbon/human/H) ..(S,H) H.verbs |= /mob/living/proc/lend_prey_control + +/datum/trait/neutral/cocoon_tf + name = "Cocoon Spinner" + desc = "Allows you to build a cocoon around yourself, using it to transform your body if you desire." + cost = 0 + custom_only = FALSE + +/datum/trait/neutral/cocoon_tf/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..(S,H) + H.verbs |= /mob/living/carbon/human/proc/enter_cocoon \ No newline at end of file diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm index b125338b306..5675a4bd318 100644 --- a/code/modules/tgui/modules/appearance_changer.dm +++ b/code/modules/tgui/modules/appearance_changer.dm @@ -38,6 +38,7 @@ map_name = "appearance_changer_[REF(src)]_map" // Initialize map objects cam_screen = new + cam_screen.name = "screen" cam_screen.assigned_map = map_name cam_screen.del_on_map_removal = FALSE @@ -407,6 +408,11 @@ return data /datum/tgui_module/appearance_changer/proc/update_active_camera_screen() + cam_screen.vis_contents = list(owner) // Copied from the vore version. + cam_background.icon_state = "clear" + cam_background.fill_rect(1, 1, 1, 1) + local_skybox.cut_overlays() + /* var/turf/newturf = get_turf(customize_usr ? tgui_host() : owner) if(newturf == last_camera_turf) return @@ -425,6 +431,7 @@ local_skybox.add_overlay(SSskybox.get_skybox(get_z(newturf))) local_skybox.scale_to_view(3) local_skybox.set_position("CENTER", "CENTER", (world.maxx>>1) - newturf.x, (world.maxy>>1) - newturf.y) + */ /datum/tgui_module/appearance_changer/proc/update_dna() var/mob/living/carbon/human/target = owner