Files
Bubberstation/code/datums/components/breeding.dm
SkyratBot 61c379045c [MIRROR] lavaland raptors (#27746)
lavaland raptors (#82537)

adds raptors to lavaland. these are creatures that have been created
through countless xenobiological experiments by nanotrasen to breed an
animal that can withstand the harsh conditions of lavaland and aid
miners. theres now a new ranch miners can access bottom right to the
mining base

![ranch](https://github.com/tgstation/tgstation/assets/138636438/20d9e358-15a5-48e2-aee3-9364ca139e43)
this ranch starts somewhat empty as most raptors have escaped
containment and are now scattered all across lavaland, u can find them
and return them to ur ranch.

in order to tame a raptor, u first need to prove to it that ur a capable
master. when u try to ride it, a little minigame prompt will pop up

![minigame](https://github.com/tgstation/tgstation/assets/138636438/dcc13102-7100-40c8-ae7a-089cd4daf868)
in this game, the bird's icon rapidly changes direction and u have to
quickly click the arrow thats OPPOSITE to the direction its facing
several times before the direction changes. if you fail 3 times itll
knock you off and run away, however if u win it will deem u a suitable
master and listen to your orders.

There's many different breeds of raptors you can find across lavaland,
all with different capabilities:
red raptors: these excel at combat and can be very useful for dealing
with lavaland mobs or defending the node drone
yellow raptors: are very speedy mounts, theyll get u from point A to
point B in record time
green raptors: they are the tankiest type of raptor and are very good
miners. while mounted, they will clear any rock walls in their path
purple raptors: can store items in them. they have a decent storage size
allowing players to carry more items across trips
white raptors: are able to heal other injured raptors. having one in ur
party would be very useful as they can nurse the combat raptors back to
full health when they need it
blue raptors: produce very nutritious milk with healing capabilities.
having 1 or 2 of these back at ur ranch would be very useful
black raptors: by far the rarest breed, its very unlikely that ull be
able to get one of these, but in the case u do, they have the combat
capabilities of the red raptor, speed of the yellow raptor, and
tankiness of the green raptor.

Breeding different colored raptors together can net u an entirely new
colored raptor. each breed has atleast 1 guaranteed combination of
parents that it will result out of.

you will also need to maintain a good friendship bond with ur raptors,
this is done by feeding them, grooming them, and petting them. u can see
the strength of ur bond by SHIFT clicking them. more hearts indicate a
stronger bond

![hearts](https://github.com/tgstation/tgstation/assets/138636438/5662c5a7-2df3-4f98-99f4-a11faa17b569)
having higher friendship bonds means ur raptors will perform better in
combat, and in the case of blue raptors, they will produce more milk.
Maintaining friendship bonds with baby raptors and keeping them happy
will also encourage them to grow faster

U can also analyze raptors using the new raptor-dex device available at
ur ranch

![pokedex](https://github.com/tgstation/tgstation/assets/138636438/82b92c0c-b7db-4a0d-997e-384a69c0ecbe)
the inherit modifiers indicate how strong this raptor's offspring will
be. raptors inherit attack and health stats from both their parents,
breeding raptors with higher inherit modifiers means the offspring will
be stronger.

raptors will also inherit some traits from their parents that will
change how they will act around u and around other raptors, some of them
being:
Playful: raptors will play with their masters and tease them
motherly: raptors will care for baby raptors, this will encourage baby
raptors to grow quicker
depressed: means its hard to keep this raptor happy and friendship bonds
will deteriorate faster if not given enough care.
coward: makes them flee combat if severly injured, ditching u to the
wolves
trouble maker: makes them attack other raptors at the ranch. however,
trouble maker raptors will not attack other trouble maker raptors,
instead they will form posses and bully raptors together. it might be a
good idea to isolate them from the other raptors

raptors primarily consume ores. to feed raptors, you need to place ore
into the food troughs at the ranch. they are too civilized to eat ores
off the ground or directly from ur hand, they will only eat it if its in
their trough

![trough](https://github.com/tgstation/tgstation/assets/138636438/70723cc7-5743-4ace-9955-4307879e7a83)

beautiful raptor sprites by spessmenart! (rest are codersprites)

adds a new layer to lavaland mobs, and gives miners new interesting
tools and ways to tackle the challenges of lavaland.

🆑 sheets, spacemenart, ben10omintrix, goofball, infrared baron, aofie
add: adds lavaland raptors and the raptor ranch
/🆑

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
2024-05-18 11:40:59 -04:00

77 lines
2.3 KiB
Plaintext

/*
* A component to allow us to breed
*/
/datum/component/breed
/// additional mobs we can breed with
var/list/can_breed_with
///path of the baby
var/baby_path
///time to wait after breeding
var/breed_timer
///AI key we set when we're ready to breed
var/breed_key = BB_BREED_READY
///are we ready to breed?
var/ready_to_breed = TRUE
///callback after we give birth to the child
var/datum/callback/post_birth
/datum/component/breed/Initialize(list/can_breed_with = list(), breed_timer = 40 SECONDS, baby_path, post_birth)
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE
if(ishuman(parent)) //sin detected
return COMPONENT_INCOMPATIBLE
if(!ispath(baby_path))
stack_trace("attempted to add a breeding component with invalid baby path!")
return
src.can_breed_with = can_breed_with
src.breed_timer = breed_timer
src.baby_path = baby_path
src.post_birth = post_birth
ADD_TRAIT(parent, TRAIT_SUBTREE_REQUIRED_OPERATIONAL_DATUM, type)
/datum/component/breed/RegisterWithParent()
RegisterSignal(parent, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, PROC_REF(breed_with_partner))
ADD_TRAIT(parent, TRAIT_MOB_BREEDER, REF(src))
var/mob/living/parent_mob = parent
parent_mob.ai_controller?.set_blackboard_key(breed_key, TRUE)
/datum/component/breed/UnregisterFromParent()
UnregisterSignal(parent, COMSIG_HOSTILE_PRE_ATTACKINGTARGET)
REMOVE_TRAIT(parent, TRAIT_MOB_BREEDER, REF(src))
post_birth = null
/datum/component/breed/proc/breed_with_partner(mob/living/source, mob/living/target)
SIGNAL_HANDLER
if(source.combat_mode)
return
if(!is_type_in_typecache(target, can_breed_with))
return
if(!HAS_TRAIT(target, TRAIT_MOB_BREEDER) || target.gender == source.gender)
return
if(!ready_to_breed)
source.balloon_alert(source, "not ready!")
return COMPONENT_HOSTILE_NO_ATTACK
var/turf/delivery_destination = get_turf(source)
var/atom/baby = new baby_path(delivery_destination)
new /obj/effect/temp_visual/heart(delivery_destination)
toggle_status(source)
addtimer(CALLBACK(src, PROC_REF(toggle_status), source), breed_timer)
post_birth?.Invoke(baby, target)
return COMPONENT_HOSTILE_NO_ATTACK
/datum/component/breed/proc/toggle_status(mob/living/source)
ready_to_breed = !ready_to_breed
source.ai_controller?.set_blackboard_key(BB_BREED_READY, ready_to_breed)