Commit Graph

146 Commits

Author SHA1 Message Date
SkyratBot
124ddd7cca [MIRROR] tgui Preferences Menu + total rewrite of the preferences backend (#8153)
* tgui Preferences Menu + total rewrite of the preferences backend

* nah, we dont need to ping those people

* trying to remove the funny stuff

* unmodularizing this

* prefs reset

* this may need to be reverted, who knows

* okay, this part

* perhaps

* EEEEEEEEE

* unsanitary

* E

* Stage 1 + loadout system

* more fixes

* E

* I mean, it launches?

* More fixes and reorganisation

* E

* customisation code is spaget.

* disable ERP prefs

* Update erp_preferences.dm

* Update erp_preferences.dm

* E

* Slowly getting there

* It may be time for help :)

* tri...colors... help

* preferences now pass preferences

* Update dna.dm

* Fuck this man

* missing savefile return, set_species works, removed dumb stuff from updateappearance

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/8199

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/8224

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

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/8278

* e

* le butonAZARAK HELLO

* hhh

* Proper recognition where it's due, MrMelbert!

* EEEE

* examine block

* Better gen hit sounds from whitedream

* final loadout touches, more bug fixes im sure to come

* i said there would be bugfixes

* Update LoadoutManager.js

* Missing preferences in the html menu

* LIVE TESTING PHASE BABY

* Update LoadoutManager.js

* EEE

* LAUNCH TEST FIRE

* Update job.dm

* Update new_player.dm

* 50gb DAY ONE PATCH

* EEE

* Update preferences.dm

* buggle fixes

* Update examine.dm

