From c8ec5bdd36895720967c25dc7a5a612ba80dd9ed Mon Sep 17 00:00:00 2001 From: actioninja Date: Tue, 26 Nov 2019 04:35:58 -0800 Subject: [PATCH] Revert "[SPEED MERGE NEEDED] removes cat (#47999)" This reverts commit 345d2bf6079b0fdf5c631531cd70dd3b47f7eb6c. --- code/controllers/subsystem/traumas.dm | 1 + .../mood_events/generic_negative_events.dm | 8 + code/game/machinery/scan_gate.dm | 3 + .../objects/items/devices/laserpointer.dm | 2 +- .../objects/items/implants/implantchair.dm | 1 + code/game/objects/items/pet_carrier.dm | 6 +- code/modules/admin/secrets.dm | 14 ++ code/modules/mob/living/carbon/human/emote.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 17 ++ .../carbon/human/species_types/felinid.dm | 166 ++++++++++++++++++ .../chemistry/reagents/other_reagents.dm | 6 + .../nanites/nanite_programs/sensor.dm | 1 + tgstation.dme | 1 + 13 files changed, 225 insertions(+), 3 deletions(-) create mode 100644 code/modules/mob/living/carbon/human/species_types/felinid.dm diff --git a/code/controllers/subsystem/traumas.dm b/code/controllers/subsystem/traumas.dm index 79438f00f24..969893e6714 100644 --- a/code/controllers/subsystem/traumas.dm +++ b/code/controllers/subsystem/traumas.dm @@ -155,6 +155,7 @@ SUBSYSTEM_DEF(traumas) "the supernatural" = typecacheof(list(/datum/species/golem/runic)), "aliens" = typecacheof(list(/datum/species/abductor, /datum/species/jelly, /datum/species/pod, /datum/species/shadow)), + "anime" = typecacheof(list(/datum/species/human/felinid)) ) return ..() diff --git a/code/datums/mood_events/generic_negative_events.dm b/code/datums/mood_events/generic_negative_events.dm index 89184e6f9c4..f09310e3683 100644 --- a/code/datums/mood_events/generic_negative_events.dm +++ b/code/datums/mood_events/generic_negative_events.dm @@ -76,6 +76,14 @@ mood_change = -2 timeout = 2 MINUTES +/datum/mood_event/table/add_effects() + if(isfelinid(owner)) + var/mob/living/carbon/human/H = owner + H.dna.species.start_wagging_tail(H) + addtimer(CALLBACK(H.dna.species, /datum/species.proc/stop_wagging_tail, H), 30) + description = "They want to play on the table!\n" + mood_change = 2 + /datum/mood_event/table_headsmash description = "My fucking head, that hurt..." mood_change = -3 diff --git a/code/game/machinery/scan_gate.dm b/code/game/machinery/scan_gate.dm index a25aedbddbf..70cd9ec4009 100644 --- a/code/game/machinery/scan_gate.dm +++ b/code/game/machinery/scan_gate.dm @@ -202,6 +202,7 @@ var/new_species = input("Set target species","Scan Mode") as null|anything in sortList(list("Human", "Lizardperson", "Flyperson", + "Felinid", "Plasmaman", "Mothmen", "Jellyperson", @@ -217,6 +218,8 @@ detect_species = /datum/species/lizard if("Flyperson") detect_species = /datum/species/fly + if("Felinid") + detect_species = /datum/species/human/felinid if("Plasmaman") detect_species = /datum/species/plasmaman if("Mothmen") diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 96e7f088661..232b9c71dbd 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -134,7 +134,7 @@ //catpeople for(var/mob/living/carbon/human/H in view(1,targloc)) - if( H.incapacitated() || H.eye_blind ) + if(!isfelinid(H) || H.incapacitated() || H.eye_blind ) continue if(user.mobility_flags & MOBILITY_STAND) H.setDir(get_dir(H,targloc)) // kitty always looks at the light diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm index 6b7fd322b74..713954d3ac7 100644 --- a/code/game/objects/items/implants/implantchair.dm +++ b/code/game/objects/items/implants/implantchair.dm @@ -166,6 +166,7 @@ if(!istype(H)) return 0 H.set_species(/datum/species/human, 1)//lizards go home + purrbation_remove(H)//remove cats H.dna.remove_all_mutations()//hulks out return 1 diff --git a/code/game/objects/items/pet_carrier.dm b/code/game/objects/items/pet_carrier.dm index 77d513a12fc..1731ab15567 100644 --- a/code/game/objects/items/pet_carrier.dm +++ b/code/game/objects/items/pet_carrier.dm @@ -88,7 +88,11 @@ return if(target.mob_size > max_occupant_weight) if(ishuman(target)) - to_chat(user, "Humans, generally, do not fit into pet carriers.") + var/mob/living/carbon/human/H = target + if(isfelinid(H)) + to_chat(user, "You'd need a lot of catnip and treats, plus maybe a laser pointer, for that to work.") + else + to_chat(user, "Humans, generally, do not fit into pet carriers.") else to_chat(user, "You get the feeling [target] isn't meant for a [name].") return diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 424d306acab..825b0844f22 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -580,6 +580,20 @@ if(!check_rights(R_ADMIN)) return toggle_all_ctf(usr) + if("masspurrbation") + if(!check_rights(R_FUN)) + return + mass_purrbation() + message_admins("[key_name_admin(usr)] has put everyone on \ + purrbation!") + log_admin("[key_name(usr)] has put everyone on purrbation.") + if("massremovepurrbation") + if(!check_rights(R_FUN)) + return + mass_remove_purrbation() + message_admins("[key_name_admin(usr)] has removed everyone from \ + purrbation.") + log_admin("[key_name(usr)] has removed everyone from purrbation.") if("customportal") if(!check_rights(R_FUN)) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 55a436ee6b4..8f367e380ca 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -59,7 +59,7 @@ var/mob/living/carbon/human/H = user if(H.mind?.miming) return - if(ishumanbasic(H)) + if(ishumanbasic(H) || isfelinid(H)) if(user.gender == FEMALE) return pick('sound/voice/human/femalescream_1.ogg', 'sound/voice/human/femalescream_2.ogg', 'sound/voice/human/femalescream_3.ogg', 'sound/voice/human/femalescream_4.ogg', 'sound/voice/human/femalescream_5.ogg') else diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index ed0cb555983..41d82045c8f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -817,6 +817,7 @@ VV_DROPDOWN_OPTION(VV_HK_MAKE_SLIME, "Make Slime") VV_DROPDOWN_OPTION(VV_HK_MAKE_ALIEN, "Make Alien") VV_DROPDOWN_OPTION(VV_HK_SET_SPECIES, "Set Species") + VV_DROPDOWN_OPTION(VV_HK_PURRBATION, "Toggle Purrbation") /mob/living/carbon/human/vv_do_topic(list/href_list) . = ..() @@ -897,6 +898,19 @@ var/newtype = GLOB.species_list[result] admin_ticket_log("[key_name_admin(usr)] has modified the bodyparts of [src] to [result]") set_species(newtype) + if(href_list[VV_HK_PURRBATION]) + if(!check_rights(R_SPAWN)) + return + if(!ishumanbasic(src)) + to_chat(usr, "This can only be done to the basic human species at the moment.") + return + var/success = purrbation_toggle(src) + if(success) + to_chat(usr, "Put [src] on purrbation.") + log_admin("[key_name(usr)] has put [key_name(src)] on purrbation.") + var/msg = "[key_name_admin(usr)] has put [key_name(src)] on purrbation." + message_admins(msg) + admin_ticket_log(src, msg) else to_chat(usr, "Removed [src] from purrbation.") @@ -1058,6 +1072,9 @@ /mob/living/carbon/human/species/dullahan race = /datum/species/dullahan +/mob/living/carbon/human/species/felinid + race = /datum/species/human/felinid + /mob/living/carbon/human/species/fly race = /datum/species/fly diff --git a/code/modules/mob/living/carbon/human/species_types/felinid.dm b/code/modules/mob/living/carbon/human/species_types/felinid.dm new file mode 100644 index 00000000000..aa0f747ee14 --- /dev/null +++ b/code/modules/mob/living/carbon/human/species_types/felinid.dm @@ -0,0 +1,166 @@ +//Subtype of human +/datum/species/human/felinid + name = "Felinid" + id = "felinid" + limbs_id = "human" + + mutant_bodyparts = list("ears", "tail_human") + default_features = list("mcolor" = "FFF", "tail_human" = "Cat", "ears" = "Cat", "wings" = "None") + + mutantears = /obj/item/organ/ears/cat + mutanttail = /obj/item/organ/tail/cat + changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT + var/original_felinid = TRUE //set to false for felinids created by mass-purrbation + +/datum/species/human/felinid/qualifies_for_rank(rank, list/features) + return TRUE + +//Curiosity killed the cat's wagging tail. +/datum/species/human/felinid/spec_death(gibbed, mob/living/carbon/human/H) + if(H) + stop_wagging_tail(H) + +/datum/species/human/felinid/spec_stun(mob/living/carbon/human/H,amount) + if(H) + stop_wagging_tail(H) + . = ..() + +/datum/species/human/felinid/can_wag_tail(mob/living/carbon/human/H) + return ("tail_human" in mutant_bodyparts) || ("waggingtail_human" in mutant_bodyparts) + +/datum/species/human/felinid/is_wagging_tail(mob/living/carbon/human/H) + return ("waggingtail_human" in mutant_bodyparts) + +/datum/species/human/felinid/start_wagging_tail(mob/living/carbon/human/H) + if("tail_human" in mutant_bodyparts) + mutant_bodyparts -= "tail_human" + mutant_bodyparts |= "waggingtail_human" + H.update_body() + +/datum/species/human/felinid/stop_wagging_tail(mob/living/carbon/human/H) + if("waggingtail_human" in mutant_bodyparts) + mutant_bodyparts -= "waggingtail_human" + mutant_bodyparts |= "tail_human" + H.update_body() + +/datum/species/human/felinid/on_species_gain(mob/living/carbon/C, datum/species/old_species, pref_load) + if(ishuman(C)) + var/mob/living/carbon/human/H = C + if(!pref_load) //Hah! They got forcefully purrbation'd. Force default felinid parts on them if they have no mutant parts in those areas! + if(H.dna.features["tail_human"] == "None") + H.dna.features["tail_human"] = "Cat" + if(H.dna.features["ears"] == "None") + H.dna.features["ears"] = "Cat" + if(H.dna.features["ears"] == "Cat") + var/obj/item/organ/ears/cat/ears = new + ears.Insert(H, drop_if_replaced = FALSE) + else + mutantears = /obj/item/organ/ears + if(H.dna.features["tail_human"] == "Cat") + var/obj/item/organ/tail/cat/tail = new + tail.Insert(H, drop_if_replaced = FALSE) + else + mutanttail = null + return ..() + +/datum/species/human/felinid/on_species_loss(mob/living/carbon/H, datum/species/new_species, pref_load) + var/obj/item/organ/ears/cat/ears = H.getorgan(/obj/item/organ/ears/cat) + var/obj/item/organ/tail/cat/tail = H.getorgan(/obj/item/organ/tail/cat) + + if(ears) + var/obj/item/organ/ears/NE + if(new_species && new_species.mutantears) + // Roundstart cat ears override new_species.mutantears, reset it here. + new_species.mutantears = initial(new_species.mutantears) + if(new_species.mutantears) + NE = new new_species.mutantears + if(!NE) + // Go with default ears + NE = new /obj/item/organ/ears + NE.Insert(H, drop_if_replaced = FALSE) + + if(tail) + var/obj/item/organ/tail/NT + if(new_species && new_species.mutanttail) + // Roundstart cat tail overrides new_species.mutanttail, reset it here. + new_species.mutanttail = initial(new_species.mutanttail) + if(new_species.mutanttail) + NT = new new_species.mutanttail + if(NT) + NT.Insert(H, drop_if_replaced = FALSE) + else + tail.Remove(H) + +/datum/species/human/felinid/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/M) + .=..() + if(chem.type == /datum/reagent/consumable/coco || chem.type == /datum/reagent/consumable/hot_coco || chem.type ==/datum/reagent/consumable/milk/chocolate_milk) + if(prob(20)) + M.adjust_disgust(20) + if(prob(5)) + M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]") + if(prob(10)) + var/sick_message = pick("Your insides revolt at the presence of lethal chocolate!", "You feel nyauseous.", "You're nya't feeling so good.","You feel like your insides are melting.","You feel illsies.") + to_chat(M, "[sick_message]") + if(prob(35)) + var/obj/item/organ/guts = pick(M.internal_organs) + guts.applyOrganDamage(15) + return FALSE + + +/proc/mass_purrbation() + for(var/M in GLOB.mob_list) + if(ishuman(M)) + purrbation_apply(M) + CHECK_TICK + +/proc/mass_remove_purrbation() + for(var/M in GLOB.mob_list) + if(ishuman(M)) + purrbation_remove(M) + CHECK_TICK + +/proc/purrbation_toggle(mob/living/carbon/human/H, silent = FALSE) + if(!ishumanbasic(H)) + return + if(!isfelinid(H)) + purrbation_apply(H, silent) + . = TRUE + else + purrbation_remove(H, silent) + . = FALSE + +/proc/purrbation_apply(mob/living/carbon/human/H, silent = FALSE) + if(!ishuman(H) || isfelinid(H)) + return + if(ishumanbasic(H)) + H.set_species(/datum/species/human/felinid) + var/datum/species/human/felinid/cat_species = H.dna.species + cat_species.original_felinid = FALSE + else + var/obj/item/organ/ears/cat/kitty_ears = new + var/obj/item/organ/tail/cat/kitty_tail = new + kitty_ears.Insert(H, TRUE, FALSE) //Gives nonhumans cat tail and ears + kitty_tail.Insert(H, TRUE, FALSE) + if(!silent) + to_chat(H, "Something is nya~t right.") + playsound(get_turf(H), 'sound/effects/meow1.ogg', 50, TRUE, -1) + +/proc/purrbation_remove(mob/living/carbon/human/H, silent = FALSE) + if(isfelinid(H)) + var/datum/species/human/felinid/cat_species = H.dna.species + if(!cat_species.original_felinid) + H.set_species(/datum/species/human) + else if(ishuman(H) && !ishumanbasic(H)) + var/datum/species/target_species = H.dna.species + var/organs = H.internal_organs + for(var/obj/item/organ/current_organ in organs) + if(istype(current_organ, /obj/item/organ/tail/cat)) + current_organ.Remove(H, TRUE) + if(target_species.mutanttail) + var/obj/item/organ/new_tail = new target_species.mutanttail + new_tail.Insert(H, TRUE, FALSE) + if(istype(current_organ, /obj/item/organ/ears/cat)) + var/obj/item/organ/new_ears = new target_species.mutantears + new_ears.Insert(H, TRUE, FALSE) + if(!silent) + to_chat(H, "You are no longer a cat.") diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index cb1f2be7765..f2c4ce00ff1 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -500,6 +500,12 @@ color = "#13BC5E" // rgb: 19, 188, 94 race = /datum/species/jelly/slime +/datum/reagent/mutationtoxin/felinid + name = "Felinid Mutation Toxin" + color = "#5EFF3B" //RGB: 94, 255, 59 + race = /datum/species/human/felinid + taste_description = "something nyat good" + /datum/reagent/mutationtoxin/lizard name = "Lizard Mutation Toxin" description = "A lizarding toxin." diff --git a/code/modules/research/nanites/nanite_programs/sensor.dm b/code/modules/research/nanites/nanite_programs/sensor.dm index ef94c36ca84..1a3622a9d0c 100644 --- a/code/modules/research/nanites/nanite_programs/sensor.dm +++ b/code/modules/research/nanites/nanite_programs/sensor.dm @@ -443,6 +443,7 @@ "Ethereal" = /datum/species/ethereal, "Pod" = /datum/species/pod, "Fly" = /datum/species/fly, + "Felinid" = /datum/species/human/felinid, "Jelly" = /datum/species/jelly ) diff --git a/tgstation.dme b/tgstation.dme index 58815019666..7c459e32140 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2107,6 +2107,7 @@ #include "code\modules\mob\living\carbon\human\species_types\corporate.dm" #include "code\modules\mob\living\carbon\human\species_types\dullahan.dm" #include "code\modules\mob\living\carbon\human\species_types\ethereal.dm" +#include "code\modules\mob\living\carbon\human\species_types\felinid.dm" #include "code\modules\mob\living\carbon\human\species_types\flypeople.dm" #include "code\modules\mob\living\carbon\human\species_types\golems.dm" #include "code\modules\mob\living\carbon\human\species_types\humans.dm"