Commit Graph

145 Commits

Author SHA1 Message Date
SkyratBot
ec09510459 Bools and returns super-pr (#53221) (#565)
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>
2020-08-30 05:12:59 +02:00
SkyratBot
0b65cc596b [MIRROR] Overlay lighting component (#469)
* 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>
2020-08-23 20:17:12 +02:00
SkyratBot
72c69368b6 [MIRROR] Opacity refactor (#405)
* 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>
2020-08-19 04:48:14 +02:00
SkyratBot
ee324ab3c2 [MIRROR] Cleanup up all instances of using var/ definitions in proc parameters. (#240)
* 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>
2020-08-07 18:26:21 +01:00
SkyratBot
5fd8cb072e [MIRROR] Color standardization, vars moved, and signals (#194)
* 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>
2020-08-04 12:20:31 +02:00
Daniel Hultgren
bae9371da5 Cleanable cleanup (#52477)
* 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>
2020-07-29 08:32:30 -04:00
L
52bf8a66f9 smooth 2020-07-16 11:14:05 -03:00
ShizCalev
254536072e [s] sanity checks vv_edit_var() values (#52255)
cl ShizCalev
fix: Added some sanity checking for varedit values.
/cl
* sanity checks vv_edit_var() values

* this should be an or

* one more fix
2020-07-16 10:20:41 +12:00
ShizCalev
d1b15ae80d Merge pull request #51943 from AnturK/hellodarknessmyoldfriend
Fixes lighting updates from opaque objects changing state (ie doors)
2020-07-01 12:19:25 -04:00
AnturK
304bd061b8 Fixes lighting updates from opaque objects changing state (ie doors) 2020-06-30 22:31:42 +02:00
Jordan Brown
2685f263fe Removes unused lighting var 2020-06-30 03:48:01 -04:00
Bobbahbrown
ead5e1d9e1 VROOOOM (#51546) 2020-06-09 20:45:16 -04:00
vuonojenmustaturska
6455fb3be5 Speeds up /datum/light_source/proc/update_corners() by 16% or so (#51004)
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
2020-05-11 11:33:28 +12:00
spookydonut
8dbf1cf4ec Changes to comply with GitHub TOS
Further changes to comply with the ToS

More ToS cleanup

Bye bye George Melons

Better to be safe than sorry
2020-04-14 21:24:50 +00:00
Rob Bailey
1aeb72b2a9 Better glowing lights (#49454)
* better glowy lights

* phase 2

* some doc comments

* working emissive blocking

* flag so these rotate correctly

* full brightness screens

* doc comments and rename

* better doc comments

* stub overrides

* better autodoc format

* Update code/game/atoms_movable.dm

Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com>

* Update code/modules/lighting/emissive_blocker.dm

Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com>

* render target defines for all planes

* update proc for emissive blocker

Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
2020-03-03 11:50:19 -05:00
Qustinnus
72fb1458a7 Adds the shower bot, makes sure you don't become too bloody (#49083)
* Epicgamers

* woops

* Update code/modules/mob/living/simple_animal/bot/construction.dm

Co-Authored-By: TheChosenEvilOne <34602646+TheChosenEvilOne@users.noreply.github.com>

* slip

* fix

* epic

* emag functionality

* Update code/modules/mob/living/simple_animal/bot/hygienebot.dm

* Update code/modules/mob/living/simple_animal/bot/hygienebot.dm

* step 1

* woops

* fixes

* fixes

* fixes++

* fixes a broken thing

* lol ok

* fixes

* oopsie

* oneliner

* lmao webedits

* small brain

Co-authored-by: TheChosenEvilOne <34602646+TheChosenEvilOne@users.noreply.github.com>
2020-02-20 22:31:22 +01:00
JJRcop
a1392847bd Remove ismovableatom macro (#9) 2020-02-17 15:03:16 +01:00
spookydonut
2591ce17a6 Travis EOF newline detection v3 (#47539)
* scream

* aaa

* aaa

* new one
2019-11-04 19:16:50 -08:00
nemvar
c38a7a3bb5 Removes a bunch of var/ in procs (#46946)
* Removes a bunch of /var in procs

* reset this

* Why wasn't this already?
2019-10-10 04:20:27 -07:00
oranges
75d3e6c0e7 Avoid generating the atom colour list on the lighting object
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
2019-07-26 02:38:51 +00:00
vuonojenmustaturska
01aef8ee82 small cleanup 2019-05-05 05:37:21 +03:00
ShizCalev
214eae8d82 Fixes a bunch of missing symbols 2018-11-12 19:05:02 -05:00
ShizCalev
324f4e0b6f Makes flashes, & flashbangs flash (#40357)
* Makes flashes & flashbangs flash

* cleanup / badminnery feature

* Added cameras
2018-09-20 23:46:44 -04:00
ShizCalev
392f4bd8e3 Bloodcult Stun Spell Tweaks (#40328)
* 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.gifv

Closes #40285

* Refactor, added mob_light helper
2018-09-19 10:30:49 -04:00
81Denton
893a5997ef Fixes stack_trace typo (#40119) 2018-09-05 19:50:11 +03:00
AnturK
61d2e5ffd0 Fixes light property vv (#39895) 2018-08-24 20:06:32 +03:00
vuonojenmustaturska
e7974dba72 this is approaching nano-optimization 2018-06-19 15:32:05 +03:00
ninjanomnom
d483ff3ef0 Regexes
`([^_\.])SendSignal\((.+?)\)` -> `\1SEND_SIGNAL(src, \2)`
`([\.\w]+?)\.SendSignal\((.+?)\)` -> `SEND_SIGNAL(\1, \2)`
2018-06-13 19:19:23 -04:00
Cruix
70687c8cdc AI Multicamera mode (#37695)
* 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
2018-05-30 20:31:32 -05:00
kevinz000
baf3fbb0cd Shuffle Exited call to after loc is actually changed in forceMove (#38022)
Fixes storage forcing everything to mouse opacity fulltile
2018-05-25 00:08:15 -07:00
AnturK
66d9a4a0cf Removes /related area variable. (#37173)
* Removes /related area variable.

* area_contents begone

* doorstuff
2018-04-14 12:45:00 +03:00
vuonojenmustaturska
f54526cc57 Lighting fix 2018-01-26 20:26:52 +02:00
Emmett Gaines
25080ff2c4 defines math (#33498) 2017-12-17 11:02:11 -05:00
vuonojenmustaturska
de51ac3667 Player Z-tracking, again (#33216)
* Player Z-tracking, again

* requested changes

* shuttle changes

* a fix

* vending

* honk

* brainstuff take 1

* Honk

* adminspam into testing def

* remove rebase artifact
2017-12-14 18:35:30 -05:00
Emmett Gaines
7c69cdcb8a Revert math (#33059)
* 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.
2017-11-23 20:59:52 -05:00
ninjanomnom
2817a1737b defines math 2017-11-22 17:36:58 -05:00
ShizCalev
8eafaccc88 Cleans up unused code 2017-11-20 00:03:33 -05:00
Kyle Spier-Swenson
12a82618da Remove some unneeded null checks in lighting
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.
2017-10-26 15:21:00 -07:00
Kyle Spier-Swenson
7cda369642 Fixes light source qdel issues. 2017-10-25 23:33:52 -05:00
vuonojenmustaturska
673abab94e Small lighting perf tweak (#31635)
* lightshit

* Revert "lightshit"

This reverts commit 25a1b6e4a104546c6393d3c472c0412f7580fe96.

* bfghsfg

* kreegah

* honk
2017-10-13 15:29:50 -06:00
Emmett Gaines
456cd10d94 Radiation rework and subsystem (#30909)
* 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
2017-10-13 10:22:00 -04:00
Kyle Spier-Swenson
f860464b62 Fixes lighting hard deleting (#30684) 2017-09-14 12:20:28 +02:00
oranges
a5cff9b73d Merge pull request #30631 from AnturK/literallyfasterthanlight
Fixes shuttle lighting issues
2017-09-13 08:10:26 +10:00
Jordan Brown
9b73bc75d5 Removes GLOB.all_lighting_objects 2017-09-12 16:53:31 -05:00
AnturK
b2def77bf6 Fixes shuttle lighting issues 2017-09-11 20:14:36 +02:00
Jordan Brown
dce49b6caf Adds defines for mouse_opacity 2017-08-14 11:18:22 -04:00
Jordan Brown
a7be74fec8 Merges the two turf/Entereds 2017-08-10 09:59:23 -04:00
oranges
5705e571de Combine the two changeturf procs into one
less confusion, this byond misfeature continues to cause issues, in this
case it was a runtime because it didn't have all the arguments the
parent had
2017-08-01 02:12:20 +00:00
Emmett Gaines
1d201939ba [Ready] Shuttle dock() rewrite (#29049)
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.
2017-07-17 12:17:56 +12:00
nicbn
77a2d3f5cd Replaces "istype"s with is_helpers macros (#28676) 2017-06-22 15:03:19 -03:00