Commit Graph

147 Commits

Author SHA1 Message Date
SkyratBot
710319fced [MIRROR] Update some TGS stuff [MDB IGNORE] (#19485)
* Update some TGS stuff

* You're welcome Cyber

---------

Co-authored-by: Jordan Dominion <Cyberboss@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2023-02-26 19:06:30 -05:00
SkyratBot
3bf3f4e02d [MIRROR] Sends a toast notification when initializations complete. [MDB IGNORE] (#18623)
* Sends a toast notification when initializations complete. (#72465)

## About The Pull Request

Initialization is significantly slowed down by the presence of clients,
though when testing features, you need to join the server. I've been
told that some devs (particularly Mothblocks) are alt-tabbed out of
Dream Daemon while doing dev work, meaning that they are liable to miss
initializations completing, causing an effective slowdown in the dev
cycle. Mothblocks said it would be nice if there was a way to produce a
desktop notification when initialization completes.

I originally intended to add a function to rust_g that would produce a
Windows toast notification with a button allowing you to immediately
launch Dream Seeker. However, I couldn't find a reliable way to detect
if the OS version was Windows 7 or earlier, so running this function on
such an OS would cause a rust panic (which I was told is only a problem
because MSO probably still uses Windows 7).

Fortunately, PowerShell scripts can access the necessary .NET APIs to
produce toast notifications on Windows 10, while also failing more
gracefully than crashing the host process. So I recreated the
functionality I intended in PowerShell.

Toast notifications will only be sent on Windows, if the
TOAST_NOTIFICATION_ON_INIT config flag is enabled, AND there are no
clients on the server.

**Note for downstreams:** If you want the toast notification to have
your downstream's icon, copy it, scale the copy down to 16x16, and
either rename it "tg_16.png" or change that path in the call to
`world.shelleo` to the name of the new file.

Video Demo:

https://user-images.githubusercontent.com/12720844/210492033-963923d7-a1de-4326-9c9f-4f0c0b71d1a5.mp4

## Why It's Good For The Game

This isn't really a line item in the Dev Cycles Initiative, but even if
Mothblocks was exaggerating the benefits, it would still be a
significant speedup in the dev cycles.

## Changelog

No player-facing changes.

* Sends a toast notification when initializations complete.

Co-authored-by: Y0SH1M4S73R <legoboyo@earthlink.net>
2023-01-10 07:38:08 -08:00
SkyratBot
6214258204 [MIRROR] The mc now keeps track of how many times a subsystem has slept in fire() [MDB IGNORE] (#18430)
* The mc now keeps track of how many times a subsystem has slept in fire() (#72324)

## About The Pull Request

The mc now keeps track of how many times a subsystem has slept in fire()

## Why It's Good For The Game

The mc now keeps track of how many times a subsystem has slept in fire()

## Changelog

The mc now keeps track of how many times a subsystem has slept in fire()

Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>

* The mc now keeps track of how many times a subsystem has slept in fire()

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>
2022-12-31 08:18:39 -08:00
SkyratBot
a8288db2d2 [MIRROR] Saves on average 10 seconds from roundstart times [MDB IGNORE] (#18172)
* Saves on average 10 seconds from roundstart times (#71730)

## About The Pull Request

When runlevels change mid work, subsystems running behind have their
next_fire updated.
It's offset by a sum of random numbers, so things don't bunch up,
especially KEEPTIME SSs

The trouble is we have so many subsystems that get added at roundstart
that this offset gets LARGE, like 10 seconds on average.

So instead of randomly offsetting, why not "fill" a set of time slots?
Only 1 keeptime subsystem a tick, and 4 others. Then we just fill up
those buckets and get to it (also don't offset things that are already
processing)

I've talked to mso a bit about this. What he reccomended was sampling a
random time withing a 2 second window.
I'm not totally sure why, kinda waiting for him to tell me off, if he
does I'll fix things up.

This pattern takes the max possible delay from 16 (76 * 5 / 20)) seconds
to 0.7 (56 / 4 / 20)
It obviously scales with subsystem count, but I like this scaling a bit
better

I've applied the same pattern to the offsetting we do at the start of
Loop(), for ticker subsystems. I am less confident in this, it does take
last fire times from at worst 3.75 seconds (15 * 5 / 20) to a static
0.75 (15 / 20)
As stated I'm less sure of this, hoping to get mso'd so I can clean
things up

## Why It's Good For The Game

Makes roundstart snappier

## Changelog
🆑
code: Roundstart "starting" should be much snappier now
/🆑

Co-authored-by: Kyle Spier-Swenson <kyleshome@ gmail.com>

* Saves on average 10 seconds from roundstart times

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@ gmail.com>
2022-12-23 12:10:49 -05:00
Zonespace
f7c26bbf25 515 Compat (#17465)
* ONLY SKYRAT CHANGES

* ACTUALLY SKYRAT CHANGES

* yolo, revert later

* Update alternate_byond_versions.txt

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
2022-11-15 06:59:06 +00:00
SkyratBot
612568daa0 [MIRROR] Swaps sleep() to use SECONDS define [MDB IGNORE] (#16973)
* Swaps sleep() to use SECONDS define

* merge conflicts and skyrat modules

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-10-19 19:43:24 -04:00
SkyratBot
f1ae5109bf [MIRROR] Removes bestF from Master Controller Crash Report Filtering (and uses voodoo magic to help cleaning up down the line) [MDB IGNORE] (#16986)
* Removes bestF from Master Controller Crash Report Filtering (and uses voodoo magic to help cleaning up down the line) (#70610)

* Removes bestF from Master Controller Crash Filtering

We removed bestF from datums back in #2701, but this still remained in the filter. Bit silly, let's get rid of this old cobweb.

I couldn't find anything suggesting that the master_controller could get a statclick variable, but that's actually a term we use in the modern day so I'm not going to bug it since it's benign. The other five are still BYOND-level variables.

Co-authored-by: Kyle Spier-Swenson <kyleshome@ gmail.com>

* Removes bestF from Master Controller Crash Report Filtering (and uses voodoo magic to help cleaning up down the line)

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@ gmail.com>
2022-10-19 16:33:12 -04:00
SkyratBot
a00cad0164 [MIRROR] Clean up subsystem Initialize(), require an explicit result returned, give a formal way to fail (for SSlua) [MDB IGNORE] (#16248)
* Clean up subsystem Initialize(), require an explicit result returned, give a formal way to fail (for SSlua)

* [PR for MIRROR PR] Changes for 16248 (#16277)

* Merge skyrat changes, update SR SS's, and remove lobby_eye

* Apply suggestions from code review

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/modules/autotransfer/code/autotransfer.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* restore lobby_cam for now

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

Co-authored-by: Tastyfish <crazychris32@gmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-09-24 17:32:40 -04:00
SkyratBot
cd3767e043 [MIRROR] Alphabetized, fixed spelling error, clarifying event descriptions. Polish [MDB IGNORE] (#16168)
* Alphabetized, fixed spelling error, clarifying event descriptions. Polish

* l

Co-authored-by: Marina <50789504+KirbyDaMaster@users.noreply.github.com>
Co-authored-by: John Doe <gamingskeleton3@gmail.com>
2022-09-11 22:20:45 -07:00
SkyratBot
b0c2a0d4c8 [MIRROR] Log subsystem initialize times in feedback, give more precise displays [MDB IGNORE] (#15932)
* Log subsystem initialize times in feedback, give more precise displays

* conflict

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-09-04 14:28:44 +01:00
SkyratBot
a8c10d1659 [MIRROR] Converts a shitload of istypes to their more concise macros [MDB IGNORE] (#15702)
Converts a shitload of istypes to their more concise macros

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-08-27 16:23:44 -04:00
SkyratBot
d8da1153b7 [MIRROR] Biddle Verbs: Queues the Most Expensive Verbs for the Next Tick if the Server Is Overloaded [MDB IGNORE] (#15329)
* Biddle Verbs: Queues the Most Expensive Verbs for the Next Tick if the Server Is Overloaded (#65589)

This pr goes through: /client/Click(), /client/Topic(), /mob/living/verb/resist(), /mob/verb/quick_equip(), /mob/verb/examinate(), and /mob/verb/mode() and makes them queue their functionality to a subsystem to execute in the next tick if the server is overloaded. To do this a new subsystem is made to handle most verbs called SSverb_manager, if the server is overloaded the verb queues itself in the subsystem and returns, then near the start of the next tick that verb is resumed with the provided callback. The verbs are called directly after SSinput, and the subsystem does not yield until its queue is completely finished.

The exception are clicks from player input since they are extremely important for the feeling of responsiveness. I considered not queuing them but theyre too expensive not to, suffering from a death of a thousand cuts performance wise from many many things in the process adding up. Instead clicks are executed at the very start of the next tick, as the first action that SSinput completes, before player movement is processed even.

A few months ago, before I died I was trying to figure out why games at midpop (40-50 people) had non zero and consistent time dilation without maptick being consistently above 28% (which is when the MC stops yielding for maptick if its overloaded). I found it out, started working on this pr, then promptly died. luckily im a bit less dead now

the current MC has a problem: the cost of verbs is completely and totally invisible to it, it cannot account for them. Why is this bad? because verbs are the last thing to execute in the tick, after the MC and SendMaps have finished executing.
tick diagram2
If the MC is overloaded and uses 100% of the time it allots itself this means that if SendMaps uses the amount its expected to take, verbs have at most 2% of the tick to execute in before they are overtiming and thus delaying the start of the next tick. This is bad, and im 99% sure this is the majority of our overtime.

Take Click() for example. Click isnt listed as a verb but since its called as a result of client commands its executed at the end of the tick like other verbs. in this random 80 pop sybil round profile i had saved on my computer sybil 80 pop (2).txt /client/Click() has an overtime of only 1.8 seconds, which isnt that bad. however it has a self cpu of 2.5 seconds meaning 1.8/2.5 = 72% of its time is overtiming, and it also is calling 80.2 seconds worth of total cpu, which means that more than 57.7 seconds of overtime is attributed to just /client/Click() executing at the very end of a tick. the reason why this isnt obvious is just because the verbs themselves typically dont have high enough self cpu to get high enough on the rankings of overtiming procs to be noticed, all of their overtime is distributed among a ton of procs they call in the chain.

Since i cant guarantee the MC resumes at the very start of the next tick due to other sleeping procs almost always resuming first: I time the duration between clicks being queued up for the next tick and when theyre actually executed. if it exceeds 20 milliseconds of added latency (less than one tenth the average human reaction time) clicks will execute immediately instead of queuing, this should make instances where a player can notice the added latency a vanishingly small minority of cases. still, this should be tm'd

* Biddle Verbs: Queues the Most Expensive Verbs for the Next Tick if the Server Is Overloaded

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2022-07-31 22:03:59 +00:00
SkyratBot
ddb16992d9 [MIRROR] Fix a subsystem priority sort [MDB IGNORE] (#14983)
* Fix a subsystem priority sort (#68490)

* Fix a subsystem priority sort

Co-authored-by: wixoa <wixoag@gmail.com>
2022-07-17 23:47:20 +01:00
Gandalf
7c2a649bf7 Familiar lobbyscreen (#13835)
* wew

* e

* e

* ye

* yes

* e

* wew

* batch review, lobby > title

* yeh

* Update code/_onclick/hud/screen_objects.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update code/_onclick/hud/new_player.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update code/_onclick/hud/new_player.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* wew

* wew

* fixes changing title screen

* yes

* tes

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-05-26 23:29:38 +01:00
SkyratBot
b87c7279b0 [MIRROR] Adds MC initialization stages. Earlier stages can fire while later ones init. Fixes tgui chat reconnection banner showing during init. [MDB IGNORE] (#13089)
* Adds MC initialization stages. Earlier stages can fire while later ones init. Fixes tgui chat reconnection banner showing during init. (#66473)

* Adds MC initialization stages. Earlier stages can fire while later ones init.
Removes TICK_LIMIT_MC_INIT config for barely doing anything to speed up init and being inconvenient to work with if fires and inits can happen at the same time.

* Adds MC initialization stages. Earlier stages can fire while later ones init. Fixes tgui chat reconnection banner showing during init.

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2022-04-25 14:25:23 +01:00
SkyratBot
a2d7403cd0 [MIRROR] Adds load testing macros [MDB IGNORE] (#12868)
* Adds load testing macros (#66178)

Adds a macro that consumes cpu up to some tick limit
Adds a define that uses said macro to leave verb processing just its
reserve of the tick
Adds a second subdefine that forces verb processing into total overtime
Mimicing the worst case scenario around maptick spikes

* Adds load testing macros

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-04-18 16:31:34 -07:00
SkyratBot
96d7bc425e [MIRROR] The mc now detects if its priority budget gets out of sync with reality and soft resets. [MDB IGNORE] (#11659)
* The mc now detects if its priority budget gets out of sync with reality and soft resets. (#64498)

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>

* The mc now detects if its priority budget gets out of sync with reality and soft resets.

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>
2022-02-22 12:56:51 +00:00
SkyratBot
e6c933c656 [MIRROR] Makes SSTimer actually recover [MDB IGNORE] (#11448)
* Makes SSTimer actually recover (#64784)

Makes SSTimer actually recover properly when it needs to. This is a follow-up for #60846 (3da51f515d) with code I added in my port of that PR to bee.

There were 3 main problems, and each was uncovered after fixing the previous:

    /datum/controller/master/New() was using faulty logic to find existing subsystems. It was adding Sound Loops twice and not adding Timer at all (Sound Loops being a subtype of Timer).
    /datum/timedevent stores a ref to the timer subsystem in var/datum/controller/subsystem/timer/timer_subsystem for performance. It wasn't being updated to the new Timer subsystem, ultimately resulting in it runtiming as an invalid timer.
    The buckets need to be reset during recovery. The TTR and other bucket-related handling is out of whack because SSTimer wasn't firing for however long recovery took. Luckily reset_buckets() can already handle all of this.

* Makes SSTimer actually recover

Co-authored-by: ike709 <ike709@users.noreply.github.com>
2022-02-11 10:31:09 +00:00
SkyratBot
854c7ef90c [MIRROR] creates SSspeech_controller so the MC can control say() execution [MDB IGNORE] (#10256)
* creates SSspeech_controller so the MC can control say() execution

* Update mob_say.dm

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-12-25 13:44:46 +00:00
SkyratBot
fa519bdde3 [MIRROR] cleanup _HELPERS/_lists.dm and all the necessary files [MDB IGNORE] (#8783)
* cleanup _HELPERS/_lists.dm and all the necessary files

* Epbic

Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-10-13 21:07:35 +01:00
SkyratBot
124ddd7cca [MIRROR] tgui Preferences Menu + total rewrite of the preferences backend (#8153)
* tgui Preferences Menu + total rewrite of the preferences backend

* nah, we dont need to ping those people

* trying to remove the funny stuff

* unmodularizing this

* prefs reset

* this may need to be reverted, who knows

* okay, this part

* perhaps

* EEEEEEEEE

* unsanitary

* E

* Stage 1 + loadout system

* more fixes

* E

* I mean, it launches?

* More fixes and reorganisation

* E

* customisation code is spaget.

* disable ERP prefs

* Update erp_preferences.dm

* Update erp_preferences.dm

* E

* Slowly getting there

* It may be time for help :)

* tri...colors... help

* preferences now pass preferences

* Update dna.dm

* Fuck this man

* missing savefile return, set_species works, removed dumb stuff from updateappearance

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/8199

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/8224

* https://github.com/tgstation/tgstation/pull/61519

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/8278

* e

* le butonAZARAK HELLO

* hhh

* Proper recognition where it's due, MrMelbert!

* EEEE

* examine block

* Better gen hit sounds from whitedream

* final loadout touches, more bug fixes im sure to come

* i said there would be bugfixes

* Update LoadoutManager.js

* Missing preferences in the html menu

* LIVE TESTING PHASE BABY

* Update LoadoutManager.js

* EEE

* LAUNCH TEST FIRE

* Update job.dm

* Update new_player.dm

* 50gb DAY ONE PATCH

* EEE

* Update preferences.dm

* buggle fixes

* Update examine.dm

* >LOOC starts on

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2021-09-23 00:40:37 +01:00
GoldenAlpharex
31b3a9331e [MIRROR] Replaced the lobby menu (with actual art) (#60953) (#7748)
* Replaced the lobby menu (with actual art) (#60953)

* a

* a

* Update new_player.dm

* Update new_player.dm

* Update new_player.dm

* a

* a

* Update new_player.dm

Co-authored-by: AMonkeyThatCodes <20987591+AMonkeyThatCodes@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-09-01 17:07:48 +01:00
SkyratBot
5170b9ecda The Failsafe can now recover from an deleted MC (#60846) (#7664)
* The Failsafe can now recover from an deleted MC
Its also more reliable and can handle a situation where its main Loop runtimes and the MC is stuck

* Reset defcon level correctly
Oops left that in from debugging the levels

* Correctly recover SSasset

* Only decrease defcon if MC creation failed
Also add some sort sleep between emergency loops

* Makes the last two emergency actions manual procs
Since they are kinda unstantable its probalby best
if only admins call these manually

Its also more reliable and can handle a situation where its main Loop runtimes and the MC is stuck
You can also now debug Master/New()

While there will most likely never be any situation where the MC is just gone its still good to know that the game can recover from such a situation
For example maybe someone messed up a SDQL query or maybe someone wanted to delete the MC to create a new one hoping the Failsafe would do so for him

Co-authored-by: Gamer025 <33846895+Gamer025@users.noreply.github.com>
2021-08-20 18:53:14 +01:00
SkyratBot
2d4ee5459b [MIRROR] Changes a line of the master controller to make it easier to read (#6699)
* Changes a line of the master controller to make it easier to read (#59974)

* Changes a line of the master controller to make it easier to read

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-07-04 16:30:35 +01:00
SkyratBot
8c6ea00947 [MIRROR] Properly fix postpones in the mc. (#6524)
* Properly fix postpones in the mc. (#59813)

I broke shuttles and other things by trusting queued_time.

This fixes it better, by tracking the ticks it's suppose to miss.

closes: #59805 (this doesn't actually work anymore it seems)

* Properly fix postpones in the mc.

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2021-06-25 22:14:55 +01:00
SkyratBot
3d87b766b3 [MIRROR] Makes master support ss.postpone()ing the next fire of running subsystems (#6491)
* Makes master support ss.postpone()ing the next fire of running subsystems (#59792)

Sadly it can't apply this to the next fire resume of paused subsystems, but at least its not resetting that postpone.

* Makes master support ss.postpone()ing the next fire of running subsystems

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2021-06-24 23:01:57 +01:00
SkyratBot
7d1d0e1fad [MIRROR] Refactors most spans into span procs (#6315)
* Refactors most spans into span procs

* AA

* a

* AAAAAAAAAAAAAAAAAAAAAA

* Update species.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-16 00:24:49 +01:00
Gandalf
0b957f39a9 Lobby UI overhaul (#4738)
* aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

* aaaaa

* Update _basemap.dm

* Update new_player.dm

* Update CaveGenerator.dm

* aaaaaaaaaaaaaaaaaaaaa

* a

* aaa

* aaaa

* aaaa

* Update login.dm

* aaaaaaaaaa

* aaaaaa

* Update lobby.dm
2021-04-09 21:18:40 +01:00
SkyratBot
17e74d67d1 [MIRROR] Remove SS_NO_TICK_CHECK (#4483)
* Remove SS_NO_TICK_CHECK (#57800)

## About The Pull Request
This is a whopper, will need @ MrStonedOne to review.
In theory this flag shouldn't be needed and my own testing didn't find any issues, but I'd feel better with a lengthy test merge.

## Why It's Good For The Game
Might make nightshift subsystem lag less, MC loop has less stuff to check.

* Remove SS_NO_TICK_CHECK

Co-authored-by: spookydonut <github@spooksoftware.com>
2021-03-28 17:25:24 +01:00
SkyratBot
b332b46b65 [MIRROR] Remove hideous inline tab indentation, and bans it in contributing guidelines (#3394)
* Remove hideous inline tab indentation, and bans it in contributing guidelines

* a

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-15 15:32:02 +00:00
SkyratBot
cc67a133e5 [MIRROR] [READY] Adds station traits: Small modifiers that can randomly be chosen each round (#3132)
* [READY] Adds station traits: Small modifiers that can randomly be chosen each round

* conflicts

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-08 23:07:24 +00:00
SkyratBot
2211ed042a [MIRROR] Stack overflow detection for the Master Controller. (#2730)
* Stack overflow detection for the Master Controller. (#56008)

* Stack overflow detection for the Master Controller.

Using a weakref, we can detect if the mc's stack was ended by byond due to a stack overflow, and restart it without waiting the entire defcon countdown in the failsafe controller.

I built a system around this concept under /datum/stack_end_detector and deployed it to the MC's main loop with checks in the failsafe controller.

* Stack overflow detection for the Master Controller.

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2021-01-17 13:06:37 +01:00
SkyratBot
b670babe47 [MIRROR] Revert "Finishes the allocation refactor" (#2676)
* Revert "Finishes the allocation refactor (#55965)" (#56137)

This reverts commit 87234f3fd8.

* Revert "Finishes the allocation refactor"

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-01-13 04:28:00 +01:00
SkyratBot
cc74eb9d55 [MIRROR] Finishes the allocation refactor (#2646)
* Finishes the allocation refactor (#55965)

#53841 continuation
I recall that the reason for infinite stuns and such was that the priority wasn't being cleared properly when something hitched and I fixed it and I don't remember where exactly but it works now (TM)
A variation of this is TMed on TGMC and it works fine

* Finishes the allocation refactor

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
2021-01-12 01:52:46 +01:00
SkyratBot
c487c73f39 [MIRROR] Grep for space indentation (#1969)
* Grep for space indentation

* aa

* Update species.dm

* Update species.dm

* Update maps.dm

* Update examine.dm

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-12-01 12:26:41 +01:00
SkyratBot
c4c9dfabf6 [MIRROR] Fix various issues with browser statpanel (#580)
* Fix various issues with browser statpanel

* a

Co-authored-by: Tad Hardesty <tad@platymuus.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-09-02 02:42:40 +02:00
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
e8bfe6eb68 [MIRROR] [Ready] CDN browser assets! (#312)
* [Ready] CDN browser assets! (#52681)

Rewrites the asset_cache system to handle sending assets to a CDN via a webroot.

see https://github.com/MrStonedOne/tgstation/blob/asset-cdn/code/modules/asset_cache/readme.md

Fixed a lot of bugs with assets, removed some dead code.

Changes:
    Moved asset cache code to transport datums, the currently loaded one is located at SSassets.transport, asset cache calls made before the config is loaded use the simple browse_rsc transport.
    Added subsystem call for when the config loads or reloads.
    Added a webroot CDN asset transport. assets are saved to a file in a format based on the file's hash (currently md5).
    Assets that don't use get_asset_url or get_url_mappings (such as browser assets referred to by static html files like changelog.html or static css files) can be saved to browse_rsc even when in cdn asset mode by setting legacy to TRUE on the datum returned by register_assets
    Added a system for saving assets on a cdn in a hash based namespace (folder), assets within the same namespace will always be able to refer to each other by relative names. (used to allow cdn'ing font awesome without having to make something that regenerates it's css files.).
    The simple/namespaced asset cache datum helper will handle generating a namespace composed of the combined md5 of everything in the same datum, as well as registering them properly.
    Moved external resource from a snowflake loaded file to a config entry, added it to resources.txt
    To ensure the system breaks in local testing in any situation that wouldn't work in cdn mode, the simple transport will mutate the filenames of non-legacy and non-namespaced assets and return this with get_asset_url.
    Simple transport's passive send of all roundstart assets to all clients is now a config that defaults to off. this is to break race conditions during local testings from devs accidentally relying on this instead of using send() properly.

cl
refactor: Interface assets (js/css/images) can now be managed using an external webserver instead of byond's one at a time file transfer queue.
admin: Adds admin verb toggle-cdn that allows admins to disable the external webserver asset transport and revert to the old system. Useful if the webserver backing this goes down (thanks cloudflare).
config: New config file, resources.txt, (must be loaded by an $include statement from the main config)
server: The external_rsc_urls.txt config has been moved to the main config system.
/cl
Porting notes:

Interface webpages must refer to their assets (css/js/image/etc) by a generated url, or the asset must register itself as a legacy asset. The system is designed to break in localtest (on simple/legacy mode) in most situations that would break in cdn mode.

Requires latest tgui.

The webserver must set the proper CORS headers for font files or font awesome (and other fonts) won't load.

/tg/'s webserver config: https://gist.github.com/MrStonedOne/523388b2f161af832292d98a8aad0eae

* [Ready] CDN browser assets!

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2020-08-12 11:32:37 +01:00
Ryll Ryll
98221771b7 Running unit tests no longer requires a launch parameter (#52529)
* for once i actually AM pushing _compile_options.dm

* cool, i get to touch travis
2020-08-01 13:13:59 -04:00
Jordan Brown
d20487b065 Fix when world.TgsInitializationComplete is called (#51533) 2020-06-10 17:19:42 +08:00
Iamgoofball
a3aa69701a [READY] Basically, Instant Explosions 2: The Search For More Money: Eternal: A Tail Of Two Kitties: 33 1/3 (#50594)
About The Pull Request

Extools maptick stuff is in the game. Stolen from BeeStation/BeeStation-Hornet#1119, improves performance. Requires ex-tools on the server, though.

Explosions have been refactored to do the actual exploding in a subsystem.

Credit to goon.

Here's some videos!

Why It's Good For The Game
Basically instant max-caps now.
We can now give more of a tick over to the sending of map updates

Changelog

cl Goonstation Coders, Beestation, Extools devs
refactor: Explosions have been heavily optimized.
/cl
2020-04-30 10:27:53 +12:00
Kyle Spier-Swenson
83398600c2 Fixes bugs in the mc related to combos of SS_BACKGROUND and other flags (#49848)
SS_BACKGROUND Conflicts with SS_TICKER and SS_NO_TICK_CHECK's behavior in certain ways. This fixes that breaking the mc.

SS_BACKGROUND has its own priority bracket that assumes that all remaining subsystems to run are also SS_BACKGROUND, allowing one of these to run when running SS_TICKER subsystems would cause the MC to assume all subsystems that run after it that tick were background subsystems, breaking the math of how much time to allocate the subsystem.

When delaying a run of a SS_NO_TICK_CHECK subsystem for lack of time, the MC will modify it's priority so it runs sooner next tick, if this happened on a background SS_NO_TICK_CHECK subsystem, it would update the wrong running total and desync the running total of the priority of all queued subsystem from the actual sum of those subsystem's priority.
2020-03-11 09:38:23 +13:00
oranges
5ccda49a29 Document the world (#46495) 2019-09-16 16:44:42 +12:00
L
a03b33be2e world.fps 2019-07-17 10:31:08 -03:00
kevinz000
10d846022a [READY]MultiZ stuff - tile atmos, movement backend, falling backend, etc etc - Electric boogaloo (#40428)
Basic multiZ mob movement procs (Observers can always move)
Open space, showing what things are below it, and everything that entails. No complex support for dynamic generation just yet.
Decide how openspace should look :/

    Atoms falling through open space (NO MOB SUPPORT/DAMAGE/ANYTHING YET.)

//CANCELLED FOR ANOTHER PR - [ ] Being able to see upwards? Downwards is going to be handled by open space.

MultiZ tile atmospherics - EDIT: Working demo! https://puu.sh/B7mUs/3f6274740f.mp4
Bugtest the heck out of this trainwreck.
2018-12-11 22:09:59 +13:00
Jordan Brown
bd7c22dda9 Moves TgsInitializationsComplete call to immediately after world/New() (#39771)
* Moves TgsInitializationsComplete call to immediately after world/New()

* Subsystem PreInit data directory audit

* world/New data directory audit

* Needful here too

* Remove SS_NO_INIT from SStitle

* Don't create banlist.bdb for SQL banning

* Stop creating legacy notes file

* Moves iconCache from data to tmp
2018-09-15 21:34:14 +12:00
Jordan Brown
575d098944 Update DMAPI to version 3.2.1.0 (#37429)
This is primarily a compatibility layer that enables both forward and backward compatibility for all past and future APIs based on the detected running TGS version. It also bundles all it's includes to make future upgrades not have to modify the dme, heck, could even use a submodule if it wanted (not happening). No other changes necessary.

There's an upcoming event system and new chat management functions. Check them out here: 303448457e/DMAPI/tgs.dm

Also added /datum/proc/CanProcCall()
2018-05-09 14:33:07 +12:00
Jordan Brown
b086b58dc3 Restarting the controller no longer resets the config 2018-03-28 13:41:16 -05:00
Kyle Spier-Swenson
8855194aae Random micro optimization to the mc I thought of while looking at something else (#36352)
We can save the second ss_flags access by using bitflag ma~~th~~gic
2018-03-13 06:32:18 -04:00
Kyle Spier-Swenson
b3b6ff2edd The punisher no longer punishes ticker subsystems 2018-01-25 18:55:52 -08:00