Commit Graph

37 Commits

Author SHA1 Message Date
LemonInTheDark
8982828d05 Removes Starlight Config (#74289)
## About The Pull Request

It was config'd off to save init time, but having it function in testing
and mapping is more valuble then the time spend on it.

On that topic, we spend roughly 1.7 seconds of init on this. 
~1.3 is spent handling the light sources and their light object
modifications (this is potentailly inflated since other sources could
cause the same objects to need updates)
~0.3 is spent searching for space turfs around lighting_objects during
init.
This will impact change_turf slightly too, costing about ~0.07 in local
testing.

It does save time for live however, since we avoid these config checks.

## Why It's Good For The Game

I believe this time is worth spending. 
I've had people try to "fix" artifacts of starlight not being enabled,
things that aren't bugs.
The test environment should as much as we can make it reflect the visual
reality of the game. This helps ensure that

## Changelog
🆑
server: The starlight config has been removed, as it is enabled by
default
/🆑
2023-03-27 22:34:13 -07:00
LemonInTheDark
069bd12e26 Fixes the labor claim console not properly linking in shuttle loads (#73590)
## About The Pull Request

Caused by f88edef0fb

I prevented lighting objects transfering between space turfs and not
space turfs.
This meant if you went from space turf -> non space turf, we had to
spawn you a new lighting object.

This would set your luminosity to 0, then queue you for updates.

This meant that shuttles would go fulldark (To things without
see_in_dark) on move. So when we'd try and do a view check to look for a
stacking machine to feed from, we'd get blocked

Lets swap from a view to a dview() then, and default to lit instead of
unlit turfs

Because mobs use infi see_in_dark this only impacts redundant view()
calls. Lets just be nice to em yeah?

## Why It's Good For The Game

Closes #73324 

## Changelog
🆑
fix: The gulag shuttle's point claim console will load in again. Whooops
/🆑
2023-02-23 23:51:29 -07:00
LemonInTheDark
f88edef0fb Space/Changeturf fixes and optimizations (#73261)
## About The Pull Request

We've got a few space related things that are busted, and shuttle
movement is slow.
I'd like to try to improve these things, if just a bit.

Long list of only tenuously related topics. Sorry for the shotgun blast

#### [Fixes lazyloaded stuff having bad
space](d4de176a63)

We need to handle area transferring in maploading code under niche
cases, and we also need to actually init reservation spaces we create.

It's also redundant and potentially dupe creating to do area lighting
handling in changeturf, because it gets touched in turf init anyway. Old
me is stupid.

#### [Adds some doc comments, yeets
ssmappping/transit](269717145d)

We had a reserved space for just shuttles to use, except it wasn't for
just shuttles.
So in theory if the space got clogged with other shit, the shuttles
could have nowhere to actually use.

It's better to just have the two groups share real estate. More sane

### The "Starlight is Slow" Block

#### [Starlight optimization part one (don't check config for each
individual turf you check for
activity)](7312a314be)

#### [Starlight optimization part two (infer
context)](be94c422ed)

Starlight was causing each space turf to cause itself and its neighbor
to constantly recheck if they had starlight off changeturf.

The exact same effect can be had by taking advantage of some
pre-existing information, namely if the space turf is gaining or losing
a source of starlight.
Essentially, instead of telling a turf to check all adjacent turfs to
see if it's got starlight, we tell the turf if WE are a source of
starlight, or if we might be taking something away from it.

There's a bit of wasted cpu here but not much, if it's worth doing a
register signal pattern for clearing depends on the case we're working
with.

Being intelligent about this makes things much faster, something in the
neighborhood of 4 to 3 fold.
I've also made openspace's starlight work better, cause the old pattern
was a bit silly.

### Changeturf is Annoying (Microops)

#### [Micro ops changeturf and turf deletion a
bit](386b3ab7fc)

Don't do work if the thing you're working on doesn't exist, don't check
every adjacent turf for firelocks on turf change (just have thefirelocks
manage that), don't check all atoms on the turf for decals on turf
change, similar.
Also moves visibility changes from camera code into changeturf, to avoid
unneeded work.

Needs some extra work to optimize the guts for this path but I can do
that!

#### [Micros camera vis
changes](ebab69e9ea)

We should only update vis when our opacity changes. 
In addition, we don't need all the camera handling fluff if we only want
to update our turf's static groups.

Also micros a camera net helper to be less crap for non multiz maps

#### [Micros some open space atmos cases, alongside avoiding a for(null)
in opacity
handling](72ae07ba1d)

#### [Ensures space_lit tiles never accidentially inherit lighting
objects](a99ff2265a)

S dumb, and leads to space turfs having two sources of lighting, which
looks wrong.
This was invisible when their lighting was fullbright, but it sucks now.


### Misc Stuff

#### [Cleans up stat tracking a bit to avoid
collisions](40fb8f21e2)

#### [Cleans up a turf helper to not be
stupid](bf4ee67100)

