Commit Graph

122 Commits

Author SHA1 Message Date
Fikou
fd9a7f8a58 MOD update: Modular Cores (#64042)
* Modsuit update - Cores
2022-01-15 13:54:53 +01:00
LemonInTheDark
f8aad14ae8 Harddel Fix Pack #42 + Better Live Reftracking Support (#63877)
* Hard Del Fixes, Ref Tracking Changes
2022-01-12 22:46:13 +01:00
Y0SH1M4S73R
7234240a05 Circuit ID Components (#63817)
This PR adds several circuit components used for scanning and checking ID cards:

The Get ID component returns the ID the target is wearing or holding
The Read ID Info component returns the name, rank, and age registered on the ID
The Read ID Access component returns a list of all the accesses on the ID
The Access Checker component does comparisons on lists of numbers, specifically tailored for checking ID access
Due to the access checker using a similar UI element to the airlock electronics, that element has been moved to its own file in tgui/interfaces/common. This change is not player-facing.
2022-01-05 20:16:22 +00:00
Y0SH1M4S73R
4ae5005cb1 circuit assemblies can be attached to wires (#63675) 2022-01-05 14:15:48 -06:00
Jeremiah
9c6fdb567d TGUI list conversions + bug fixes (#63354)
About The Pull Request

    Converts more inputs to TGUI. Possibly all user-facing input lists in the game.
    Did any surrounding text/number inputs as well
    Added null choice support so users can press cancel.
    Added some misc TGUI input fixes
    Fixed custom vendors while I was there

I refactored a lot of code while just poking around.
Primarily, usage of .len in files where I was already working on lists.
Some code was just awful - look at guardian.dm and its non use of early returns
If there are any disputes, I can revert it just fine, those changes are not integral to the PR.
Why It's Good For The Game

Fixes #63629
Fixes #63307
Fixes custom vendors /again/
Text input is more performant.
Part of a long series of TGUI conversion to make the game more visually appealing
Changelog

cl
refactor: The majority of user facing input lists have been converted to TGUI.
refactor: Tgui text inputs now scale with entered input.
fix: Many inputs now properly accept cancelling out of the menu.
fix: Fixes an edge case where users could not press enter on number inputs.
fix: Custom vendor bluescreen.
fix: You can now press ENTER on text inputs without an entry to cancel.
/cl
2021-12-31 11:07:28 +13:00
Y0SH1M4S73R
9653fa06e0 save shell component properly loads shells that come with their own circuit (#63628)
Attempting to load a BCI or circuit MODsuit module with the save shell component yields an empty circuit. This PR fixes that by making the save shell component check for and delete any pre-existing circuit in the loaded shell.
2021-12-26 22:37:29 +00:00
AndrewL97
619acc1624 Fix skin tone sorting and refactor color procs (#63554)
* Remove superfluous hash from hex2rgb call
Add stack_trace to hex2rgb to catch future nonsense
2021-12-22 21:07:53 -08:00
Mothblocks
04552deb5c Fix missing SIGNAL_HANDLERs (#63404)
More missing signal handlers caught by dm-lua
2021-12-17 11:57:48 +00:00
LemonInTheDark
9b605b9cc0 Speeds up the preference menu, significantly. Adds object pooling, other stuff too (#63225)
* Removes like 50% of the cost of using the ui, it turns out that the storage component is fucking moronic. Likely significantly reduces the overtime of typecacheof

* Reduces the cost of reloading the dummy by ~50%
Turns out just initializing and deleting organs was like half the cost of reloading a default dummy.
It occured to me (Mothblocks) that we don't actually care about any organs we can't see or that don't effect visuals. So almost all of our organ loading can just be skipped.

This saves a significant chunk of cpu time, items next!

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
2021-12-08 16:20:03 -08:00
Y0SH1M4S73R
d6628103b1 BCI implanters no longer drop their BCI on the floor when opened (#63204)
Exactly what it says in the title. Implanters used to drop the BCI they contained when opened up. Now they don't. For good measure I made them drop their contained BCIs when deconstructed as well in case they already did that as a consequence of the BCI being located inside the implanter, which was the cause of the issue in the first place.
2021-12-05 15:02:34 +00:00
Watermelon914
a2369f8f42 Allows shells that requiring anchoring to take power from APCs (#62907)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-11-19 11:56:14 -08:00
Watermelon914
838baab5db Fixes the foreach and filter circuit component (#62798)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-11-14 21:12:50 -08:00
Ghom
21c89ba12b Reagents scanner circuit component (#62704)
It allows people to make circuits objects that interface with reagents.
2021-11-10 19:35:44 +00:00
Ghom
45e7aeda84 Material Scanner circuit component (#62677)
* Material Scanner circuit component

* get_turf(src) to get_location()
2021-11-09 23:08:55 -05:00
Watermelon914
a4183b0364 Fixes some connection problems with response signals for integrated circuits (#62627)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-11-09 00:46:10 -05:00
Watermelon914
bb8bcd2473 Made admin circuits more abstract, they no longer end up in the contents of the shell. (#62630)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-11-08 14:55:19 -08:00
Y0SH1M4S73R
9036c91504 Adds the assembly shell (#62307)
Adds the assembly shell, which can be attached to wires and other assemblies like proximity sensors, timers, etc. Because assemblies already have screwdriver interaction that gets overriden by the shell component, the regular assembly screwdriver interaction can also be performed with right-click. This can be seen on examine.
While currently, circuits can interact with wires and such using remote signalers and the radio component, this has its limits, such as the possibility that someone else uses the same frequency/code combo. With the assembly shell, you can put all your circuit logic into the attached assembly.
2021-11-02 21:28:11 +00:00
Watermelon914
c2c464b26d Made integrated circuits duplicatable (#62302)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-11-02 02:30:42 -07:00
Watermelon914
44a2af780d Integrated the component printer into the integrated circuit UI. You can now link integrated circuits to component printers (#62287)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-10-28 11:42:57 -07:00
Ghom
585f1119e3 Binary and Decimal Conversion Components. (#61889)
Added a couple components that convert a number into an array of binary digits and viceversa.
May help players mak more complex and advanced components without filtering those lacking knowledge in the binary field.
2021-10-23 08:03:26 +01:00
Y0SH1M4S73R
a8e01da16f Adds 2 new signals, adds pre/postattack_secondary signals to circuit signal handler presets (+a proccall component fix) (#62233)
Adds COMSIG_ITEM_AFTERATTACK_SECONDARY and COMSIG_MOB_ITEM_AFTERATTACK_SECONDARY signals, which are both called by item/proc/afterattack_secondary.
Adds COMSIG_ITEM_PRE_ATTACK_SECONDARY and COMSIG_ITEM_AFTERATTACK_SECONDARY to the list of circuit signal handler presets.
The proc call, set var, and spawn atom components will resolve any weakrefs passed to them in their parameter port, seeing as the list literal component now converts datums into weakrefs.
2021-10-21 12:41:22 +01:00
MMMiracles
d3ce7ed857 Pacifists can now fire wire guns (#62173)
Pacifists can use non-lethal weapons and the circuit gun seems pretty non-lethal.
2021-10-20 13:11:16 -04:00
Ghom
d9f4153a41 clickon signal procs cleanup (fixes inability to examine things in certain situations). (#62180)
Title. The clickon proc calls params2list only after the component signal was sent notwhitstanding clickon comsig procs also needing to access these parameters in order to work properly, which means every one of these comsig procs has its own params2list(params) call. This problem isn't exlusive to these comsig procs. For some reason the params text string is passed down to the melee click chain, afterattack and afterattack_secondary instead of the params/modifiers list... buuut we'll get there later. TL;DR params2list is being called more times than necessary because of a suboptimal old code.

Another issue: Some of these comsig procs ignore parameters such as shift, which is used to examinate things and access popup menus, alt, ctrl and/or middle mouse button. This is the case of the honorbound mutation datum, shy and shy in room components, mechas and the clown car. This is of course also getting fixed.
2021-10-19 13:52:59 +01:00
Watermelon914
1bb8f3fd4c List literal components now store weakrefs instead of the datum directly (#62004)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-10-17 11:45:25 -07:00
Ghom
88b420d240 Trigonometry circuit component (#61885)
Adds a trigonometry circuit component to the game.
2021-10-16 19:25:30 -04:00
Mothblocks
3be6f04b5c Add missing SIGNAL_HANDLERs (#62115)
Add missing SIGNAL_HANDLERs
2021-10-15 07:01:02 +01:00
Ghom
9c7d509354 Printer Circuit Component (#62012)
I'm adding a circuit component that can print text string on a paper object in a variety of colors and font typefaces (currently only web-safe ones are available, maybe i'll add some fancy ones in the future but they'd need to be imported either through @import of @font-face in a separate CSS not imported by every tgui UI).
It's important to note that because the UI sanitizes new text inputed by users and not what's already written on the paper (so the pen_color and pen_font don't be purged in the process), we can't safely have these strings "printed" into the info variable directly, because of that these values will be stored in two new list variables, one for the text and one for font color, face and the signature. When the paper sheet UI is opened, these will be sanitized and then parsed into the text, so the next time the paper is edited we can clear these two lists.
Obviously better than a hacky byond proc - parsemarkdown() is outdated af -, albeit a bit messy... like the rest of paper code.

Requires #62033.
2021-10-14 19:37:39 +01:00
FA120
4ca8383bda Fix list literal unable to contain tables (#62009)
Co-authored-by: me <>
2021-10-12 22:46:37 -07:00
Ghom
6c5766c62e timepiece circuit module (#62039)
Adds a circuit component that outputs the station time in chosen format and unit of time when triggered. The options are currently 24-hour and 12-hour for the time format, hours, minutes and seconds for the unit of time.
The component is called timepiece because clock was already taken by another component that sends signal outputs at intervals.
2021-10-12 14:32:30 +01:00
Ghom
b78b9fde74 Adds the CIRCUIT_FLAG_REFUSE_MODULE circuit flag. (#62033)
Components like the MMI one can't be added to circuits more than once since they may register signals with same proctype and similar things which make for some tangled up race conditions if more than one is present.
Unfortunately this safety can be bypassed - with little gain alas, an MMI can't be inserted by attacking the component with it. it needs a shell - by using a module component. That's no good. So I'm adding a flag that can be used to stop certain components from being added to module components.
2021-10-11 19:28:08 +01:00
Watermelon914
0ebf4891ad Fixes bugs with admin circuits, expands upon some admin circuit components and fixes duplicator runtiming when a port doesn't exist. (#61948)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-10-10 03:36:25 -07:00
Watermelon914
1590ae1f93 Makes it so that datums can take entity inputs too (#61930)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-10-09 04:31:38 -07:00
Watermelon914
0cc06cf6ec Fixed dispenser and new circuit list components not being available (#61960)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-10-09 04:31:15 -07:00
Watermelon914
7ef01161ed Fixed circuit variables not working because of a null listener in their listener list (#61961)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-10-09 00:58:27 -07:00
Watermelon914
f6dfff674f Fixed animating filters with circuits and added special signal ports for instant circuit execution. (#61851)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-10-08 05:29:59 -07:00
Watermelon914
d15b305527 Refactors the list datatype to support composite lists. Adapts a lot of circuits to be able to properly use composite lists. Adds the dispenser shell (#61856)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: Colovorat <35225170+Colovorat@users.noreply.github.com>
2021-10-06 22:51:36 -07:00
Jordan Brown
765c7840e2 [s] Cleanup escalation unsafe procs (#61905)
Fixes admins spawning in atoms and datums without the DF_VAR_EDITED flag
2021-10-06 13:12:50 +01:00
Ghilker
682e7132b5 cleanup of _HELPERS/game.dm (#61859)
some more cleanup, game.dm this time
2021-10-03 16:51:52 -04:00
Y0SH1M4S73R
5fc3aa5b3d Adds Animation and Filter Components for Admin Circuits (#61766)
Adds a selection of components for animating atoms and manipulating filters.
Makes animating atoms and filters using circuits more intuitive.
Also Watermelon planned to make these but was too busy with other circuit QOL stuff and asked me if I would be willing to do it.
2021-10-01 21:00:02 +01:00
Watermelon914
1a507d23ed Refactors how circuit size is calculated. Fixed module circuit size not taking up capacity equal to the amount of circuit components inside of it. (#61554)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-09-30 11:09:42 -07:00
Watermelon914
a4be13ac62 Adds a lot of QoL to the integrated circuit UI. (#61677)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-09-25 16:40:24 -07:00
Watermelon914
390f60f571 Adds buttons in the UI for specific components (#61622)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-09-25 03:50:15 -07:00
tralezab
6c01cc2c01 every case of initialize that should have mapload, does (#61623)
## About The Pull Request

stop forgetting to include mapload, if you don't include it then every single subtype past it by default doesn't include it

for example, `obj/item` didn't include mapload so every single item by default didn't fill in mapload

![](https://media.discordapp.net/attachments/823293417186000909/875122648605147146/image0.gif)

## Regex used:

procs without args, not even regex

`/Initialize()`

procs with args
`\/Initialize\((?!mapload)((.)*\w)?`

cleanup of things i didn't want to mapload:
`\/datum\/(.)*\/Initialize\(mapload`
2021-09-24 17:56:50 -04:00
Y0SH1M4S73R
b7ed43d7a8 Adds a Datum port type for Admin Circuits (#61582)
Admin circuit components were limited in their utility due to the setvar, getvar, proccall, and signal handler components only being able to operate on atoms. I have improved them by adding the datum datatype, which is used exclusively by the aforementioned components in place of the atom datatype their target port currently uses. Furthermore, an option for the expected output type has been added to the getvar and proccall components. This option defaults to any.
2021-09-22 08:04:05 +01:00
TheSmallBlue
6fde2a7b9f Adds the Proximity Pinpointer circuit component! (#61574) 2021-09-21 17:12:29 -07:00
Watermelon914
9295f0d5bd [s] Fixed admins being able to bypass proccall protections via remote sdql and circuits. (#61482)
About The Pull Request

Admins can bypass IsAdminAdvancedProcCall checks by using these methods of proccall because proccall protection is kinda dumb. This has been tweaked so that there is proper proccall protection for these methods of proccall.
Code is hacky, but there's not much of a choice if we want procs to be properly protected from admin proccalls from any sort of remote source. If anyone has a better idea on how to implement this, feel free to hit me up.

We need a special global mob that handles proccalls from sources that may not have a usr/client to refer back to. IsAdminAdvancedProcCall() relies usr being defined, so if no usr is defined, then this will always return false. This has been adjusted so that proccalls without a usr/client to refer back to will instead set usr to this special mob, which will then let the IsAdminAdvancedProcCall() return true by comparing whether usr == this special global mob.
Why It's Good For The Game

Admins can no longer bypass IsAdminAdvancedProcCall checks.
Changelog

cl
admin: Admins are no longer able to bypass proccall protections using remote methods of proccalling.
/cl
2021-09-22 12:09:16 +12:00
Watermelon914
a80026018a Adds the "speaker name" port to the voice activator circuit component (#61602)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-09-21 17:03:15 -07:00
Watermelon914
711bc1526a Fixed ntnet components not being type safe (#61426)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-09-21 16:37:21 -07:00
Watermelon914
21e5cfe8d2 Adds the interrupt signal to the delay component, reorganises BCI files and circuit code improvements (#61393)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-09-19 00:21:52 -07:00
Watermelon914
0c010b93b7 BCIs now come with one bci action (#61521)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-09-18 17:15:41 -07:00