From 8d78a999e15e0c2fe78f11d2d5af4778c4c148ca Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 12 Nov 2017 13:17:41 -0600 Subject: [PATCH] Update jellypeople.dm --- .../carbon/human/species_types/jellypeople.dm | 338 ------------------ 1 file changed, 338 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index 3debb6ade3..3cacf1b309 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -1,340 +1,3 @@ -<<<<<<< HEAD -/datum/species/jelly - // Entirely alien beings that seem to be made entirely out of gel. They have three eyes and a skeleton visible within them. - name = "Xenobiological Jelly Entity" - id = "jelly" - default_color = "00FF90" - say_mod = "chirps" - species_traits = list(MUTCOLORS,EYECOLOR,NOBLOOD,VIRUSIMMUNE,TOXINLOVER) - meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/slime - exotic_blood = "slimejelly" - damage_overlay_type = "" - var/datum/action/innate/regenerate_limbs/regenerate_limbs - liked_food = MEAT - -/datum/species/jelly/on_species_loss(mob/living/carbon/C) - if(regenerate_limbs) - regenerate_limbs.Remove(C) - ..() - -/datum/species/jelly/on_species_gain(mob/living/carbon/C, datum/species/old_species) - ..() - if(ishuman(C)) - regenerate_limbs = new - regenerate_limbs.Grant(C) - -/datum/species/jelly/spec_life(mob/living/carbon/human/H) - if(H.stat == DEAD) //can't farm slime jelly from a dead slime/jelly person indefinitely - return - if(!H.blood_volume) - H.blood_volume += 5 - H.adjustBruteLoss(5) - to_chat(H, "You feel empty!") - - if(H.blood_volume < BLOOD_VOLUME_NORMAL) - if(H.nutrition >= NUTRITION_LEVEL_STARVING) - H.blood_volume += 3 - H.nutrition -= 2.5 - if(H.blood_volume < BLOOD_VOLUME_OKAY) - if(prob(5)) - to_chat(H, "You feel drained!") - if(H.blood_volume < BLOOD_VOLUME_BAD) - Cannibalize_Body(H) - H.update_action_buttons_icon() - -/datum/species/jelly/proc/Cannibalize_Body(mob/living/carbon/human/H) - var/list/limbs_to_consume = list("r_arm", "l_arm", "r_leg", "l_leg") - H.get_missing_limbs() - var/obj/item/bodypart/consumed_limb - if(!limbs_to_consume.len) - H.losebreath++ - return - if(H.get_num_legs()) //Legs go before arms - limbs_to_consume -= list("r_arm", "l_arm") - consumed_limb = H.get_bodypart(pick(limbs_to_consume)) - consumed_limb.drop_limb() - to_chat(H, "Your [consumed_limb] is drawn back into your body, unable to maintain its shape!") - qdel(consumed_limb) - H.blood_volume += 20 - -/datum/action/innate/regenerate_limbs - name = "Regenerate Limbs" - check_flags = AB_CHECK_CONSCIOUS - button_icon_state = "slimeheal" - icon_icon = 'icons/mob/actions/actions_slime.dmi' - background_icon_state = "bg_alien" - -/datum/action/innate/regenerate_limbs/IsAvailable() - if(..()) - var/mob/living/carbon/human/H = owner - var/list/limbs_to_heal = H.get_missing_limbs() - if(limbs_to_heal.len < 1) - return 0 - if(H.blood_volume >= BLOOD_VOLUME_OKAY+40) - return 1 - return 0 - -/datum/action/innate/regenerate_limbs/Activate() - var/mob/living/carbon/human/H = owner - var/list/limbs_to_heal = H.get_missing_limbs() - if(limbs_to_heal.len < 1) - to_chat(H, "You feel intact enough as it is.") - return - to_chat(H, "You focus intently on your missing [limbs_to_heal.len >= 2 ? "limbs" : "limb"]...") - if(H.blood_volume >= 40*limbs_to_heal.len+BLOOD_VOLUME_OKAY) - H.regenerate_limbs() - H.blood_volume -= 40*limbs_to_heal.len - to_chat(H, "...and after a moment you finish reforming!") - return - else if(H.blood_volume >= 40)//We can partially heal some limbs - while(H.blood_volume >= BLOOD_VOLUME_OKAY+40) - var/healed_limb = pick(limbs_to_heal) - H.regenerate_limb(healed_limb) - limbs_to_heal -= healed_limb - H.blood_volume -= 40 - to_chat(H, "...but there is not enough of you to fix everything! You must attain more mass to heal completely!") - return - to_chat(H, "...but there is not enough of you to go around! You must attain more mass to heal!") - -////////////////////////////////////////////////////////SLIME PEOPLE/////////////////////////////////////////////////////////////////// - -/datum/species/jelly/slime - // Humans mutated by slime mutagen, produced from green slimes. They are not targetted by slimes. - name = "Slimeperson" - id = "slime" - default_color = "00FFFF" - species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,NOBLOOD,VIRUSIMMUNE, TOXINLOVER) - say_mod = "says" - hair_color = "mutcolor" - hair_alpha = 150 - ignored_by = list(/mob/living/simple_animal/slime) - burnmod = 0.5 - coldmod = 2 - heatmod = 0.5 - var/datum/action/innate/split_body/slime_split - var/list/mob/living/carbon/bodies - var/datum/action/innate/swap_body/swap_body - -/datum/species/jelly/slime/on_species_loss(mob/living/carbon/C) - if(slime_split) - slime_split.Remove(C) - if(swap_body) - swap_body.Remove(C) - bodies -= C // This means that the other bodies maintain a link - // so if someone mindswapped into them, they'd still be shared. - bodies = null - C.faction -= "slime" - C.blood_volume = min(C.blood_volume, BLOOD_VOLUME_NORMAL) - ..() - -/datum/species/jelly/slime/on_species_gain(mob/living/carbon/C, datum/species/old_species) - ..() - if(ishuman(C)) - /* slime_split = new - slime_split.Grant(C) - swap_body = new - swap_body.Grant(C) */ - - if(!bodies || !bodies.len) - bodies = list(C) - else - bodies |= C - - C.faction |= "slime" - -//If you're cloned you get your body pool back -/datum/species/jelly/slime/copy_properties_from(datum/species/jelly/slime/old_species) - bodies = old_species.bodies - -/datum/species/jelly/slime/spec_life(mob/living/carbon/human/H) - /*if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT) - if(prob(5)) - to_chat(H, "You feel very bloated!")*/ - if(H.nutrition >= NUTRITION_LEVEL_WELL_FED) - H.blood_volume += 3 - H.nutrition -= 2.5 - - ..() - -/datum/action/innate/split_body - name = "Split Body" - check_flags = AB_CHECK_CONSCIOUS - button_icon_state = "slimesplit" - icon_icon = 'icons/mob/actions/actions_slime.dmi' - background_icon_state = "bg_alien" - -/datum/action/innate/split_body/IsAvailable() - if(..()) - var/mob/living/carbon/human/H = owner - if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT) - return 1 - return 0 - -/datum/action/innate/split_body/Activate() - var/mob/living/carbon/human/H = owner - if(!isslimeperson(H)) - return - CHECK_DNA_AND_SPECIES(H) - H.visible_message("[owner] gains a look of \ - concentration while standing perfectly still.", - "You focus intently on moving your body while \ - standing perfectly still...") - - H.notransform = TRUE - - if(do_after(owner, delay=60, needhand=FALSE, target=owner, progress=TRUE)) - if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT) - make_dupe() - else - to_chat(H, "...but there is not enough of you to go around! You must attain more mass to split!") - else - to_chat(H, "...but fail to stand perfectly still!") - - H.notransform = FALSE - -/datum/action/innate/split_body/proc/make_dupe() - var/mob/living/carbon/human/H = owner - CHECK_DNA_AND_SPECIES(H) - - var/mob/living/carbon/human/spare = new /mob/living/carbon/human(H.loc) - - spare.underwear = "Nude" - H.dna.transfer_identity(spare, transfer_SE=1) - spare.dna.features["mcolor"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F") - spare.real_name = spare.dna.real_name - spare.name = spare.dna.real_name - spare.updateappearance(mutcolor_update=1) - spare.domutcheck() - spare.Move(get_step(H.loc, pick(NORTH,SOUTH,EAST,WEST))) - - H.blood_volume = BLOOD_VOLUME_SAFE - H.notransform = 0 - - var/datum/species/jelly/slime/origin_datum = H.dna.species - origin_datum.bodies |= spare - - var/datum/species/jelly/slime/spare_datum = spare.dna.species - spare_datum.bodies = origin_datum.bodies - - H.mind.transfer_to(spare) - spare.visible_message("[H] distorts as a new body \ - \"steps out\" of them.", - "...and after a moment of disorentation, \ - you're besides yourself!") - - -/datum/action/innate/swap_body - name = "Swap Body" - check_flags = AB_CHECK_CONSCIOUS - button_icon_state = "slimeswap" - icon_icon = 'icons/mob/actions/actions_slime.dmi' - background_icon_state = "bg_alien" - -/datum/action/innate/swap_body/Activate() - if(!isslimeperson(owner)) - to_chat(owner, "You are not a slimeperson.") - Remove(owner) - else - ui_interact(owner) - -/datum/action/innate/swap_body/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.conscious_state) - - ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) - if(!ui) - ui = new(user, src, ui_key, "slime_swap_body", name, 400, 400, master_ui, state) - ui.open() - -/datum/action/innate/swap_body/ui_data(mob/user) - var/mob/living/carbon/human/H = owner - if(!isslimeperson(H)) - return - - var/datum/species/jelly/slime/SS = H.dna.species - - var/list/data = list() - data["bodies"] = list() - for(var/b in SS.bodies) - var/mob/living/carbon/human/body = b - if(!body || QDELETED(body) || !isslimeperson(body)) - SS.bodies -= b - continue - - var/list/L = list() - // HTML colors need a # prefix - L["htmlcolor"] = "#[body.dna.features["mcolor"]]" - var/area/A = get_area(body) - L["area"] = A.name - var/stat = "error" - switch(body.stat) - if(CONSCIOUS) - stat = "Conscious" - if(UNCONSCIOUS) - stat = "Unconscious" - if(DEAD) - stat = "Dead" - var/current = body.mind - var/is_conscious = (body.stat == CONSCIOUS) - - L["status"] = stat - L["exoticblood"] = body.blood_volume - L["name"] = body.name - L["ref"] = "\ref[body]" - L["is_current"] = current - var/button - if(current) - button = "selected" - else if(is_conscious) - button = null - else - button = "disabled" - - L["swap_button_state"] = button - L["swappable"] = !current && is_conscious - - data["bodies"] += list(L) - - return data - -/datum/action/innate/swap_body/ui_act(action, params) - if(..()) - return - var/mob/living/carbon/human/H = owner - if(!isslimeperson(owner)) - return - var/datum/species/jelly/slime/SS = H.dna.species - - var/datum/mind/M - for(var/mob/living/L in SS.bodies) - if(L.mind && L.mind.active) - M = L.mind - if(!M) - return - if(!isslimeperson(M.current)) - return - - switch(action) - if("swap") - var/mob/living/carbon/human/selected = locate(params["ref"]) - if(!(selected in SS.bodies)) - return - if(!selected || QDELETED(selected) || !isslimeperson(selected)) - SS.bodies -= selected - return - if(M.current == selected) - return - if(selected.stat != CONSCIOUS) - return - - swap_to_dupe(M, selected) - -/datum/action/innate/swap_body/proc/swap_to_dupe(datum/mind/M, mob/living/carbon/human/dupe) - M.current.visible_message("[M.current] \ - stops moving and starts staring vacantly into space.", - "You stop moving this body...") - M.transfer_to(dupe) - dupe.visible_message("[dupe] blinks and looks \ - around.", - "...and move this one instead.") -======= /datum/species/jelly // Entirely alien beings that seem to be made entirely out of gel. They have three eyes and a skeleton visible within them. name = "Xenobiological Jelly Entity" @@ -670,4 +333,3 @@ dupe.visible_message("[dupe] blinks and looks \ around.", "...and move this one instead.") ->>>>>>> 626302c... Merge pull request #32161 from ninjanomnom/512-experimental