Commit Graph

27 Commits

Author SHA1 Message Date
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
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
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
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
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
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
126411f405 Refactors how components are triggered and refactors how ports are ordered (#60934)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-09-03 02:22:39 -07:00
LemonInTheDark
1f5e76a39f [s] Audits object say() uses to make handling text more safe (#61147)
Made all say()s deal with encoding, audited all uses of say() to prevent double encoding or like, manually inserting span(). 
I left some stuff without sanitize that only draws from the code, since it's hell to clean up otherwise. That
and I let admins do whatever the fuck they want
2021-09-02 08:36:36 +01:00
Watermelon914
4fb589ba7b fixes html execution with circuits (#61143)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-08-31 16:39:27 -07:00
TiviPlus
5a59713592 [s] Patch a server crashing exploit (#61057)
if you create a bunch of signallers then spam the send signal button you can grind the server to a halt at low numbers and crash it at high numbers of signallers

This is an imperfect fix as a proper fix would refactor signal datums to use a subsystem but I dont feel like rewriting all of signal code thank you very much

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-08-26 14:23:47 -07:00
Watermelon914
05ede8dc30 Adds Circuit variables (#60590)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-08-12 18:30:50 -07:00
Gurkenglas
e0fad671fd Input ports now connect to multiple output ports. Remove combiner. (#60494)
* tgui bsod

* debug disconnections

* prelim

* recomment

* set_value -> put ._.

* DAMN IT

* reinsert subsystem

* prepare

* unditch signals

* remove combiner

* remove combiner some more

* how did router.dm get here? deleting.

* These two COMSIGS should be one.

* critical typo

* inline cast

* have your signals

* Have your set_input & set_output.

* make compile

* upgrade save/load to n-to-n-wires

* have your documentation

* have your unsafe proc

* pay no attention to the compile errors

* unlist the ref

* paste my for block back in ._.

* fix manual input

* oops pushed too soon

* Have your !port.connected_to?.length

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
2021-08-11 18:48:29 +03:00
TheSmallBlue
2eabd28a06 Fixes a small problem with the pathfinding path and the robot fix merge (#60751) 2021-08-08 00:20:25 -07:00
Watermelon914
0deb859b3c Moves most circuit defines to files (#60705)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-08-07 16:16:18 -07:00
Watermelon914
13296f5f74 Refactors port types completely and adds the option type. Refactors options to use this new type (#60571)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-08-04 09:06:48 -07:00
Gurkenglas
aa018a857a Circuit component descriptions and module names are now visible to the naked eye. (#60545) 2021-07-31 21:19:43 -07:00
Watermelon914
ac2efd9b86 Removes Destroy overrides from most circuit components (#60492)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-07-28 18:31:42 -07:00
TheSmallBlue
c96effce0a Adds a Pathfinding circuit component (#60095) 2021-07-26 04:08:33 -07:00
Watermelon914
11dd7a852b Adds crew monitor usb connections and fixes the soundemitter's frequency port (#59942)
Adds crew monitor usb connections and fixes the soundemitter's frequency port
Allows you to view health and stuff.
2021-07-03 14:43:35 -03:00
Watermelon914
3356f5d2ab Fixed cooldowns for speech and soundemitter circuit components. Brought speech component more in line with other components. (#59958)
Fixes to the cooldowns. Also circuits now use an input trigger/output trigger system which the speech component hadn't yet adopted because it was made before that system was introduced and left out when changing most components to use this system.

Also temporarily disables input/output signal ports for the prebuilt speech relay circuit until I can properly code in a way to load circuits.
2021-07-03 14:42:42 -03:00
Watermelon914
02f0fe75fa Adds the sound emitter circuit component (#59866)
Adds the sound emitter circuit component. Allows the integrated circuit to play a sound of varying volume and frequency.
2021-06-30 15:38:31 -03:00
Watermelon914
7e9e2df721 Adds USB to arrest consoles. Adds list circuit components. (#59850)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-06-29 13:23:14 -07:00
Mothblocks
23790c6c5e Fix missing SIGNAL_HANDLER (#59826)
Adds SIGNAL_HANDLER to everywhere that didn't have it that was picked up by dm-lua, which is now ready enough to catch these.
2021-06-27 15:43:49 +01:00
Watermelon914
921416b5d8 Adds the airlock shell, refactors USB code to be easier to use, implements USB cables for the binary valve and more. (#59728)
Adds the airlock shell. The circuit has full control over the airlock.
Refactors USB code to be easier to use for less experienced coders.
Implements USB cables for the binary valve to be able to open/close the valve.
Adds a private channel for radios that only lets circuits with the same owner's ID to interact with it.
2021-06-24 14:22:19 -03:00
Watermelon914
2c0288ffe0 Adds the MMI circuit component. Allows inputting signals into circuit component ports (#59743)
Adds the MMI component which outputs signals whenever they click somewhere/try to move.
Allows inputting signals into ports, making it easier to debug integrated components.
2021-06-24 14:14:29 -03:00
Watermelon914
f92403f3ed Added circuit component UI details, added multiplexer and allowed inserting components directly into shells. (#59635)
Adds the multiplexer circuit component - en.wikipedia.org/wiki/Multiplexer
Circuit components can now be directly inserted into shells rather than having to take the integrated circuit out.
Special information can be accessed from components now through the "Info" button besides the eject button on a component.
2021-06-23 18:34:19 -03:00
Watermelon914
f2b39b6803 More circuit components. Restructures the circuit components folder to be more organised. (#59459)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-06-04 21:38:30 -07:00