Merge pull request #12897 from FartMaster69420/cocoon

Cocoon Metamorphosis
This commit is contained in:
Casey
2022-05-12 19:21:53 +00:00
committed by CHOMPStation2
parent 70d0e4cf4b
commit 9f6a9a4e6a
5 changed files with 58 additions and 1 deletions
@@ -35,6 +35,8 @@
animate_shake()
drop_contents()
icon = open_egg_icon
if(user.transforming)
user.transforming = FALSE
/obj/item/weapon/storage/vore_egg/proc/animate_shake()
var/init_px = pixel_x
@@ -1038,3 +1038,29 @@
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)
transforming = TRUE
var/datum/tgui_module/appearance_changer/cocoon/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
@@ -177,3 +177,13 @@
desc = "You can breathe under water."
cost = 1
var_changes = list("water_breather" = 1)
/datum/trait/positive/cocoon_tf
name = "Cocoon Spinner"
desc = "Allows you to build a cocoon around yourself, using it to transform your body if you desire."
cost = 1
//custom_only = FALSE
/datum/trait/positive/cocoon_tf/apply(var/datum/species/S,var/mob/living/carbon/human/H)
..(S,H)
H.verbs |= /mob/living/carbon/human/proc/enter_cocoon
@@ -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
@@ -544,7 +551,7 @@
// VOREStation Add - Ears/Tails/Wings
/datum/tgui_module/appearance_changer/proc/can_use_sprite(datum/sprite_accessory/X, mob/living/carbon/human/target, mob/user)
if(!isnull(X.species_allowed) && !(target.species.name in X.species_allowed))
if(!isnull(X.species_allowed) && !(target.species.name in X.species_allowed) && (!istype(target.species, /datum/species/custom))) // Letting custom species access wings/ears/tails.
return FALSE
if(LAZYLEN(X.ckeys_allowed) && !(user?.ckey in X.ckeys_allowed) && !(target.ckey in X.ckeys_allowed))
@@ -43,3 +43,15 @@
if(APPEARANCECHANGER_CHANGED_EYES)
to_chat(M, "<span class='notice'>You feel lightheaded and drowsy...</span>")
to_chat(O, "<span class='notice'>You feel warm as you make subtle changes to your captive's body.</span>")
// Cocoon Stuff
/datum/tgui_module/appearance_changer/cocoon
name ="Appearance Editor (Cocoon)"
flags = APPEARANCE_ALL_HAIR
customize_usr = TRUE
/datum/tgui_module/appearance_changer/cocoon/tgui_status(mob/user, datum/tgui_state/state)
//if(!istype(owner.loc, /obj/item/weapon/storage/vore_egg/bugcocoon))
if(!owner.transforming)
return STATUS_CLOSE
return ..()