* >LOOC starts on

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2021-09-23 00:40:37 +01:00
SkyratBot
cae8396538 [MIRROR] tgui maintenance chores (#7597)
* tgui maintenance chores

* AAAAAA

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-08-17 19:15:40 +01:00
SkyratBot
b0964f0a03 [MIRROR] Observers can now read circuits from anywhere + fix obscure tgui bug (#7477)
* Fixes admins not being able to open circuits from anywhere (#60775)

* Observers can now read circuits from anywhere + fix obscure tgui bug

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-08-10 15:56:51 +01:00
SkyratBot
3bfdbdcd55 [MIRROR] Adds a autofocus arg to tgui_alert (#7167)
* Adds a autofocus arg to tgui_alert (#60452)

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Adds a autofocus arg to tgui_alert

Co-authored-by: Wayland-Smithy <64715958+Wayland-Smithy@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2021-07-28 19:02:11 +01:00
SkyratBot
c1163dff19 [MIRROR] EVEN MORE HARDDEL FIXES (#7017)
* EVEN MORE HARDDEL FIXES (#60228)

Fixes a ton of harddels, sourced from #59996
I think this brings us down to like, ~100 per round from ~200, with only like 20 of those being proper hell failures. I've seen harddel profiles below 1 second of total cost. Feeling good.

See you on the other side

Makes the cryopod control computer into a weakref, never trust bee code
Converts brig door timer internal lists to weakrefs
Fixes a harddel caused by qdeling a motion sensitive camera after it had left its source area, jesus christ why didn't we do this already holy shit
Converts the radio implant ref held by the antenna mutation to weakrefs because it isn't reliably cleaned up, makes the radio implant actually qdel its fucking radio
Removes the target var from the throwing datum, it does literally nothing and just exists to cause harddels, mostly for the singularity
 Fixes a cable harddel sourced from things that try to enter blueprints after smoothing, but before roundstart. IE, shuttles. Removes shuttles from the blueprints
Fixes emmisive blockers being added post qdel
Removes some manual ghosting from cryopods, I initially did this for harddel reasons, but I figured out a better fix for that. I'm now doing it because it's got this really strange logic for like "re-entering the game" that doesn't actually link to what the ghostize proc does. We should remove this at some point
Fixes robot hud objects harddeling due to hanging refs
Fixes buildmode related hanging refs, I'm coming for you admin team
Fixes a few instances of trying to add the forensics component post qdel, hhhhhhhhhhh
Fixes some split personality harddels/weirdness
Replaces a use of disconnect_duct with an init qdel hint, I suspect there's more issues with duct harddels, I've seen some odd logs about ahhh the area_contents list, but we can worry about that later
Makes teleporter targets into weakrefs, properly types them as /atom
Makes frequency devices into weakrefs
Makes cameras remove themselves from camera nets on Destroy
Makes tgui ui datums implement destroy, this means if I ever see one hang a ref to user or whatever, I know there's an error with calling close() properly. I've seen this harddel once, but not after this change so I assume there was some error with close(). IDK maybe this is a papering over? Would have to ask @ stylemistake
I've seen logs of beartraps being in world post del, putting a return there just in case. The same is true of nerf darts, but I haven't really looked into that yet
Makes a shoe's ref to untying alerts a weakref, yes this is needed.
Moves clearing client_in_contents to the Login of the new mob. This prevents doing things like ghosting someone before a mob qdel causing harddels
Fixes a harddel set sourced from adding a status effect to a qdeleted thing. Is this an error? I'm honestly not sure.
Converts bsa code to weakrefs
Converts the partner var of heat exchangers to weakrefs
Converts camera assemblies to weakrefs
Fixes some dumb behavior with ammo casings and assuming you'll be on a turf post Destroy parent call
Fixes? merger related harddels, you were never cleared from your own members list, so origin objects would end up making a new list, creating harddels. Potential input from @ ninjanomnom about the logic
Chasms store a static list of "falling atoms", which only exists for chasms that go somewhere else. This list wasn't being cleared of qdeleted objects, which is what happens when you fall in most chasms. Fixes this, and converts the list to weakrefs.
Fixes some runtimes in both sheet code, and the weather listener element. This is here because runtime spam made testing more of a pain, didn't think it needed its own pr
Fixes colorful reagent harddels sourced from reagents that were qdel'd before roundstart. I'm only like 50% sure this actually got it, but the issue may have been solved by #60174, so eh
Turns the nuke op antag datum's ref to the war button into a weakref
Fixes some holopad code that was not nulling refs all the time
Converts camera bugs to weakrefs, this was the result of the bug being "reworked" like 6 years back without taking the existing ref clearing into account. Whole item needs a redo, but this'll do for now.
Ensures that the both pulling and pullee refs are cleared on Destroy
The crew monitor held all users in a non clearing list, makes that list a weakref because I hate everything

Oh and I removed all sources of gas_mixture qdeletion, I'm kinda unsure on this since it's not technically supported, but any harddels from it might? indicate something going wrong with like, gas passing logic. I'd like @ MrStonedOne's thoughts, since I trust him to call me an idiot if I'm wrong.

<!-- Please add a short description of why you think these changes would benefit the game. If you can't justify it in words, it might not be worth adding. -->

## Why it's not good for the game

I crashed sybil like 10 times to get this data, I'm gonna put it to good use. Don't think you're safe sybilites, I'm coming for you.

* EVEN MORE HARDDEL FIXES

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-07-20 12:59:41 +02:00
SkyratBot
28c10d881a [MIRROR] Cache asset/mappings results (#6776)
* Cache asset/mappings results (#59914)

* Cache asset/mappings results

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-07-08 00:06:16 +02:00
SkyratBot
3bad703dc7 [MIRROR] Fix tgui async modals (#6564)
* Fix tgui async modals (#59822)

* Fix tgui async modal constructor order

* Fix another bug with the async modals

* Fix tgui async modals

Co-authored-by: Aronai Sieyes <arokha@arokha.com>
2021-06-28 14:16:26 +01:00
SkyratBot
25cdf772a4 [MIRROR] Gives advanced wireless right click functionality to agent ID cards. (#6511)
* Gives advanced wireless right click functionality to agent ID cards. (#59657)

* Wireless schmireless

* tgui adjacency check

* Tgui state tweaks

* Moar functionality

* Right clickify

* Depends-on-Things

* I have always wanted a the agent ID card of my own.

* Revert "Tgui state tweaks"

This reverts commit 42824a30958186f62cf47ce5ebd150a02b3ee8b2.

* Revert "tgui adjacency check"

This reverts commit af0bf4c46456e92c1d5e29ccd2b064be134216b4.

* Compose don't inherit

* Revert "Depends-on-Things"

This reverts commit 7880e7b1914c7de22e2a57c0b4005a0fb748cc61.

* Gives advanced wireless right click functionality to agent ID cards.

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
2021-06-25 12:50:43 +01:00
SkyratBot
c27ff0647e [MIRROR] tgui input list improvements (#6405)
* tgui input list improvements (#59668)

pressing enter or space now selects the selected button
duplicate keys no longer cause input lists to break

* tgui input list improvements

Co-authored-by: LatteKat <56778689+jupyterkat@users.noreply.github.com>
2021-06-20 15:08:42 +01:00
SkyratBot
6f3b151bb8 [MIRROR] Fixes a bunch of harddels that are sourced from player action (#6252)
* Fixes a bunch of harddels that are sourced from player action

* Mirror!

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
2021-06-11 03:13:33 +01:00
SkyratBot
456f347dfa [MIRROR] USE SIGNAL_HANDLER REEEEEE (#5921)
* use SIGNAL_HANDLER REEEEEE (#59242)

makes as many procs as i can find use the SIGNAL_HANDLER define which i assumed they all already did

* USE SIGNAL_HANDLER REEEEEE

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-05-25 03:42:11 +01:00
SkyratBot
ea9aed5554 [MIRROR] Replace alert usage with tgui_alert (#5815)
* Replace alert usage with tgui_alert

* a

* Update observer.dm

Co-authored-by: Celotajs <81999976+celotajstg@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-05-21 00:06:09 +01:00
SkyratBot
c0a0c8055c Fixes edge cases revolving who can strip and who can't (#58445) (#4946)
Fixes all simple mobs being able to strip, as well as being able to strip when your hands are blocked (e.g. cuffed).

Fixes #58260.

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-04-16 13:25:55 +02:00
SkyratBot
2a26d1a54d [MIRROR] Four New Sects, small rethemes to first 3 (#4832)
* Four New Sects, small rethemes to first 3

* Update species.dm

* Update species.dm

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-04-13 12:27:21 +01:00
SkyratBot
62cf66483a [MIRROR] Xenomorphs can now strip humans again, create granular tgui state compositors (#4498)
* Xenomorphs can now strip humans again (#58007)

* Xenomorphs can now strip humans again, create granular tgui state compositors

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-03-29 13:29:39 +01:00
SkyratBot
e5ff997ef8 [MIRROR] Experi-Sci: Techweb nodes may now require you to perform "scientific" experiments (#3614)
* Experi-Sci: Techweb nodes may now require you to perform "scientific" experiments

* Update all_nodes.dm

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-23 21:51:28 +00:00
Gandalf
3cfd853bf3 MAJOR: Non-modular map hardset 09.02.2021 (#3219)
* Major map forcedate 09.02.21

* a
2021-02-09 00:50:46 +00:00
SkyratBot
02571bae25 [MIRROR] Revert "Use a dummy include to indicate TGUI isn't built" (#3181)
* Revert "Use a dummy include to indicate TGUI isn't built (#56470)" (#56711)

* Revert "Use a dummy include to indicate TGUI isn't built"

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-02-08 23:37:44 +00:00
SkyratBot
c0cb9c1576 [MIRROR] Use a dummy include to indicate TGUI isn't built (#3025)
* Use a dummy include to indicate TGUI isn't built (#56470)

* Use a dummy include to indicate TGUI isn't built

Co-authored-by: Jordan Brown <Cyberboss@users.noreply.github.com>
2021-02-02 19:04:26 +00:00
Useroth
ef6481e253 Missed PR mirrors from tgstation (https://github.com/tgstation/tgstation/pull/55373 and https://github.com/tgstation/tgstation/pull/56080) (#2759)
* Mirror of tgstation's Common Build Tooling (#55373)

* tgui 4.3 (#56080)

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-01-18 07:42:54 +01:00
SkyratBot
2050326ec6 [MIRROR] Tgui input list (#2621)
* Tgui input list

* aaa

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2021-01-10 23:22:17 +01:00
SkyratBot
4fcda89276 [MIRROR] Fixes AIs being unable to access their local APC when out of power (#2564)
* Fixes AIs being unable to access their own APC interface when power is off (#55977)

    When an AI runs out of power, they get a short fluff text story about hacking into their own APC through the powernet or whatever, before having the APC's interface open. The intention is that an AI can re-enable their own breaker after a bit if something flipped it off. However, one of the many checks in TGUI will fail if the AI has no power (specifically, if incapacitated() returns TRUE), making this whole feature not work. In fact, it's probably been broken since TGUI APCs were done. I have fixed it by adding a check in the very same proc to return UI_INTERACTIVE if the UI's source object is the same object referenced in the AIs apc_override variable. Closes #52548
    The apc_override variable is now an APC object reference rather than a boolean. It is set to the AI's local APC when the hack flufftext completes, and is null'd when power is restored. This reference is used by the above, so that the AI only gets access to this one APC rather than any APC in general.
    AIs now also get a hyperlink in their chatbox, allowing them to open the APC interface should they have closed it. If they have had power restored, the apc_override reference var will be null, and using the hyperlink will simply result in text stating the backdoor to the APC is closed.
    If the AI reconnects into a state where it has no power and apc_override is set, it will get a hyperlink to the APC, in case the AI player had been reconnecting when the window would have popped up or otherwise does not have the link for whatever reason.

* Fixes AIs being unable to access their local APC when out of power

Co-authored-by: zxaber <37497534+zxaber@users.noreply.github.com>
2021-01-08 01:22:13 +00:00
SkyratBot
c487c73f39 [MIRROR] Grep for space indentation (#1969)
* Grep for space indentation

* aa

* Update species.dm

* Update species.dm

* Update maps.dm

* Update examine.dm

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-12-01 12:26:41 +01:00
SkyratBot
89a21458b5 [MIRROR] Replace tgalert with tgui_alert, a new TGUI-based alert system (#1833)
* Replace tgalert with tgui_alert, a new TGUI-based alert system

* a

* a

Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2020-11-26 08:05:45 +00:00
SkyratBot
e6879819ea [MIRROR] CanUseTopic() refactor. (#1829)
* CanUseTopic() refactor. (#54747)

* CanUseTopic() refactor.

* Forgot about default_can_use_topic. Tested and working.

* Update bin.dm

* no-nonsense.

* CanUseTopic() refactor.

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2020-11-25 13:56:56 +01:00
SkyratBot
11a506fdbf [MIRROR] tgui: Refactor Asset Delivery (#1688)
* tgui: Refactor Asset Delivery

* a

* Update tgui.bundle.js

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-11-14 22:19:40 +01:00
SkyratBot
91773c46da [MIRROR] Interview System / Soft Panic Bunker (#1458)
* Interview System / Soft Panic Bunker

* a

Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-10-26 08:32:37 +01:00
SkyratBot
b8d9874c27 [MIRROR] Converts all A && A.B into A?.B (#1292)
* Converts A && A.B into A?.B (#54342)

Implements the ?. operator, replacing code like A && A.B with A?.B

BYOND Ref:
When reading A?.B, it's equivalent to A && A.B except that A is only evaluated once, even if it's a complex expression like a proc call.

* Converts all A && A.B into A?.B

Co-authored-by: ZeWaka <zewakagamer@gmail.com>
2020-10-13 23:19:25 +02:00
SkyratBot
970a2b03d6 [MIRROR] Mobility refactor: no more update_mobility() (#1233)
* Mobility refactor: no more update_mobility()

* Update robot.dm

Fixes robots.

* megadumb

* Update robot.dm

* weh

* Update gunpoint_datum.dm

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-10-10 02:31:35 +02:00
SkyratBot
98568e191a [MIRROR] Enforce preserving parent proc return values across ui_act call stacks (#999)
* Enforce preserving parent proc return values across ui_act call stacks (#53964)

All ui_act procs should call parent by default. All procs should preserve the value of the parent proc when it's TRUTHY and pass it down the call stack. No UI should be interactible when its flags or state indicate it should not be, except when explicity overriden by child procs intentionally disregarding parent return values to achieve a specific goal.

* Enforce preserving parent proc return values across ui_act call stacks

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
2020-09-26 17:17:59 +02:00
SkyratBot
fd11d35489 [MIRROR] Adds borg tablets, and RoboTact as a borg self-management app (#959)
* tgui: Borg tablets and RoboTact as a borg self-management app (#53373)

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* take one

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* part 2

* Automatic changelog compile [ci skip]

* part 3

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* part three I think

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* who even knows what step I'm on anymore

* and another one

* Automatic changelog compile [ci skip]

* PR time

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Forward Progress

* Automatic changelog compile [ci skip]

* Merge remote-tracking branch 'upstream/master' into SiliScreen

* more foward progress

* RoboTact

* bad tab

* Improvements all around

Plus some changes to vis_overlay to allow for color

* Lights and things

* borg network card

borg tablets lose networking when borg is locked or has no power

* hud changes

not done yet, but getting close

* better modPC screen button

* updoot

* more useful colors

* linter

* Do I finally get a green ✓

* better law sync catching

* hate linters

Co-authored-by: Changelogs <action@ github.com>

* Adds borg tablets, and RoboTact as a borg self-management app

Co-authored-by: zxaber <37497534+zxaber@users.noreply.github.com>
Co-authored-by: Changelogs <action@ github.com>
2020-09-24 20:29:31 +02:00
SkyratBot
dca6acf1ca [MIRROR] Fix runtime with ntos apps and improves code involved in the runtime (#854)
* Fix runtime with NTOS apps and improve code involved (#53779)

There exists a specific state where ui.open() can be called yet the
result would be a null window and such behaviour would be intentional.
The following CRASH in ui.send_asset() would thus be misleading,
because send_asset() was called after open().

This PR adds more information to the CRASH about when the failure state
can occur, makes open() return a value based on whether it actually
opened a new pooled window or not, and makes sure modular computer apps
don't send_assets unless a new pooled window was created.

* Fix runtime with ntos apps and improves code involved in the runtime

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
2020-09-18 05:13:12 +02:00
SkyratBot
46108ba90d [MIRROR] Fix runtime when NPC tries to interact with tgui (#851)
* Fix runtime when NPC tries to interact with tgui (#53776)

Monki tries to open a door with a wire panel open, it tries to open a tgui for him, and uh oh, there is no client on user.

* Fix runtime when NPC tries to interact with tgui

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-09-18 00:36:40 +01:00
SkyratBot
1e705faa19 [MIRROR] Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#709)
* Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#52981)

* Process procs now properly use deltatime when implementing rates, timers and probabilities

* Review fixes

* Geiger counters cleanup

Made hardsuit geiger code more similar to geiger counter code
Geiger counters are more responsive now

* Moved SS*_DT defines to subsystems.dm

* Rebase fix

* Redefined the SS*_DT defines to use the subsystem wait vars

* Implemented suggested changes by @AnturK

* Commented /datum/proc/process about the deltatime stuff

* Send delta_time as a process parameter instead of the defines

Also DTfied acid_processing

* Dtfied new acid component

* Process procs now properly utilize deltatime when implementing rates, timers and probabilities

Co-authored-by: Donkie <daniel.cf.hultgren@gmail.com>
2020-09-09 08:19:23 +02:00
SkyratBot
2c68537762 [MIRROR] tgui: Improve logging, Fix external links (#537)
* tgui: Improve logging, Fix external links (#53226)

* tgui: Improve logging, Fix external links

* Print suspending on the same line

* Streamline fix chat verb

* Muh https

* tgui: Improve logging, Fix external links

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-08-27 03:10:03 +02:00
SkyratBot
d9b246cca9 [MIRROR] tgchat (#342)
* 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.

* tgchat

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-08-14 23:30:16 +02:00
SkyratBot
e8bfe6eb68 [MIRROR] [Ready] CDN browser assets! (#312)
* [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

* [Ready] CDN browser assets!

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2020-08-12 11:32:37 +01:00
SkyratBot
4394b6f971 [MIRROR] Adds an atmos debugging tool and excited group visualizer (#185)
* Adds an atmos debugging tool and excited group visualizer (#52395)

* Adds an atmos debugging tool and excited group visualizer

* rebuild moment

* yarn install -> yarn run build

* Sigh

* Fixed UI, did not test, needs a rebuild.

* Proper flexing

* Adds varied colors, improved ui courtusy of stylemistake:

* Fixes a runtime, updates tgui

* added superconductors, cleaned up some shitcode, removed a clashing color

* Woop

* Speed

* rebuild

* Adds a tick count

* begone auto-update

* color defines

* rebuild moment

* color improvements, fixes updating

* adds another preprocesser define to handle showing max shares in the ui

* test of application system?

* patches up some display issues, allows for smooth flowing from one group to another

* overlay-ified

* client testing

* dmi moment

* plane master

* it fucking works

* size change

* passthrough

* rebuild moment

* adresses review concerns, toggles active turf vis on when testing

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>

* Adds an atmos debugging tool and excited group visualizer

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-08-03 16:37:24 +02:00
Aleksej Komarov
8a12f15f40 tgui: Fixes assets, CDN support (#52321)
* tgui: Better asset code, CDN support

* Rebuild tgui

* µ-fix
2020-07-19 00:28:00 -07:00
Timberpoes
6f0a68f94a 2spooky now no interact with tgui 2020-07-19 01:18:39 +01:00
Ryll-Ryll
1f31064c3e Merge remote-tracking branch 'tgstation/master' into who-named-this-damned-proc 2020-07-16 21:43:14 -04:00
Aleksej Komarov
1227c1f5f5 Fix sending of updates (#52282)
tgui: Fix sending of updates for non-interactive but observable UIs.
2020-07-16 15:22:37 -07:00
Aleksej Komarov
47b6c62078 tgui 4.0: Reduced Logging (#52280) 2020-07-16 20:18:27 +02:00
Aleksej Komarov
0cf00a2645 tgui 4.0 (#52085)
* tgui 4.0 hyper squash

* Upgrade dependencies
2020-07-16 20:13:04 +02: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
Ryll-Ryll
fc0b247738 rename 2020-07-11 23:23:23 -04:00
Trigg
31502772be update_static_data now passes user to push_data() (#51485)
update_static_data now passes user to push_data().

I'm pretty sure no UIs currently use user in ui_static_data for... Anything. So that's why no one noticed this before. Well, better to pass it than not.
2020-06-08 20:39:50 +12:00
spessman-007
5ae305ec9f Resolve issues with incorrect usage of a/an (#51095)
Co-authored-by: NewSta <spessman-007@users.noreply.github.com>
2020-05-25 01:34:34 +08:00
Aleksej Komarov
602270d178 tgui: MIT License (#50969)
* MIT license headers

* various tweaks

- Tweak jsdoc headers a bit
- Use an old-school format with SPDX-License-Identifier for SCSS
- Add headers to tgui dmcode

* Simplify the license section

* Rebuild tgui, small tweaks

Co-authored-by: ZeWaka <zewakagamer@gmail.com>

About The Pull Request

All relevant source code now contains copyright headers, that explicitly assert copyright and license for every file.

This has been done to prepare TGUI for wider adoption. Goon station devs are interested in using TGUI, and hopefully this will result in a nice collaboration and improvements to both codebases.

The following files were relicensed under MIT:

    code/controllers/subsystem/tgui.dm
    code/modules/tgui/*.dm
    tgui/**/*.js
    tgui/**/*.scss

The following files were kept untouched:

    tgui/packages/tgui/interfaces/**/*.js
    tgui/packages/tgui/styles/interfaces/**/*.scss

Project is still basically AGPL-3.0 under /tg/station's parent license (with added MIT texts), but allows importing MIT code into MIT-compatible codebases.
2020-05-11 10:32:52 +12:00
Aleksej Komarov
d327e3a148 Uh oh, curly brackets in DM #50497 2020-04-20 20:39:54 +03:00