* if you give a monkey an instrument, it will begin playing the donkey kong theme (#61726)
* if you give a monkey an instrument, it will begin playing the donkey kong theme
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
* Refactors datum AI idle behaviors into datums (#61455)
Co-authored-by: MonkeyThatCodes <monkey>
* Refactors datum AI idle behaviors into datums
Co-authored-by: AMonkeyThatCodes <20987591+AMonkeyThatCodes@users.noreply.github.com>
* Refactors connect_loc_behalf into a component (#60678)
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)
* Update glass.dm
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* Monkeys can now retaliate against xenomorph and animal attacks. (#60157)
Co-authored-by: Rohesie <rohesie@ gmail.com>
* Monkeys can now retaliate against xenomorph and animal attacks.
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Rohesie <rohesie@ gmail.com>
* Sentient monkeys are no longer knocked over by mobs in the way. (#60139)
Title. They used to be immune to this in the past, but then they were refactored into a species and things have changed.
* Sentient monkeys are no longer knocked over by mobs in the way.
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Reverts Entered() passing dir instead of old loc (#59910)
* Reverts Entered() passing dir instead of old loc
Co-authored-by: Rohesie <rohesie@gmail.com>
* Makes turfs persist their signals, uses this to optimize connect_loc (#59608)
* 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
* Makes turfs persist their signals, uses this to optimize connect_loc
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc
* WHEW THAT WAS EASY
* Update ammo.dm
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* Adds new wrinkles to monkey brains (#58631)
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.
* Adds new wrinkles to monkey brains
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
* Adds a subsystem for ai movement (#57111)
* done
* straight walk
* movement
* yep
* removes unused macro
* done
* Update ai_movement.dm
* Adds a subsystem for ai movement
Co-authored-by: Qustinnus <Floydje123@hotmail.com>
* Monkeys drop forced two handed items (#56329)
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)
* Monkeys drop forced two handed items
Co-authored-by: NightRed <nightred@gmail.com>
* Makes it so player-controller monkeyized humans dont also keep AI control + extra AI controller fixes (#55515)
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
* Makes it so player-controller monkeyized humans dont also keep AI control + extra AI controller fixes
Co-authored-by: Qustinnus <Floydje123@hotmail.com>
* [READY] Creates Datumized AI and applies it to monkeys (#55238)
New AI system, implemented for monkeys.
* [READY] Creates Datumized AI and applies it to monkeys
Co-authored-by: Qustinnus <Floydje123@hotmail.com>