Nian Caterpillar Infestation and Worme Invasion (#25560)

* I hate DMI merge conflicts.

* Attempt at full merge conflict resolution

* Ticked >:C

* Moves the include because

* Fixes missing proc.

* 🫃

* Readds the worme cubes to all places the other bunches are. As well as changes the xenobiology console to spit out the type of monkey/primitive form that the monkey recycler is set to.

* Adds changes requested by DGamerL

* Replaces space indents with tabs. Error caused by copy pasting.

* Update code/modules/mob/living/simple_animal/friendly/nian_caterpillar.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Spaghetti-bit <60483458+Spaghetti-bit@users.noreply.github.com>

* Uniforms the tab spacing.

* Apply suggestions from code review

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: Spaghetti-bit <60483458+Spaghetti-bit@users.noreply.github.com>

* Adds requested changes from @lewcc

* Removes so missed #undef in `monkey.dm`

---------

Signed-off-by: Spaghetti-bit <60483458+Spaghetti-bit@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
Spaghetti-bit
2024-06-22 12:20:27 -06:00
committed by GitHub
parent 2645a94fd4
commit f0cef57c17
23 changed files with 300 additions and 42 deletions
@@ -165,6 +165,9 @@
/mob/living/carbon/human/stok/Initialize(mapload)
. = ..(mapload, /datum/species/monkey/unathi)
/mob/living/carbon/human/nian_worme/Initialize(mapload)
. = ..(mapload, /datum/species/monkey/nian_worme)
/mob/living/carbon/human/moth/Initialize(mapload)
. = ..(mapload, /datum/species/moth)
if(!body_accessory)
@@ -62,7 +62,7 @@
/datum/species/monkey/on_species_gain(mob/living/carbon/human/H)
..()
H.real_name = "[lowertext(name)] ([rand(100,999)])"
H.real_name = get_random_name()
H.name = H.real_name
H.butcher_results = list(/obj/item/food/snacks/meat/monkey = 5)
@@ -85,13 +85,13 @@
tail = "farwatail"
reagent_tag = PROCESS_ORG
has_organ = list(
"heart" = /obj/item/organ/internal/heart/tajaran,
"lungs" = /obj/item/organ/internal/lungs/tajaran,
"liver" = /obj/item/organ/internal/liver/tajaran,
"kidneys" = /obj/item/organ/internal/kidneys/tajaran,
"brain" = /obj/item/organ/internal/brain/tajaran,
"appendix" = /obj/item/organ/internal/appendix,
"eyes" = /obj/item/organ/internal/eyes/tajaran/farwa //Tajara monkey-forms are uniquely colourblind and have excellent darksight, which is why they need a subtype of their greater-form's organ..
"heart" = /obj/item/organ/internal/heart/tajaran,
"lungs" = /obj/item/organ/internal/lungs/tajaran,
"liver" = /obj/item/organ/internal/liver/tajaran,
"kidneys" = /obj/item/organ/internal/kidneys/tajaran,
"brain" = /obj/item/organ/internal/brain/tajaran,
"appendix" = /obj/item/organ/internal/appendix,
"eyes" = /obj/item/organ/internal/eyes/tajaran/farwa //Tajara monkey-forms are uniquely colourblind and have excellent darksight, which is why they need a subtype of their greater-form's organ..
)
@@ -108,13 +108,13 @@
tail = "wolpintail"
reagent_tag = PROCESS_ORG
has_organ = list(
"heart" = /obj/item/organ/internal/heart/vulpkanin,
"lungs" = /obj/item/organ/internal/lungs/vulpkanin,
"liver" = /obj/item/organ/internal/liver/vulpkanin,
"kidneys" = /obj/item/organ/internal/kidneys/vulpkanin,
"brain" = /obj/item/organ/internal/brain/vulpkanin,
"appendix" = /obj/item/organ/internal/appendix,
"eyes" = /obj/item/organ/internal/eyes/vulpkanin/wolpin //Vulpkanin monkey-forms are uniquely colourblind and have excellent darksight, which is why they need a subtype of their greater-form's organ..
"heart" = /obj/item/organ/internal/heart/vulpkanin,
"lungs" = /obj/item/organ/internal/lungs/vulpkanin,
"liver" = /obj/item/organ/internal/liver/vulpkanin,
"kidneys" = /obj/item/organ/internal/kidneys/vulpkanin,
"brain" = /obj/item/organ/internal/brain/vulpkanin,
"appendix" = /obj/item/organ/internal/appendix,
"eyes" = /obj/item/organ/internal/eyes/vulpkanin/wolpin //Vulpkanin monkey-forms are uniquely colourblind and have excellent darksight, which is why they need a subtype of their greater-form's organ..
)
@@ -134,13 +134,13 @@
inherent_traits = list(TRAIT_NOEXAMINE, TRAIT_NOFAT, TRAIT_WATERBREATH)
has_organ = list(
"heart" = /obj/item/organ/internal/heart/skrell,
"lungs" = /obj/item/organ/internal/lungs/skrell,
"liver" = /obj/item/organ/internal/liver/skrell,
"kidneys" = /obj/item/organ/internal/kidneys/skrell,
"brain" = /obj/item/organ/internal/brain/skrell,
"appendix" = /obj/item/organ/internal/appendix,
"eyes" = /obj/item/organ/internal/eyes/skrell //Tajara monkey-forms are uniquely colourblind and have excellent darksight, which is why they need a subtype of their greater-form's organ..
"heart" = /obj/item/organ/internal/heart/skrell,
"lungs" = /obj/item/organ/internal/lungs/skrell,
"liver" = /obj/item/organ/internal/liver/skrell,
"kidneys" = /obj/item/organ/internal/kidneys/skrell,
"brain" = /obj/item/organ/internal/brain/skrell,
"appendix" = /obj/item/organ/internal/appendix,
"eyes" = /obj/item/organ/internal/eyes/skrell //Tajara monkey-forms are uniquely colourblind and have excellent darksight, which is why they need a subtype of their greater-form's organ..
)
/datum/species/monkey/unathi
@@ -159,11 +159,40 @@
bodyflags = HAS_TAIL | HAS_BODYACC_COLOR
has_organ = list(
"heart" = /obj/item/organ/internal/heart/unathi,
"lungs" = /obj/item/organ/internal/lungs/unathi,
"liver" = /obj/item/organ/internal/liver/unathi,
"kidneys" = /obj/item/organ/internal/kidneys/unathi,
"brain" = /obj/item/organ/internal/brain/unathi,
"appendix" = /obj/item/organ/internal/appendix,
"eyes" = /obj/item/organ/internal/eyes/unathi
"heart" = /obj/item/organ/internal/heart/unathi,
"lungs" = /obj/item/organ/internal/lungs/unathi,
"liver" = /obj/item/organ/internal/liver/unathi,
"kidneys" = /obj/item/organ/internal/kidneys/unathi,
"brain" = /obj/item/organ/internal/brain/unathi,
"appendix" = /obj/item/organ/internal/appendix,
"eyes" = /obj/item/organ/internal/eyes/unathi
)
/datum/species/monkey/nian_worme
name = "nian worme"
name_plural = "nian worme"
icobase = 'icons/mob/human_races/monkeys/r_worme.dmi'
tail = ""
total_health = 75
inherent_biotypes = MOB_ORGANIC | MOB_HUMANOID | MOB_BUG
bodyflags = BALD | SHAVED
greater_form = /datum/species/moth
default_language = "Tkachi"
eyes = "blank_eyes"
butt_sprite = "nian"
reagent_tag = PROCESS_ORG
dietflags = DIET_HERB
tox_mod = 3 // Die. Terrible creatures. Die.
has_organ = list(
"heart" = /obj/item/organ/internal/heart/nian,
"lungs" = /obj/item/organ/internal/lungs/nian,
"liver" = /obj/item/organ/internal/liver/nian,
"kidneys" = /obj/item/organ/internal/kidneys/nian,
"brain" = /obj/item/organ/internal/brain/nian,
"eyes" = /obj/item/organ/internal/eyes/nian
)
/datum/species/monkey/nian_worme/spec_attacked_by(obj/item/I, mob/living/user, obj/item/organ/external/affecting, intent, mob/living/carbon/human/H)
if(istype(I, /obj/item/melee/flyswatter) && I.force)
apply_damage(I.force * FLYSWATTER_DAMAGE_MULTIPLIER, I.damtype, affecting, FALSE, H) // making flyswatters do 15x damage to moff
@@ -1,8 +1,5 @@
#define COCOON_WEAVE_DELAY 5 SECONDS
#define COCOON_EMERGE_DELAY 15 SECONDS
#define COCOON_HARM_AMOUNT 50
#define COCOON_NUTRITION_AMOUNT -200
#define FLYSWATTER_DAMAGE_MULTIPLIER 9
/datum/species/moth
name = "Nian"
@@ -51,6 +48,8 @@
"eyes" = /obj/item/organ/internal/eyes/nian
)
primitive_form = /datum/species/monkey/nian_worme
optional_body_accessory = FALSE
suicide_messages = list(
@@ -75,7 +74,6 @@
H.change_icobase(new_icobase, owner_sensitive) //Update the icobase of all our organs, but make sure we don't mess with frankenstein limbs in doing so.
/datum/species/moth/on_species_gain(mob/living/carbon/human/H)
..()
var/datum/action/innate/cocoon/cocoon = new()
@@ -244,8 +242,5 @@
id = "cocooned"
alert_type = null
#undef COCOON_WEAVE_DELAY
#undef COCOON_EMERGE_DELAY
#undef COCOON_HARM_AMOUNT
#undef COCOON_NUTRITION_AMOUNT
#undef FLYSWATTER_DAMAGE_MULTIPLIER
@@ -0,0 +1,149 @@
/mob/living/simple_animal/nian_caterpillar
name = "nian caterpillar"
icon = 'icons/mob/monkey.dmi'
icon_state = "mothroach"
icon_living = "mothroach"
icon_dead = "mothroach_dead"
icon_resting = "mothroach_sleep"
pass_flags = PASSTABLE | PASSMOB
mob_biotypes = MOB_ORGANIC | MOB_BUG
mob_size = MOB_SIZE_SMALL
ventcrawler = VENTCRAWLER_ALWAYS
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
butcher_results = list(/obj/item/food/snacks/meat = 1)
minbodytemp = 0
blood_color = "#b9ae9c"
maxHealth = 50
health = 50
speed = 0.75
stop_automated_movement = FALSE
turns_per_move = 4
// What they sound like
voice_name = "nian caterpillar"
speak_emote = list("flutters", "chitters", "chatters")
emote_hear = list("flutters", "chitters", "chatters")
emote_see = list("flutters", "chitters", "chatters")
// Special verbs for when someone interacts with a caterpillar
response_help = "pets"
response_disarm = "shoos"
response_harm = "kicks"
// Xenobiology and cargo are the only ways to get the caterpillar.
gold_core_spawnable = FRIENDLY_SPAWN
melee_damage_lower = 5
melee_damage_upper = 8
attacktext = "bites"
attack_sound = 'sound/weapons/bite.ogg'
holder_type = /obj/item/holder/nian_caterpillar
can_collar = TRUE
/// Evolution action.
var/datum/action/innate/nian_caterpillar_emerge/evolve_action = new()
/// The amount of nutrition the nian caterpillar needs to evolve.
var/nutrition_need = 500
/mob/living/simple_animal/nian_caterpillar/Initialize()
. = ..()
real_name = name
add_language("Tkachi")
evolve_action.Grant(src)
/mob/living/simple_animal/nian_caterpillar/proc/evolve(obj/structure/moth/cocoon/C, datum/mind/M)
if(stat != CONSCIOUS)
return FALSE
// A changeling caterpillar shouldn't be restricted from evolving.
// A caterpillar needs to consume food-- similar to a dioan nymph --to evolve.
if((nutrition < nutrition_need) && !IS_CHANGELING(M))
to_chat(src, "<span class='warning'>You need to binge on food in order to have the energy to evolve...</span>")
return
// Worme is the lesser form of nian. The caterpillar evolves into this lesser form.
var/mob/living/carbon/human/nian_worme/adult = new(get_turf(loc))
if(istype(loc, /obj/item/holder/nian_caterpillar))
var/turf/cocoon_turf = get_turf(loc)
qdel(loc)
forceMove(cocoon_turf)
for(var/datum/language/L in languages)
adult.add_language(L.name)
adult.regenerate_icons()
adult.name = name
adult.real_name = name
// Mind transfer to new worme.
M.transfer_to(adult)
// Worme is placed into cacoon.
adult.forceMove(C)
C.preparing_to_emerge = TRUE
adult.apply_status_effect(STATUS_EFFECT_COCOONED)
adult.KnockOut() // Zzzz
adult.create_log(MISC_LOG, "has woven a cocoon")
// For any random generated names. This is for when a new nian caterpillar is spawned.
// [ nian caterpillar (042) ] etc.
if(findtext(adult.real_name, "nian caterpillar"))
adult.real_name = adult.dna.species.get_random_name()
adult.name = adult.real_name
for(var/obj/item/W in contents)
unEquip(W)
qdel(src)
return TRUE
/mob/living/simple_animal/nian_caterpillar/proc/consume(obj/item/food/snacks/G)
if(nutrition >= nutrition_need) // Prevents griefing by overeating food items without evolving.
return to_chat(src, "<span class='warning'>You're too full to consume this! Perhaps it's time to grow bigger...</span>")
visible_message("<span class='warning'>[src] ravenously consumes [G].</span>", "<span class='notice'>You ravenously devour [G].</span>")
playsound(loc, 'sound/items/eatfood.ogg', 30, TRUE, frequency = 1.5)
if(G.reagents.get_reagent_amount("nutriment") + G.reagents.get_reagent_amount("plantmatter") < 1)
adjust_nutrition(2)
else
adjust_nutrition((G.reagents.get_reagent_amount("nutriment") + G.reagents.get_reagent_amount("plantmatter")) * 2)
qdel(G)
/mob/living/simple_animal/nian_caterpillar/attack_hand(mob/living/carbon/human/M)
// Let people pick the little buggers up.
if(M.a_intent != INTENT_HELP)
return ..()
if(isrobot(M))
M.visible_message("<span class='notice'>[M] playfully boops [src] on the head!</span>", "<span class='notice'>You playfully boop [src] on the head!</span>")
else
get_scooped(M)
/mob/living/simple_animal/nian_caterpillar/attacked_by(obj/item/I, mob/living/user, def_zone)
if(istype(I, /obj/item/melee/flyswatter) && I.force)
gib() // Commit die.
else
..()
/datum/action/innate/nian_caterpillar_emerge
name = "Evolve"
desc = "Weave a cocoon around yourself to evolve into a greater form. The worme."
icon_icon = 'icons/effects/effects.dmi'
button_icon_state = "cocoon1"
/datum/action/innate/nian_caterpillar_emerge/proc/emerge(obj/structure/moth/cocoon/C)
for(var/mob/living/carbon/human/H in C)
H.remove_status_effect(STATUS_EFFECT_COCOONED)
H.remove_status_effect(STATUS_EFFECT_BURNT_WINGS)
C.preparing_to_emerge = FALSE
qdel(C)
/datum/action/innate/nian_caterpillar_emerge/Activate()
var/mob/living/simple_animal/nian_caterpillar/user = owner
user.visible_message("<span class='notice'>[user] begins to hold still and concentrate on weaving a cocoon...</span>", "<span class='notice'>You begin to focus on weaving a cocoon... (This will take [COCOON_WEAVE_DELAY / 10] seconds, and you must hold still.)</span>")
if(do_after(user, COCOON_WEAVE_DELAY, FALSE, user))
var/obj/structure/moth/cocoon/C = new(get_turf(user))
var/datum/mind/H = user.mind
user.evolve(C, H)
addtimer(CALLBACK(src, PROC_REF(emerge), C), COCOON_EMERGE_DELAY, TIMER_UNIQUE)
+6
View File
@@ -94,6 +94,12 @@
desc = "It's a small maintenance robot."
icon_state = "drone"
/obj/item/holder/nian_caterpillar
name = "nian caterpillar"
desc = "It's a tiny little itty bitty critter."
icon_state = "mothroach"
slot_flags = SLOT_FLAG_HEAD
/obj/item/holder/drone/emagged
name = "maintenance drone"
icon_state = "drone-emagged"