branchrust_reboot/main/Livestock_animalscancel
85 Commits over 62 Days - 0.06cph!
A few more tweaks to the ragdoll copier to save some clicks
Bull ragdoll
Cow ragdoll joint improvements
New RagdollCopyTool, allows us to copy a ragdoll (joints/ragdolls/colliders) from one hierarchy to another
Setup cow corpse/ragdoll, joints are a horror show right now but at least it's setup
Should make copying the setup over to the other rigs faster
Fix NRE when a livestock animal dies
Add an overgrazing mechanic - if too many livestock eat the grass in an area in too short a time they will no longer be able to eat the grass (either take them to some fresh grass or use a trough)
If an animal is in an overgrazed area they will display a label on the popup when looked at
Adapted from the OverfishedArea mechanic, both systems now share a new DepletedArea class which shares the same grid
New milk item placeholder
If an item id doesn't match the shortname, show an error in the inspector with a fix button
Hooked up fur shader toggle when shearing is ready
Added readytomilk and readytoshear debug commands
ai.showstate now parents it's Ddraw labels, looks a lot smoother
Animals can now eat from a trough, will prioritise that over grazing on grass
Renamed the "Horse Dung" item to just "Dung" (left the prefab/item def names referencing horse, no point changing those)
Hooked up male calf prefab/material
Merge from main (will need codegen)
AI select/move commands now work on multiple animals
Added ai.selectinrange convar
Added ai.deselectnpc convar
When ordering multiple NPC's to a location they all receive an offset so they don't all pathfind to the exact same spot
Hooked up sale info in-game UI
Create new SellAnimals and AnimalSalePreview dialogue panels
First one lists all nearby animals that are following the player (and can be sold) and the other shows what you will receive for selling that animal
No rewards hooked up yet, just panel flow
Stables_b is now playable in editor
Start of boilerplate animal selling mechanic, just set up NPC and basic conversation for now
Added a drink water need and corresponding behaviour to livestock animals, they can drink from a nearby water container or river/lake
Add commands to select and direct a given NPC
ai.selectnpc will select the npc in front of the player
ai.movenpc will make the npc navigate to the point the player is looking at (takes a walk type sneak, walk, jog, run, sprint, fullsprint)
ai.releasenpc stops the debug control
Works on legacy AI and modern FSM based AI, needs to be manually added to every FSM AI but it's a one line change for each type
Add a rename dialog to livestock animals, can only be used while the animal is being led
Infant animals will now stay close to their mother
LIvestock animals now save who their parent is
Added CompletePregnancy convar for debugging
All stats need to be >50% to allow breeding
Add a social stat to livestock - positive if there are 5 animals nearby, negative if there are less than or more than 5 animals nearby
Hooked up stats to crosshair display
Fixed sizing of stats widget
Livestock animals now sit while pregnant (so it's not just visible via UI)
Vitals get frozen so they don't end up starving
Refactored the timers on livestock animal into a new PersistentTimer class
Makes it easy to create new timer based behaviours (drop dung, get older, give birth, etc) and persist those timers through a save/load
Livestock now drop horse dung (might need a rename)
Hooked up sheep sleeping anim
Cleanup, don't use obsolete SetFlags
Fix animals moving while sleeping
New species asset for livestock
Supports spawning a different prefab for male/female animals
Setup for cows and sheep
Fixed all animals set to female
Added breeding fsm states
Stats boilerplate, save load
Sleeping behaviour
Unsaved wip from yesterday