Now aliens properly nuzzle/bite eachother, also removes the "No attacking people at spawn, you jackass." message when attacking other aliens, because it is useless since they can't directly harm eachother.
This pr goes through: /client/Click(), /client/Topic(), /mob/living/verb/resist(), /mob/verb/quick_equip(), /mob/verb/examinate(), and /mob/verb/mode() and makes them queue their functionality to a subsystem to execute in the next tick if the server is overloaded. To do this a new subsystem is made to handle most verbs called SSverb_manager, if the server is overloaded the verb queues itself in the subsystem and returns, then near the start of the next tick that verb is resumed with the provided callback. The verbs are called directly after SSinput, and the subsystem does not yield until its queue is completely finished.
The exception are clicks from player input since they are extremely important for the feeling of responsiveness. I considered not queuing them but theyre too expensive not to, suffering from a death of a thousand cuts performance wise from many many things in the process adding up. Instead clicks are executed at the very start of the next tick, as the first action that SSinput completes, before player movement is processed even.
A few months ago, before I died I was trying to figure out why games at midpop (40-50 people) had non zero and consistent time dilation without maptick being consistently above 28% (which is when the MC stops yielding for maptick if its overloaded). I found it out, started working on this pr, then promptly died. luckily im a bit less dead now
the current MC has a problem: the cost of verbs is completely and totally invisible to it, it cannot account for them. Why is this bad? because verbs are the last thing to execute in the tick, after the MC and SendMaps have finished executing.
tick diagram2
If the MC is overloaded and uses 100% of the time it allots itself this means that if SendMaps uses the amount its expected to take, verbs have at most 2% of the tick to execute in before they are overtiming and thus delaying the start of the next tick. This is bad, and im 99% sure this is the majority of our overtime.
Take Click() for example. Click isnt listed as a verb but since its called as a result of client commands its executed at the end of the tick like other verbs. in this random 80 pop sybil round profile i had saved on my computer sybil 80 pop (2).txt /client/Click() has an overtime of only 1.8 seconds, which isnt that bad. however it has a self cpu of 2.5 seconds meaning 1.8/2.5 = 72% of its time is overtiming, and it also is calling 80.2 seconds worth of total cpu, which means that more than 57.7 seconds of overtime is attributed to just /client/Click() executing at the very end of a tick. the reason why this isnt obvious is just because the verbs themselves typically dont have high enough self cpu to get high enough on the rankings of overtiming procs to be noticed, all of their overtime is distributed among a ton of procs they call in the chain.
Since i cant guarantee the MC resumes at the very start of the next tick due to other sleeping procs almost always resuming first: I time the duration between clicks being queued up for the next tick and when theyre actually executed. if it exceeds 20 milliseconds of added latency (less than one tenth the average human reaction time) clicks will execute immediately instead of queuing, this should make instances where a player can notice the added latency a vanishingly small minority of cases. still, this should be tm'd
The COMSIG_PROJECTILE_RANGE signal can be used to add signal handlers for behaviors that a projectile should execute each step of its travel. Currently, nothing uses it, but it is available for use in admin circuits or lua scripts.
The pixel_speed_multiplier var for projectiles acts as the value passed to the trajectory_multiplier argument of pixel_move, which originally was passed a constant value of 1. By lowering this var, you can reduce the speed of projectiles without them becoming jumpy. As an example, magic missile, gauntlet echo, the demonic watcher's temp beam, and the demonic frost miner's projectiles have all been changed to use this var. As such, their movement will be much smoother (but still the same effective speed).
This PR fixes this issue by making sure every proc called in the stack of /proc/wrap_lua_print which could sleep is called using INVOKE_ASYNC, and to prevent such problems in the future, marks all the wrappers as SHOULD_NOT_SLEEP(TRUE). I also figured out how to fix the dumb overflowing problem of the lua editor ui.
Due to lag concerns regarding lua states with a large number of global variables (including fields within global tables), I have made it so the global table and state log are hidden by default - they can be shown using a toggle button in the editor ui.
this code was untestable because
it required a config flag to be set on, this flag is false by default on local
it requires multiple people on the server
so it turned out that leader spawning is broken. this should fix it
* Makes liver/stomach repair consistent with heart/lung repair - everybody gets one.
* Replicates operated vars for stomach/liver.
* It'd be good if the surgery wasn't repeatable.
* And if the fix didn't break it.
* Motorised Wheelchairs will not become dense when someone is buckled.
Motorised Wheelchairs will manually bump living mobs they tried to move through.
* Removes unnecessary check for emag, we want this behaviour at all times.
* Fixes seed extractors not taking seeds from plant bags.
- When refactored, it accidently changed it from taking the seed "from its loc" to "from the extractor itself", which always failed
* Unit test
* Genericises it a bit
* Toy guns are only available to clown operatives.
* Removes from both operative uplinks: Camera Bug, Combat Gloves Plus (already removed from leaders), Guerrilla Gloves, FRAME disc, Radioactive Microlaser, Blood-Red Magboots (the standalone ones, not the modules), Power Beacon, Bioterror everything (including the bundle), Stechkin APS machine pistol and ammo, AI Detector.
makes the nuke op player with the most nuke ops playtime the leader
makes the leader start with loud mode on on their radio
idea for that second one from BeeStation/BeeStation-Hornet#6631
making the most playtime nuke op the leader prevents 1st time players from rolling it, they will generally be more competent, and able to be entrusted, just like you can trust a head of staff more. a player with more competency will also probably be better at actually leading and not just clicking a button to open the ship, if they try.
the radio is a tiny change to make the leader matter more, and able to give better leadership, because im pretty sure most people dont even realize the leader has access to loud mode
Fixes#68779#68382 Added a "melee cooldown" to ALL cooldown actions by default, which is something I wasn't sure about in the PR, but Space suggested it wouldn't affect anything. Turns out did affect some things
I instead have overridden all the new cooldown actions (Alien, spells, and some misc ones) to have a 0 second melee cooldown, allowing constructs and similar to attack and use spells freely
The USB connections for air alarms have been improved and now include scrubber control, vent control and the setting of the air alarm mode. Also fixes a bug where the limits were not being properly set.
The scrubber, vent and limit control can be duplicated in the circuit to allow multiple limits/scrubbers/vents to be controlled by one circuit.
Any airlock can be made into a shell during construction by configuring the airlock electronic before insert.
* Refactored fundamental circuit components that have varying inputs. Made the integrated circuit UI slightly better.
* Fixes with UI
* Removes logger
* Ran prettier
* Fixed documentation
* Rebalances drone circuit
* Drones can now charge in chargers
Co-authored-by: Watermelon914 <hidden@hidden.com>
* Test commit, adds file.
Adds the actual game implementation
Revert "Feature/ratlain"
Adds hiding shards behind posters.
Begins adding evil posters which make you sad if you look at them.
Refactors 'seeing' to use proximity sensors.
This is both more efficient and allows both propaganda tools to share code.
Added most of the implementation for grafitti too, needs splitting into its own file.
* Separated objectives into different files
* Adds the graffiti objective
* Adds demoraliser component for shared behaviour between disparate items
* Soap now calls wash() instead of just qdeling things by itself
Adds file I forgot to commit.
* Remove pointless 'var's
* Makes my abstract objective abstract, probably?
Missed one remaining instance of unecessary var
* Alphabetises tgstation.dme
Tiny change to flavour text.
Removes random unwanted pixel.
* * Refactors how signals are handled across the code and moves filtering to a more appropriate place.
* Handily removes owner object which we don't need any more.
* Adds some early returns.
* Adds missing call to super in contraband.dm attackby.
* That was supposed to be a commit not also a push.
Reverts one change I didn't want to make which also allows this to compile.
* * Removes unecessary tracking of rune in spraycan
* Simplifies spam protection
* Unregister signals in "ungenerate_objective" rather than bespoke proc
* Removes pointless type cast applied two lines before type guarding it again
* Fixes some formatting
* Replaces mob/living/human with mob/living in demoraliser, if Ian get a mood component then why not demoralise him too?
* Adds missing comment
* Updates bad proc name
* * Moves proc from demoraliser to mood
* Replaces reference to glass shard trap with a weakref
* Cleans up some lines which were left after refactoring
* Corrects timing of setting `drawing_rune`
* More early returns
* Test
* Removes trailing /
Replaces . = ..() with a later return ..() in a couple of places
* Restores failure penalty
Adds weight to objective category
* Adds penalty to missed file.
* Separates slipping on graffiti to its own signal
Removes a duplicate comment
More early returns
* Renames vague var.
The decals from decal painters and tile sprayers are identical to the ones from roundstart, except they're washable. This is good for if you need to undo or erase mistakes. Or to janicart clown nonsense quickly. But it sucks if you're trying to cement some proper borders and queue arrows and whatnot in.
So, they now are not washable, but instead you crowbar the floor tiles up, just like with map-start decals.
Also added ink level meter for toner cartridges.
Also, replaced my previous half-effort "white" and "black" tile sprayer colors with neutral and dark. Makes neutral and bar burgundy use the correct unusual alpha values as with the real ones.
Why It's Good For The Game
So that these aesthetic improvements aren't accidentally wiped by the janitor cleaning up.
As well, the extremely common neutral tile overlays can now be painted.
Changelog
cl
add: The results of the tile sprayer and decal painter can now only be removed by crowbarring the tile, just like map-start.
fix: Tile sprayer's "white" replaced with "neutral", the most common tile overlay color.
/cl
* The reason why xenos survive fire better than humans goes further than this. The original PR partially fixes it, and makes it so that, on high firestacks, xenos reliably die considerably faster than humans do. However, on low firestacks it's a different story.
The way humans handle being on fire is that their external temeperature (or skin temperature or body temperature, there's no consistent name for it but the var name is bodytemperature) increases based on the line that I copied over to xeno code here. However, being on fire also cancels all other procs that I could find that would ordinarily regulate external temperature through interacting with the atmos around the mob and from equalizing the core and external temperatures of a mob. This equalization still happens, but it becomes a one-way street. The core heats up from equalizing it's temp with the skin but the skin doesn't reduce it's temperature in turn, so even though the body could offset the temperature delta caused by being on fire with few firestacks, it doesn't get the chance to.
Meanwhile, xenos (and all other carbons) don't have two different temperature values. Their external temperature doubles as core temperature and so they suffer differently from being on fire. Their temperature won't interact with the environment to cool itself while on fire, but their metabolism will still lower their temperature if it strays out of safe parameters.
Because of this, while humans are by design unable to offset the temperature increase from fire, other carbons, xenos included, are able to reset their temperature to neutral faster than a fire with low firestacks can raise it and so they can be on fire indefinitely. When high firestacks are involved this is still true, but their metabolism will be overwhelmed, their temperature will start to steadily rise and because of the way their bodies react to high temperatures they will take more damage and die faster than humans.
You now left click to climb up and right click to climb down a ladder. A delay of 1 second has also been added, since otherwise it'd take only one click to immediately move vertically and would be much more spammable.
Ghosts still use the old radials, because their right clicks are bound to the default byond popup menu.
* Replaces many instances of GetComponents in mining items with signals and better uses overall of Components, in drills and the GPS handcuffs.
* To do this, also added 3 new signals to mechs when you are adding/removing mech equipment onto one.