WHY ARE YOU USING THE RANGED TURF HELPER IF YOU GO ONE TILE

#### [Moves transit turf signal cleanup to destroy, I named this proc
wrong](c85c2cfc86)

I'm sorry @Time-Green 

#### [Adds better transit caching to
shuttles](35e85334c4)

Adds a max reserved transit size to the shuttle subsystem, to keep
things in bounds.
In addition, adds a soft cap under which existing transit space will get
hold onto, to make repeated non escape/arrive shuttle movements faster

Hopefully this makes common shuttle moves less bad.
## Why It's Good For The Game

Speed
2023-02-06 23:04:50 -05:00
AnturK
84f69359a0 More horrible 515 proc compatibility. (#71333)
So i left over some basic `/whatever/proc/format` uses in the original
PR this fixes it.

Notable exceptions to the rule:
- Paths in add_verb/remove_verb, we need full path instead of a name
there to access verb metadata so we can't use proc ref macros there.
- regex.Replace, found out that it does not accept call by name. Instead
i added new REGEX_REPLACE_HANDLER so we can at least try to mark these.

There's still leftover global procs that do not use GLOBAL_PROC_REF but
they functionally equivalent so that's for later.

I don't see any reasonable way to grep for this. But if you got any
ideas please share.
2022-11-22 07:55:43 +00:00
GoblinBackwards
2c544a1959 Fixes compile error in lighting code when testing mode is enabled (#70550)
* Fixes compile error in lighting code when compiling with testing mode enabled, because it was using a var that wasn't yet defined.
2022-10-16 21:46:38 -04:00
LemonInTheDark
e5a2b0f16e Micros the lighting subsystem (Saves a second of init) (#69838)
About The Pull Request

Micros lighting objects, and their creation

We save a good bit of time by not walking space turfs adjacent to new objects.
We also save some time with micros in the actual underlay update logic.

I swear dude we spend like 0.8 seconds of init applying the underlay. I want threaded maptick already

Micros lighting sources, and corner creation

A: Corners were being passed just A turf, and then expected to generatecorners based on that. This is pointless.
It is better to instead pass in the coords of the bottom left turf, and then build in a circle. This saves like 0.3 seconds

B: We use so many damn datum vars in corner application that we just do not need to.
This resolves that, since it pissed me off. It's pointless. Lets cache em instead

There's some misc datum var caching going on here too. Lemme see...
Oh and a bit of shortcutting for a for loop, since it was a tad expensive on its own.

Also I removed the turfs list, because it does fucking nothing. Why is this still here.

All my little optimizations save about 1 second of init I think
Not great, but not bad, and plus actual lighting work is faster now too
Why It's Good For The Game

Speed
2022-09-27 09:56:35 +13:00
LemonInTheDark
a6d4e180ad Adds a visualizer for lighting object updating. Optimizes the same (#67678)
It occured to me, we didn't have a good way to "see" what turfs were actually being updated
Figured I'd fix that

I've also added some debug vars on SSlighting to make testing with/without some checks easier

Speaking of which, I've added a second check to lighting corner updating
Basically, if our past and current cached rgb values are the same, there's no point updating

This is possible because static lighting is relative. If you've got a
TON of blue, it'll outweight the red and green you have in smaller amounts

We also do some rounding to ensure values look right

Similarly, if you've got roughly the same lighting, and a bit of something you already have a lot of is added, you're not likely to actually enter a new "bracket" of color

Anyway uh, it's hard to profile this, but I've seen it help quite a bit, mostly with things like emergency lighting that updates lighting in small amounts often, and in constricted spaces.

To some extent just comes down to map design
2022-06-18 19:50:18 -05:00
AffectedArc07
0d9a49503a Fixes bugged lighting overlays on dark tiles (#63171) 2021-12-02 13:48:17 -08:00
Kylerace
d3a1bea859 Turns lighting objects into a datum, makes all lighting be performed with an underlay. big maptick fix very good! (#58991)
credit to zewaka for the idea of using underlays

turns the lighting object movables that were unnecessary and increased maptick into a datum which then applies and removes an underlay in update(). also applies a lot of general lighting clean ups (mostly using as anything in loops and fixing single letter var names).

multiz is a little different by necessity, now only the bottom turf's lighting matters in the brightness of the top turf unlike master where the bottom turf's lighting object is hidden from the vis_contents of the top turf. there are still some kinks to iron out here though, since currently objects suspended in openspace (like tram platforms) look bad and glass floors look bad too

only thing i have left to do is make multiz work (well)

UPDATE: multiz now appears the same as far as i can tell, its possible there are other situations in which its different but datum mats work and it automatically updates if the turf below changes. now i just need to make the system less finnicky if at all possible (and possibly merge managed_turf_vis_content with managed_overlays maybe?)

new update: its basically equivalent to normal multiz as far as i can tell (visually at least, in the circumstances ive tested so far)

NEW NEW UPDATE: turfs no longer have the VIS_HIDE vis_flag and multiz works without stacking the lighting from the floor below! so this shouldnt have any overt drawbacks to master anymore

1 needless movable per tile is terrible for maptick. this is probably a larger improvement than my emissive blocker change in terms of maptick. im guessing we'd get around 0.6 average maptick per player after this where currently we get 0.85 or so

Edit: according to lemon, sybil reached 0.71 maptick per person when tm'd with this

if this is a big enough improvement i might finally be able to get rid of the Gone discord avatar
2021-06-12 21:37:29 -07:00
Kyle Spier-Swenson
e0c3019dc3 [READY] Lighting list cleanup. (#59002)
Removed a bunch of back reference lists that were either entirely unused, or contained references that could be found within the datums contained in other lists.

lighting corner datums now get deleted with unused.

light sources no longer track lighting corners where the appiled light rounds to 0.

Fix lighting on turfs that gained dynamic lighting mid round. lazy init corner datums.

these two are related. by decoupling corner datums from the turfs dynamic lighting state, we can use them to know what level of light a non-dynamic light turf should have once it gains dynamic light.

Also should free up some memory not storing these datums in maint. Corner datums only exist on a turf that has light cast upon it by the dynamic lighting system.

Lighting corners are now lazy inited and deleted. they should always (and only exist) if there is a light source shining on it within range (even if the turf has no dynamic lighting). This is needed to support turfs that become lighting enabled mid round. On the plus side, they will no longer be generated on full dark turfs.
2021-06-10 14:42:11 -07:00
Rob Bailey
292b217911 Layer overhaul (#57915)
## About The Pull Request
Changes up some layer and plane defines for no particular reason lol

## Why It's Good For The Game
Planes actually override layers, and layers control ordering within planes. A lot of the usage of plane and layer was wholly unnecessary. This refactor helps future maintainability while also being needed staging for _future features._
2021-03-29 09:51:44 -04:00
TemporalOroboros
fb488fdfff Some explosions code cleanup (#57493)
Clears out two deprecated explosions systems (explosion ids and explosion levels)
Refactors a bunch of contents_explosions procs to be maybe slightly faster.
Cleans up a bunch of ex_act code.
Slightly cleaner code
A few less unused vars on /atom and /turf
2021-03-20 16:03:59 -07:00
coiax
71314216f6 Tweaked insulated spray-on gloves (#56232)
Some tweaking and code smoothing of the spray-on gloves. The only
mechanical change is in also letting them be washed off (although it
takes a while under a shower or using a sink).

A visible message also provides better feedback.

* Make /wash a SHOULD_CALL_PARENT proc

A number of things depend on that signal being called.

* Makes suggested changes

- Adds SIGNAL_HANDLER to signal handler
- Changes name of turf variable for readability
- Reenables lighting object override of parent
2021-01-19 08:46:34 +02:00
Qustinnus
d4483aa1d0 You can look into the gateway now (#55624)
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-01-05 15:44:45 -08:00
TiviPlus
ca366c3ea1 Bools and returns super-pr (#53221)
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>
2020-08-28 14:26:37 -07: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
Daniel Hultgren
0741b1977f 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 09:31:38 -03: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
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
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
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
Kyle Spier-Swenson
f860464b62 Fixes lighting hard deleting (#30684) 2017-09-14 12:20:28 +02:00
Jordan Brown
9b73bc75d5 Removes GLOB.all_lighting_objects 2017-09-12 16:53:31 -05:00
Jordan Brown
dce49b6caf Adds defines for mouse_opacity 2017-08-14 11:18:22 -04: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
MrStonedOne
dd53bb5be3 Does the remie 2017-05-06 02:07:38 -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
Cyberboss
7b9282cb07 Revert "Shuttle movement immediately updates lighting objects" 2017-04-13 18:56:08 -04:00
Cyberboss
7d927e6bfa Shuttle movement immediately updates lighting objects 2017-04-07 15:44:48 -04: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
Incoming
db64b6221d makes full dark tiles a proper icon like full light tiles. All color operations, even non matrix ones, are slower: definitely so for the server and seemingly also for the client. 2017-04-01 20:32:56 -04:00
Incoming
eef57ac6b0 Speeds up client side rendering of lighting by selectively swapping out full dark and full light tiles with easier to render options.
Visually no difference should be noticeable
2017-04-01 19:09:15 -04:00
MrPerson
db34a1f2be Merge branch 'master' of https://github.com/tgstation/-tg-station into revert_revert_revert_come_on_revert_please_rever_please_shit_REVERT_JESUS_TAPDANCING_CHRIST_REVERT_YOU_FUCKING_PIECE_OF_GODDAMN_PISS
Conflicts:
	code/_onclick/hud/plane_master.dm
	code/modules/lighting/lighting_object.dm
2017-03-15 18:53:09 -07: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