* Make lighting object management robust.
Fixes a bug that caused lighting objects to not properly manage themselves on turf change, and adds nosiness and runtimes for when such a case happens again.
* does the remie
This was causing turfs changed at world init from a no lighting system turf to a turf that used the lighting system to have two lighting overlays, one randomly stuck at black depending on timing.
Basically, they key difference between StonedMC and CarnMC is that when multiple ticks want to run at the same byond tick, we divvy up the tick between the subsystems, rather then allow one subsystem to hog it all.
The key difference between StonedMC and GoonPS is that we allow the subsystems to tell us how to divvy up the tick using flags and priority.
The new SS_ flags allows us to select behaviors that used to be piggybacked as side effects of dynamic wait or default but sometimes unneeded behavior.
Dynamic wait is 100% gone, lower priority and SS_BACKGROUND are better more refined ways of doing this when combined with MC_TICK_CHECK
I have by design never looked at the inners of goonPS, so this is all original code but I know it uses two loops because of comments by goon devs on reddit threads, that design didn't make sense before, but when I can tell a SS how much of a byond tick it is allowed to have, knowing how many need to run this tick is helpful I also know a bit more about how it works from piecing together comments in #vgstation.
Detailed list of changes:
Subsystems now have flags, allowing fine grain control over things like rather or not it processes, inits, rather it's wait is how long between runs (post run timing) or how long between starts, and rather or not late fires should cause the next fire to be earlier.
Mc now has two loops One loop handles queuing shit, one loop handles running shit.
MC now splits up tick allotment rather than first come first serve Subsystems can even request a bigger share using higher priorities. (It will even resume subsystems it paused if other subsystems hadn't used as much as it predicted they might need)
Default fps is now 20 This is related enough to the MC and it's a change that's really long since over due
All code oddities are most likely to be necessities to lower overhead on the mc since it runs every tick
* Starting out on our tgui journey
* God tgui, why do you need to be updated
You're dynamically generated anyway
* Commit of stuff
* Further progress is being made
* Everyone loves buildscripts
* Further modifications to my incredible running script
* Starting to modify the minimap code to be better
* It's going well thusfar, I guess
* What have I done
* RIP minimap
* FUN FUN FUN FUN FUN
* Adds shuttle_manipulator.dmi
MUH HOLOGRAMS
* Is it done? IS IT OVER
* Peer review
* Some bug fixes
* Makes that damn greentext shut up
* Shuttle registration
* Made the Emergency Escape Bar more robust
No climbing on the bar.
* Do not stare into the operation end of the device
* Compile shame
* THE MOST DUMB
* Passive barmaiden
* Emergency shuttle memes
* MORE SAFETY CODE
* Fancy shuttle manipulator icons
* Smoothing it out
* We are going to have a lot of fun with this one
* Independent blobbernauts
* WABBAJACK WABBAJACK
* Message for attempting to authenticate old style
* Angry alert noise is back
* Revert "Independent blobbernauts"
This reverts commit 34d6af7c9c88cfc2864990cb37b586bb90163dd3.
* No parrot sleep plz
* Moves the special shuttle stuff to special.dm
* No Bartender like a Centcom Bartender
* Non-controversial map changes
- Backup shuttle moved closer to Centcom main structure, docking tube
created
- Moved shuttle import landmark to above Centcom main building
- Added shuttle displays to Conference Room
- Squashed the Chapel a bit in Metastation
- Made the docking port on Z2 massive
- Made the docking port on Metastation a lot larger
* Hacks and slashes at Box
A bunch of things are extended and squashed so Box shuttle dock can
support the MetaStation emergency shuttle.
* Some Metastationshit
* Never ending changes
* Wabbajack to TGM
* Modified the bar, I think that's all of them
* Stops Barmaiden wandering around
* More code review
* Whitspace, the bane of us all
* DIE WHITESPACE DIE
Moves everything on a 15+ layer to a plane. So now you get screen catcher (-99, was already on a plane), lighting (15), effects that ignore lighting (16), fullscreen UI effects (18), screen objects used to build the UI (19), actual equipment in the UI slots (20), and everything else (0).
Also created a file to contain plane and layer defines for hopeful eventual use.
Hopefully this doesn't change anything now but does enable some nifty new features in the future.
No longer uses animate() when unneeded, because animate() is slow.
Also turns Clamp() into a macro to reduce proccall overhead.
The whitespace changes in atmos are needed because of the way the
preprocessor handles macros.
Thank you MrPerson for helping with this.
This bug isn't reproducable so no, I'm not sure this will fix it. It's still a good idea to do this though.
Best guess as to what happened: A light was deleted pre-round for some reason. The garbage ss del()'d the light before the lighting system's first tick, so a null got into the lighting ss's lights list. This broke the whole system directly from roundstart and caused the thousands of "can't run null.check()" runtime errors from yesterday.
Turfs now have a baseturf var which determines what is "under" every
turf. The default is space.
Actions that previously did changeturf(/turf/space) (like bombs or RCD
deconstruction) now do changeturf(baseturf). Functionally the same for
the station, but allows special turf types that don't break to space
(such as planet tiles).
Right now the asteroid tiles are the only thing with a baseturf other
than space (the baseturf is an asteroid tile).
Baseturf is tracked when new things are built, so building a floor and
then a wall on the asteroid tile, and then bombing that wall will return
it to an asteroid tile, not space.
Allows building on asteroid tiles now that doing so wont randomly make
holes to space. Time for giant mining forts.
I should have done this years ago for away missions.
Also added myself to admins.txt
MC:
No longer tracks a subsystem's cpu usage. This was basically worthless and took up space on the stat panel
Can calculate wait down to a tenth of a decisecond to make it fps/world.ticklag agnostic
Now allows subsystems to have a dynamic wait, that is based on a ratio of how long that subsystem has been taking to process(cost). (This system allows for upper and lower bounds, and an changeable cost delta for each subsystem)
MC can now be told to init a zlevel
All Subsystems:
Stats panel now allows child subsystems to pass it a message to add to its stats entry. All subsystems have been moved over to this system - This should cut down on subsystems having to copy and paste the stats proc in order to add to it
All subsystems now properlly handle being given a zlevel in their init proc
Subsystem changes:
Air:
Added air to the dynamic wait subsystem. upper bound: 50, lower bound: 5, cost delta: 3 times process cost
Air now fires 4 times faster when it can do so without lagging things up
Pipenet has been merged into air
Atmos machinery now processes with process_atmos(), ticked by air, not machinery.
Hotspots (the fire object) are now object pooled
Pipenet:
Deleted, added to air
Machinery:
Moved all atmos calcualtions in all objects's process() to process_atmos().
Lighting:
Added Lighting to the dynamic wait subsystem. upper bound: 20, lower bound: 5, cost delta: 3 times process cost
Ticker:
Fixed ticker not updating the lobby panel when game start delayed
Fixed the game start timer updating rapidly from queued fires when game start delay is removed
Garbage/qdel:
qdel will now limit its process time to 2ds a fire.
qdel can now be given hints as a return to Destroy() as to what should be done with the object.
the options are:
queue: (default) this is the normal behavior.
letmelive: old default to non-null/zero. does nothing with the object
iwillgc: functionally the same as above, mainly to let people working with objects know that the object will not be queued for GC checking
harddel: this will queue the object to be deleted without storing a soft reference, mainly to save locate() processing time.
harddel_now: this will del() the object. To allow for a clean removal of every del() not in qdel
All objects have been updated to the new system, harddel and iwillgc was not added to any new objects.
Fixed some objects not GCing because they didn't properlly clear references in Destory()
Fixed some objects getting qdel'ed preventing other objects from getting GCed because they did not null their reference to that object.
Lighting SS no longer cares about the return of check(); the light datums are responsible for deleting themselves.
Cap on lighting effects from turfs is now 8 because they're static and shouldn't be flashing lights too often. This means starlight actually works now instead of being capped at 1 measly turf.
Lighting related ChangeTurf() code is in the lighting module. Changed it up to be faster on lighting controller init and not leave dangling lights when a turf becomes or stops being opaque or when it turns into space. This diff log is gonna be useless sadly but take my word for it, it all works.
Lighting related Moved() code is also in the lighting module. Opaque objects will now update nearby lights when they move (mechs).
Opaque objects other than the light datum's owner on the same tile as its owner will block the effect of the light. In other words a mech standing on the same square as a light bulb will block all the light of that bulb.
Changed "cheap_hypoteneuse()" with an even cheaper version; actually calculating the hypoteneuse! I can prove it's cheaper if needed.
Removed move_contents_to() because it's unused and trying to use it would cause major bugs with lights and other shit and I have no interest in supporting that, so let's not even tempt people.