Replaces like 70-80% of 0 and such, as a side effect cleaned up a bunch of returns
Edit: Most left out ones are in mecha which should be done in mecha refactor already
Oh my look how clean it is
Co-authored-by: TiviPlus <TiviPlus>
Co-authored-by: Couls <coul422@gmail.com>
Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: Couls <coul422@gmail.com>
* Overlay lighting component (#52413)
Sparks no longer lag, projectile beams move super smoothly, same with mobs and whatnot. This also allows for easy expansion into directional lights, field-of-view, wee-woo rotating lights or whatever.
It does have a downside: things right-clicked or checked through the alt+click tab will show the light overlay:
This is a BYOND limitation, very well worth it IMO.
🆑
add: Smooth movable lighting system implemented. Projectiles, sparks, thrown flashlights or moving mobs with lights should be much smoother and less laggy.
balance: Light sources no longer stack in range, though they still do in intensity.
/🆑
* Overlay lighting component
Co-authored-by: Rohesie <rohesie@gmail.com>
* Opacity refactor (#52881)
Moves all opacity var manipulation to a proc which sends a signal.
light_blocker element for movable opaque atoms made, which tracks its movement and updates the affected turfs for proper lighting updates.
has_opaque_atom boolean replaced by the opacity_sources lazylist to keep track of the sources, and a directional_opacity which serves a similar function but also allows for future expansion with on-border opaque objects (not yet implemented).
Some opacity-related sight procs optimized as a result of this.
Some variables moved to the object's definition.
A define or two added into the mix for clarity.
Some code cleaning, like turning booleans into their defines.
One file renamed for clarity.
Changelog
cl
balance: Mechs no longer block sight. It's a non-trivial cost for the lighting system with little to no gain.
/cl
* Opacity refactor
Co-authored-by: Rohesie <rohesie@gmail.com>
* Cleanup up all instances of using var/ definitions in proc parameters. (#52728)
* var/list cleanup
* The rest of the owl
* plushvar bad
* Can't follow my own advice.
* Cleanup up all instances of using var/ definitions in proc parameters.
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Color standardization, vars moved, and signals (#52574)
Defined all the existing light_color values.
Moved their definitions to colors.dm
Made white the default color. It was so already, but that was very obscured.
Moved the atom light-related variables to the atom definition.
Wrapped changes to variables such as light_color into procs that report the event through signals.
Moved the light_on variable to the atom level, also adding a signal for its changing, to represent toggling lights.
Cleaned up a little bit of code in where new variables were defined before redefinitions.
This is all atomization to reduce changes in #52413
None of this affect gameplay at all, it's all code cleaning and refactoring.
There's more colors to standardize, a search for color = will find lots of targets, and I see little need to have both the LIGHT_COLOR and COLOR patterns, but I don't want to make this PR bigger than it already is.
* Color standardization, vars moved, and signals
Co-authored-by: Rohesie <rohesie@gmail.com>
* Don't initialize the atom_colours list on atoms until it's actually needed
* Moved bloody_hands var to mob/living/carbon/human instead
* Added COMSIG_COMPONENT_CLEAN_RADIATION signal to reduce moms spaghetti
The shower and suit storage unit now calls this signal instead of either doing it manually or doing it via the washed proc
* Cleaned up carbon washing, renamed washed to wash
* The wash proc now doesn't take the washer as first arg because that wasn't used anywhere
* The wash strength is no longer optional
* Carbons now overrides the wash proc instead of using the signal
* Properly check for obscuredness before washing any equipped items
* Properly wash all items and bloody hands etc
* Added clean_lips proc for humans for cleaning any lipstick
* Cleaned up washing. Washy stuff now calls wash instead of calling the clean signal directly
* Renamed is_cleanable to ismopable, gives this category a more fitting purpose. Many things beyond floor decals are cleanable. It is now also determined using the atom layer instead to make it more generic.
* Properly utilize the is_cleanable define
* Added wash override for turfs where they also wash any mopables on the same tile
* Space cleaner and cleaning element etc now simply washes the mob instead of doing its own manual cleaning on ~some~ equipped items
* Non-component washables now simply override wash instead of registering for the clean signal
* Fixed some left over clean signal registers not returning true
* Added clean_strength var to space cleaner
* Moved human wash proc next to the other washing procs
* Also wash glasses and mask if not obscured when washing face
* Fixed attempting to "scoop up" cleanable decals using a rag
* Fixed plasmaman spacehelm icon not updating when washed
Also removed a duplicated worn_overlays proc
* Fixed head icon not updating when washing lipstick
* Moved radioactive clean signal register to where it should be
* Added atom radiate VV verb for debugging
* Redesigned the CLEAN constants into a more sensible flags setup
This makes it more dynamic, cleaning apparatuses can clean more specific than just a cleaning strength.
* CLEAN_TYPE_* flags indicate a specific cleanable, such as blood, fingerprints or disease
* CLEAN_* consts consist of a combination of cleaning types to make cleaning apparatuses have a consistent behaviour on what they clean
* Fixed broken rad removal logic in showers
* Apply suggestions from code review
Co-authored-by: Rohesie <rohesie@gmail.com>
* Removed unneccesary bool from sink code
* Fixed wrongly named variable in turf wash
* Renamed bloody_hands to blood_in_hands
Co-authored-by: Rohesie <rohesie@gmail.com>
About The Pull Request
Just moving /turf/proc/get_corners() into its only caller, slightly shuffled.
Also #defining /proc/GetRedPart() etc, which should flatten down to a copytext+text2num operation with #51005. Also defining parse_light_color() since it has two callers and does something trivial (splits #ff0000 into three luminance vars).
cl Naksu
code: Lighting corner updates are ever so slightly faster.
/cl
This will save memory, and we're constantly manually modifying the
color of this atom all the time, so it makes no sense to bookkeep it in
the atom colour list (that's for restoring atom colors that are affected
by other effects)
I was going to use a flag on flags_1 to control the behaviour, but
they're all in use and I don't want to add flags_2
* Cult Stun Spell Tweaks
Updated to use anti_magic_check instead of a nullrod check.
Corrected the stun message showing if the target is immune to the effect.
Added some visual effects (an actual red flash), and a "holy bubble" around the person if they're immune to the effect.
https://i.imgur.com/wd77s8w.gifvCloses#40285
* Refactor, added mob_light helper
* Added multicamera mode for AIs
* Minor multicamera fixes
* Cameras near an AI multicamera eye now light up red
* Disabled AI multicamera mode without admin intervention
* Fixed AIs being able to use multicamera mode when they should not
* Revert "all this wrapping and it's not even christmas (#33035)"
This reverts commit faaf151580.
* Revert "fuck me for forgetting to graph this one"
This reverts commit 45d7acea2f.
* Revert "defines math"
This reverts commit 2817a1737b.
These weren't needed, and ran thousands of times per second during high lighting activity, and were pretty high up in the line by line profile of lighting for what was basically a noop.
* radiation rework and subsystem
* moves a few things to initialize and adds radiation insulation
* adds a radiation contamination mechanic and makes requested changes
I'm terrified by the possibilities from this
* radiated objects give off light
and hopefuly contamination is balanced
* fixes runtimes and an mc crash kek
removed the lighting part of contaminated objects
attempted some more balancing
* Collectors output power in process() gradualy
And some more balancing tweaks
* Excludes a bunch of things from becoming radioactive
* Ready for testmerge balancing
* Inverse square law was swapped
* testmerge balancing
fixes the geiger counter
buffs collector power gen
nerfs sm radiation
slightly buffs rad insulation
nerfs rad damage (and its burn)
raised the minimum radiation
* disabling the radiation subsystem won't build up rad wave datums forever
* rewrites how mobs handle radiation
upgrades geiger counter functionality
and more balance tweaks
* cleans up stuff and removes debug message
* Slight contamination buff
* Major rad wave performance boost
Also improves rad insulation
Buffs contamination, again
* Fixes insulation runtime
More balance and performance tweaks
* fixes rad collectors not receiving power
* The final balance commit
Fixes a major bug causing radiation to underperform
More geiger counter changes that will be changed more to add sounds
* Monkey business
* Geiger counter sounds
* cleanup and move components to their own initialize
* Some code cleanup
And forgotten changes
* Cleans up some trailing returns
* Mapping changes
A complete rewrite of the dock proc for shuttles to make it more maintainable and readable and also bring over some new features while we're at it. This allows for multi-area shuttles and more control over the effects of anything being moved.
Areas, and movable atoms all have (before|on|after)ShuttleMove procs, turfs have (from|to)ShuttleMove procs which are called the same as beforeShuttleMove.
All ShuttleMove procs have been moved to a single file in the shuttle module.
Stationary docks will have their baseturf_type and area_type modified in maps once the problems have been worked out.