Fantasy redgate map

Added a new fantasy redgate map that consists of a fantasy town and a large dungeon beneath it.

Added a selection of fantasy props.

Added a variety of "magic" resprites of existing items. These are intended to be tech disguised as magic and have descriptions to hint at it, along with some papers on the map.

Added an alchemy system that creates potions in an alembic out of an ingredient and a base. If the ingredient and base match, an interesting potion is created, if they don't, a poor quality potion is created.

Added a new reagent that polymorphs the drinker into a random creature.

Added a chest version of crates.

Added wooden wall lockers.

Added random spawners for fantasy items, potions, ingredients and bases for mapping.

Added hedge and wooden fences.

Added an old fashioned resprite of the oven.

Added a cooking pot resprite of the microwave.

Added wall torches.

Added barrel version of water tanks, beer tanks, wine tanks, blood tanks and a kettle resprite of a coffee dispenser.

Added a wooden tub bath.

Added 19 new vore mobs: 2 Catslugs, 6 succubi, 1 cryptdrake, 4 vampires 5 peasants and a bat.
This commit is contained in:
SatinIsle
2023-09-22 21:44:22 +01:00
parent 202870bfd7
commit 0c39b8b7d8
70 changed files with 53276 additions and 68 deletions
+312
View File
@@ -0,0 +1,312 @@
/obj/machinery/alembic
name = "Alembic"
desc = "A piece of glass chemical apparatus that is used to distill and concentrate chemicals."
icon = 'icons/obj/chemical.dmi'
icon_state = "alembic"
use_power = FALSE
anchored = TRUE
density = FALSE
layer = ABOVE_WINDOW_LAYER
vis_flags = VIS_HIDE
unacidable = TRUE
clicksound = "button"
clickvol = 60
var/potion_reagent = 0
var/bubbling = 0
var/base_reagent = 0
var/product_potion = 0
var/expected_base = 0
/obj/machinery/alembic/update_icon()
if(potion_reagent == 0 && base_reagent == 0) //Empty
icon_state = "alembic"
else if(potion_reagent != 0 && base_reagent == 0) //Has potion reagent but not base
icon_state = "alembic-base"
else if(potion_reagent == 0 && base_reagent != 0) //Has a base but no reagent
icon_state = "alembic-base"
else if(potion_reagent != 0 && base_reagent != 0 && !bubbling ) //Has a reagent but is not turned on
icon_state = "alembic-full"
else if(bubbling == 1) //is actively bubbling
icon_state = "alembic-bubble"
return
/obj/machinery/alembic/attackby(var/obj/item/weapon/potion_material/O as obj, var/mob/user as mob)
if(istype(O,/obj/item/weapon/potion_material))
if(potion_reagent != 0 )
to_chat(user, SPAN_WARNING("There is already a reagent in the alembic!"))
return
else
src.potion_reagent = O
src.expected_base = O.base_reagent
src.product_potion = O.product_potion
user.drop_item()
O.loc = src
update_icon()
to_chat(user, SPAN_NOTICE("You place the [O] in the alembic."))
src.updateUsrDialog()
return
else if(istype(O,/obj/item/weapon/potion_base))
if(base_reagent != 0 )
to_chat(user, SPAN_WARNING("There is already a base in the alembic!"))
return
else
src.base_reagent = O
user.drop_item()
O.loc = src
update_icon()
to_chat(user, SPAN_NOTICE("You place the [O] in the alembic."))
src.updateUsrDialog()
return
else
to_chat(user, SPAN_WARNING("This item is no use in the alembic."))
return
/obj/machinery/alembic/attack_hand(mob/user as mob)
if(potion_reagent == 0 || base_reagent == 0) //If there is nothing in there
to_chat(user, SPAN_WARNING("The alembic is not yet full!"))
return
else if(potion_reagent != 0 && base_reagent != 0 && !bubbling) //if there is something in there and it's not bubbling yet
bubbling = 1
update_icon()
to_chat(user, SPAN_NOTICE("The alembic begins boiling the [potion_reagent] in the [base_reagent]."))
sleep 30
bubbling = 0
to_chat(user, SPAN_NOTICE("The alembic finishes brewing the potion!"))
spawn_potion()
potion_reagent = 0
base_reagent = 0
update_icon()
return
else if(bubbling)
to_chat(user, SPAN_WARNING("The alembic is already boiling!"))
return
/obj/machinery/alembic/AltClick(mob/user)
if(potion_reagent == 0)
to_chat(user, SPAN_WARNING("There is nothing in the alembic!"))
return
else if(potion_reagent != 0 && !bubbling) //if there is something in there and it's not bubbling yet
if(!user.incapacitated() && Adjacent(user))
user.put_in_hands(potion_reagent)
potion_reagent = 0
update_icon()
else
return
else if(bubbling)
to_chat(user, SPAN_WARNING("The alembic is already boiling, it's too late to get your reagent back!"))
return
/obj/machinery/alembic/proc/spawn_potion()
if(istype(base_reagent,expected_base))
new product_potion(loc)
else
var/failed_product = pick(/obj/item/weapon/reagent_containers/glass/bottle/potion/plain,
/obj/item/weapon/reagent_containers/glass/bottle/potion/ethanol,
/obj/item/weapon/reagent_containers/glass/bottle/potion/sugar,
/obj/item/weapon/reagent_containers/glass/bottle/potion/capsaicin,
/obj/item/weapon/reagent_containers/glass/bottle/potion/soporific,
/obj/item/weapon/reagent_containers/glass/bottle/potion/lipostipo,
/obj/item/weapon/reagent_containers/glass/bottle/potion/phoron)
new failed_product(loc)
//The actual ingredients!
/obj/item/weapon/potion_material
name = "blood ruby"
desc = "An extremely hard but oddly brittle gem with a beautiful red colouration."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "blood_ruby"
var/base_reagent = /obj/item/weapon/potion_base/ichor
var/product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/healing
/obj/item/weapon/potion_material/blood_ruby
/obj/item/weapon/potion_material/ruby_eye
name = "ruby eye"
desc = "An odd gem in the shape of an eye, it has a strange static charge to the surface."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "ruby_eye"
base_reagent = /obj/item/weapon/potion_base/ichor
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/greater_healing
/obj/item/weapon/potion_material/golden_scale
name = "golden scale"
desc = "A reptilian scale with an almost metalic texture and a shining gold surface."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "golden_scale"
base_reagent = /obj/item/weapon/potion_base/alkahest
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/fire_resist
/obj/item/weapon/potion_material/frozen_dew
name = "frozen dew"
desc = "A bitter leaf with a small droplet of crystalised dew attached to it."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "frozen_dew"
base_reagent = /obj/item/weapon/potion_base/ichor
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/antidote
/obj/item/weapon/potion_material/living_coral
name = "living coral"
desc = "Some coral that appears to be friving outside of the water, it has an oddly metallic scent."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "living_coral"
base_reagent = /obj/item/weapon/potion_base/aqua_regia
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/water
/obj/item/weapon/potion_material/rare_horn
name = "rare horn"
desc = "A sharp, straight horn from some unknown animal."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "rare_horn"
base_reagent = /obj/item/weapon/potion_base/alkahest
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/regeneration
/obj/item/weapon/potion_material/moldy_bread
name = "moldy bread"
desc = "A slice of bread that's clearly been left out for far too long."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "moldy_bread"
base_reagent = /obj/item/weapon/potion_base/aqua_regia
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/panacea
/obj/item/weapon/potion_material/glowing_gem
name = "glowing gem"
desc = "An pretty but rough gem that is literally glowing green, it tingles to touch."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "glowing_gem"
base_reagent = /obj/item/weapon/potion_base/alkahest
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/magic
/obj/item/weapon/potion_material/giant_toe
name = "giant toe"
desc = "One really large severed toe, in some state of suspended decomposition. It's gross and stinks."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "giant_toe"
base_reagent = /obj/item/weapon/potion_base/aqua_regia
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/lightness
/obj/item/weapon/potion_material/flesh_of_the_stars
name = "flesh of the stars"
desc = "A rare slab of meat with an unknown origin, said to have fallen from the sky."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "flesh_of_the_stars"
base_reagent = /obj/item/weapon/potion_base/aqua_regia
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/bonerepair
/obj/item/weapon/potion_material/spinning_poppy
name = "spinning poppy"
desc = "A small poppy flower that seems inclined to twirl without aid."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "spinning_poppy"
base_reagent = /obj/item/weapon/potion_base/aqua_regia
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/pain
/obj/item/weapon/potion_material/salt_mage
name = "salt mage"
desc = "A statuette made from salt crystals, it's adorned with a little mages hat."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "salt_mage"
base_reagent = /obj/item/weapon/potion_base/alkahest
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/shrink
/obj/item/weapon/potion_material/golden_grapes
name = "golden grapes"
desc = "A bunch of grapes with a shining golden skin, they smell strongly of some sort of solvent."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "golden_grapes"
base_reagent = /obj/item/weapon/potion_base/alkahest
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/growth
/obj/item/weapon/potion_material/fairy_house
name = "fairy house"
desc = "A moderately large mushroom with a speckled red cap and... a door on the front?"
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "fairy_house"
base_reagent = /obj/item/weapon/potion_base/ichor
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/faerie
/obj/item/weapon/potion_material/thorny_bulb
name = "thorny bulb"
desc = "A flesh green plant bulb covered in thorns, it has a sulfur rich aroma."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "thorny_bulb"
base_reagent = /obj/item/weapon/potion_base/aqua_regia
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/relaxation
/obj/item/weapon/potion_material/ancient_egg
name = "ancient egg"
desc = "An egg, but seemingly really really old and long past rotten."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "ancient_egg"
base_reagent = /obj/item/weapon/potion_base/aqua_regia
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/speed
/obj/item/weapon/potion_material/crown_stem
name = "crown stem"
desc = "An odd little flower that looks like a crown, the leaves have a minty aroma."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "crown_stem"
base_reagent = /obj/item/weapon/potion_base/alkahest
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/attractiveness
/obj/item/weapon/potion_material/red_ingot
name = "red ingot"
desc = "An oddly red coloured block of iron, it seems rather brittle and wouldn't make for a good smithing material."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "red_ingot"
base_reagent = /obj/item/weapon/potion_base/alkahest
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/boyjuice
/obj/item/weapon/potion_material/soft_diamond
name = "soft diamond"
desc = "A gem that looks much like a diamond, but is squishy to the touch."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "soft_diamond"
base_reagent = /obj/item/weapon/potion_base/ichor
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/girljuice
/obj/item/weapon/potion_material/solid_mist
name = "solid mist"
desc = "A small purple stone that seems to be radiating some sort of mist."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "solid_mist"
base_reagent = /obj/item/weapon/potion_base/ichor
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/badpolymorph
/obj/item/weapon/potion_material/spider_leg
name = "spider leg"
desc = "A severed limb from a spider, it seems to be oozing with green... something."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "spider_leg"
base_reagent = /obj/item/weapon/potion_base/aqua_regia
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/SOP
/obj/item/weapon/potion_material/folded_dark
name = "folded dark"
desc = "A folded material that appears to be made of pure dark."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "folded_dark"
base_reagent = /obj/item/weapon/potion_base/ichor
product_potion = /obj/item/weapon/reagent_containers/glass/bottle/potion/truepolymorph
//base ingredients
/obj/item/weapon/potion_base/aqua_regia
name = "aqua regia"
desc = "A mixture of concentrated acids, be careful not to spill it! A base ingredient of many potions."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "aqua_regia"
/obj/item/weapon/potion_base/ichor
name = "ichor"
desc = "A thick and heavy red reagent said to be tinged with the blood of gods. A base ingredient of many potions."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "ichor"
/obj/item/weapon/potion_base/alkahest
name = "alkahest"
desc = "Also known as the universal solvent, said to be capable of dissolving metal rapidly. A base ingredient of many potions."
icon = 'icons/obj/chemical_potionreagents.dmi'
icon_state = "alkahest"
@@ -148,3 +148,33 @@
/obj/item/weapon/reagent_containers/chem_disp_cartridge/chaitea,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/decafchai
)
/obj/machinery/chemical_dispenser/kettle //reskin of coffee dispenser
name = "kettle"
desc = "A kettle used for making hot drinks."
icon_state = "kettle"
ui_title = "kettle"
accept_drinking = 1
/obj/machinery/chemical_dispenser/kettle/full
spawn_cartridges = list(
/obj/item/weapon/reagent_containers/chem_disp_cartridge/coffee,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/cafe_latte,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/soy_latte,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/hot_coco,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/milk,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/cream,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/sugar,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/tea,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/ice,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/mint,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/orange,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/lemon,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/lime,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/berry,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/greentea,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/decaf,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/chaitea,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/decafchai
)
@@ -103,6 +103,11 @@
. = ..()
reagents.add_reagent("water", 4000)
/obj/structure/reagent_dispensers/watertank/barrel
name = "water barrel"
desc = "A barrel for holding water."
icon_state = "waterbarrel"
//Fuel
/obj/structure/reagent_dispensers/fueltank
name = "fuel tank"
@@ -463,6 +468,20 @@
. = ..()
reagents.add_reagent("beer",1000)
/obj/structure/reagent_dispensers/beerkeg/wood
name = "beer keg"
desc = "A beer keg with a tap on it."
icon_state = "beertankfantasy"
/obj/structure/reagent_dispensers/beerkeg/wine
name = "wine barrel"
desc = "A wine casket with a tap on it."
icon_state = "beertankfantasy"
/obj/structure/reagent_dispensers/beerkeg/wine/Initialize()
. = ..()
reagents.add_reagent("redwine",1000)
/obj/structure/reagent_dispensers/beerkeg/fakenuke
name = "nuclear beer keg"
desc = "A beer keg in the form of a nuclear bomb! An absolute blast at parties!"
@@ -492,3 +511,15 @@
reagents.splash_area(get_turf(src), 3)
visible_message(span("danger", "The [src] bursts open, spreading oil all over the area."))
qdel(src)
/obj/structure/reagent_dispensers/bloodbarrel
name = "blood barrel"
desc = "A beer keg."
icon = 'icons/obj/chemical_tanks.dmi'
icon_state = "bloodbarrel"
amount_per_transfer_from_this = 10
/obj/structure/reagent_dispensers/bloodbarrel/Initialize()
. = ..()
reagents.add_reagent("blood", 1000, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"="O-","resistances"=null,"trace_chem"=null))
@@ -377,3 +377,12 @@
amount_per_transfer_from_this = 20
possible_transfer_amounts = list(10,20,30,60,120)
volume = 120
/obj/item/weapon/reagent_containers/glass/pint_mug
desc = "A rustic pint mug designed for drinking ale."
name = "pint mug"
icon = 'icons/obj/drinks.dmi'
icon_state = "pint_mug"
matter = list(MAT_WOOD = 50)
drop_sound = 'sound/items/drop/wooden.ogg'
pickup_sound = 'sound/items/pickup/wooden.ogg'
@@ -139,3 +139,177 @@
M.adjust_nutrition(-20 * removed)
if(M.weight < 500)
M.weight += 0.3
/datum/reagent/polymorph
name = "Transforitine"
id = "polymorph"
description = "A chemical that instantly transforms the consumer into another creature."
taste_description = "luck"
reagent_state = LIQUID
color = "#a754de"
scannable = 1
var/tf_type = /mob/living/simple_mob/animal/passive/mouse
var/tf_possible_types = list(
"mouse" = /mob/living/simple_mob/animal/passive/mouse,
"rat" = /mob/living/simple_mob/animal/passive/mouse/rat,
"giant rat" = /mob/living/simple_mob/vore/aggressive/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,
"space bumblebee" = /mob/living/simple_mob/vore/bee,
"space bear" = /mob/living/simple_mob/animal/space/bear,
"voracious lizard" = /mob/living/simple_mob/vore/aggressive/dino,
"giant frog" = /mob/living/simple_mob/vore/aggressive/frog,
"jelly blob" = /mob/living/simple_mob/vore/jelly,
"wolf" = /mob/living/simple_mob/vore/wolf,
"direwolf" = /mob/living/simple_mob/vore/wolf/direwolf,
"great wolf" = /mob/living/simple_mob/vore/greatwolf,
"sect queen" = /mob/living/simple_mob/vore/sect_queen,
"sect drone" = /mob/living/simple_mob/vore/sect_drone,
"panther" = /mob/living/simple_mob/vore/aggressive/panther,
"giant snake" = /mob/living/simple_mob/vore/aggressive/giant_snake,
"deathclaw" = /mob/living/simple_mob/vore/aggressive/deathclaw,
"otie" = /mob/living/simple_mob/vore/otie,
"mutated otie" =/mob/living/simple_mob/vore/otie/feral,
"red otie" = /mob/living/simple_mob/vore/otie/red,
"defanged xenomorph" = /mob/living/simple_mob/vore/xeno_defanged,
"catslug" = /mob/living/simple_mob/vore/alienanimals/catslug,
"monkey" = /mob/living/carbon/human/monkey,
"wolpin" = /mob/living/carbon/human/wolpin,
"sparra" = /mob/living/carbon/human/sparram,
"saru" = /mob/living/carbon/human/sergallingm,
"sobaka" = /mob/living/carbon/human/sharkm,
"farwa" = /mob/living/carbon/human/farwa,
"neaera" = /mob/living/carbon/human/neaera,
"stok" = /mob/living/carbon/human/stok,
"weretiger" = /mob/living/simple_mob/vore/weretiger,
"dragon" = /mob/living/simple_mob/vore/bigdragon/friendly,
"leopardmander" = /mob/living/simple_mob/vore/leopardmander
)
/datum/reagent/polymorph/affect_blood(var/mob/living/carbon/target, var/removed)
var/mob/living/M = target
log_debug("polymorph start")
if(!istype(M))
log_debug("polymorph istype")
return
if(M.tf_mob_holder)
log_debug("polymorph tf_holder")
var/mob/living/ourmob = M.tf_mob_holder
if(ourmob.ai_holder)
log_debug("polymorph ai")
var/datum/ai_holder/our_AI = ourmob.ai_holder
our_AI.set_stance(STANCE_IDLE)
M.tf_mob_holder = null
ourmob.ckey = M.ckey
var/turf/get_dat_turf = get_turf(target)
ourmob.loc = get_dat_turf
ourmob.forceMove(get_dat_turf)
ourmob.vore_selected = M.vore_selected
M.vore_selected = null
for(var/obj/belly/B as anything in M.vore_organs)
log_debug("polymorph belly")
B.loc = ourmob
B.forceMove(ourmob)
B.owner = ourmob
M.vore_organs -= B
ourmob.vore_organs += B
ourmob.Life(1)
if(ishuman(M))
log_debug("polymorph human")
for(var/obj/item/W in M)
log_debug("polymorph items")
if(istype(W, /obj/item/weapon/implant/backup) || istype(W, /obj/item/device/nif))
log_debug("polymorph implants")
continue
M.drop_from_inventory(W)
qdel(target)
return
else
log_debug("polymorph else")
if(M.stat == DEAD) //We can let it undo the TF, because the person will be dead, but otherwise things get weird.
log_debug("polymorph dead")
return
log_debug("polymorph not dead")
var/mob/living/new_mob = spawn_mob(M)
new_mob.faction = M.faction
if(new_mob && isliving(new_mob))
log_debug("polymorph new_mob")
for(var/obj/belly/B as anything in new_mob.vore_organs)
log_debug("polymorph new_mob belly")
new_mob.vore_organs -= B
qdel(B)
new_mob.vore_organs = list()
new_mob.name = M.name
new_mob.real_name = M.real_name
for(var/lang in M.languages)
new_mob.languages |= lang
M.copy_vore_prefs_to_mob(new_mob)
new_mob.vore_selected = M.vore_selected
if(ishuman(M))
log_debug("polymorph ishuman part2")
var/mob/living/carbon/human/H = M
if(ishuman(new_mob))
log_debug("polymorph ishuman(newmob)")
var/mob/living/carbon/human/N = new_mob
N.gender = H.gender
N.identifying_gender = H.identifying_gender
else
log_debug("polymorph gender else")
new_mob.gender = H.gender
else
log_debug("polymorph gender else 2")
new_mob.gender = M.gender
if(ishuman(new_mob))
var/mob/living/carbon/human/N = new_mob
N.identifying_gender = M.gender
for(var/obj/belly/B as anything in M.vore_organs)
B.loc = new_mob
B.forceMove(new_mob)
B.owner = new_mob
M.vore_organs -= B
new_mob.vore_organs += B
new_mob.ckey = M.ckey
if(M.ai_holder && new_mob.ai_holder)
var/datum/ai_holder/old_AI = M.ai_holder
old_AI.set_stance(STANCE_SLEEP)
var/datum/ai_holder/new_AI = new_mob.ai_holder
new_AI.hostile = old_AI.hostile
new_AI.retaliate = old_AI.retaliate
M.loc = new_mob
M.forceMove(new_mob)
new_mob.tf_mob_holder = M
target.bloodstr.clear_reagents() //Got to clear all reagents to make sure mobs don't keep spawning.
target.ingested.clear_reagents()
target.touching.clear_reagents()
/datum/reagent/polymorph/proc/spawn_mob(var/mob/living/target)
log_debug("polymorph proc spawn mob")
var/choice = pick(tf_possible_types)
tf_type = tf_possible_types[choice]
log_debug("polymorph [tf_type]")
if(!ispath(tf_type))
log_debug("polymorph tf_type fail")
return
log_debug("polymorph tf_type pass")
var/new_mob = new tf_type(get_turf(target))
return new_mob