jamie stinks (#16349)

* Modernizes TGUI (#4219)

* Ports the first two PRs. CBT works local

* tchussi oops

* linttobuild

* Update Dockerfile for CBT (#56175)

Follow-up to fix the failing Docker CI on master.

- Reorganize the entire Dockerfile to be more readable
- Inline the tgstation/byond Dockerfile into our own, so we can change the base distro at will
- Also allows us to trash the dependencies.sh<->Dockerfile hack
- Use 32-bit libs on a 64-bit distro so that we can download and run recent 64-bit Node binaries
- Call tools/build/build rather than DreamMaker directly

* TGUI 43 plus hotfix 1

* https://github.com/tgstation/tgstation/pull/58701

* https://github.com/tgstation/tgstation/pull/56223

* https://github.com/tgstation/tgstation/pull/56229

* https://github.com/tgstation/tgstation/pull/56713

* https://github.com/tgstation/tgstation/pull/56797

* https://github.com/tgstation/tgstation/pull/57081/

* https://github.com/tgstation/tgstation/pull/57154

* https://github.com/tgstation/tgstation/pull/57251

* https://github.com/tgstation/tgstation/pull/56269

* https://github.com/tgstation/tgstation/pull/57277

* https://github.com/tgstation/tgstation/pull/57287

* https://github.com/tgstation/tgstation/pull/57326

* QF

* GimmeHopeUpdateExtra_Pr_Labels

* Flush queue in preloading part of tgui_panel (#57432)

* Flush queue in preloading part of tgui_panel

* Update tgui_panel.dm

* Compiles

* https://github.com/tgstation/tgstation/pull/57461

* tgui: Upgrade to Yarn 2.4.1 and TypeScript 4.2 (#57465)

* Fix tgui reloading (#57499)

* 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.

* Fixes build script failing properly on windows. (#57623)

* 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>

* Typescript fixups. (#57746)

* Improve tgui routing to allow interface subdirectories (#57825)

* Improve tgui routing to allow interface subdirectories

* Reverse order of interface file resolution, to be consistent with common expectation (top-level .tsx, top-level .js, directory .tsx, directory.js) and the way Webpack checks

* Fixes TGS compiles on windows. (#57834)

Batch quotes strike again.

* 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).

* https://github.com/tgstation/tgstation/pull/57931

* https://github.com/tgstation/tgstation/pull/58061

* https://github.com/tgstation/tgstation/pull/58081

* https://github.com/tgstation/tgstation/pull/58212

* https://github.com/tgstation/tgstation/pull/58215

* https://github.com/tgstation/tgstation/pull/58219

* Add "Except DM" build mode to build.js (#58245)

* https://github.com/tgstation/tgstation/pull/58484

* FixBaconFabandPodLauncher

* haharunlintmanuallyfirstkids

* One last fab change then its perf

* f5willwork

* This May Do it

* prune

* Fix Docker build failing on a clean checkout (#56190)

Follow-up to #56175 which turned out to be accidentally relying on Node already being downloaded.

* Huh? Rebuild you better be a fluke

* getinthere

* Syncretize

* Revert "Syncretize"

This reverts commit 41749b68868d2af1b82de9ba6de39cf8052dd1ee.

* zzzz

* quick path change

* another quick

* Correct Dockerfile, bloats it with GCC lol.

* small

* back2oldfile I HATE DOCKER I HATE EXTOOLS

* firstthingnotdonelol

* yuabzn

* v

* reverttoclassic

* Difffffffffff

* prec1s

* ccc

* ok

* bitte

* jesus im dum

* z

* Nuke Window resizable and improve drag code (#56727)

* comp

Co-authored-by: Tad Hardesty <tad@platymuus.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: Cyprex <35031555+Cyprex@users.noreply.github.com>
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Mordent <62817778+mordent-goonstation@users.noreply.github.com>
Co-authored-by: Jonathan Rubenstein <jrubcop@gmail.com>

* thanks yarn!

* Update Panel.js

* compiles

* restores exosuit

* chmod

* Update travis_config.txt

* honk

* honk2

* Update turdis.yml

* Update ExosuitFabricator.js

* Revert "Update turdis.yml"

This reverts commit 7517df56e5.

* Revert "Update ExosuitFabricator.js"

This reverts commit ac31fa4543.

* wtf is this

* lol

* Update tgui.dm

Co-authored-by: Sinestia <40812746+Sinestia@users.noreply.github.com>
Co-authored-by: Tad Hardesty <tad@platymuus.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: Cyprex <35031555+Cyprex@users.noreply.github.com>
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Mordent <62817778+mordent-goonstation@users.noreply.github.com>
Co-authored-by: Jonathan Rubenstein <jrubcop@gmail.com>
Co-authored-by: Jamie D <993128+JamieD1@users.noreply.github.com>
This commit is contained in:
TheGamerdk
2023-01-02 15:03:15 +01:00
committed by GitHub
parent d2817db1a1
commit ca57f72a78
193 changed files with 8255 additions and 6991 deletions

View File

@@ -1,107 +1,107 @@
import os
import sys
import inspect
import shutil
def AddToPath(path):
if path not in sys.path:
sys.path.insert(0, path)
delimeter = ':' if os.name == "posix" else ";"
os.environ['PATH'] = path + delimeter + os.environ['PATH']
current_dir = os.path.split(inspect.getfile(inspect.currentframe()))[0]
AddToPath(os.path.abspath(os.path.join(current_dir, "third_party/Imaging-1.1.7/PIL")))
AddToPath(os.path.abspath(os.path.join(current_dir, "third_party/zlib")))
import Image
import _imaging
def PngSave(im, file):
# From http://blog.client9.com/2007/08/28/python-pil-and-png-metadata-take-2.html
# these can be automatically added to Image.info dict
# they are not user-added metadata
reserved = ('interlace', 'gamma', 'dpi', 'transparency', 'aspect')
# undocumented class
import PngImagePlugin
meta = PngImagePlugin.PngInfo()
# copy metadata into new object
for k,v in im.info.iteritems():
if k in reserved: continue
meta.add_text(k, v, 0)
# and save
im.save(file, "PNG", pnginfo=meta)
def ProcessFile(path):
name, ext = os.path.splitext(path)
ext = ext.lower()
if (ext != ".dmi" and ext != ".png") or os.path.splitext(name)[1] == ".new":
return
try:
im = Image.open(path)
print name + ": " + im.format, im.size, im.mode
if im.mode != "RGBA":
return
width, height = im.size
pix = im.load()
n_transparent = 0
make_opaque = []
def add(x, y):
if pix[x, y][3] == 0:
make_opaque.append((x, y))
for x in range(0, width):
for y in range(0, height):
if pix[x, y][3] > 0:
if x > 0:
add(x - 1, y)
if x < width - 1:
add(x + 1, y)
if y > 0:
add(x, y - 1)
if y < height - 1:
add(x, y + 1)
else:
n_transparent += 1
for coords in make_opaque:
pix[coords] = (0, 0, 0, 1)
PngSave(im, path)
except:
print "Could not process " + name
root_dir = os.path.abspath(os.path.join(current_dir, "../../"))
icons_dir = os.path.join(root_dir, "icons")
def Main():
if len(sys.argv) != 2:
print "Usage: hitbox_expander.py filename.dmi"
return 0
try:
with open(sys.argv[1]):
ProcessFile(os.path.abspath(sys.argv[1]))
return 0
except IOError:
pass
for root, subdirs, files in os.walk(icons_dir):
for file in files:
if file == sys.argv[1]:
path = os.path.join(root, file)
ProcessFile(path)
return 0
print "File not found: " + sys.argv[1]
if __name__ == "__main__":
Main()
import os
import sys
import inspect
import shutil
def AddToPath(path):
if path not in sys.path:
sys.path.insert(0, path)
delimeter = ':' if os.name == "posix" else ";"
os.environ['PATH'] = path + delimeter + os.environ['PATH']
current_dir = os.path.split(inspect.getfile(inspect.currentframe()))[0]
AddToPath(os.path.abspath(os.path.join(current_dir, "third_party/Imaging-1.1.7/PIL")))
AddToPath(os.path.abspath(os.path.join(current_dir, "third_party/zlib")))
import Image
import _imaging
def PngSave(im, file):
# From http://blog.client9.com/2007/08/28/python-pil-and-png-metadata-take-2.html
# these can be automatically added to Image.info dict
# they are not user-added metadata
reserved = ('interlace', 'gamma', 'dpi', 'transparency', 'aspect')
# undocumented class
import PngImagePlugin
meta = PngImagePlugin.PngInfo()
# copy metadata into new object
for k,v in im.info.iteritems():
if k in reserved: continue
meta.add_text(k, v, 0)
# and save
im.save(file, "PNG", pnginfo=meta)
def ProcessFile(path):
name, ext = os.path.splitext(path)
ext = ext.lower()
if (ext != ".dmi" and ext != ".png") or os.path.splitext(name)[1] == ".new":
return
try:
im = Image.open(path)
print name + ": " + im.format, im.size, im.mode
if im.mode != "RGBA":
return
width, height = im.size
pix = im.load()
n_transparent = 0
make_opaque = []
def add(x, y):
if pix[x, y][3] == 0:
make_opaque.append((x, y))
for x in range(0, width):
for y in range(0, height):
if pix[x, y][3] > 0:
if x > 0:
add(x - 1, y)
if x < width - 1:
add(x + 1, y)
if y > 0:
add(x, y - 1)
if y < height - 1:
add(x, y + 1)
else:
n_transparent += 1
for coords in make_opaque:
pix[coords] = (0, 0, 0, 1)
PngSave(im, path)
except:
print "Could not process " + name
root_dir = os.path.abspath(os.path.join(current_dir, "../../"))
icons_dir = os.path.join(root_dir, "icons")
def Main():
if len(sys.argv) != 2:
print "Usage: hitbox_expander.py filename.dmi"
return 0
try:
with open(sys.argv[1]):
ProcessFile(os.path.abspath(sys.argv[1]))
return 0
except IOError:
pass
for root, subdirs, files in os.walk(icons_dir):
for file in files:
if file == sys.argv[1]:
path = os.path.join(root, file)
ProcessFile(path)
return 0
print "File not found: " + sys.argv[1]
if __name__ == "__main__":
Main()

0
tools/linux_build.py Executable file → Normal file
View File

View File

@@ -44,7 +44,7 @@ class DMM:
return bio.getvalue()
def generate_new_key(self):
free_keys = self._ensure_free_keys(1)
self._ensure_free_keys(1)
# choose one of the free keys at random
key = 0
while free_keys:

2
tools/travis/build_tgui.sh Executable file → Normal file
View File

@@ -11,7 +11,7 @@ source dependencies.sh
## Setup NVM
if [[ -e ~/.nvm/nvm.sh ]]; then
source ~/.nvm/nvm.sh
nvm use "${NODE_VERSION}"
nvm use "${NODE_VERSION_PRECISE}"
fi
echo "Building 'tgui'"

View File

@@ -4,8 +4,8 @@ set -euo pipefail
source dependencies.sh
source ~/.nvm/nvm.sh
nvm install $NODE_VERSION
nvm use $NODE_VERSION
nvm install $NODE_VERSION_PRECISE
nvm use $NODE_VERSION_PRECISE
npm install --global yarn
pip3 install --user PyYaml