Commit Graph

82 Commits

Author SHA1 Message Date
John Willard
380c143431 Adds map feedback thread support (AI stat panel buff) (#90506)
## About The Pull Request

This PR started with the idea of adding support for map feedback
threads, which I added to the roundend report, escape menu, and stat
panel. To do this though I had to make pretty annoying changes to the
stat panel and had to touch every single time something to the stat
panel was added, so since we now have a way to have links in the stat
panel I thought of taking full advantage of it and add some QOL.

AIs can now track their borgs by clicking their status on the stat panel


https://github.com/user-attachments/assets/1789dc46-5d12-48e9-bb8d-d3278aa19639

With Melbert's comment, I added another stat panel entry that directs
you to the Webmap page, which currently seems to be a little messed up
(https://github.com/AffectedArc07/SS13WebMap/issues/41 &
https://github.com/AffectedArc07/SS13WebMap/issues/42) but if they get
fixed this would be a swag asf feature

##### Code bounty for Ezel/Improvedname

## Why It's Good For The Game

Feedback threads was a suggestion from a player and is fully in control
of admins as an optional thing, and while we still have stat panel I
think it's nice to be able to take advantage of its features.

## Changelog

🆑
admin: Admins can now link a URL for maps, used to give feedback on said
maps. Accessible through the roundend report, escape menu, and stat
panel.
qol: AIs can track their borgs by clicking on them in the stat panel.
qol: You can now directly go to the webmap of maps from the stat panel
(assuming it's set in config).
/🆑
2025-04-21 17:20:41 -07:00
Jordan Dominion
a834a92ed6 Add an event to config reloading that can be used to trigger a config sync (#90329) 2025-03-30 20:44:23 +00:00
LemonInTheDark
96ee8fd2a5 Relative Config $imports (#89418)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

When you import a config file inside a subdirectory, the config loader
will now look IN that subdirectory, instead of exiting out to the parent
folder.

As a consequence, adds support for ".." to our deduplication system to
avoid infinite loops due to headmin brain.

## Why It's Good For The Game

jannies are on some shit wanna make their lives a bit nicer

Note: I am testing on windows and also have only a loose grasp of how
linux works, might fuck up in that environment idk

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and its effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
config: the config loader now supports relatively pathed imports
(importing a file inside a subfolder now acts as if you were IN that
subfolder)
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2025-03-05 14:51:14 +13:00
klorpa
d2c7806047 Spelling and Grammar Fixes (#85992)
## About The Pull Request
Fixes several errors to spelling, grammar, and punctuation.
## Why It's Good For The Game
## Changelog
🆑
spellcheck: fixed a few typos
/🆑
2024-08-21 17:07:02 +12:00
san7890
c403a6eccc Wraps lowertext() to ensure proper stringification. (#82442)
## About The Pull Request

Fixes #82440

This PR just creates a new macro, `LOWER_TEXT()` (yes the irony is not
lost on me) to wrap around all calls of `lowertext()` and ensure that
whatever we input into that proc will be stringified using the `"[]"`
(or `tostring()` for the nerds) operator. very simple.

I also added a linter to enforce this (and prevent all forms of
regression) because I think that machines should do the menial work and
we shouldn't expect maintainers to remember this, let me know if you
disagree. if there is a time when it should be opted out for some
reason, the linter does respect it if you wrap your input with the
`UNLINT()` function.
2024-04-10 12:19:43 -07:00
san7890
d8058f1245 Datumizes out jobconfig.toml (extensibility edition) (#76102)
## About The Pull Request

Hey there,

#75992 (fc54fd6a60) made me realize just
how wacky the job config system is to people trying to add more new
stuff to it, so I finally got the motivation to fix it up.

The gist is that it does all of the same stuff on the front-end as you
would expect, but instead of having to modify core generation code to
create/recreate the files, it instead uses a robust series of getters
and setters. It's much better to use these getters and setters because
we can apply needed game logic (like ensuring that the age that the
server operator puts in is actually sane, and not completely out of
bounds (if you want to permanently price people out of a position, just
set it to 0)). The getters are also nifty too, because they let me atone
for an early mistake I made with how assistants are meant to work with
"unlimited" nonsense.

All a new coder who wants to add stuff to the config needs to do now is
create the define, create the datum, add the procs for the datums, and
that's it! They don't have to do any of the wacky stuff or account for
weird stuff or do any weird copypasta, it's all handled by the system.
One datum is all you need, quite neat.

This also fixes some issues in #75992 that probably weren't discovered
in testing, but the only good way to fix it was a retune+refactor, which
is included in this PR.
## Why It's Good For The Game

Much more extensible, ensuring this system actually works as fully
intended, etc.

I fixed up the documentation (they didn't regenerate the job config
after they updated the code-side documentation) and some weird spacing
stuff that I missed in my review of that aforementioned PR. Everything
should work as expected, it's been tested quite a bit. It's also in its
own folder now, which is neat because we can share the local defines and
split all this stuff out of the already-quite-large SSjob file.
## Changelog
🆑
server: job_config.toml should now comply with reload-configuration
verb, meaning you can hot-reload the configuration from disk and have it
apply ingame automatically.
config: The documentation for setting Minimum Character Age on a per-Job
basis has been altered to be more explicit.
fix: The Minimum Character Age configuration entry is now sanitized to
ensure that it's within the codebase-defined ages, since there's no
(legitimate) way to get a character outside of those ages anyways.
Invalid values will log to the config log.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-07-04 23:57:16 +00:00
Mothblocks
980f3adc70 ezdb - A one click script to quickly setting up a development database (#75053)
https://user-images.githubusercontent.com/35135081/235344815-8e825ba9-52cf-44e8-b8e2-a2aeb5d47276.mp4

- Downloads a portable MariaDB (doesn't pollute your main system)
- Sets up a database with a random password on port 1338 (configurable)
- Installs the initial schema
- Every time after, will run updates

Major versions right now explicitly escape hatch, because those
historically come with something like a Python script, and I do not want
it to pretend to work.

---------

Co-authored-by: san7890 <the@san7890.com>
2023-05-15 12:49:29 -06:00
Jordan Dominion
3ceee2aab4 World Initialization Refactor (#74808)
- Removes unnecessary real global vars.
- Adds comments pointing to the init order defined in
/code/game/world.dm.
- Prevent people using `GLOBAL_REAL_VAR` and `GLOBAL_REAL` to circumvent
init order.
- Properly type `PROFILE_STORE` real global.
- Refactored `make_datum_references_lists()` and moved the call to it
into `GLOB` init with duct tape.
- Renamed `GLOB.admin_log` to `GLOB.admin_activities` as it wasn't
actually a log file.
- Whitelist loading happens in config.
- Renamed `SSdbcore`'s `SetRoundID()` to `InitializeRound()`. Now
handles calling `CheckSchemaVersion()`.
- Created macro for setting up log `GLOB`s.
- Removed log line for `GLOB` count.
- Moved call to `make_datum_reference_lists()` to
`/datum/controller/global_vars/Initialize()`. I slimmed it down where
possible too.
- Updated comments about world init order.
- Move `load_admins()` call to after log setup.
- Removes unused function `gib_stack_trace()`.
- Removes a bunch of unused log `GLOB`s.
- Unlocks the secrets of the universe by finally making the first
executed line of code deterministic.

No functional changes. Closes #74792
Testmerge thoroughly.

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-04-24 18:38:38 -06:00
Kyle Spier-Swenson
faf96a9ad0 Don't error on dupe configs in other files. (#73399)
It ruins my whole every server defaults -> per server overrides model
for config management

🆑
config: Repeated configs in other files (from $include) will no longer
trigger a config error. Repeated configs in the same file still will.
config: In all cases the new value will still be used
/🆑
2023-02-15 18:42:25 -07:00
Zephyr
bb3947e68f add a stack_trace to config validation checking (#73160)
## About The Pull Request

config validation didn't actually throw on invalid configs, thus CI
never caught breaking changes
## Why It's Good For The Game

config should work
2023-02-07 07:05:41 +00:00
Jacquerel
b174af7661 Basic Mob Carp Part VIII: Basic Mob Carp (#72073)
## About The Pull Request

Wow we're finally here. This turns carp into Basic Mobs instead of
Simple Animals.
They use a variety of behaviours added in previous PRs to act in a
marginally more interesting way than they used to.
But don't worry there's still 2 or 3 PRs to follow this one until I'm
done with space fish.

Changes in this PR:
Carp will try to run away if they get below 50% health, to make use of
their "regenerate if not attacked" component.
Magicarp have different targetting behaviour for spells depending on
their spell;
- Ressurecting Carp will try to ressurect allied mobs.
- Animating Carp will try to animate nearby objects.
- Door-creating Carp will try to turn nearby walls into doors.

You can order Magicarp to cast their spell on something if you happen to
manage to tame one.
The eating element now has support for "getting hurt" when you eat
something. Carp eating can rings and hating it was too soulful not to
continue supporting.

## Why It's Good For The Game

Carp are iconic beasts and I think they should be more interesting.
Also we just want to turn mobs into basic mobs anyway.

## Changelog

🆑
add: Carp will now run away if their health gets low, meaning they may
have a chance to regenerate.
add: Lia will now fight back if attacked instead of letting herself get
killed, watch out!
balance: Magicarp will now aim their spells more intelligently.
add: Tame Magicarp can be ordered to use their spells on things.
refactor: Carp are now "Basic Mobs" instead of "Simple Mobs"
fix: Dehydrated carp no longer give you a bad feeling when they're your
friend and a good feeling when they're going to attack you.
balance: Tamed carp are now friendly only to their tamer rather than
their whole faction, which should make dehydrated carp more active.
Order them to stay or follow you if you want them to behave around your
friends.
/🆑
2022-12-25 18:24:18 -08:00
Mothblocks
8bfc509771 Add development override configuration system (#71427)
Config system will now load dev_overrides.txt automatically if it
exists, but this file is in gitignore. I want to use this for
configuring SQL and such easier.
2022-11-25 20:22:57 +01:00
AnturK
4d6a8bc537 515 Compatibility (#71161)
Makes the code compatible with 515.1594+

Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword

And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.

@tgstation/commit-access Since the .proc/stuff is pretty big change.

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-15 03:50:11 +00:00
san7890
901662f59b Changes job config format to use TOML, and add tools for migrating existing format (#70199) 2022-10-18 14:51:24 -07:00
san7890
59b55793cd Word Filter Fix Round Two: JSON Decoding Debauchery (#68975)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Yeah, you need to json_decode the results again, again, again. This is three JSON decodes, I believe? I could be wrong. Anyways, we add another json_decode here as well to not runtime on initialization (as well as have the word filter work most likely).

Tested on local, did not see the runtime that @ShizCalev brought up in https://github.com/tgstation/tgstation/pull/68905#issuecomment-1204557463 (after verifying where it would be seen on master). Should be good now. Again.
2022-08-04 01:04:13 -04:00
san7890
a1e716b60a Blargedy Blarg Blarg Blarg - Word Filter Error Fix (#68905)
Blargedy Blarg Blarg Blarg - Word Filter Fix

Hey there,

Apparently, even after five days of thinking about the JSON_DECODE issue we had going from rust-g 1.0.1 to 1.0.2, I forgot to check our own code. I think I fudged something where I was using the global proc instead of the actual RUSTG define, so you would always get back an encoded JSON array, which would result in passing a null for content (based on what was seen on production), etc. The failure condition we were seeing is that no matter how perfect the word filter was, you would still crash to get this issue:

With a few "null spaces" after that message. So, I'm pretty sure this is the issue since I'm not seeing anything in my config_error.log  with this change added.

Whoops.
2022-08-02 06:31:38 -07:00
san7890
1e540f3286 Take Two: The word filter now verbosely describes config failure (Rust-g 1.0.2 Edition) (#68690)
A resuscitation of #67474 since Arm is not presently able to do it.

rustg_read_toml_file has backwards dependency to support older cases that checked for lack of list (the old sign the rust fn went wrong).

Fixes #67446

The configuration for the word filter now verbosely describes the error from the bad toml to the logs, allowing problems with it to be identified quicker and resolved.
Why It's Good For The Game

BLAZING
Ferris warning
Changelog

cl Armhulen/Armhulenn/Bazelart/Tralezab, san7890
admin: Word filters incorrectly set up will now have their errors actually described. Please, tell your server ops when you see it so they may fix the configuration.
server: Rust-g on this codebase is now on the 1.0.2 version, prepare accordingly.
/cl

I also bump rust-g's DLL to 1.0.2 in this PR as well.
2022-08-01 08:20:42 +12:00
ShizCalev
7b471582d8 Fixes some mapping errors not using the mapping error log. (#64114)
Should help prevent #64066 from reoccurring.
2022-01-18 12:18:04 -05:00
Watermelon914
8fd85e9666 [MDB IGNORE] BIDDLE TRAITORS - Adds progression traitors. Refactors uplink code in its entirety (#63588)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
Co-authored-by: tgstation-server <tgstation-server@tgstation13.org>
Co-authored-by: gbfree <guillaumebfree@gmail.com>
Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
Co-authored-by: Changelogs <action@github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com>
Co-authored-by: oranges <email@oranges.net.nz>
Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: ike709 <ike709@users.noreply.github.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Pepsilawn <reisenrui@gmail.com>
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: SuperNovaa41 <supernovaa41@protonmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: san7890 <34697715+san7890@users.noreply.github.com>
Co-authored-by: MMMiracles <lolaccount1@hotmail.com>
Co-authored-by: Krysonism <49783092+Krysonism@users.noreply.github.com>
Co-authored-by: Aziz Chynaliev <azizonkg@gmail.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
Co-authored-by: Mooshimi <85910816+Mooshimi@users.noreply.github.com>
Co-authored-by: carshalash <carshalash@gmail.com>
Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
2022-01-11 15:47:10 -08:00
GoldenAlpharex
d407799f4a The word filter will now be less scared of double or trailing spaces (#62703)
It kept on tripping because the RegEx expression was malformed due to an absence of words in to_join_on_whitespace_splits, which caused it to filter out spaces that were at the beginning or at the end of a message, or if there was two spaces one by the other.

Also prevents people from sending a message that's only spaces in OOC, because that's a little silly.
2021-11-10 18:26:53 +00:00
AndrewL97
1ef73dbc37 Map load unit testing and directory whitelisting - Mojave Sun is a really cool downstream, like and subscribe for longer PR names. oranges was here and made this github PR name much longer, thereby proving once and for all that upstreams do add value to the downstream not just endless amounts of refactoring because we can't write any api's in a modular fashion the first time around so have to update them later to be modular. Anyway do you think a taco counts as a sandwich? (#62620)
About The Pull Request

This is a fix for map not load anymore because of security changes
Why It's Good For The Game

Maps are good as they encourage gameplay and differentiate ss13 from a classic MUD game
Changelog

cl
add: unit test for map load
add: directory param to map load + whitelist for data and _maps
add: advertising for mojave sun in tg commit logs
/cl
2021-11-07 21:30:49 +13:00
TheFakeElon
3de38b11b8 [s] Security vulnerability patch (#62568)
About The Pull Request

In my personal, subjective opinion; trialmins should not, in fact, be able to read and delete server/box configuration files on a whim.

cl
server: Patches multiple(?) arbitrary file related vulnerabilities
/cl
2021-11-05 13:31:13 +13:00
NamelessFairy
1238ce2373 Adds the ability to soft filter words, also fixes some word filter bugs (#62158) 2021-10-26 12:45:36 -07:00
Mothblocks
1f000babea Fix word bounds on filters, where they would only be applied at the beginning (#61714) 2021-09-27 20:38:49 -07:00
Mothblocks
dbe560f4d9 Change the word filter configuration to allow providing reasons, fix emotes not working in filters, and implement separate OOC/IC/PDA filters (#61606) 2021-09-25 21:13:43 -07:00
Mothblocks
7b0c926634 Add support for multiple MOTD in config (#61589)
## About The Pull Request
Changes "motd.txt" from being hardcoded to being a list of files which are read sequentially.

CC @MrStonedOne for config changes

## Why It's Good For The Game
On production, our MOTDs contain several individual sections:

- Active Trial Admin threads
- General game information
- MRP specific information

I want to automate number 1, I want number 2 to be shared among all servers, and I want number 3 to be shared among all MRP servers.
2021-09-21 12:03:46 -04:00
Mothblocks
5a4c87a9fc tgui Preferences Menu + total rewrite of the preferences backend (#61313)
About The Pull Request

Rewrites the entire preferences menu in tgui. Rewrites the entire backend to be built upon datumized preferences, rather than constant additions to the preferences base datum.

Splits game preferences into its own window.

Antagonists are now split into their individual rulesets. You can now be a roundstart heretic without signing up for latejoin heretic, as an example.

This iteration matches parity, and provides very little new functionality, but adding anything new will be much easier.

Fixes #60823
Fixes #28907
Fixes #44887
Fixes #59912
Fixes #58458
Fixes #59181
Major TODOs

Quirk icons, from @Fikou (with some slight adjustments from me)
Lore text, from @EOBGames (4/6, need moths and then ethereal lore from @AMonkeyThatCodes)
Heavy documentation on how one would add new preferences, species, jobs, etc

    A lot of specialized testing so that people's real data don't get corrupted

Changelog

cl Mothblocks, Floyd on lots of the design
refactor: The preferences menu has been completely rewritten in tgui.
refactor: The "Stop Sounds" verb has been moved to OOC.
/cl
2021-09-15 10:11:11 +12:00
Bobbahbrown
634049e1e9 Add $reset directive to config processor for setting a config entry to default value (#59874)
added this so that the value of INTERVIEW_QUESTIONS (and subsequently any other string list) can be overridden without much issue by additional config files.

i also changed the functionality of default on config_entry as it seemed to be counterintuitive to have it be set to the initial value of the config_entry. in my opinion this should be a compile-time default, and so i've refactored the code such that default now contains the actual default, and the config_entry_value is set at intialization.
2021-06-30 16:20:57 +12:00
Mothblocks
e2b929974e Remove a bunch of old gamemode code (#59067)
* Beep beep gamemode removal coming through

* More cleaning

* More cleaning

* Clean up station_was_nuked

* Station nuke source

* Remove name

* More unused functions

* Remove antag rep, which was unused in dynamic

* Remove more antag rep stuff, which was UNUSED IN DYNAMIC

* Station goals outside of mode

* Remove setup_done

* Remove player lists

* Move some older procs

* Fix simulations

* Attempt to fix this stupid case sensitive bullshit

* Revert "Attempt to fix this stupid case sensitive bullshit"

This reverts commit 8693c02d67602543d7d4b92130a7a32cd973e5bf.

* ???

* Delete icons/Testing directory

* Move station_goals global definition
2021-05-29 11:03:41 +02:00
Mothblocks
7e4de07506 Remove all gamemodes except Dynamic (#58470)
Removes all /datum/game_mode except dynamic. Eventually, all of mode and game_mode will be removed, and Dynamic will become an ingrained system. Every single other gamemode was unmaintained at best and poisoned other code at worst. Currently all tg servers run 24/7 Dynamic, so the time to act is now.

* Remove gamemode references from age checks

* Monkey

* Remove heretics

* Remove BBs

* Refactor uplinks and remove clown ops

* Remove nuke ops

* Removes and refactors cult

* Remove extended

* Remove and move out meteors

* Removes wizard

* Remove sandbox

* Remove changelings

* Remove traitors

* Remove revs

* Remove gangs

* Remove changing mode and voting for new gamemodes

* get_candidates signature fix

* Summon ERT and NERD in their own panel

* Remove some old unneeded age_check stuff

* Fix old signatures of get_uplink_items

* Use Extended like config for dynamic.json

* Fix discounted gear
2021-04-25 01:55:10 -07:00
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
LemonInTheDark
dd6cea82d9 Reverts the recent config changes (#56606)
* Revert "Fixes included config files not loading (#56602)"

This reverts commit 0749b322f6.

* Revert "Adds configuration consistency tests (#56562)"

This reverts commit 4f44014e25.
2021-02-02 22:14:47 -05:00
LemonInTheDark
0749b322f6 Fixes included config files not loading (#56602)
Fixes included config files not loading, adds an error to catch future instances, cleans up some code and comments a proc
We were passing a list as a filename, which is never good for file loading
2021-02-02 20:31:17 -05:00
Jordan Brown
4f44014e25 Adds configuration consistency tests (#56562)
Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-02 13:22:52 -08:00
Jordan Brown
cd22f91ddf Fix startup double runtimes again (#56047)
Prevents runtimes that occur before /world/New is called from runtiming in /world/Error due to lack of the config being loaded.
2021-01-10 00:04:58 -03:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
Tad Hardesty
89b4e01680 Fix various issues with browser statpanel (#53263)
* Keep tab buttons in view when scrolled down
* Unfocus tab buttons after click so scrollbar keeps working
* Fix some subsystem stat entries
* Improve key passthrough
* Fix runtimes from nulls in AI connected_robot list
* Add missing info in MC tab for global/config/etc.
* Fix #53298 by including turf in alt-click menu
2020-08-29 23:51:42 -03:00
Aleksej Komarov
0e1b20e6db tgchat (#52426)
Replaces goonchat with a tgui based chat panel

    Fixes #52898
    Fixes #52663

It is as fast as goonchat was (if not faster in certain circumstances), and is very extensible. It has all the necessary code for sorting messages into categories, which means that one of the next features will be multiple tab support.

Additional features that you will get with tgchat right now:
    Massively faster server-side performance compared to goonchat, especially if batching multiple messages to one client.
    Message persistence across rounds and reconnects. (All messages are stored client-side in IndexedDB)
    More robust scroll tracking. If you scroll up, it will not change the scroll position on new messages like goonchat did.
    Multiple message combining. (Currently set to combine up to 5 messages over last 5 seconds).
    If using the highlighting feature, it highlights the whole message as well as the matching word.
    "Now playing" widget, with preview of the song title, a knob for adjusting the volume and a stop button.

Architecture is as following:
```
to_chat() -+
           |
        SSchat
   (queue, batching)
           |
  window.send_message()
           |
           v
+-------------+
| tgui-panel  |
|+-----------+|
|| tgchat    ||
|+-----------+|
+-------------+
```

Subsystem is basically goonchat, but without all the garbage that slows the servers down (string concatenation, double urlencoding, sanitizing, etc). Now, instead of all that, it's being slowed down by json_encode in /datum/tgui_window/proc/send_message, which IMO is completely worth it, and allows sending various templates and widgets to tgchat.

/datum/tgui_window abstracts the whole window away from you, establishes a nice message-passing interface between DM and JS, with two message queues on each side, automatically loads js/css assets for you, basically does everything. You as a developer only have to worry about sending/receiving messages and write javascript.

tgui-panel is a slimmed down version of tgui, and functions as a container for various widgets, and tgchat is one of them. It of course can be expanded with more stuff.

It's also a separate entry point and a JS bundle, so it's not bloating the main tgui bundle, and is currently sitting at about 230kB.
2020-08-14 13:21:40 +12:00
Kyle Spier-Swenson
8df93ba39e [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
2020-08-12 13:51:43 +12:00
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
MrPerson
f7eb2c905b Unicode awareness Part 2 -- copytext() (#48512)
* Unicode support Part 2 -- copytext()

This is the transition of all copytext() calls to be unicode aware and also some nearby calls in the same functions. Most things are just replacing copytext() with copytext_char() as a terrible character limiter but a few others were slightly more involved.

I replaced a ton of
````
var/something = sanitize(input())
something = copytext(something, 1, MAX_MESSAGE_LEN)
````

with a single stripped_input() call. stripped_input() already calls html_encode(), trim(), and some other sanitization so there shouldn't be any major issues there.

This is still VERY rough btw; DNA is a mess, the status displays are complete ass, there's a copytext() in code\datums\shuttles.dm that I'm not sure what to do with, and I didn't touch anything in the tools folder. I haven't tested this much at all yet, I only got it to compile earlier this morning. There's also likely to be weird bugs until I get around to fixing length(), findtext(), and the rest of the string procs.

* Makes the code functional

* Assume color hex strings are always # followed by ascii.
Properly encodes and decodes the stuff in mob_helpers.dm which fixes some issues there.

* Removes ninjaspeak since it's unused
2020-01-18 13:07:22 +13:00
spookydonut
4e8ff18b07 Fix Travis grep script to use PCRE to actually match things (#47065)
Several of the greps were missing the `-P` switch which caused them to 
fail to match things. The EOL grep also wasn't working right so I 
replaced it with the one I added to TGMC.
2019-10-19 10:21:05 -07:00
AnturK
6c2a6e8d64 Supresses policy file runtime but messages admins about it. 2019-07-07 21:28:21 +02:00
JJRcop
938789d0a7 [READY] Blocked words tell you which ones (#44728)
About The Pull Request

Same premise as #44712 but using a simple regex replace and also on the client side
Closes #44712

I was gonna PR it to #44712 but half way through I realized I had already replaced nearly all of bobbah's changes, and after I was finished the branches shared nothing.
Why It's Good For The Game

The delta is way smaller and simpler
Should solve the DoS concerns without needing a limit on bad chats because it's not a loop it's on the client side
Changelog

cl JJRcop and Bobbahbrown
tweak: When attempting to say a blocked word in character you will be notified which ones were blocked.
/cl
2019-06-29 21:09:56 +12:00
Unknown
62edbcf64f Satisfies the fruit 2019-06-19 19:48:08 -06:00
Unknown
8e65bb63c4 Config 2019-06-19 18:39:34 -06:00
AnturK
69ac935bde Upgrades policy config + policy verb. (#44296)
* Upgrades policy config + policy verb.

* Better example and proper default value.

* hr on top

* Cleanup
2019-06-10 11:51:25 -04:00
TheChosenEvilOne
a66126d7e3 Add map voting (#44244)
- Add map voting
- Rename config option for preferred map weighted map selection
2019-06-04 23:55:14 +02:00
Tad Hardesty
55db6f8761 Remove misleading THIS_PROC_TYPE macro 2019-03-06 18:28:42 -08:00
Mike Long
8dc15f30d1 Fixes errant capitalization based compile error 2018-10-13 18:35:04 -04:00