Files
Bubberstation/code/datums/components/fertile_egg.dm
Ben10Omintrix 761b14ef7c lavaland raptors (#82537)
## About The Pull Request
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)

## Why It's Good For The Game
adds a new layer to lavaland mobs, and gives miners new interesting
tools and ways to tackle the challenges of lavaland.

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

---------

Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
2024-05-16 19:54:00 -07:00

72 lines
2.4 KiB
Plaintext

/**
* ### A fertile egg component!
*
* This component tracks over time if the atom is in ideal conditions,
* and eventually hatches into the embryonic type.
*
* The initial design of this component was to make more generic the code for
* chickens laying eggs.
*/
/datum/component/fertile_egg
/// What will come out of the egg when it's done.
var/embryo_type
/// Minimum growth rate per tick
var/minimum_growth_rate
/// Maximum growth rate per tick
var/maximum_growth_rate
/// Total growth required before hatching.
var/total_growth_required
/// The current amount of growth.
var/current_growth
/// List of locations which, if set, the egg will only develop if in those locations.
var/list/location_allowlist
/// If true, being in an unsuitable location spoils the egg (ie. kills the component). If false, it just pauses the egg's development.
var/spoilable
///callback after the egg hatches
var/datum/callback/post_hatch
/datum/component/fertile_egg/Initialize(embryo_type, minimum_growth_rate, maximum_growth_rate, total_growth_required, current_growth, location_allowlist, spoilable, examine_message, post_hatch)
// Quite how an _area_ can be a fertile egg is an open question, but it still has a location. Technically.
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
src.embryo_type = embryo_type
src.minimum_growth_rate = minimum_growth_rate
src.maximum_growth_rate = maximum_growth_rate
src.total_growth_required = total_growth_required
src.current_growth = current_growth
src.location_allowlist = location_allowlist
src.spoilable = spoilable
src.post_hatch = post_hatch
START_PROCESSING(SSobj, src)
/datum/component/fertile_egg/Destroy()
STOP_PROCESSING(SSobj, src)
. = ..()
/datum/component/fertile_egg/process(seconds_per_tick)
var/atom/parent_atom = parent
if(location_allowlist && !is_type_in_typecache(parent_atom.loc, location_allowlist))
// In a zone that is not allowed, do nothing, and possibly self destruct
if(spoilable)
qdel(src)
return
current_growth += rand(minimum_growth_rate, maximum_growth_rate) * seconds_per_tick
if(current_growth < total_growth_required)
return
parent_atom.visible_message(span_notice("[parent] hatches with a quiet cracking sound."))
new embryo_type(get_turf(parent_atom))
post_hatch?.Invoke(embryo_type)
// We destroy the parent on hatch, which will destroy the component as well, which will stop us processing.
qdel(parent_atom)