Commit Graph

11 Commits

Author SHA1 Message Date
san7890
ccef887efe Lints Against Unmanaged Local Defines (#74333)
# MAINTAINER - USE THE BUTTON THAT SAYS "MERGE MASTER" THEN SET THE PR
TO AUTO-MERGE! IT'S MUCH EASIER FOR ME TO FIX THINGS BEFORE THEY SKEW
RATHER THAN AFTER THE FACT.

## About The Pull Request

Hey there,

This took a while to do, but here's the gist:

Python file now regexes every file in `/code` except for those that have
some valid reason to be tacking on more global defines. Some of those
reasons are simply just that I don't have the time right now (doing what
you see in this PR took a few hours) to refactor and parse what should
belong and what should be thrown out. For the time being though, this PR
will at least _halt_ people making the mistake of not `#undef`ing any
files they `#define` "locally", or within the scope of a file.

Most people forget to do this and this leads to a lot of mess later on
due to how many variables can be unmanaged on the global level. I've
made this mistake, you've made this mistake, it's a common thing. Let's
automatically check for it so it can be fixed no-stress.

Scenarios this PR corrects:

* Forgetting to undef a define but undeffing others.
* Not undeffing any defines in your file.
* Earmarking a define as a "file local" define, but not defining it.
* Having a define be a "file local" define, but having it be used
elsewhere.
* Having a "local" define not even be in the file that it only shows up
in.
* Having a completely unused define*

(* I kept some of these because they seemed important... Others were
junked.)
## Why It's Good For The Game

If you wanna use it across multiple files, no reason to not make it a
global define (maybe there's a few reasons but let's assume that this is
the 95% case).

Let me know if you don't like how I re-arranged some of the defines and
how you'd rather see it be implemented, and I'd be happy to do that.
This was mostly just "eh does it need it or not" sorta stuff.

I used a pretty cool way to detect if we should use the standardized
GitHub "error" output, you can see the results of that here
https://github.com/san7890/bruhstation/actions/runs/4549766579/jobs/8022186846#step:7:792
## Changelog
Nothing that really concerns players.

(I fixed up all this stuff using vscode, no regexes beyond what you see
in the python script. sorry downstreams)
2023-03-29 10:17:03 -07:00
Zephyr
dc2b1f5589 Removes SQRT_2 and its usages (#72913)
Signed-off-by: GitHub <noreply@github.com>
## About The Pull Request
## Why It's Good For The Game
Resolves #72534 
## Changelog

Signed-off-by: GitHub <noreply@github.com>
2023-01-24 10:51:52 -08:00
Mothblocks
e9351f6ae0 Add lints for idiomatic balloon alert usage (#72280)
Adds lints for `balloon_alert(span_xxx(...))` (which is always wrong),
and balloon alert where the first letter is a capital (which is usually
wrong). Fixes everything that failed them. As a reminder, abbreviations
like "AI" and "GPS" shouldn't be capitalized in a balloon alert.

In cases where this is intentional for flavor (there was one case), you
can `UNLINT` like so:

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2022-12-29 19:01:45 +00:00
GoblinBackwards
80f7366c21 Fixes being able to get to centcomm and move through floors when in mechs/boxes (#71486)
## About The Pull Request
Fixes #71484 - Adds a check to the down verb to make sure a z level
exists below before trying to move.
Changes some step() in relay_move procs to use zMove instead if they
have a direction of up/down, as this was causing you to be able to phase
through floors if you were in a cardboard box/mech/etc
## Why It's Good For The Game

![dreamseeker_LuXqZUhvNg](https://user-images.githubusercontent.com/22856555/203672877-6b7da56c-494a-49dc-a8c8-13b15c2133eb.gif)
## Changelog
🆑
fix: Fixed being able to move through floors and get to centcomm when
moving up/down while inside mechs and similar movable objects.
/🆑
2022-11-25 00:29:11 -08:00
ShizCalev
9dab26371c Throws a bunch of parenthesis around to ensure dear Aunt Sally is always properly excused. (#71281)
Similar vein to #37116

This is supposed to be standard, yet here we are.

SHOULDN'T change anything, but there's likely something out there that's
bound to behave different because of it.


These were done manually, regex to find things that MIGHT need to be
corrected;
`^#define.+\+((?!\)).)*$`
`^#define.+-((?!\)).)*$`
`^#define.+\*((?!\)).)*$`
`^#define.+\/((?!\)).)*$` (yeah that's a lot of stuff.)
`^#define.+%((?!\)).)*$`
`^#define.+SECONDS((?!\)).)*$`
`^#define.+MINUTES((?!\)).)*$`
2022-11-21 20:53:06 -08: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
Fikou
00db69ffdd you can no longer stuff infinite ais in modsuits (#65915) 2022-04-05 19:37:56 -07:00
Fikou
fd9a7f8a58 MOD update: Modular Cores (#64042)
* Modsuit update - Cores
2022-01-15 13:54:53 +01:00
Fikou
4adebd7f02 modsuit works with speed potions + ai movement fix + file sortage (#63670)
modsuit examining now tells you about wire panels
fixes being able to remove stuff with the dna lock
fixes 63650
fixes 63633
sorts module files
2021-12-29 13:44:27 -08:00
Fikou
f58848e2ec modsuit patch one (#63638)
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2021-12-27 14:47:59 -08:00
Fikou
7b38dd4ff7 MODsuits (#59109) 2021-12-24 12:00:24 -08:00