* Drastic Lag Mitigation Subsystem: SSlag_switch (#59717)
Requested by oranges and inspired by the upcoming event. A new subsyetem, non-processing (for now), aimed at providing some toggle switches that can be flipped as a last ditch effort to save some CPU cycles by sacrificing some non-critical mechanics. Below you can see each individual toggle.
Screenshot of the admin panel:
image
Surely there are more opportunities for toggles I missed, but adding new ones is not very difficult at all.
Why It's Good For The Game
Better performance during extreme pop, I hope.
Changelog
cl
code: Introduces the Lag Switch subsystem for when a smoother experience is worth trading a few bells and whistles for. Performance enhancement measures can be togged by admins with the Show Lag Switches admin verb or enabled automatically at a pop amount set via config.
config: Added a new config var: number/auto_lag_switch_pop
* Drastic Lag Mitigation Subsystem: SSlag_switch
* mirrored the changes to the modular file
Co-authored-by: Wayland-Smithy <64715958+Wayland-Smithy@users.noreply.github.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
* Add $reset directive to config processor for setting a config entry to default value
* Update game_options.dm
Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* Port: fixes of SStimer subsystem from RU SS220 Paradise (#59718)
Unobvious problem spot
#define BUCKET_POS(timer) (((round((timer.timeToRun - SStimer.head_offset) / world.tick_lag)+1) % BUCKET_LEN)||BUCKET_LEN)
With tick_lag equal to 0.1, 0.25, 0.5, rounding of division is normal. But at other values it may be shifted either more or less due to the specifics of floating-point storage and processing. Numbers 0.1, 0.25, 0.5 have blank mantissa, unlike others which lead to numbers such as 245.0000004 when divided.
PS: tick_lag is rounded to the first two decimal places.
Fixes
Rewrote the circular doubly linked list to a regular doubly linked list, because it could cause timers to loop infinitely.
Fixed re-creation of a bucket if the timer does not have a callback.
Added debug stat indicator RST to MC SStimer.
Added optional ability to log dump all timers on crash.
Fixed subsystem logic when a bucket position is misplaced due to division and rounding inaccuracy. The system now captures such rounding errors and restores the correct timer position.
References
[RU] SS220 Paradise port process from TGstation and fixes:
ss220-space/Paradise#5ss220-space/Paradise#10ss220-space/Paradise#26ss220-space/Paradise#32ss220-space/Paradise#37
Contributors
@ semoro: fixes
@ Bizzonium: port
Changelog
cl Semoro and azizonkg
fix: Ported fixes of SStimer subsystem from RU SS220 Paradise
config: Added a new config var: flag/log_timers_on_bucket_reset
/cl
* Port: fixes of SStimer subsystem from RU SS220 Paradise
Co-authored-by: Aziz Chynaliev <azizonkg@gmail.com>
* Implements a new auto-tagging system for ID card which adds a config to auto-flag them as an intern. (#58236)
About The Pull Request
ID cards when equipped will check the player's living hours if the USE_LOW_LIVING_HOUR_INTERN flag is set. If their living hours is less than the first of the following (checked in order from 1st to 3rd until a valid value is found):
Config USE_LOW_LIVING_HOUR_INTERN_HOURS
Config USE_EXP_RESTRICTIONS_HEADS_HOURS
Hardcoded 15 hours
Then their ID card is tagged as Intern Assignment, unless they're a Head of Staff in which case they become an Assignment-in-Training.
PDAs, Wallets and Tablets also update any ID cards they hold, so equipping a PDA, Tablet or Wallet will also update any ID cards inside it.
This occurs automatically, even if the card does not belong to the owner. This only occurs when the user's assigned_role is a station job.
* Implements a new auto-tagging system for ID card which adds a config to auto-flag them as an intern.
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Sets up ambition logging baseline framework
* That's one line, how did I write it
* Have to rewrite all the logs!
* I don't know what I'm doing anymore
* I think this is the last thing
* Log ambition is now added to config
* Ambition flag now correctly checks for the ambition flag
* Okay /here/ we go
* No more lowercase ckeys in admin chat
* Admin actions are now logged too
* Adds logging to uplinks, spellbooks, and the codex ciatrix (#56450)
* Initial logging
* Bugfix and adds uplink logging to config file
* Another bugfix
* Adds logging to uplinks, spellbooks, and the codex ciatrix
Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
* Added the SQL logging.. waf
* I dont know why CI does not like my sql......
* I think i fixed the sql....
* Attempt #1 to make linter happy
* Shhh linter, it will be over soon
Just breath into this cloth... ignore the chloroform smell.
(Add a Preprocesser statement, to make the SpacemanDMM linter ignore the SQL code in a mob atom obj, that causes it to trigger its hard coded test for stoplag.
This only does not trigger on other SQL, as there is hard coded exception in SpacemanDMM that ignores the other objects. the better fix would be to update SpacemanDMM to add this into the exclusion. but this change at least allows the PR to be merged finally)
Co-authored-by: MissFox <github@aesir.org.uk>
* Add config for discord bot prefix (#55400)
This allows you to set this in config, save having to hardcode it
I also fixed a mistake where only one message was changed in the
messaging from the account linking system
* Add config for discord bot prefix
Co-authored-by: oranges <email@oranges.net.nz>
* Remove the hyphen from the default value of the github url string (no longer -tg-station) (#55136)
* Remove the hyphen from the default value of the github url string (no longer -tg-station)
Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
* Fixes and a little cleanup.
* False by default.
* Apply suggestions from code review
Co-authored-by: Azarak <azarak10@gmail.com>
* Modularization and comments.
* #include
Co-authored-by: Azarak <azarak10@gmail.com>
* Adds a living time config to the panic bunker (#54341)
* Adds a living time value to the panic bunker, so you can keep people out based on time spent playing the game
* updates the admin verb, and enables %minutes% as an option
* Makes a proc call more clear
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>
* than
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>
* Adds a living time config to the panic bunker
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>
* Overhauls discord verification system (#53289)
This completely replaces the previous verification system, for one that
will interoperate with a discord redbot instance that uses the cogs
located at you github.com/optimumtact/orangescogs
This cuts out several steps in the system, but it also leaves alone the
existing notify system (which just uses a file list of discord ids) as a
record of who to notify
SQL changes required for the new database system
Version 5.10, 7 August 2020, by oranges
Changes how the discord verification process works.
Adds the discord_links table, and migrates discord id entries from
player table to the discord links table in a once off operation and then
removes the discord id on the player table
The user connects to any tg server, and uses the "Verify Discord
Account" verb, this generates a six word one time use token, with a 4
hour time validity period (defined as 4 hours from the timestamp value)
in the discord links table.
This one time token, and the ckey of the user are stored in
discord_links
At this point the entire DM side is done, this is all it does
* Overhauls discord verification system
Co-authored-by: oranges <email@oranges.net.nz>
* CentCom Galactic Ban DB: Bigger and Better Edition (#52588)
Admins will now be able to look up a player's bans from several other servers via the player panel.
My hope is that porting this to as many servers as possible will encourage more servers to make their bans publicly viewable so they can be included in this system. Direct access to a server's database is not required (or even supported).
Supported servers:
BeeStation
/vg/station
OracleStation
FTL13
Fulpstation
TGMC
Planned support (WIP):
World Server
Yogstation
Halo: SSE
Any other server willing to make their bans publicly visible.
API: https://centcom.melonmesa.com
Source: https://github.com/bobbahbrown/CentCom
Changelog
cl ike709 and bobbahbrown
add: Admins can now see your bans on (some) other servers.
/cl
* CentCom Galactic Ban DB: Bigger and Better Edition
Co-authored-by: ike709 <ike709@users.noreply.github.com>
* CentCom Galactic Ban DB (#52519)
* CentCom Galactic Ban DB
* Sanitize and config
* Apparently TG has a http_request datum
* Tweaks
* An excellent suggestion
* Turns out BYOND is better at JSON parsing than I thought it was
* Fun fact: 4 out of 5 UIs don't bother to do this
* CentCom Galactic Ban DB
Co-authored-by: ike709 <ike709@users.noreply.github.com>
CHAT_NEW_GAME_NOTIFICATIONS
I can't find the commit that untied the original config to the announcement, but this is how it originally was: db68cd1#diff-d91ba57ba114207ed6985097e129dd9cR137
Whoever did it obviously didn't read the send2irc (now send2chat) doc comment
Closes#51416
About The Pull Request
1 config change and 1 preference change:
Adds a config option AUTO_DEADMIN_TIMEGATE that, when defined, only enforces config force-deadmins for all roles/sec/command/silicon/antag for the first X seconds in the round. After this time expires, the game will defer to the individual's deadmin settings.
Adds a preference for admins to ignore being summoned by cult ghosts, starts disabled by default. Nice for when you're sitting around observing a cultist and don't want to be bugged by them suddenly summoning you!
I'm not 100% with dealing with prefs and configs but stock settings preserve previous functionality and must be manually enabled to have effect. Please look it over and offer advice if changes are needed!
Why It's Good For The Game
I don't like the auto-deadmin config option being on in the first place since it's annoying to get deadmin'd when I'm testing antag stuff, but I spoke to @Twaticus who indicated they like having it for roundstart, but agreed it was annoying when trying to test stuff later in the round. This is a simple compromise that lets config-controllers still force people to deadmin at the starts of shifts where most of the proscribed roles are assigned, while not bothering other admins who make themselves a blob at the thunderdome an hour in to test something.
As for the cult ghosts, I hate suddenly getting summoned as a cult ghost while I'm adminning, but other people like being able to be summoned while currently admin'd, so pref time.
Changelog
🆑 Ryll/Shaps
config: Added AUTO_DEADMIN_TIMEGATE which allows config force deadmin settings to only apply for the first X seconds in a round. Starts disabled
admin: New preference to ignore being summoned as a cult ghost while admin'd, starts disabled
/🆑
About The Pull Request
As requested by oranges this enforces a requirement, when configured, that a player must have a certain amount of living playtime in hours to auto-enroll into a discord role.
Why It's Good For The Game
Removes discord moderation requirement
Changelog
cl bobbahbrown
server: Discord role auto enrollment can now be configured to require a certain number of living hours.
/cl
About The Pull Request
When a user successfully links their BYOND accounts and discord accounts, they will now be automatically roled, based on config settings.
NOTE: This does not update pre-linked accounts, but I can write an external bot to do that if needed
RUST-G has also been updated in this PR, to be inline with this PR over at RUST-G tgstation/rust-g#23
Why It's Good For The Game
People with linked accounts can now be given a specific role in the discord, which is good for verification.
Changelog
🆑 AffectedArc07
add: Linking your discord and BYOND accounts will now give you a role in the discord
/🆑
cl
add: Added support for a widescreen toggle, actual widescreen will require a config change.
tweak: Auto-fit view is now the default. This will only apply to new players.
/cl
* Add a virus log, plus a log for facehuggers
Logs each infect event and contains detailed descriptions of the virus
I also added a log message for printing virus culture bottles including
who printed them
Finally i tacked on a change to adding a game log entry for facehuggers
because why not
* Further logging fixes and updates
Medbots now combat log
combat log no longer tries to run keyname on an object because that
doesn't make much sense
* Dead say no longer logs twice
* tabs to spaces
* disables the MMB exploit
* Adds a config option to set a minimum build, with the recommended minimum build for 512 users being 1421
* readds the post-block detection, and changes MMB -> Middle Mouse Button
* Makes it the standard, I guess
Co-Authored-By: nichlas0010 <nichlas00100@gmail.com>
* Update client_procs.dm
Spiritual successor and extension to #17798, an almost entire rebuild of the SQL ban system backend and interface.
Bantypes are removed per #8584 and #6174. All bans are now 'role bans', server bans are when a ban's role is server. Admin bans are a column, meaning it's possible to ban admins from jobs.
Bans now have only an expiry datetime, duration is calculated from this when queried.
unbanned column is removed as it's superfluous, checking unban status is now done through checking unban_datetime. unban_round_id column added. Each ip and computerid columns rearranged so ip is always first, like in other tables. Bans now permit a null ckey, ip and computerid.
Ban checking is split into two procs now is_banned_from() does a check if a ckey is banned from one or more roles and returns true or false. This effectively replaces jobban_isbanned() used in simple if() statements. If connected a client's ban cache is checked rather than querying the DB. This makes it possible for a client connected to two or more servers to ignore any bans made on one server until their ban cache is rebuilt on the others. Could be avoided with cross-server calls to update ban caches or just the removal of the ban cache but as is I've done neither since I think it's enough of an edge case to not be worth it.
The second proc is is_banned_from_with_details(), this queries the DB for a role ban on a player's ckey, ip or CID and returns the details. This replaces direct queries in IsBanned.dm and the preferences menu.
The legacy ban system is removed.
The interfaces for banning, unbanning and editing bans have been remade to require less clicking and easier simultaneous operations. The banning and jobban panel are combined. They also store player connection details when opened so a client disconnecting no longer stops a ban being placed.
New banning panel:
Key, IP and CID can all be toggled to allow excluding them from a ban.
Checking Use IP and CID from last connection lets you enter only a ckey and have the DB fill these fields in for you, if possible.
Temporary bans have a drop-menu which lets you select between seconds, minutes, hours, days, weeks, months and years so you don't need to calculate how many minutes a long ban would be. The ban is still converted into minutes on the DB however.
Checking any of the head roles will check both of the boxes for you.
The red role box indicates there is already a ban on that role for this ckey. You can apply additional role bans to stack them.
New unbanning panel:
Unbanning panel is now separate from the banning panel but otherwise functionally the same.
Ban editing panel:
Actually just a modified banning panel, all the features from it work the same here.
You can now edit almost all parameters of a ban instead of just the reason.
You can't edit severity as it's not really part of the ban.
The panels have been tested but I've not been able to get my local server to be accessible so ban functionality isn't properly confirmed. Plenty of testing will be required as I'd rather not break bans.
cl
admin: Ban interface rework. The banning and unbanning panels have received a new design which is easier to use and allows multiple role bans to be made at once.
prefix: Ban search and unbanning moved to unbanning panel, which is now a separate panel to the old banning panel.
/cl
* Allows floats on all config entries that have no valid reason to disallow them
Needed for run speed changes, but I'm allowing them on any config that has no bonafide reason to disallow them.
The criteria used was "Is there a technical reason why floats should not be allowed or is there a technical/logical reason why floats would never mean anything more compared to a integer".
For instance: The cloning timer was made to allow floats because 0.5 ds increments are valid at our current fps and more would be valid at other fpses. Yes, from a practical standpoint nobody would ever want to have cloning be valid for 30 minutes and 50 milliseconds after death, but from a technical standpoint there is no reason not to let them.
* Update general.dm
fixes#41106 since it'll have it's own fucking location.
cl ShizCalev
add: Admins can now personalize their asay message color on servers with the feature enabled.
tweak: Moved some admin only preference verbs out of the Preferences tab and to a new admin preferences tab to help unclutter it / prevent accidental toggling of fun things.
/cl
Note that the start of the admin message will still use the default formatting just so it can be quickly recognized as an admin message and not an OOC one.