Commit Graph

33 Commits

Author SHA1 Message Date
LemonInTheDark
7f444f510e Fixes a ton of harddels (#57736)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
2021-03-17 05:51:53 -07:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
Rohesie
25f670f8de 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
2020-08-19 13:24:20 +12:00
Timberpoes
19c3bbde31 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.
2020-08-07 12:23:42 -03:00
AnturK
304bd061b8 Fixes lighting updates from opaque objects changing state (ie doors) 2020-06-30 22:31:42 +02: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
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
vuonojenmustaturska
01aef8ee82 small cleanup 2019-05-05 05:37:21 +03:00
vuonojenmustaturska
e7974dba72 this is approaching nano-optimization 2018-06-19 15:32:05 +03:00
Emmett Gaines
25080ff2c4 defines math (#33498) 2017-12-17 11:02:11 -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
Jordan Brown
0c22596eca Fix some things assuming lighting corners existed (#28511) 2017-06-17 12:03:10 -03:00
MrStonedOne
52b98599de Fixes nested lights not working properly 2017-05-08 14:16:46 -07:00
MrStonedOne
ac3cfcb4b1 >forgetting that REMOVE_EFFECT needs effect_str 2017-05-08 10:54:32 -07:00
MrStonedOne
9cc6a335e3 last one I swear mom! 2017-05-07 13:52:36 -07:00
MrStonedOne
8762d79fbe Clearly the coffee hasn't kicked in yet 2017-05-07 13:15:48 -07:00
MrStonedOne
ce7878d7b9 Fixes a bug in processing lights of deleted atoms. 2017-05-07 12:40:52 -07:00
MrStonedOne
bd720fff96 Fixes light/lum counts getting fucked up when turfs changed 2017-05-07 12:38:42 -07:00
MrStonedOne
72652a536c Copy/paste fail 2017-05-06 21:31:44 -07:00
MrStonedOne
b0c4bf7ec1 Some more improvments, removed dview.
This *seems* to be a decent speed up just in the appearent time it takes break all lights to process, and dview wasn't really needed here.

Minor oddies can occur on bigger lights near their edges, but not enough to justify the extra cost.
2017-05-06 17:46:20 -07:00
MrStonedOne
2ed266d506 More /vg/lighting tweaks
Rather then remove the light from all tiles, then re-add the light to all tiles, we just go thru each tile and diff the light level from the last value we added to it. (since this is tracked)
This cut the proc calls for updating lights in half.

Lighting objects now default to full brite rather then full dark so shuttles aren't as immersion breaking when they transit.

Made lighting more agressive about clearing empty lists.
2017-05-06 01:50:19 -07:00
Leo
c91ff0e35a Merge pull request #26284 from AnturK/ilookedatstacktraceabyssanditlookedback
Fixes DVIEW runtimes in preferences.
2017-04-20 08:02:37 -03:00
Cyberboss
72d0271f94 Normalizes how some lighting things GC 2017-04-17 13:15:39 -04:00
AnturK
b814e36883 Fixes DVIEW runtimes in preferences. 2017-04-17 00:10:01 +02:00
Cyberboss
9e1ef0ffe2 Global variable wrappers (#25325)
* Add the system for managed global variables

* Travis ban old globals

* So you CAN inline proccall, that's neat

* Fix that

* master.dm

* Remove the hack procs

* Move InitGlobals to the proper spot

* configuration.dm

* Fix the missing pre-slash

* clockcult.dm

* This is probably for the best

* Doy

* Fix shit

* Rest of the DEFINES tree

* Fix

* Use global. for access

* Update find_references_in_globals

Always hated that proc

Whoever made it must've bee a r e a l idiot...

* __HELPERS tree

* Move global initialization to master.

Fix the declaration

* database.dm

* Dat newline

* I said DECLARATIVE order!

* Here's something you can chew on @Iamgoofball

* game_modes.dm

* Fix this

* genetics.dm

* flavor_misc.dm

* More stuff

* Do it mso's way. Keep the controllers as global

* Make master actually see it

* Fix

* Finish _globalvars/lists

* Finish the rest of the _globalvars tree

* This is weird

* Migrate the controllers

* SLOTH -> GLOB

* Lighting globals

* round_start_time -> ticker

* PAI card list -> pai SS

* record_id_num -> static

* Diseases list -> SSdisease

* More disease globals to the SS

* More disease stuff

* Emote list

* Better and better

* Bluh

* So much stuff

* Ahh

* Wires

* dview

* station_areas

* Teleportlocs

* blood_splatter_icons

* Stuff and such

* More stuff

* RAD IO

* More stuff and such

* Blob shit

* Changeling stuff

* Add "Balance" to changelogs

* Balance for changelog compiler + Auto Tagging

* Update the PR template

* hivemind_bank

* Bip

* sacrificed

* Good shit

* Better define

* More cult shit

* Devil shit

* Gang shit

* > borers

Fix shit

* Rename the define

* Nuke

* Objectives

* Sandbox

* Multiverse sword

* Announce systems

* Stuff and such

* TC con

* Airlock

* doppllllerrrrrr

* holopads

* Shut up byond you inconsistent fuck

* Sneaky fuck

* Burp

* Bip

* Fixnshit

* Port without regard

* askdlfjs;

* asdfjasoidojfi

* Protected globals and more

* SO MANY

* ajsimkvahsaoisd

* akfdsiaopwimfeoiwafaw

* gsdfigjosidjfgiosdg

* AHHHHHHHHHHHHHHHHHHHHHHH!!!!!

* facerolll

* ASDFASDFASDF

* Removes the unused parts of dmm_suite

* WIP

* Fix quote

* asdfjauwfnkjs

* afwlunhskjfda

* asfjlaiwuefhaf

* SO CLOSE

* wwwweeeeeewwwww

* agdgmoewranwg

* HOLY MOTHER OF FUCK AND THATS JUST HALF THE JOB?!?

* Fix syntax errors

* 100 errors

* Another 100

* So many...

* Ugh

* More shit

* kilme

* Stuuuuuufffff

* ajrgmrlshio;djfa;sdkl

* jkbhkhjbmjvjmh

* soi soi soi

* butt

* TODAY WE LEARNED THAT GLOBAL AND STATIC ARE THE EXACT SAME FUCKING THING

* lllllllllllllllllllllllllllllllllllllllllll

* afsdijfiawhnflnjhnwsdfs

* yugykihlugk,kj

* time to go

* STUFFF!!!

* AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!

* ngoaijdjlfkamsdlkf

* Break time

* aufjsdklfalsjfi

* CONTROL KAY AND PRAY

* IT COMPILEELEELELAKLJFKLDAFJLKFDJLADKJHFLJKAJGAHIEJALDFJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

* Goteem

* Fix testing mode

* This does not belong in this PR

* Convert it to a controller

* Eh, fuck this option

* Revert controllerization Ill do it some other time

* Fix

* Working controllerization

* FOR THE LOVE OF CHRIST PROTECT THE LOGS

* Protect admins and deadmins

* Use the inbuilt proc
2017-04-06 23:26:13 -06:00
Kyle Spier-Swenson
99002e25a3 Fixes lighting of pixel shifted objects and reverts the hacky memleak fix + other lighting fixes (#24963)
* Revert "Lighting micro optimizations and fixes (#24939)"

This reverts commit 78bbbfe20a.

* vg refactor stage 1

* Fix runtime in get_turf_pixel

* fix lighting on turfs

* Fix certain things reading light levels wrong.

* Made SS faster/better by making it split its tick allotment up between it's 3 tasks

* istypeless loops @pjb3005

/proc/typed_loop    6.826        6.830        6.858       190761
/proc/typeless_loop 5.582        5.586        5.620       190435

* lazy init lists
2017-03-14 19:27:23 +01:00
PJB3005
25b5b49394 SHIP IT 2017-02-12 18:37:09 +01:00
Pieter-Jan Briers
aeb057579e Hey it almost works 2017-02-04 01:00:12 +01:00
PJB3005
7356e80484 hey that should be everything except making it compile. 2017-01-17 22:08:27 +01:00