* 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>
Adds set_density()
Fixes one instance of a duplicate density assignment on an object.
Comments two hacky usages of density which will have to forgo using the setter for now.
Lets us append code to the event of density changing.
Pretty sure this is leading up to some multitile object thing -Lemon
Co-authored-by: Rohesie <rohesie@gmail.com>
* Refactors tram code to be more robust (#59596)
Tram code has a lot of locate() in list, a lot of unnecessary typechecking and generally bad practices. This refactors tramcode to be easily more maintainable and to have more consistent behaviour, as well as removing any unnecessary code.
* Refactors tram code to be more robust
Co-authored-by: Watermelon914 <37270891+Watermelon914@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>
* Removes some boiler plate from working with atmos code (#58885)
Everything that called turf.assume_air and turf.remove_air was already updating turfs, and all that not tying
the two together did was add more boiler plate, and break things when people forgot about it.
This shouldn't add any overhead outside of hotspots, but I think that's trivial
* Removes some boiler plate from working with atmos code
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Makes the explosive compressor and blastcannon actually use the TTVs they're given + the explosion changes to support that. (#58015)
* Adds explosion SFX to the blastcannon and explosive compressor
- Extracts the explosion SFX and screenshake proc from the SSexplosions explosion handling proc and lets the explosive compressor and blastcannon use it.
* Miscellaneous changes
- Adds defines for the internal explosion arglist keys
- Reverses the values of the explosion severity defines
- Changes almost everything that uses `/proc/explosion` to use named arguments
- Removes a whole bunch of argname = 0 in explosion calls.
* Removes named callback arguments.
* Changes the explosion signals to just use the arguments list
Adds a simple framework to let objects respond to explosions occurring inside of them.
Changes a whole bunch of explosions to use the object being exploded as the origin of the explosion rather than the turf the object is on.
Makes the explosive compressor and blastcannon actually use the TTVs they are given.
Adds support for things responding to internal explosions.
Less snowflake code for the explosive compressor and blastcannon calculating bomb range.*
Less confusing explosion severity defines.
Less opaque explosion arguments
*does not guarantee that the solution to letting them actually use the TTV is any less snowflake.
* Makes the explosive compressor and blastcannon actually use the TTVs they're given + the explosion changes to support that.
Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
* Uses the update_icon_updates_onmob element to update the flash's onmob sprite (#58674)
* Uses the update_icon_updates_onmob element to update the flash's onmob sprite
Co-authored-by: cacogen <25089914+cacogen@users.noreply.github.com>
* Tramstation: choo choo MORE MAP COMIN' THROUH
* Tramstation: Skyrat Edition (#4104)
* Decals Fixed
* Modularity? Whatever
* Fuck me if I need to make a second PR for this
* Blueshield + Cryo + Ian Fursuit
* Automatic changelog generation for PR #4104 [ci skip]
Co-authored-by: MMMiracles <lolaccount1@hotmail.com>
Co-authored-by: Cheshify <73589390+Cheshify@users.noreply.github.com>
* At first i thought that i was being forced to add a feature 🤮 but then i realized i was being encouraged to refactor 😄. Electrified chair is now a component instead of a failure (#57117)
* At first i thought that i was being forced to add a feature 🤮 but then i realized i was being encouraged to refactor 😄. Electrified chair is now a component instead of a failure
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* Makes assembly parts not fall out of their holder when picked up (#57096)
Co-authored-by: thebleh <email@ example.com>
* Makes assembly parts not fall out of their holder when picked up
Co-authored-by: thebleh <43266738+rdragan@users.noreply.github.com>
Co-authored-by: thebleh <email@ example.com>
* moves gun related icons to guns folder (#57077)
moves ammo icons, projectile icons and hitscan effect icons to guns folder
renames projectile.dmi to ballistic.dmi so its less confusing
moves rcd ammo from ammo.dmi to tools.dmi with the rcd
* moves gun related icons to guns folder
Co-authored-by: Fikou <piotrbryla@onet.pl>
* Flash immune cyborgs are now immune to flash. (#56774)
* Flash immune cyborgs are now immune to flash.
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Makes blast doors/shutters and blast door controllers buildable and deconstructible (#56486)
* Makes blast doors/shutters and blast door controllers buildable and deconstructible
Co-authored-by: HugoOdaX <42174630+HugoOdaX@users.noreply.github.com>
* Fix elevators (#56117)
Currently elevators are broken since they try to use the z level of the assembly inside the button to determine how to move
The assemblies z level is however always 0 and instead the z level of the button containing the assembly must be used
This fixes this
* Fix elevators movement when called via button
Co-authored-by: Gamer025 <33846895+Gamer025@users.noreply.github.com>
* Mechanical Curtains (#55751)
good for better mapping, I have seen some mappers wish to utilize fancy curtains on their rooms windows (for example, a psychologist office) but wanted to be able to have privacy when with a patient, which curtains can be opened from either side of the window, and shutters just dont fit the theme, this way mappers can add in curtains which are button operated and cant be opened manually, basically, it functions like a shutter, only it looks and acts like curtains (can be destroyed like one, etc... it is literally a curtain subtype)
* Mechanical Curtains
Co-authored-by: 小月猫 <alina.r.starkova@gmail.com>
* fixes high confusion levels blocking rev conversions and removes help intent disabling the usage of tacticool flashing (#55750)
* fixes high confusion levels blocking rev conversions and removes help intent disabling the usage of tacticool flashing 2
Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com>
* pass_flags handling refactor + rewrites a part of projectiles for the n-th time (#54924)
Yeah uhh this'll probably need testmerging even after it's done because yeah it's a bit big.
If y'all want me to atomize this into two PRs (pass flags vs projectiles) tell me please. Pass flags would have to go in first though, in that case, as new projectile hit handling will rely on pass_flags_self.
Pass flags:
Pass flags handling now uses an atom variable named pass_flags_self.
If any of these match a pass_flag on a thing trying to pass through, it's allowed through by default.
This makes overriding CanAllowThrough unnecessary for the majority of things. I've however not removed overrides for very.. weird cases, like plastic flaps which uses a prob(60) for letting PASSGLASS things through for god knows why.
LETPASSTHROW is now on pass_flags_self
Projectiles:
Not finalized yet, need to do something to make the system I have in mind have less unneeded overhead + snowflake
Basically, for piercing/phasing/otherwise projectiles that go through things instead of hitting the first dense object, I have them use pass_flags flags for two new variables, projectile_phasing and projectile_piercing. Anything with pass_flags_self in the former gets phased through entirely. Anything in the latter gets hit, and the projectile then goes through. on_hit will also register a piercing hit vs a normal hit (so things like missiles can only explode on a normal hit or otherwise, instead of exploding multiple times. Not needed as missiles qdel(src) right now but it's nice to have for the future).
I still need to decide what to do for hit handling proper, as Bump() is still preferred due to it not being as high-overhead as something like scanning on Moved(). I'm thinking I'll make Moved() only scan for cases where it needs to hit a non-dense object - a prone human the user clicked on, anything special like that. Don't know the exact specifics yet, which is why this is still WIP.
Projectiles now use check_pierce() to determine if it goes through something and hits it, doesn't hit it, or doesn't go through something at all (should delete self after hitting). Will likely make an on_pierce proc to be called post-piercing something so you can have !fun! things like projectiles that go down in damage after piercing something. This will likely deprecate the process_hit proc, or at least make it less awful.
scan_for_hit() is now used to attempt to hit something and will return whether the projectile got deleted or not. It will delete the projectile if the projectile does hit something and fails to pierce through it.
scan_moved_turf() (WIP) will be used for handling moving onto a turf.
permutated has been renamed to impacted. Ricocheting projectiles get it reset, allowing projectiles to pierce and potentially hit something again if it goes back around.
A new unit test has been added checking for projectiles with movement type of PHASING. This is because PHASING completely causes projectiles to break down as projectiles mainly sense collisions through Bump. The small boost in performance from using PHASING instead of having all pass flags active/overriding check_pierce is in my opinion not worth the extra snowflake in scan_moved_turf() I'd have to do to deal with having to check for hits manually rather than Bump()ing things.
Movement types
UNSTOPPABLE renamed to PHASING to better describe what it is, going through and crossing everything but not actually bumping.
Why It's Good For The Game
Better pass flags handling allows for less proc overrides, bitflag checks are far less expensive in general.
Fixes penetrating projectiles like sniper penetrators
This system also allows for better handling of piercing projectiles (see above) without too much snowflake code, as you'd only need to modify on_pierce() if you needed to do special handling like dampening damage per target pierced, and otherwise you could just use the standardized system and just set pass flags to what's needed. If you really need a projectile that pierces almost everything, override check_pierce(), which is still going to be easier than what was done before (even with snowflake handling of UNSTOPPABLE flag process_hit() was extremely ugly, now we don't rely on movement types at all.)
* pass_flags handling refactor + rewrites a part of projectiles for the n-th time
Co-authored-by: silicons <2003111+silicons@users.noreply.github.com>
* Minor refactor to signal handlers to remove potential sleeps (#54649)
About The Pull Request
These are legacy sleepers, the remaining 12 are non-trivial to fix.
* Minor refactor to signal handlers to remove potential sleeps
Co-authored-by: spookydonut <github@spooksoftware.com>
* Mousetrap the movie (#54965)
I forgot to check more than ismouse() on the mousetrap side, because I am blind.
This adds the extra checks for israt() and isregalrat() to the trap triggering.
* Mice, Rats, and Regal Rats all trigger mousetrap effects properly.
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
* Improves admin logging for when TTV valves get opened. (#54776)
Basically just reformats the logging code for TTVs when valves get opened. It's a bit more verbose, giving a bit more detail in general. It also has line breaks, because it makes things easier to read.
I've also added the ability for signals to hold a logging string. In this case, a signaller creates a signal and attaches a logging string. If the signal is received by any signallers attached to a TTV, it stores the last logging string associated with that signal. Functionally, this means that TTVs can now ask their attached signaller for the logging string of the last signal it received and display it as part of the logging string.
* Improves admin logging for when TTV valves get opened.
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Converts A && A.B into A?.B (#54342)
Implements the ?. operator, replacing code like A && A.B with A?.B
BYOND Ref:
When reading A?.B, it's equivalent to A && A.B except that A is only evaluated once, even if it's a complex expression like a proc call.
* Converts all A && A.B into A?.B
Co-authored-by: ZeWaka <zewakagamer@gmail.com>
* Cleans up rat related features and makes Regal Ratking a rare spawn from mouse migration event. (#54191)
* Cleans up rat related features and makes Regal Ratking a rare spawn from mouse migration event.
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
* Enforce preserving parent proc return values across ui_act call stacks (#53964)
All ui_act procs should call parent by default. All procs should preserve the value of the parent proc when it's TRUTHY and pass it down the call stack. No UI should be interactible when its flags or state indicate it should not be, except when explicity overriden by child procs intentionally disregarding parent return values to achieve a specific goal.
* Enforce preserving parent proc return values across ui_act call stacks
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Gives Public Mining on Icebox an Elevator, and just a TON of lift fixes so they're viable to map with. [MULTI-BEE] [:pslime: in the chat] (#53728)
add: Icebox now has an elevator! I just took the trousers of every shaft miner to batter town, word.
* Gives Public Mining on Icebox an Elevator, and just a TON of lift fixes so they're viable to map with. [MULTI-BEE] [:pslime: in the chat]
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
* Fixes oversight with "tactical combat spinning" and flashes (#53823)
Using the spin emote can no longer let you RNG your way out of new flash mechanics.
Mobs have a new flag that is set to when they start spinning and unset when they stop.
Flashes now use this new flag when calcing deviation.
Tactical combat spinning using the spin emote now results in a full deviation flash when it may previously have resulted in a failure or half-deviation flash.
Emotes should either not influence combat at all (spin on floor when both players share the same loc, this was already handled by same-loc code), or negatively influence combat for the emote user (spin in all other circumtances, which is what this PR addresses).
* Fixes oversight with "tactical combat spinning" and flashes
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Fix flash runtime, improve flash logic (#53784)
image
Flash + Emp = Flash with no user = Runtime.
Additional logic has been put in place to handle this.
I've also robustified the calculate_deviation proc to have explicit returns in every code path and simplified it to only care about the direction the victim is facing compared to the attacker's position.
* Magic numbers are bad because wizards are bad
* Rohesie feex
* Fix flash runtime, improve flash logic
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Nerfs Flashes [Edge Awards 2020] (#53604)
Flashes now deal stamina damage and micro-stun, they deal higher damage than batons BUT they have a severe disadavntage in form of directionality. Stamina damage and the duration of the micro stun is determined by direction your enemy is facing.
* Nerfs Flashes [Edge Awards 2020]
Co-authored-by: EdgeLordExe <42111655+EdgeLordExe@users.noreply.github.com>
* Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#52981)
* Process procs now properly use deltatime when implementing rates, timers and probabilities
* Review fixes
* Geiger counters cleanup
Made hardsuit geiger code more similar to geiger counter code
Geiger counters are more responsive now
* Moved SS*_DT defines to subsystems.dm
* Rebase fix
* Redefined the SS*_DT defines to use the subsystem wait vars
* Implemented suggested changes by @AnturK
* Commented /datum/proc/process about the deltatime stuff
* Send delta_time as a process parameter instead of the defines
Also DTfied acid_processing
* Dtfied new acid component
* Process procs now properly utilize deltatime when implementing rates, timers and probabilities
Co-authored-by: Donkie <daniel.cf.hultgren@gmail.com>