From 9f37a7bbc9806631d3a068f38041f19073caf509 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+AnArgonianLizardThatStealsPRs@users.noreply.github.com> Date: Fri, 20 Oct 2023 15:05:52 +0300 Subject: [PATCH] [MIRROR] Turns Holodeck Monkeys into actual Monkeys [MDB IGNORE] (#175) * Turns Holodeck Monkeys into actual Monkeys (#79068) * Fix the screenshot test --------- Co-authored-by: san7890 Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com> --- code/__DEFINES/mobs.dm | 1 + code/modules/holodeck/holo_effect.dm | 2 +- code/modules/holodeck/mobs.dm | 23 --------------- .../space_fauna/revenant/revenant_harvest.dm | 4 +++ .../mob/living/carbon/carbon_defines.dm | 2 +- .../modules/mob/living/carbon/human/monkey.dm | 18 ++++++++++-- .../carbon/human/species_types/monkeys.dm | 27 ++++++++++++++++++ code/modules/mob/living/carbon/life.dm | 2 +- .../mob/living/simple_animal/slime/powers.dm | 4 +++ .../surgery/bodyparts/dismemberment.dm | 2 ++ ...manoids__datum_species_monkey_holodeck.png | Bin 0 -> 823 bytes .../unit_tests/simple_animal_freeze.dm | 1 - tgstation.dme | 1 - 13 files changed, 57 insertions(+), 30 deletions(-) delete mode 100644 code/modules/holodeck/mobs.dm create mode 100644 code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_monkey_holodeck.png diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 34c301a2171..2912da06a9c 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -130,6 +130,7 @@ #define SPECIES_NIGHTMARE "nightmare" #define SPECIES_MONKEY "monkey" #define SPECIES_MONKEY_FREAK "monkey_freak" +#define SPECIES_MONKEY_HOLODECK "monkey_holodeck" #define SPECIES_MONKEY_HUMAN_LEGGED "monkey_human_legged" #define SPECIES_MOTH "moth" #define SPECIES_MUSHROOM "mush" diff --git a/code/modules/holodeck/holo_effect.dm b/code/modules/holodeck/holo_effect.dm index a8d51c87728..76b3d320774 100644 --- a/code/modules/holodeck/holo_effect.dm +++ b/code/modules/holodeck/holo_effect.dm @@ -102,7 +102,7 @@ mobtype = /mob/living/basic/bee/toxin /obj/effect/holodeck_effect/mobspawner/monkey - mobtype = /mob/living/simple_animal/holodeck_monkey + mobtype = /mob/living/carbon/human/species/monkey/holodeck /obj/effect/holodeck_effect/mobspawner/penguin mobtype = /mob/living/basic/pet/penguin/emperor/neuter diff --git a/code/modules/holodeck/mobs.dm b/code/modules/holodeck/mobs.dm deleted file mode 100644 index 7a7e7c22d9e..00000000000 --- a/code/modules/holodeck/mobs.dm +++ /dev/null @@ -1,23 +0,0 @@ -/* - Mobs -*/ - -/mob/living/simple_animal/holodeck_monkey - name = "monkey" - desc = "A holographic creature fond of bananas." - icon = 'icons/mob/human/human.dmi' - icon_state = "monkey" - icon_living = "monkey" - icon_dead = "monkey_dead" - speak_emote = list("chimpers") - emote_hear = list("chimpers.") - emote_see = list("scratches.", "looks around.") - speak_chance = 1 - turns_per_move = 2 - butcher_results = list() - response_help_continuous = "pets" - response_help_simple = "pet" - response_disarm_continuous = "pushes aside" - response_disarm_simple = "push aside" - response_harm_continuous = "kicks" - response_harm_simple = "kick" diff --git a/code/modules/mob/living/basic/space_fauna/revenant/revenant_harvest.dm b/code/modules/mob/living/basic/space_fauna/revenant/revenant_harvest.dm index b8bb05db484..c162ecf2c21 100644 --- a/code/modules/mob/living/basic/space_fauna/revenant/revenant_harvest.dm +++ b/code/modules/mob/living/basic/space_fauna/revenant/revenant_harvest.dm @@ -14,6 +14,10 @@ to_chat(src, span_revenwarning("You are already siphoning the essence of a soul!")) return FALSE + if(target.flags_1 & HOLOGRAM_1) + target.balloon_alert(src, "doesn't possess a soul!") // it's a machine generated visual + return + draining = TRUE var/value_to_return = harvest_soul(target) if(!value_to_return) diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 0cfb9d08c83..e5f43c2e933 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -47,7 +47,7 @@ ///only used by humans. var/obj/item/clothing/ears = null - /// Carbon + /// Carbon, you should really only be accessing this through has_dna() but it's your life var/datum/dna/dna = null ///last mind to control this mob, for blood-based cloning var/datum/mind/last_mind = null diff --git a/code/modules/mob/living/carbon/human/monkey.dm b/code/modules/mob/living/carbon/human/monkey.dm index db8f2f4f1e3..76bf7cc5288 100644 --- a/code/modules/mob/living/carbon/human/monkey.dm +++ b/code/modules/mob/living/carbon/human/monkey.dm @@ -4,7 +4,7 @@ ai_controller = /datum/ai_controller/monkey faction = list(FACTION_NEUTRAL, FACTION_MONKEY) -/mob/living/carbon/human/species/monkey/Initialize(mapload, cubespawned=FALSE, mob/spawner) +/mob/living/carbon/human/species/monkey/Initialize(mapload, cubespawned = FALSE, mob/spawner) if (cubespawned) var/cap = CONFIG_GET(number/monkeycap) if (LAZYLEN(SSmobs.cubemonkeys) > cap) @@ -21,7 +21,7 @@ /mob/living/carbon/human/species/monkey/angry ai_controller = /datum/ai_controller/monkey/angry -/mob/living/carbon/human/species/monkey/angry/Initialize(mapload) +/mob/living/carbon/human/species/monkey/angry/Initialize(mapload, cubespawned = FALSE, mob/spawner) . = ..() if(prob(10)) INVOKE_ASYNC(src, PROC_REF(give_ape_escape_helmet)) @@ -32,6 +32,20 @@ equip_to_slot_or_del(helmet, ITEM_SLOT_HEAD) helmet.attack_self(src) // todo encapsulate toggle +/mob/living/carbon/human/species/monkey/holodeck + race = /datum/species/monkey/holodeck + +/mob/living/carbon/human/species/monkey/holodeck/spawn_gibs() // no blood and no gibs + return + +/mob/living/carbon/human/species/monkey/holodeck/has_dna() + return null + +/mob/living/carbon/human/species/monkey/holodeck/create_bodyparts(list/overrides) // done like this in case people add more limbs to monkeys or something + . = ..() + for(var/obj/item/bodypart/limb as anything in bodyparts) + limb.bodypart_flags |= BODYPART_UNREMOVABLE // no farming organs or limbs from these fellers. get a monkey cube + GLOBAL_DATUM(the_one_and_only_punpun, /mob/living/carbon/human/species/monkey/punpun) /mob/living/carbon/human/species/monkey/punpun diff --git a/code/modules/mob/living/carbon/human/species_types/monkeys.dm b/code/modules/mob/living/carbon/human/species_types/monkeys.dm index bcb0a831182..9b34e2924fe 100644 --- a/code/modules/mob/living/carbon/human/species_types/monkeys.dm +++ b/code/modules/mob/living/carbon/human/species_types/monkeys.dm @@ -192,4 +192,31 @@ /obj/item/organ/internal/brain/primate/get_attacking_limb(mob/living/carbon/human/target) return owner.get_bodypart(BODY_ZONE_HEAD) +/// Virtual monkeys that crave virtual bananas. Everything about them is ephemeral (except that bite). +/datum/species/monkey/holodeck + id = SPECIES_MONKEY_HOLODECK + knife_butcher_results = list() + meat = null + skinned_type = null + inherent_traits = list( + TRAIT_GENELESS, + TRAIT_GUN_NATURAL, + TRAIT_NO_AUGMENTS, + TRAIT_NO_BLOOD_OVERLAY, + TRAIT_NO_DNA_COPY, + TRAIT_NO_UNDERWEAR, + TRAIT_NO_ZOMBIFY, + TRAIT_NOBLOOD, + TRAIT_NOHUNGER, + TRAIT_VENTCRAWLER_NUDE, + ) + bodypart_overrides = list( + BODY_ZONE_L_ARM = /obj/item/bodypart/arm/left/monkey, + BODY_ZONE_R_ARM = /obj/item/bodypart/arm/right/monkey, + BODY_ZONE_HEAD = /obj/item/bodypart/head/monkey, + BODY_ZONE_L_LEG = /obj/item/bodypart/leg/left/monkey, + BODY_ZONE_R_LEG = /obj/item/bodypart/leg/right/monkey, + BODY_ZONE_CHEST = /obj/item/bodypart/chest/monkey, + ) + #undef MONKEY_SPEC_ATTACK_BITE_MISS_CHANCE diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 2196aa40043..353b8de7bd7 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -747,7 +747,7 @@ ///Check to see if we have the liver, if not automatically gives you last-stage effects of lacking a liver. /mob/living/carbon/proc/handle_liver(seconds_per_tick, times_fired) - if(!dna) + if(isnull(has_dna())) return var/obj/item/organ/internal/liver/liver = get_organ_slot(ORGAN_SLOT_LIVER) diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm index 01197efc8ed..9e858d4f02d 100644 --- a/code/modules/mob/living/simple_animal/slime/powers.dm +++ b/code/modules/mob/living/simple_animal/slime/powers.dm @@ -64,6 +64,10 @@ if(issilicon(meal) || meal.mob_biotypes & MOB_ROBOTIC) return FALSE + if(meal.flags_1 & HOLOGRAM_1) + meal.balloon_alert(src, "no life energy!") + return FALSE + if(isanimal(meal)) var/mob/living/simple_animal/simple_meal = meal if(simple_meal.damage_coeff[TOX] <= 0 && simple_meal.damage_coeff[BRUTE] <= 0) //The creature wouldn't take any damage, it must be too weird even for us. diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm index 5a7343f8a0b..e863341eb43 100644 --- a/code/modules/surgery/bodyparts/dismemberment.dm +++ b/code/modules/surgery/bodyparts/dismemberment.dm @@ -86,6 +86,8 @@ . += cavity_item cavity_item = null + return . + ///limb removal. The "special" argument is used for swapping a limb with a new one without the effects of losing a limb kicking in. /obj/item/bodypart/proc/drop_limb(special, dismembered) if(!owner) diff --git a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_monkey_holodeck.png b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_monkey_holodeck.png new file mode 100644 index 0000000000000000000000000000000000000000..28f6b0b1dccbf14433af8746cd73fc8fb28c0342 GIT binary patch literal 823 zcmV-71IYY|P)BmPlNuT!R$60sdxH)R z4j>>P$H&KbGXP;>VUXjrkpKVy0d!JMQvg8b*k%9#0A+eqSad{Xb7OL8aCB*JZU6vy zoKseCa&`CgQ*iP1KApDvssY_yH%`^O2Nh(tjznIOv?k2I{lEuI>cOaUNZ zV_p5u+K(U$wds;R;~kN8ryOSyLfc5thx`$L4)ay{+3@pn)>&tb>O(&Gg!h0j=$MB2 zK?1-9`CusUHQV_?1g;Vg%!X;4A5b?52qS@Uen7{KmeG`^X(2Lkys^butXFC)663+k zUFE~M@zzedbM}JmpamwcD1Z;&ret{cCXiYSD+=)4BF>aQ31qP@>3$V}Z4n}p2-r`d z2}A^d&EJkYfB?n#Ng(1T#P2)6zZjl#FNg@=mcTdCL%GA5r29>PYflKKw>q&`G4SB) zG0BP3i}^dhX6YCRG~7GM2zx%*oL