Commit Graph

115 Commits

Author SHA1 Message Date
Ling
980999fa79 Improves roundstart time (#17199) 2022-12-31 15:38:45 +00:00
fira
c30f297c11 MC backport (#16992)
* Break things

* fix bad replace in test code
2022-12-31 15:30:57 +00:00
adamsong
44cd06ecc6 [ADMIN] Chganges auth backend to use the forums instead of the DB (#15195)
* [ADMIN] Chganges auth backend to use the forums instead of the DB

* Remove dbranks flag

* I'm dumb

* re-promotes myself

* Re-use datums, rather than continually re-making them

* Delete the datum instead, easier to manage

* Moved to an inhertiance based system for permissions management

* Proccall protection and logging

* Linter

* Update config

* Fixes pp I hope

* Two letters made it do a bad, I am sad

* Clears forums admins when reloading

* Adds db support

* Update config

* Re-enables forum integration

* No editing the funny datum

* Allow me to do the funny during the test merge

* Didn't commit the changes

* Copying and pasting hard

* Sanitize ckey

* Var is unnecessary

* Small debug log to debug dono chat

* Fixes wrong proc call

* Move log, will be a bit much, but is fine because its temporary

* Made better log message

* Fixed reload admins, added debug log to json_decode that was erroring

* Expanded forums integration error handling

* Fully protects funny lists
2022-08-28 14:26:46 +01:00
ynot01
a94aa9a6f4 round actually ends on narsie & time defines (#14207)
* round actually ends on narsie

* time defines

* time defines
2022-05-28 22:56:57 +01:00
Altoids1
119ea82e32 The initial subsystem loading now gives an approximate % to completion, among other style tweaks (#13645)
* Makes the HEY LISTEN dialog a bit quieter

Now it only prints to admins. It's still logged and everything, for those who want to shave off the <100 ms it takes the server to usually handle this atmos equalization stuff.

TBH this is such a, weird debug line, I don't really know why it was kept in as a big dumb to_chat(world) for so long.

* Makes the subsystem init dialog look nicer

Now, instead of displaying performance times to the whole `world`, an approximate loading % is printed to everyone (with admins getting the old dialog in span_notice style).

EDIT: Fixes some stuff Gamer complained about
EDIT EDIT: I don't get how SHOULD_CALL_PARENT works

* Update yogstation/code/controllers/subsystem/yogs.dm

Co-authored-by: nmajask <nmajask@gmail.com>

Co-authored-by: Jamie D <993128+JamieD1@users.noreply.github.com>
Co-authored-by: nmajask <nmajask@gmail.com>
2022-04-16 00:07:42 +01:00
adamsong
3baeaeb0c4 Steals tg's span macros (#12232)
* Steals tg's span macros

* Fix alphabet

* Updated some more spans

* Misses a conflict

* Fix compile errors

* Converts more spans

* oops
2021-09-17 12:50:16 +01:00
TheGamerdk
65e3fe7465 CDN Assets + TGChat + Statbrowser Restyle (#10211)
* asset cache cdn

* Fix cdn rsc (#52886)

I was converting this to use length so it didn't have to care if the list existed or not, and forgot to remove the .len. this broke cdn .rsc files because length(num) returns 0.

* Add warning about https to the external rsc config (#53367)

today in hostchat we discovered that most of the servers who tried to 
do cdn the .rsc, had unknown issues because they had used https:// 
urls. Byond can't into https.

like 5 servers had failed to get this to work because of that pitfall, 
so im gonna add a warning to the config.

* tchat

* tgchat compile

* fixes

* Merge pull request #53011 from stylemistake/tgui-chat-fix-asay

tgchat: Fix asay

* chat color

* logging

* webstorage

* compile TGUI

* actually like compiles on the DM side

* Update chat-dark.scss

* Update chat-light.scss

* Update resources.txt

* Update tgui-panel.bundle.css

* Colors

* compile

* s

* s

* Ports Gamers TGChat so we can edit it. - NOT LIVE TGCHAT BRANCH (#10226)

* asset cache cdn

* Fix cdn rsc (#52886)

I was converting this to use length so it didn't have to care if the list existed or not, and forgot to remove the .len. this broke cdn .rsc files because length(num) returns 0.

* Add warning about https to the external rsc config (#53367)

today in hostchat we discovered that most of the servers who tried to 
do cdn the .rsc, had unknown issues because they had used https:// 
urls. Byond can't into https.

like 5 servers had failed to get this to work because of that pitfall, 
so im gonna add a warning to the config.

* tchat

* tgchat compile

* fixes

* Merge pull request #53011 from stylemistake/tgui-chat-fix-asay

tgchat: Fix asay

* chat color

* logging

* webstorage

* compile TGUI

* actually like compiles on the DM side

* Update chat-dark.scss

* Update chat-light.scss

* Update resources.txt

* Update tgui-panel.bundle.css

* Colors

* compile

* s

* s

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Co-authored-by: skoglol <33292112+kriskog@users.noreply.github.com>
Co-authored-by: TheSmallBlue <ilanmori@hotmail.com>

* Fixes Replay Chat

* Update to_chat.dm

* Update chat.dm

* Update demo.dm

* yarn berry

* yarn berry compile

* Update resources.txt

* Update config/resources.txt

* Update resources.txt

* Attempt at fixing reconnect.

* Lets try fix it again

* oops

* THROW THE SINK AT IT

* ree

* Makes Travis work again thank you jamie

* Fixes snowflake images

* Update security.dm

* Updates TGChat Test Merge (#10307)

* asset cache cdn

* Fix cdn rsc (#52886)

I was converting this to use length so it didn't have to care if the list existed or not, and forgot to remove the .len. this broke cdn .rsc files because length(num) returns 0.

* Add warning about https to the external rsc config (#53367)

today in hostchat we discovered that most of the servers who tried to 
do cdn the .rsc, had unknown issues because they had used https:// 
urls. Byond can't into https.

like 5 servers had failed to get this to work because of that pitfall, 
so im gonna add a warning to the config.

* tchat

* tgchat compile

* fixes

* Merge pull request #53011 from stylemistake/tgui-chat-fix-asay

tgchat: Fix asay

* chat color

* logging

* webstorage

* compile TGUI

* actually like compiles on the DM side

* Update chat-dark.scss

* Update chat-light.scss

* Update resources.txt

* Update tgui-panel.bundle.css

* Colors

* compile

* s

* s

* Ports Gamers TGChat so we can edit it. - NOT LIVE TGCHAT BRANCH (#10226)

* asset cache cdn

* Fix cdn rsc (#52886)

I was converting this to use length so it didn't have to care if the list existed or not, and forgot to remove the .len. this broke cdn .rsc files because length(num) returns 0.

* Add warning about https to the external rsc config (#53367)

today in hostchat we discovered that most of the servers who tried to 
do cdn the .rsc, had unknown issues because they had used https:// 
urls. Byond can't into https.

like 5 servers had failed to get this to work because of that pitfall, 
so im gonna add a warning to the config.

* tchat

* tgchat compile

* fixes

* Merge pull request #53011 from stylemistake/tgui-chat-fix-asay

tgchat: Fix asay

* chat color

* logging

* webstorage

* compile TGUI

* actually like compiles on the DM side

* Update chat-dark.scss

* Update chat-light.scss

* Update resources.txt

* Update tgui-panel.bundle.css

* Colors

* compile

* s

* s

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Co-authored-by: skoglol <33292112+kriskog@users.noreply.github.com>
Co-authored-by: TheSmallBlue <ilanmori@hotmail.com>

* Fixes Replay Chat

* Update to_chat.dm

* Update chat.dm

* Update demo.dm

* yarn berry

* yarn berry compile

* Update resources.txt

* Update config/resources.txt

* Update resources.txt

* Attempt at fixing reconnect.

* Lets try fix it again

* oops

* THROW THE SINK AT IT

* ree

* Makes Travis work again thank you jamie

* Fixes snowflake images

* Update security.dm

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Co-authored-by: skoglol <33292112+kriskog@users.noreply.github.com>
Co-authored-by: TheSmallBlue <ilanmori@hotmail.com>
Co-authored-by: alexkar598 <25136265+alexkar598@users.noreply.github.com>

* Fixes

* Undo Kitchen Sink

* Fucking 7 Hours.

* status panel

* stat panel fixes

* fixes

* stat panel stuff

* Stat panel finish

* Compile, oops

* Update server_maint.dm

* Update world.dm

* Update interface.dm

* tgui compile

* Update subsystems.dm

* fix statpanel deleting whole admin tab (#54211)

fix: adminhelping no longer removes entire admin tab
fix: end of round no longer removes entire admin tab

* Update skin.dmf

* verbs?

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: skoglol <33292112+kriskog@users.noreply.github.com>
Co-authored-by: TheSmallBlue <ilanmori@hotmail.com>
Co-authored-by: Jamie D <993128+JamieD1@users.noreply.github.com>
Co-authored-by: alexkar598 <25136265+alexkar598@users.noreply.github.com>
Co-authored-by: Couls <coul422@gmail.com>
Co-authored-by: Tad Hardesty <tad@platymuus.com>
Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
2020-11-10 19:10:27 +00:00
Jamie D
0dd6fae119 [Port] Explosions Subsystem Test 1 (#10202)
* Explosions Subsystem Test 1

* Fucking linter

* Fucking TG Are Dents

* SCREW OFF LINTER
2020-10-28 17:54:13 +00:00
alexkar598
8b963c9626 Documents 61 files (#9306)
* Document the world (#46495)

* Document drone verbs.dm

* Document the outfit datum with autodoc (#45415)

* Uncurse take_damage and document obj_defense.dm (#45146)

The original take_damage proc defined vars for no good reason had some 
duplicate code and wasn't very readable.

If you are wondering why it calls obj_break every time it takes damage 
while below integrity_failure, that's the way it used to be. Most (if 
not all) stuff that takes advantage of this functionality already 
accounts for this.

* Convert some code docs into the auto doc format (#45101)

* Commit Message

* Fixes

* e

* Documents browserOutput.dm (#51439)

* Add autodoc to the callback datum (#45463)

* Autodoc the vending machine (#45468)

* Autodoc the vending machine

* Update code/modules/vending/_vending.dm

Co-Authored-By: Tad Hardesty <tad@platymuus.com>

* autodoc organ helpers (#45464)

* timer proc autodocs (#46530)

* bunch of define autodocs

* ballistic guns autodoc (#45578)

* ballistic guns autodoc

* fixes

* client vars autodoc (#46446)

About The Pull Request

Autodocs client vars

* Autodoc for XB and Research

* shuttle docking autodoc (#48677)

* Add autodocs for reagents (#49478)

* Fix

Co-authored-by: oranges <email@oranges.net.nz>
Co-authored-by: Jonathan (JJRcop) Rubenstein <jrubcop@gmail.com>
Co-authored-by: nemvar <47324920+nemvar@users.noreply.github.com>
Co-authored-by: alexkar598 <>
Co-authored-by: Tad Hardesty <tad@platymuus.com>
Co-authored-by: spookydonut <github@spooksoftware.com>
Co-authored-by: actioninja <actioninja@gmail.com>
2020-07-24 21:38:47 -04:00
MCHSL
fa23507568 Revert "Lag removal, try 2 (#7553)" (#7985)
This reverts commit 1504d2c784.
2020-03-16 09:03:34 +01:00
1fbff5f83b23d39d38b1dfcb4cac8d9b
1504d2c784 Lag removal, try 2 (#7553)
* dark git magic

* I already added this

* oh god

* change to proper global
2020-03-11 17:25:39 -04:00
Ling
10ac750844 world.fps and SStimers safety check (#6419) 2019-07-22 17:06:54 -04:00
Jordan Brown
64a2bf39f6 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:57:57 +01:00
Jordan Brown
6063273b99 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 03:33:36 +01:00
Nich
6c5f55699a adds webhooks 2018-04-25 22:34:26 +02:00
Jordan Brown
5132104c78 Restarting the controller no longer resets the config 2018-03-28 19:41:40 +01: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
Jordan Brown
52872cd477 Forces test run to run with a set random seed (#34912) 2018-01-24 20:27:21 -05:00
Jordan Brown
015258d01c Config dir again except this time it works (#34606)
* Revert "Revert "Fix config_dir usage (#34469)""

* Make config exist before world/New but not load it until then
2018-01-21 19:32:12 +01:00
Jordan Brown
bf7938cfdf Adds test run mode. Fails travis if it fails (#34198)
* Adds test run

* Add OVERRIDE_LOG_DIRECTORY_PARAMETER

* Fails travis if a test run fails

* Fix travis looping

* Move the unit tests behind a define

* Fix various test run things

* Remove the DEBUG check because that's just you shooting yourself in the foot

* Adds readability spacing. Makes RunUnitTests a generic proc

* Remove unit tests
2018-01-19 11:53:26 -05:00
Jordan Brown
fd181a9f45 Adds random seed feedback (#33708)
* Master now sets rand_seed

* Blackbox now records Master.random_seed
2017-12-25 20:04:56 -05: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
Jordan Brown
73fbac36d7 Adds a config option to change world.sleep_offline (#32505)
* Adds a config option to change world.sleep_offline

* Runlevel has no space
2017-11-09 00:44:49 -06:00
Jordan Brown
d95865656f Logs subsystem shutdowns (#31951) 2017-10-21 16:27:00 -02:00
MrStonedOne
c8bb13d7c2 In which the stoner one gets stoned and tries to address tick contention... again
Tick contention is when the mc, sleep()/spawns(), and byond internal processing fight each other for game tick time. Usually in an unproductive way that wastes cpu cycles and reduces the effective amount of game tick to go around.

Tweaked the anti-tick contention heuristics of the MC a touch.

Fixed an incorrect operator in the mc's anti-tick contention heuristics causing it to apply in times of no lag rather then times of lag.

The mc's anti-tick contention heuristics now plays better with the high pop processing mode.

We no longer reserve the tail end of a tick for the mc to have if the mc doesn't plan to run next tick because of high pop mode or anti-tick contention heuristics.

stoplag() can now be given an initial delay allowing it to act like a smarter sleep (in that it sleeps for longer if the server is overwhelmed.

All short sleeps that only existed for performance reason and had no game play, visual/audio, or balance reasons behind their timing were converted to stoplag().
2017-10-09 01:21:43 -07:00
MrStonedOne
7b7a4ca287 High pop reduced MC processing mode.
The logic behind this is that at higher populations, byond ends up needing to do more at the end of the tick to update clients, that the mc and traditional sleep timers end up fighting for a very small amount of time left.
Increasing the MC's sleep time means its wakes up sooner in the tick. So it has more time to do things, even if they don't happen as often, and leaving every other tick free allows for sleeping CHECK_TICK task to wake up without finding the MC left them very little time to do things.

Admins have been regularly manually doing this by varediting the processing variable to 2, that i figured we should automate it.

for /tg/, i plan on raising the player count a bit, but they make decent defaults for the avg server.
2017-10-06 00:34:09 -07:00
Jordan Brown
4178c209f1 Configuration datum refactor (#30763)
* Configuration datum refactor

* More WIP

* New easier on the eyes format

* More WIP

* Finished config.txt

* Fucktons more WIP

* The end of conversion draws near...

* Add all this shit

* Done converting entries finally

* Hunting down compile errors

* More WIP

* MORE CONVERSIONS

* More WIP

* More WIP

* Oh shit only 90 errors this time!

* IT COMPILES!!!

* Fixes world start runtimes
2017-09-29 15:36:51 +13:00
shizcalev
4f5658cfbb Cleaned up some decimal values. 2017-09-14 12:50:06 -04:00
Jordan Brown
30573dc6f1 Adds defines for world.tick_usage (#30184)
* Add tick_usage define

* Move tick.dm -> _tick.dm

* Add TICK_USAGE_REAL define

* Add comments

* Replace all instances of tick usage with appropriate define
2017-08-30 10:09:24 +12:00
Jordan Brown
3f1a50bf1b Subsystem PreInit() now respects init_order (#30092)
* Subsystem PreInit() now respects init_order

* Reh

* Yeah just nevemind then

* Update master.dm
2017-08-25 12:42:46 +02:00
Jordan Brown
27f05467ef Fixes subsystem MC crash tracking 2017-08-01 16:11:14 -04:00
ShizCalev
59ef81245b Changes some 1s and 0s to TRUE and FALSE (#29144) 2017-07-10 10:31:34 -04:00
Cyberboss
7590e0aa73 Fixes full controller recovery not restoring appropriate runlevel 2017-05-23 09:33:24 -04:00
Leo
e3a34e1b4e Merge pull request #27523 from Cyberboss/MasterStatic
Makes global master vars static
2017-05-23 00:12:49 -03:00
Cyberboss
fab23038fd Makes global master vars static 2017-05-21 18:59:43 -04:00
Cyberboss
e553d4423b Fixes Master/Recover not restoring previous runlevel 2017-05-21 17:49:13 -04:00
Cyberboss
ee404b2170 World.dm Refactor (#27268)
* Cleanup world/New

* Moves some things from OnReboot SS Shutdowns

* Move mode handling procs to ticker

* Moves delayed reboot to ticker
Cleans up round end sound setting
Splits round end animation between SStitle and SSticker

* Moves PR announcement to where it can use the define

* Clean this bit up

* Move out datacore Initialization

* Fix some stuff

* Fix this for

* Different PR

* Gives admins reboot options

* Make it smaller
2017-05-18 21:53:46 +10:00
coiax
f1f5149e2e Fixes a bug where shuttles would not function (#27338)
* Fixes a bug where shuttles would not function

Okay, so Cyberboss walked me through this, I've tested it, and it fixes
shuttles working, it sets the master controller runlevel to 3, like it's
supposed to?

I don't really know that much about how this actually works internally.
But it does fix the bug.

* Compiling

* RIP softreset
2017-05-16 23:18:27 +02:00
oranges
0300f8540e Merge pull request #27132 from Cyberboss/runlevels
MC Runlevels
2017-05-16 09:03:34 +12:00
MrStonedOne
c9fd93c154 The Punisher now also delays the next fire of subsystems that overrun.
Because of how this is ends up being calculated, this will almost never actually kick in, but sometimes subsystems like garbage will overrun into mutiple ticks, so delaying their next fire is needed.
2017-05-12 15:36:13 -07:00
MrStonedOne
49ded39314 The punisher!
The mc will now punish subsystems that overrun their tick allotment with less allotment in later fires.
2017-05-12 13:42:41 -07:00
Cyberboss
1c6bd654b7 Make runlevels bitflags 2017-05-11 10:04:19 -04:00
Cyberboss
a0a27219b6 MC Runlevels 2017-05-10 16:05:37 -04:00
Cyberboss
75bdbc02bb Cleans up an MC statement 2017-05-10 15:59:24 -04:00
Cyberboss
6c6fc719ec Refactors roundstart checks slightly (#26131)
* Refactors roundstart checks slightly

* Fix
2017-04-27 10:05:40 +12:00
Cyberboss
e8567cd7c9 Fix 2017-04-16 17:04:39 -04:00
Cyberboss
652a655e29 Standardizes subsystem Shutdown order 2017-04-14 19:04:32 -04:00