Commit Graph

62 Commits

Author SHA1 Message Date
oranges
981f09693c Allows people to skip the icon cutter on a DMTARGET, but properly this time (#86500)
Adds a new build parameter to skip icon cutting, this build parameter is
--skip-icon-cutter

This allows users like myself who don't have a working hypnagogic to
build the game when we are trying to debug code issues and don't care
about icons being cut or not

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2024-09-06 16:22:52 -06:00
AnturK
c6952e132b Build script detects sound changes properly. (#86113)
Fixes #86112
2024-09-04 12:13:48 +02:00
AnturK
7ca738d168 Fixes CI not checking warnings. (#83015)
Yeah.
2024-05-03 13:37:38 -06:00
LemonInTheDark
0d28e004e3 Bumps Hypnagogic to v3.1.0 (#82953)
## About The Pull Request

Bumps the cutter to my latest
[version](https://github.com/spacestation13/hypnagogic/releases/tag/v3.1.0)

See there for the full CL but in short:

### Fixes/Polish

Error handling actually works now (it prints instead of crashing the
program)

Pretty colors in CLI when running it


![image](https://github.com/tgstation/tgstation/assets/58055496/3bb1ce3c-055e-4b3d-ba94-dad262517a94)

Release files are more portable (Windows version requires less cruft bs
dlls, and the linux version targets musl instead of glibc, making it far
less platform dependent)

### Features

The cutter supports a new mode called Reconstruction, which takes a
target dmi and does a good faith effort to convert it back to input png
and toml files. This only works for default bitmasking, and it doesn't
ALWAYS work, but it's really powerful.
It's what I used to make my initial cutter pr here. See
[here](https://github.com/spacestation13/hypnagogic/blob/v3.1.0/examples/bitmask-slice-restore.toml)
for more detail.
2024-04-30 17:06:26 +02:00
LemonInTheDark
4a5cb3e92f Makes the cutter lint actually work (#82913)
## About The Pull Request

Turns out I fucked up the os walk stuff so this never actually did
anything. (also a broken param but at this point does it even matter)
More then that, it wasn't build to handle being called by something not
in its folder. This fixed that, so the lint like actually works.
2024-04-28 13:25:15 -06:00
Jeremiah
318857c302 Reverts 82333 (#82608)
## About The Pull Request
#82333 

I was mistaken

The inconsistent indentation warnings are killing me

I tried
## Why It's Good For The Game
Developer sanity
2024-04-12 07:14:39 -04:00
Jeremiah
4339fcb264 Removes editorconfig and suggested extension (#82333)
## About The Pull Request
(Correct me if I'm wrong here but) this is made obsolete by prettier and
our vscode settings
## Why It's Good For The Game
Removes obsolete tools
## Changelog
N/A nothing player facing
2024-03-31 17:47:22 -06:00
AnturK
0bbb32e91d Makes the DM too old to build message better. (#82110)
Since the current wording was kinda ambiguous.
2024-03-20 15:38:45 -06:00
AnturK
4fdf458d40 Adds better buildtool errors when using byond 514 or older (#81129)
Every time someone asks what -DCBT means i lose sleep so here's a
slightly invasive solution.
Build will now check if the dm version is at least 515.1597 (first
version with -D switch), at the cost of having to run dry dm.exe run.
2024-01-28 23:46:10 +01:00
Jordan Dominion
6de94bbf9e Wait 10s in TGS build for ESBuild to exit (#80958)
ESBuild lingering after the build has caused issues with TGS on TGMC
(running Windows).

@MrStonedOne test this please?
2024-01-17 04:36:16 -05:00
Kyle Spier-Swenson
8b91d3b8b7 Fix juke ignoring changes in dm files in the map folder (#80861)
juke refuses to compile dm if it thinks nothing changed.

juke doesn't have a way to bypass this and force a given target to
compile (this is a complaint for another repo)

There are dm files inside of this folder that are compiled in.
2024-01-09 14:08:00 -05:00
ReturnToZender
43073f6b54 Fixes .jsx missing from TguiTarget in build.js (#80630)
## About The Pull Request
.jsx files were recently switched to by TGstation, but because they were
not in TGUITarget, when you make changes to a .jsx file, it doesn't
recompile TGUI! Yippee!

I SPENT HALF AN HOUR RECOMPILING MY TGUI AND HAVING IT JUST NOT SHOW UP.
IT'S THE WORST. PLEASE FREE ME.
This PR fixes that

## Why It's Good For The Game
This has no game impact, it just fixes something that infuriates me. It
will save coders from the pain I had to go through before I realized
what was wrong.

## Changelog

🆑 ReturnToZender
fix: JSX files, when edited, cause TGUI to recompile on build
/🆑
2023-12-28 18:04:59 -08:00
AnturK
c4ccea1ab6 Makes build tool use 515 -D argument instead of m.dme file (#80494)
Now that we require 515 to build, we can simplify the build process a
bit.

Leaves TGS define part in until TGS gets that functionality
2023-12-22 10:32:58 -05:00
LemonInTheDark
b8fc9b367e Icon Autoslicing (#79659)
## About The Pull Request

Ok so you know all the dmis we have that are made to work with the
smoothing system? carpets, walls, etc.

The proper way to edit those is to convert them into a png with 5
"states' it in (one for 0 connections, one for horizontal, one for
vertical, one for all cardinals and one for all directions) and then
modify THAT, then run it through [the cutter
tool.](https://github.com/tgstation/icon-cutter)

But none ever does that, because we explain it fucking nowhere. So
instead, let's keep all those "base" files in the repo, alongside the
configs they work with, and "cut" the pngs into dmis as a part of the
build process.

I wrote a guide for how to interact with this system as a spriter, you
can find it
[HERE](https://github.com/LemonInTheDark/tgstation/blob/slice-the-sky/icons/Cutter.md).

[Adds a icon cutter build
task](52143d2e96)

This relies on action ninja's hypnagogic (find more
[here](https://github.com/actioninja/hypnagogic)), a rust based icon
cutter.
It operates inline with the file structure, searching the codebase for
templates and resource files and compiling them down to dmis.

It can do way more then just bitmask stuff, but that is what we are
using it for rn.

Hope is to prevent for eternity the "I'm just gonna edit each of these
255 icon states that's how this carpet was made right?" meme, and allow
more expansive use of smoothing in future

[Adds a lint that ensures config files work
right](21eeab9cf8)

Checks to ensure they have a paired png and dmi, and also avoids issues
with uncompiled changes by double checking that nothing happens
before/after a cutter run

[Pulls all non smoothed states out of structures into bespoke
dmis](a730e0cb47)

This is required because the cutter cannot output named icon states,
only the actual cut icon

[Does something similar to
walls](40780e9481)

Moves reinforced walls decon stuff from their icon to a var on the type
and a set of states in the reinforced_states dmi

Moves falsewalls into their own dmi, this involved some changes to
gamecode to ensure falsewalls knew which dmi to use and what key.
Makes falsewalls display as such in editor rather then just walls

Moves smoothrock's gibonite overlays into their own file for similar
reasons

[Same thing different day
(Floors)](9a3da3b697)

Pulls bespoke floor icon states into their own file, splits up neon
carpets into multiple files to make cutting possible

[Actually adds the cut templates and their matching png
files](1bd8920dc9)

Not much to report here, outside of I changed the prefix for bamboo
walls to bamboo_wall so it works with false_walls

## Why It's Good For The Game


![image](https://github.com/tgstation/tgstation/assets/58055496/7c3ac7fb-873c-481b-8667-082e39432876)

None should have to manually edit cut dmis. Ever.
Also this makes adding a new smoothed thing trivial, don't even need to
know what tool you're using to do it. V good v good.
Sets us up nicely for wallening's well, wall of sprites.

Some structural decisions, we are essentially committing build artifacts
here. That's the best way of handling it because otherwise mappers could
need to run build.bat before opening a map, and that is stupid!

## Changelog
🆑
refactor: (Almost) all smoothed icons can now be edited in their pre cut
forms
/🆑
2023-12-07 16:43:00 +13:00
Jordan Dominion
44f88e49be Quietens Spaceman when debugging UNIT_TESTS locally (#75570)
The contract is removed by virtue of testing.
2023-05-30 01:21:55 +00:00
Jordan Dominion
3df5d3b42b Removes +x from files that shouldn't have it (#75574)
Each of these is an extra operation TGS has to do when copying the repo.

Who is committing these?
2023-05-21 18:59:59 -07:00
Mothblocks
486b569cb0 Fix 515 warnings from INVOKE_ASYNC and qdel experiment flag, treat warnings as errors in CI (#73788)
Fixes #72681
2023-03-05 23:37:11 -05:00
AnturK
d56b762103 Fixes build script "server" target (#71376)
Put the param in wrong place in #71283
2022-11-21 19:56:27 +01:00
AnturK
b9f26ad477 Adds basic support for multiple byond versions to build scripts. (#71283)
You can now specify few named versions in `tools/build/dm_versions.json`
file and either set them as default (overriding anything but env vars)
or just use them with new --dm-version parameter.

Makes juggling versions bit easier during testing. I'll look into adding
support in sdmm so debugging is in line later.

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2022-11-17 08:54:47 -08:00
Tastyfish
849bf5ae80 Fixes tramstation chunk, adds map test path (#70822)
Fixes tramstation chunk, adds map compilation path to also check for modular maint maps.
2022-10-27 17:46:19 -04:00
AnturK
c6fb4f3a47 Cleans up tgfont build command (#69786)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2022-09-08 16:59:46 -07:00
san7890
00c500d8a0 Removes Goon from Build.js (#68679)
* Removes Goon from Build.js

Hey there,

This folder doesn't exist any more on the repository, so we should probably drop it since it is no longer relevant to the function of this script.

I assume my changing of nearly every line in this file is related to Prettier running on the Javascript.

* Revert "Removes Goon from Build.js"

This reverts commit 1c5ab76fa9bbb1474a6ad615eef1bea27091f323.

* Does it without Prettier
2022-07-24 14:30:40 -04:00
Jeremiah
731ab29aa7 Adds Prettierx - or how I broke TGUI for the nth time (#67935)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2022-06-23 18:10:22 -07:00
Jeremiah
acfa5e4fdd TGUI Say: Upgrades chat input with modern features (#67116)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: iamgoofball <iamgoofball@gmail.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: KubeRoot <6917698+KubeRoot@users.noreply.github.com>
Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: Iamgoofball <4081722+Iamgoofball@users.noreply.github.com>
Co-authored-by: DomitiusKnack <56321744+DomitiusKnack@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Wallem <66052067+Wallemations@users.noreply.github.com>
2022-06-16 17:21:21 -07:00
Mothblocks
3d319f6157 Autowiki - Generate wiki pages through code (#64417)
Adds a /datum/autowiki template which can be derived in order to create wiki pages and queue file uploads. This is then kickstarted by the new tgs target autowiki (using the AUTOWIKI define) in order to upload these pages.

The pages generated are, in a best case scenario, raw data. This means that wiki editors can decide what the actual theme is without ever having to touch the repository. In the future, MSO will hopefully sandbox the wiki and install Scribunto to let us separate data and style even more.

These will, when done, upload to templates, such as Template:Autowiki/VendingMachines. The actual pages (in this case "Vending Machines") will include this, and thus can write down their own prose and whatnot without ever having to touch repo.

This will also be run on a daily GitHub action, with some secrets setup to link to the account. Currently this is on a bot password (my forum account will not be leaked in the event of a collapse), but at some point I would like to create a dedicated bot account.

This PR adds a Techweb and Vending Machine autowiki. You can look at the Vending Machines one here and the Techweb one here.

I have absolutely no idea what to label this PR (other than note the unit tests I've added). Feel free to add whatever gives GBP 😉
2022-01-28 00:30:15 +00:00
AnturK
dc510bccbb Remove tgfont from pipeline, build it to git (#63358) 2021-12-12 00:57:23 +02:00
Aleksej Komarov
26f56653c6 tgui-bench (#61081)
Added a package that allows precisely benchmarking tgui components on IE11 without having the game launched.

It has a convenient syntax for writing tests, just create a file packages/tgui-bench/tests/*.test.tsx, and export a function which you want to benchmark

Performance improvements
As part of this PR, I have also improved the raw performance of some tgui components:

Button component - 1.8x faster
Flex component - 1.1x faster
Stack component - 1.3x faster
This improves performance of heavy UIs by a tiny bit.
2021-09-09 18:11:41 +01:00
Aleksej Komarov
96d53c0f8b Downgrade Juke to 0.8.1 (#61110)
A light version of the revert to help builds work on TGS3.

(TGS3 builds were locking up on live, causing servers to be unable to testmerge or update things because of something to do with the recent juke build. I don't into the build tool, otherwise I'd be more clear)
2021-08-30 23:14:08 -07:00
mokulus
e6e38ec4e5 Exit on DreamMaker warnings in CI Windows build (#61025)
Added an option to tools/build/build to treat DreamMaker warnings as errors. Enabled this option only for Windows Build (tools/ci/build.ps1).

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-08-26 12:08:26 +03:00
Aleksej Komarov
a7753ad6fd Juke Build 0.9.0 (#61005)
* Juke Build 0.9.0

* Fix a small bug with build.js

* Distill cmds

* Return sonar

* Revert those build.cmd changes

* Some improvements

* Treat all sonar warnings as errors because they should fail the sonar target

* Do not clean up bootstrap cache because it locks up on removing it
2021-08-25 16:09:00 +02:00
Aleksej Komarov
ad3ef5c803 Juke Build 0.8.1 Hotfix 1 (#60897)
* Juke Build 0.8.1 Hotfix 1

* Do not restore Yarn cache on just DM build
2021-08-16 20:58:28 +03:00
Aleksej Komarov
9bbabfe36b tgui maintenance chores (#60859)
## About The Pull Request

**Upgrades:**

- Yarn 3.0
- TypeScript 4.3
- Sass 1.37
  - Required some refactoring of `/` into `math.div()` in CSS

**Dependency removals:**

- Removed ESM package, see: https://github.com/standard-things/esm/pull/902

I initially thought it was impossible to stop relying on this package, but fortunately, ES module support in Node 12+ now comes standard and I only had to convert the very few external module imports to `require()` (because Yarn PnP).

I also moved `logging.js` directly into `tgui-dev-server` package, because that's where it is used. One less internal dependency.

**Sidegrades:**

- Removed creation of a common tgui chunk, because in practice it creates unnecessary complexity (devs sometimes get a white screen due to this chunk being invalid) and doesn't really save that much data on CDN, and **definitely** doesn't make tgui load faster.

I think that is all. I tested it a bit and everything seemingly works.
2021-08-16 12:21:45 -04:00
Aleksej Komarov
a7de4870ac Use experimental modules flag for Node before 12.22.4 (#60891) 2021-08-16 18:56:54 +03:00
Aleksej Komarov
e5ae0667bf Juke Build 0.8.1 (#60404) 2021-08-15 15:17:11 -07:00
Aleksej Komarov
6eacbde24f Stop compiling DM if compiler outputs are locked. (#60022)
Basically, saves developer's time by yelling that the compiler can't write to dmb/rsc, because they are locked by Dream Daemon.

Added myself as a code owner for /tools/build.
2021-07-07 01:01:46 +01:00
Aleksej Komarov
f59adc2537 Juke Build 0.4.0 (#59796)
Updated Juke Build to version 0.4.0
Main new feature: dependsOn, inputs, outputs, and onlyWhen fields now all accept a function of format ({ get }) => ..., and all of them can be async. This means that you can easily parametrize every part of the build.
Added references to Juke Build to README in the build folder
2021-06-25 13:29:36 -03:00
Aleksej Komarov
d200efc293 Juke Build Hotfix 2 - PreCompile script compatibility (#59649)
* Juke Build Hotfix 2 - PreCompile script compatibility

* Pass arguments from bat to build.js

* Pass arguments in BUILD.bat as well

* Quick tweak
2021-06-14 09:30:59 +12:00
Aleksej Komarov
280882b549 Juke Build Hotfix 1 (#59643)
* Juke Build Fix

* More fixes
2021-06-13 17:00:04 +02:00
Aleksej Komarov
b06d238de9 Juke Build (#59390) 2021-06-13 00:15:51 -07:00
tralezab
743c5f44c6 Close every issue made by ZeWaka (#58701)
sure whatever i totally know what im doing
2021-04-27 16:51:37 +03:00
Jonathan Rubenstein
89b8d584b1 Add "Except DM" build mode to build.js (#58245) 2021-04-10 15:10:52 -07:00
ZeWaka
8a14af7bce Deletes duplicate export property (#58212) 2021-04-08 00:07:09 -07:00
Aleksej Komarov
29556e879b Upgrade tgui dependencies, make yarn task skippable (#58081)
* Upgrade tgui dependencies, make yarn task skippable

* Use a phony target to avoid double rebuilds
2021-04-01 11:00:35 +02:00
Cyprex
687a1c05df Add note about rust-g for building on Linux (#57622)
This PR adds a minor note about needing to compile rust-g to Linux building instructions. I'm not sure if this is the appropriate place for it, but I don't see a better place to put it.
2021-03-26 10:10:28 +13:00
Mothblocks
a6280d2e39 Create explicit warning if not building with CBT (#57931)
Adds a new CBT define which is automatically created when building. If this define is absent, the build will fail.

This is what Cyberboss tried to do with USE_BUILD_BAT_INSTEAD_OF_DREAM_MAKER.dm, but couldn't.

The reasoning behind this is CBT is already a requirement to build a fresh project, otherwise the tgui bundle files won't exist. This gives a readable error to go along with that. However, you can currently build once then just use Dream Maker. This is a footgun - not only are we already adding new things to CBT like tgfont which will fail later on, but also it will create weird scenarios when we add tasks to CBT that don't immediately fail if not ran, or otherwise create out of sync builds.

Also replaces rmSync with unlinkSync, which works on older Node versions.

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-03-25 18:48:07 +02:00
Aleksej Komarov
8080a5132c tgui: ESLint and VSCode settings improvements (#57905)
Added column 80 rulers to all javascript and scss files.
    Added a "prettier" config to have sensible defaults for those who prefer to use it.
    Added RadarJS (fork of SonarQube's SonarJS). Launchable only via bin/tgui --lint-harder for now.
    Disabled ESLint rule for parens around arrow function arguments, because in TypeScript they're pretty much always required, and I don't want to replace it throughout the codebase.
    Removed unused javascript extensions from tooling (jsx, mjs).
2021-03-23 23:35:19 +00:00
AnturK
7fef33c459 Adds easy to extend custom svg font. (#57717)
Just throw in svgs into tgui/packages/tgfont/icons directory and you can use them in tgui with tg- prefix.

Co-authored-by: Style Mistake <stylemistake@gmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-03-18 15:20:59 +02:00
Aleksej Komarov
9c9cdfac8a Check node version in CBT (#57461) 2021-03-06 14:42:37 -08:00
AnturK
df610c66a5 Fixes build destructuring false (#57287) 2021-02-28 13:21:04 -05:00
Aleksej Komarov
c474392ff3 More robust checking of DM paths (#57277) 2021-02-28 14:41:39 +01:00