The "They don't appear to be themselves" line on humans that have AI controllers is now controllable by the AI controller, and is only "They don't appear to be themselves" by default.
Monkeized human now have the line
Alright, big exciting PR.
First big thing! Traits can now be tried to organs which are granted and removed from the mob with the organ.
The traits PRIMATIVE, LITERATE, CAN_STRIP, and ADVANCED_TOOL_USER have been removed from species inherent traits list, because they apply to the species brain in specific, not their whole body.
The baseline brain gives the traits LITERATE, CAN_STRIP, and ADVANCED_TOOL_USER, all species that had these traits have a baseline brain.
Ashwalkers have been given a "primitive brain" which gives ADVANCEDTOOLUSER, CAN_STRIP, PRIMITIVE, and notably not literacy. These give them the same traits as before, but their privative nature and lack of reading followers their brain no matter which body they inhabit.
Monkeys have been given the "primate brain" which gives CAN_STRIP and PRIMITIVE. The monkey's brain now holds the logic for the monkey tripping mechanic instead of the AI datum which is a huge win. Monkeys with clients can also now toggle if they would like to be tripped by people, in order to better blend in. AI monkeys will always have tripping on. I also have implemented my qol monkey tripping changes from #69478 (the videos on that PR are still accurate)
What this means, is a human's brain in a monkey's body will still be able to use tools, read, and even operate mechs. but will still have the other non mental monkey traits like being able to crawl though vents while naked. So lovely.
Conversely a monkey's brain (even a sentient one) that is put in a human body will still be illiterate, and will be unable to use complex tools.
Transforming into a monkey via genetics or other means will also change your brain into a monkey brain (this mechanic existed before now, it just wasn't applicable)
Some of this code might not be up to standard, please give me your corrections.
Monkeys will now drop the item in their hand when selecting a weapon to attack with if it is worse than their basic bite attack, and will avoid picking up a weapon if they can't find one that's better than their basic bite attack.
Because of this, you can no longer completely disable monkeys by filling their hands with zero force items. This also means you can no longer trick monkeys into using sutures and other medical items on you.
About The Pull Request
Pun Pun has a new AI, with it they received the following:
Instead of screeching/roaring/scratching/jumping/rolling, Pun Pun will instead sing/dance/bow/clear throat/sign.
Pun Pun now rings desk bells instead of finding random shit to pick up, and doesn't intentionally seek out weapons.
Pun Pun has a higher chance of giving people stuff in their hand, so the Bartender can give them a drink and let them go walking around.
Additionally:
Pun Pun is now immune to being hardstunned by walking into them, giving them a little more bite for greytiders beating them up.
Monkeys can now use desk bells.
Why It's Good For The Game
I like Pun Pun and when Monkey AIs were originally added, there was a note about giving them a unique AI. Since we're slowly turning the poor monkey into an actual Bartender assistant, I find it thematic that they would ring the bell and give out drinks in their hand, as if the Bartender taught them themselves.
For the hardstun immunity, I mostly did it because I find it annoying for a Bartender to have to carefully navigate around Pun Pun to not knock them over and make them drop an instrument (or anything else) in their hand, but it also works as a buff to people trying to kill them. Pun pun is a unique monkey so I don't believe they should be as easy to kill as any other.
Desk bell addition was necessary for Pun Pun to use it.
Changelog
cl
add: Pun Pun now gives stuff in their hand frequently and rings desk bells.
add: Pun Pun now has gentleman-like emotes, rather than screeching and roaring.
balance: Pun Pun no longer looks for weapons in their off time.
balance: Pun Pun is no longer vulnerable to stuns by being walked into.
qol: Monkeys can now use desk bells.
/cl
Monkey knockdown used to be on Crossed until it was made an AI here: 55238
Now it instead uses COMSIG_ATOM_ENTERED, which only takes into account walking over the monkey. Something that you can't do unless you are non-dense or they are lying on the floor, in which case you aren't even knocking them down?
Now it uses COMSIG_MOVABLE_CROSS instead so it's how it used to be, actually functional and useful.
Monkeys only get knocked over when you walk over them (not even when you swap places with them, which I thought was supposed to be the case), this makes non-dense mobs not knock them over. Which means Revenants, bots, small animals (lizards/butterflies), larvas, ect. will not knock monkeys over.
Splitting up monkey ai into subtrees allows me to make a punpun ai after this pr is merged, makes stopping planning matter for the AI subtrees, and more generic subtrees that can be used by most ais
It also gets rid of bad practices like setting blackboards in the ai controller.
See title. Also refactors caltrops into a component because they use connect_loc_behalf which requires them to hold the state.
This also fixes COMPONENT_DUPE_SELECTIVE from just outright not working.
connect_loc_behalf doesn't make sense as an element because it tries to hold states. There is also no way to maintain current behaviour and not have the states that it needs.
Due to the fact that it tries to hold states, it means the code itself is a lot more buggy because it's a lot harder to successfully manage these states without runtimes or bugs.
On metastation, there is only 2519 connect_loc_behalf components at roundstart. MrStonedOne has told me that datums take up this much space:
image
If we do the (oversimplified) math, there are only ever 5 variables that'll likely be changed on most connect_loc_behalf components at runtime:
connections,
tracked,
signal_atom,
parent,
signal_procs
This means that on metastation at roundstart, we take up this amount: (24 + 16 * 5) * 2519 = 261.97600 kilobytes
This is not really significant and the benefits of moving this to a component greatly outweighs the memory cost.
(Basically the memory cost is outweighed by the maint cost of tracking down issues with the thing. It's too buggy to be viable longterm basically)
* Makes turfs persist signals
* Splits connect_loc up into two elements, one for stuff that wishes to connect on behalf of something, and one for stuff that just wants to connect normally. Connecting on behalf of someone has a significant amount of overhead, so let's do this to keep things clear
* Converts all uses of connect_loc over to the new patterns
* Adds some comments, actually makes turfs persist signals
* There's no need to detach connect loc anymore, since all it does is unregister signals. Unregisters a signal from formorly decal'd turfs, and makes the changeturf signal persistance stuff actually work
* bro fuck documentation
* Changes from a var to a proc, prevents admemems and idiots
* Extra detail on why we do the copy post qdel
Enter(), Entered(), Exit() and Exited() all passed the old loc forward, but everything except a single a case cared about the direction of the movement more than about the specific source.
Since moving multi-tile objects will have multiple sources of movement but a single direction, this change makes it easier to track their movement.
Cleaned up a lot of code around and made proc inputs compatible.
I'll add opacity support for multi-tile objects in a different PR after this is merged, as this has grown large enough and I don't want to compromise the reviewability.
Tested this locally and as expected it didn't impair movement nor produced any runtimes.
Sourced from #59118 and a cursed project I'll pr later, This pr contains a lot of harddel fixes for stuff that pops up after a player interacts with something. I'm not gonna list them all here because there's something like 60 130, check the commit log if you're curious
Oh and I moved ref tracking screaming to a separate define, and made some optimizations to the thing in general. I think that's it, this pr is a bit of a frankenstine
This does a variety of improvements to monkey ai that I got drawn into after fixing a relatively simple bug with monkeys and guns. This pr is in support of #58565 so that in the rare chance pun pun gets a gun, they know how to use it. Previously #16630 made it so monkeys could use guns but semi-recently that was broken. Now that's fixed and in addition some other monkey ai capabilities were enhanced, read the changelog for the full list.
About The Pull Request
This PR removes intents and replaces them with a combat mode. An explanation of what this means can be found below
Major changes:
Disarm and Grab intents have been removed.
Harm/Help is now combat mode, toggled by F or 4 by default
The context/verb/popup menu now only works when you do shift+right-click
Right click is now disarm, both in and out of combat mode.
Grabbing is now on ctrl-click.
If you're in combat mode, and are currently grabbing/pulling someone, and ctrl-click somewhere else, it will not release the grab (To prevent misclicks)
Minor interaction changes:
Right click to dissasemble tables, racks, filing cabinets (When holding the right tool to do so)
Left click to stunbaton, right click to harmbaton
Right click to tip cows
Right click to malpractice surgery
Right click to hold people at gunpoint (if youre holding a gun)
Why It's Good For The Game
Intents heavily cripple both the code and the UI design of interactions. While I understand that a lot of people will dislike this PR as they are used to intents, they are one of our weakest links in terms of explaining to players how to do specific things, and require a lot more keypresses to do compared to this.
As an example, martial arts can now be done without having to juggle 1 2 3 and 4 to switch intents quickly.
As some of you who saw the first combat mode PR, the context menu used to be disabled in combat mode. In this version it is instead on shift-right click ensuring that you can always use it in the same way.
In this version, combat mode also no longer prevents you from attacking with items when you would so before, as this was something that was commonly complained about.
The full intention of this shift in control scheme is that right click will become "secondary interaction" for items, which prevents some of the awkward juggling we have now with item modes etcetera.
Changelog
cl Qustinnus
add: Intents have been replaced with a combat mode. For more info find the PR here: #56601
/cl
Monkeys cannot wield twohanded items.
But are not forced to drop items that must be wielded two handed.
This forces monkeys to drop items if they need to be two handed.
(Also makes monkey ais not try and pick up 2 handed weapons)
AI controllers now properly check if a mob is client-controlled and dont start processing if its the case.
AI controllers now handle deletion on unpossesion if that's filled in as an argument
Dead monkeys stop attacking things