Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turns Holodeck Monkeys into actual Monkeys #175

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/holodeck/holo_effect.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 0 additions & 23 deletions code/modules/holodeck/mobs.dm

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/carbon_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 16 additions & 2 deletions code/modules/mob/living/carbon/human/monkey.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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))
Expand All @@ -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
Expand Down
27 changes: 27 additions & 0 deletions code/modules/mob/living/carbon/human/species_types/monkeys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/living/simple_animal/slime/powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions code/modules/surgery/bodyparts/dismemberment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion code/modules/unit_tests/simple_animal_freeze.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
/mob/living/simple_animal/drone/snowflake/bardrone,
/mob/living/simple_animal/drone/syndrone,
/mob/living/simple_animal/drone/syndrone/badass,
/mob/living/simple_animal/holodeck_monkey,
/mob/living/simple_animal/hostile,
/mob/living/simple_animal/hostile/alien,
/mob/living/simple_animal/hostile/alien/drone,
Expand Down
1 change: 0 additions & 1 deletion tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4019,7 +4019,6 @@
#include "code\modules\holodeck\holo_effect.dm"
#include "code\modules\holodeck\holodeck_map_templates.dm"
#include "code\modules\holodeck\items.dm"
#include "code\modules\holodeck\mobs.dm"
#include "code\modules\holodeck\turfs.dm"
#include "code\modules\hydroponics\biogenerator.dm"
#include "code\modules\hydroponics\bouquets.dm"
Expand Down
Loading