Commit Graph

168 Commits

Author SHA1 Message Date
Ghilker
5713b4fb77 improve speed of cascade walls, better description for them + CL for cascade antag (#66800)
Cascade walls were processing on object subsystem, they are now in their own subsystem that ticks once per second and should be more reliable even in case of high td
better description for the walls to be more interesting
2022-05-10 19:52:50 +01:00
TemporalOroboros
068a3be859 Makes smoke and foam attempt to fill the available space. (#65281)
Have you ever noticed that the chemical smoke and chemical foam reactions are a lot less effective in confined spaces? This is because they currently attempt to spread to all tiles within n steps of their origin. If they can't expand onto a tile they get blocked and the expanding cloud/flood misses out on all the tiles that would be in range, but that can't be reached.

Obviously smoke and foam getting blocked by walls and the like makes intuitive sense, but it seemed a bit nonsensical that walls would basically delete a significant chunk of an expanding, amoebic mass. The solution I came up with is making smoke and foam expand until they cover a certain area, with a shared tracker for the target size and total size of the flood. The flood will simply expand as normal until it covers the desired target area. Blocked expansions just don't count and will be made up for with expansion elsewhere.

Attendant to these changes are a whole bunch of minor code improvement to smoke, foam, and one for wizard spells because I was already in the area and :pain:.

There have been some minor balance changes to the chemical smoke and foam reactions:

I converted them over to passing the desired area of the resulting smoke cloud/foam flood. The old equation for the resulting area was along the lines of 2sqrt(x)(sqrt(x) + 1) + 1 given reaction volume x and given unobstructed expansion. I've made them just pass around 2x instead. This is actually less than they used to try for, but now they're guaranteed to reach that unless the flood is fully contained. Not entirely certain if buff or nerf. Probably buff on the station.
Also, foam dilution is now based on covered area instead of target expansion range. Since this scales faster than it used to foam has been effectively nerfed at high volumes. To compensate for this I removed the jank 6/7 effect multiplier and increased the base reagent scaling a bit. Again, not certain if buff or nerf.
2022-05-07 13:10:37 -07:00
Fikou
8a51c10665 [MDB IGNORE] Adds dead space navigation (#65741)
Adds the navigate verb, it makes a holographic path to any navigation beacon on station
Video here: https://streamable.com/2uy76l
removes wayfiding pinpointers and the associated quirk, as theyre kinda redundant with it
needs #65665 before merge
partially inspired by goon
2022-04-03 10:42:51 +01:00
LemonInTheDark
079f8ac515 Adds moveloop bucketing, uses queues for the singulo rather then sleeps (#64418)
Adds a basic bucketing system to move loops.

This should hopefully save a lot of cpu time, and allow for more load while gaining better smoothness.

The idea is very similar to SStimer, but my implementation is much more simple, since I have to worry less about long delays and redundant buckets.
Insertion needs to be cheaper too, since I'm making a system that by design holds a lot of looping things

It comes with some minor tradeoffs, we can't have constant rechecking of loops if a move "fails", not that we really want that anyway
We also lose direct control over the timer var, but I think that's better, don't want people manipulating that directly
Not that it even really worked very well back when we did have it
Removes the sleep from singularity code

Rather then using sleep to store the state of our iteration, we instead queue the iteration in a list.
We then use a custom singulo processing subsystem to call our "digest" proc several times per full eat, with the hope of staying on top of
our queue
This rarely happens because the queue is too large, god why is a sm powered singulo 24x24 tiles.

I've also A: cached our dist checks, and B: Added dist checks to prevent attempting to pull things out of range
This might look a bit worse, but it saves a lot of work

Oh right and I made the singulo unable to eat while it still has tiles to digest. The hope is to prevent
overwork and list explosion.

Hopefully this will prevent singulo server stoppage, though I've seen some other worrying things in testing.
2022-02-03 07:57:52 -03: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
Ron
7a214d187a Gamer quirk (#64277)
Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com>
2022-01-24 11:56:57 -08:00
Kylerace
10ba80973b makes most statpanel tabs update a tenth or so as often (>= 4 seconds instead of 4 deciseconds) because theyre wastful of cpu (#63991)
makes most updating stat panel tabs update once every 4 seconds instead of 4 deciseconds, but switching tabs instantly updates statpanel data for you. also makes examining a turf make flat icons for a maximum of 10 contents instead of 30 because its ridiculous to call getFuckingFlatIcon() wrappers that many times. also makes SSfluids not have SS_TICKER and updates its wait accordingly because theres no reason for it to be a ticker subsystem

the mc tab updates every 2 seconds unless someone has the pref enabled to refresh it quickly because SOME UNILLUMINATED LEMONS absolutely must watch overtime spikes in real time

statpanels can take between 1-3% of masters total processing time at very high pop, which is silly considering theres no need for someone to know any of the data updated accurate to less than half of a second. The only reason it needed to update so fast was because it looked awful when switching tabs, which will only be updated on the next fire. now switching tabs updates data instantly so theres no need to update the rest of the data quickly.

also makes each stat tab update into its own proc so we can tell how much each tab update costs
2022-01-23 00:46:46 -08:00
LemonInTheDark
815bb8ae40 Adds a movement looping system, replaces inbuild procs and spacedrift with it (#62567)
* Adds a subsystem to handle automated directional movement, replaces all instances of walk_towards with it. Makes meteors and immovable rods not drift in space, and makes immovable rods more destructive. Note, I've opted not to use byond's method of moving towards something, which is effectively Move(src, get_step(src, get_dir(src, target))) as it's cringe and doesn't make a smooth line. I've replaced it with a autoupdating rise over run setup, read the code for more details

* woop forgot the subsystem

* Documentation, contributing.md entry, and some cleanup

* Makes the moveloop datum more oop friendly, sets us up for a lot of conversions

* Converts the curseblob and walk_away() to the subsystem

* Changes the default for override from FALSE to TRUE

* converts walk() over, still need to add a replacement proc for it, but we didn't actually have anything that used the raw proc

* converts the rest of walk_to() over, nearing the end now

* cleans up some errors

* Fully documents everything, fills in some missing movement types, uses the power of oop to make things cleaner, and typepaths longer

* Finishes the contributing.md stuff

* Done

* Fefaults -> Defaults, can you tell I wrote this at 1AM?

* resolves bubblegum issues

* Roh's suggestions

Co-authored-by: Rohesie <rohesie@gmail.com>

* Cleanup

* Hey lemon, did you know that Destroy() lives on datums? ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

* Converts over the discrepencies created in my absense

* HAHA FUCK YOU I PAY MY DUES

* Whoops lost some stuff in the merge

* Converts the system from seconds to deciseconds to make dealing with the api more sane

* Some stuff I missed

* Makes movement an inheritable subsystem type, splits the moveloop file into two, one for the subsystem, and one for the datums

* Makes a subsystem that handles directing movers out to other subsystems. It's a bit bad right now, but it's a
good first step. I think I'll move the move loop datum to a lazy var on mobs instead of an assoc list, don't
like lists.

Also makes the movement procs global, I'll move em to the /movement subsystem at some point or something like
that

* Converts the existing uses of the procs over to the new format

* Adds support for subsystem precedence, so a type of A can override type B.
General cleanup, still kinda in debug mode but it's getting better

* I'll admit I'm not too familiar with this, but I think it will work

* Adds starting logic so movement types "pausing" makes any sense
Redoes how waiting is handled to make it based on world.time directly. I don't remember why. I think it's better
this way.

Adds a drifting movement type, moves space drift over to it.
Needs severe work before it's ready, too much info stored and modified on the moving object, see comment
Starts work on making drifting smooth

* Moves almost all space drifting vars over to signals on the movement datum
Properly implements glide size stuff for both the subsystem and the loops. Space drift will be smoother now.
It's not perfect, but it'll work just fine for now

Adds a way to override a client'd mob's glide size mid move, uses it to make entering a spacedrift look right
Adds a way to delay a client move outside of just move_delay, meant to be used for long periods, and setup such
that it doesn't make inputs persist

Adds flags to movement loops, alongside MOVELOOP_OVERRIDE_CLIENT_CONTROL, which blocks client movements while
the loop is firing, and for it's visual delay after

This means you can't exit a space drift until you hit the actual wall. This feels a lot better

Some general logic stuff, move() will return true/false if it succeeded or failed
Adds a stop_loop() proc that's called when a move loop is no longer active

Suck my nuts

* Moves precedence to the loop instead of the subsystem

* Moves drifting into a component, this lets me explictly block input after the move loop ends, so people can't
move the moment they functionally move onto a new tile
This is a bit underdeveloped currently, but that's a problem for another day

Cleans up some uses of move procs, fixes runtimes in metoer and curseblob code
Adds signals for stopping/starting a move loop, sending one for destroy is redundant.
Moves existing event signals from the movable being acted on to the loop itself, makes more sense this way
Makes the move handler return the created loop up the chain so we can register to it
Fixes a logic error in loop contesting code that lead to loops never actually being removed from subsystems
because they didn't know they should be.
Properly changes lifetime from a time to stop, to functionally an amount of moves to complete before stopping
Adds some new signals for pre/post loop process. This is to better tie into components.

I decided I didn't like the idea of tying all functionality to the loops themselves
The loop decides functionally how to move, components or just tied in signals can decide when/when not to move
and can modify properties of the loop

Making a new loop for things like atmos drift, something I'm interested in tackling in the future, seemed silly

* Moves movement procs directly to the subsystem for better namespacing or whatever

* Moves movement packets onto /atom/movable, no longer need the debugging
I've decided to not just put their contents fully onto atom movable, since it makes debugging on live much
harder, can't sdql for them anymore.

Fixes a runtime in meteor code, properly this time
Fixes a logic error in stop_looping
Makes move manager NO_INIT, because well, it doesn't init

* Commits human sin, makes Recover() work properly for movement subsystems

* Fixes immovable rod orbits not always working, they were returning too early in moved and fucking up the var we use to track move count, and thus not sending a signal properly

* Reworks the curseblob to use signals more, and to not use override

* Missed this in the movement ss commit

* Removes override, makes having a higher or equal precedence take its place

* Updates documentation

* Cleans up some unused defines

* Nukes the unused flags option

* Whoops forgot to qdel check

* Removes an unused var I had for client move prevention before I started using a component

* Let's do this properly

* Modernizes meteor code to better match how explosions actually work currently

* Some more cleanup

* Cleans up effect code a little bit
Nukes the effect system's sleep loop, we use movement loops instead
As a part of that, instead of 1 timer per effect spawned, we react to loop failure and make it 1 timer per
effect system
This should reduce the amoumt of slowdown we see after mass lighting break

It's not everything, we're still making a timer per spark effect, but it cuts things down significantly

* Updates explosions to not sleep

* Adds support for modifying a loops delay post process, makes extinguisher code suck less then it does currently, nukes some more sleeps and timer loops

* Converts water tank resin over to move loops rather then sleeps, minor behavior change mind, the cooldown starts on fire rather then on land, but I think that makes more sense anyway

* compile and runtime fix

* Fixes some runtimes, cleans up some code, ensures feature parity when it comes to logging

* Prevents resin foam from space drifting

* Adds support for flags back into the system, I need it for reasons

* Updates move_towards to fix some bugs and resolve some inconsistent behavior, implements a flag that makes a loop's first move start instantly

* Fixes extinguishers not actually transfering any reagents

* Converts sprays to the new system. This does actually minorly change behavior, in that I've changed the order of spray actions from step -> sleep -> wash to step -> wash -> sleep, but I'm not terribly torn up about it because frankly I think it feels better

* Converts grav catapults over to the new system

* Converts trays over to moveloops

* Converts robot streaking to move loops, the other two coming soon

* Compile you won't. Also fixes a behavior issue with oil streaks

* Does directional step_to properly, cleans up the other two streaking types

* Converts step_trigger over, not that it's actually used anywhere. Changes how stoping a move works, you need to explicitly qdel, other the step is just considered to be ignored. This will make life easier later

* Adds a jps movement loop. It's a bit bloaty, id is stupid, but it'll work just fine

* Makes the system support passing in a datum that's just used as extra context for the move. The hope is this makes signalizing things less of an absolute headache

* Begins the conversion of ai movement datums to movement loops

* These two are reasonably simple, only weird thing I'm doing is A: Not allowing target hotswapping, which I hope none is doing, and B: passing the controller into the move loop as extra context so things work properly

* JPS is a bit more complex, partially because the old implementation was a bit weird. 2 major things. 1: I'm dropping what I think was a redundant behavior minimum distance check from the premove bit of logic, since I'm pretty sure it didn't do anything. 2, instead of just stoping the step in an error state like being pulled, we count it against our max move total

* Audit

* Moves most forced movement to the framework, adds some components to make things nicer

* Implements a flag that makes the loop always operate, regardless of precedence and without impacting any other loops

* Moves movement subsystems into the right folder

* Hey potato what if you had two procs that did the same thing and one called the other? Wow it's useless

* Merges slipping and force movement

* Converys conveyors over to the system. It's a bit fragile, but I think it's totally worth it to save the sleep loop

* Precedence -> Priority, cleans up some logic errors, makes priority highest to lowest instead of lowest to highest, straight cleans some code up

* Makes poly and bubbles ignore spacedrift, now that precedence actually functions properly. I'm likely missing cases of this, will deal with it later

* Depression, thy name is linter

* Fixes linter, and hopefully fixes the runtimes in ci too

* Wew

* Sets sprays and extinguishers back to legacy, since people do actually seem to have noticed

* Spelling errors my beloved

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>

* More detail, moves return descriptions

* Converts transit tubes to the system?

* Adds the glide size modifier. Not honestly sure that this should be default, considering how crummy it makes things look for normal walking, but it's useful as hell here

* Adds a force move in dir template, actual support for fast initial steps (wtf old me) and a helper proc for setting delay

* Cleans up displosal code a bit, I thought about adding it to the system but it would functionally be just 'disposal loops'. Maybe I'll make a template subtype? not sure how I want to handle stuff like this

* Cleans up mob movement a bit

* Let's use the controller's visual delay

* Makes the resin thrower nicer, cries

* Cleans up some comments, replaces an implicit world.icon_size with an explicit one, fixes up a typecheck

* typecache instead of double istype. Can't do much about the !atom/movable, list would be too big I feel

* hhh

* bro wtf

* Documents the why of SS_TICKER

* Puts SSmovement on SS_TICKER. Lets us support tick steps

* Cleans up the charge action. Makes it use moveloops

* Fixes CI? kinda worried that this just got dropped

* Converts disposal pipes to move loops. They stutter a bit more then usual as of now, hoping that's a me thing, if it's not I'ma look at uping the priority of the base subsystem

* Moves the move subsystems off background, puts some on ssticker

* Prevents some things that shouldn't move in space from moving in space

* Documents the general form and usage of the system

* Virgin one vs chad once

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>

* Removes unneeded check

* Moves appropriate movement subsystems into SS_BACKGROUND. Removes redundant SS_KEEP_TIMINGs

I do want the behavior of SS_TICKER, which at this point is tick based waits, and ignoring overtime when
calculating next fire.
Since honestly, these subsystems should ignore overtime in regards to next fire, the cost of moving A may be
nothing compared to the cost of moving B.

* Makes the MODULUS macro use floor. I knew our coders would never let me down, glad this exists, thanks ninja
Fixes teleporting caused by shitty round() behavior, adds a "you hit your target" case to homing loops

* Converts blood splatters to move loops, that'll do it

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2022-01-16 14:58:41 -08:00
Seth Scherer
4d5cd60d40 Adds roundstart logging for station traits (#63985) 2022-01-11 15:59:04 -05:00
Ghom
12bf03aa08 proximity monitors cleanup (plus connect_range and connect_containers components) (#62755)
I'm refactoring proximity monitors and fields, removing lots of bloat from both that's hardly even used. Proximity monitors no longer generate effect objects to track the surrounding area, should be less cpu expensive and easier to maintain (or phase out), read and use.
This PR also adds a couple components which may be needed for future stuff (for starters, the mirror reflection PR #62638 could use the connect_range comp)

Improving old old, ugly old code and adding some useful backend components. Tested and working.
2021-12-21 23:49:08 -08:00
Ghom
2fbd7b20bb Synthesizers and headphones can now have circuits! (#62825)
About The Pull Request

A circuit and shell components have been added to Synthesizers (headphones and spacepods included, though with a reduced capacity because of their size), so they can now be used for wiremod. Just like for instant cameras, no shell design here. They are meant to be found in dorms or maybe ordered from cargo.
Why It's Good For The Game

The station outside the sci department has plenty of USB ports stuff but is lacking when it comes to circuits shell. This is another small step toward a better and more applicable wiremod.
Changelog

cl
expansion: Synthesizers and headphones can now have circuits installed.
/cl
2021-12-02 11:18:36 +13:00
Mothblocks
72104c5729 Move conveyor belts to their own system, rename conveyor2 (#62911)
Renames conveyor2.dm to conveyor.dm, and removes the historical comment about "new conveyor belts". As a reminder, comments should be about what the code is now, not what it used to be. (Muh history -Lemon)

Moves conveyor belts to their own SS with an identical wait. It is very common, as an admin, for me to want to adjust conveyor belt processing, either to make it faster (for laughs) or to disable it when it is causing heavy lag. It is very difficult to do this (especially the former) because it just uses fast process.
2021-11-18 16:51:47 -08:00
Mothblocks
061f47d0ee Antag HUDs will now animate if you have multiple antagonists, and will no longer clear on deconversion (#62718)
About The Pull Request

This is for the admin combo HUD. Players shouldn't notice any difference (except at roundend).
2021-11-09T16-27-26.mp4

Removes the ability to set custom antag HUDs for custom admin teams for complexity, though if there's a large enough demand I can try to bring it back in another PR.

Fixes #59767

TM candidate only so that I can make sure antags aren't getting leaked to people who shouldn't see them.
Changelog

cl
fix: Antag HUDs will no longer clear on deconversion if the player was another antag.
qol: Antag HUDs (as seen by admins and at the round end) will now animate between all antagonists, rather than just choosing the most latest.
/cl
2021-11-12 10:53:45 +13:00
Mothblocks
ec95e7cf94 Add healing aura component (#62526) 2021-11-08 01:20:12 -08:00
John Willard
6c0aba5da4 removes double spaces AFTER symbols (#62515)
* removes double spaces AFTER symbols

* found more
2021-11-03 21:09:35 -04:00
Ghilker
95c8e00af7 cleanup _HELPERS/_lists.dm and all the necessary files (#61827)
Bring _HELPERS/_lists.dm to latest standards by:
-Adding proper documentation and fixing existing one
-Giving vars proper names
-Procs now use snake case as per standard (many files that use those procs will be affected)
2021-10-12 14:48:51 +01:00
MrMelbert
a1d67b11f2 fixes two bugs caused by the renaming of mime/clown fan (#61933)
Fixes two bugs caused by #61818.
Closes #61911.

Fixes invisible HUD icons for mime/clown fans. The prior PR renamed the icon_states assigned to the HUDs, but not the icon state within the DMI for the two hud icons
Fixes mime/clown pins also having the wrong worn icon state
Fixes clown fan being able to be selected with mime fan
2021-10-07 16:17:41 +01:00
MrMelbert
976b2e4d1a Fix quirk blacklist not working (#61932) 2021-10-06 22:52:17 -07:00
Mothblocks
9902d64135 Fix quirks being automatically removed (#61631)
Quirks were being validated before the subsystem was setup, this moves to get_quirks() which initiates if needed.
2021-09-23 04:42:02 +01:00
Mothblocks
e3c909cf6e Add admin panel for station traits (#61546)
Admins can now revert (most) station traits before a round starts, as well as setup the station traits that will run next round.

Previously, admins had no control over this system, making it sometimes painful for running planned events.

It is not feasible to update the station traits of the current round, considering some apply pre-roundstart, but it is doable to edit the station traits of the next round.
2021-09-22 22:23:04 +01:00
Mothblocks
0ce04c12b1 Fix quirks list in preferences menu being empty before SSquirks (#61492)
About The Pull Request

Fixes #61490
Changelog

cl
fix: Fixed the quirks list in the preferences menu sometimes being empty.
/cl
2021-09-22 12:14:53 +12:00
Emmett Gaines
04dfcc6559 GAGS fix + debug improvements I needed to find it (#60819)
This fix was one hell of a debug journey. Icon.Insert() was the issue here but I'm not sure if it counts as byond bug in this particular case. When you insert a single frame icon, if an existing icon state of the same name exists normally it would be overridden. However different things happen if the icon that gets overridden has multiple frames. I'm not fully sure of the different behaviors but depending on what the icons consisted of you could get animated sprites where every frame was the same or appending frames to animated sprites in strange ways.

This has been fixed by making sure no Inserts are overriding existing icon states so that the strange behavior doesn't have to be dealt with.

The GAGS debug menu has been upgraded a bit on the way to fixing this bug. A toggle to automatically refresh icons when the dmi or json configuration are updated has been added and the step by step preview will only show steps now involved in the creation of the icon state you select.
2021-09-16 23:55:12 +01:00
Mothblocks
5a4c87a9fc tgui Preferences Menu + total rewrite of the preferences backend (#61313)
About The Pull Request

Rewrites the entire preferences menu in tgui. Rewrites the entire backend to be built upon datumized preferences, rather than constant additions to the preferences base datum.

Splits game preferences into its own window.

Antagonists are now split into their individual rulesets. You can now be a roundstart heretic without signing up for latejoin heretic, as an example.

This iteration matches parity, and provides very little new functionality, but adding anything new will be much easier.

Fixes #60823
Fixes #28907
Fixes #44887
Fixes #59912
Fixes #58458
Fixes #59181
Major TODOs

Quirk icons, from @Fikou (with some slight adjustments from me)
Lore text, from @EOBGames (4/6, need moths and then ethereal lore from @AMonkeyThatCodes)
Heavy documentation on how one would add new preferences, species, jobs, etc

    A lot of specialized testing so that people's real data don't get corrupted

Changelog

cl Mothblocks, Floyd on lots of the design
refactor: The preferences menu has been completely rewritten in tgui.
refactor: The "Stop Sounds" verb has been moved to OOC.
/cl
2021-09-15 10:11:11 +12:00
AMonkeyThatCodes
46cb925af0 Basic Mobs: the cooler simple mobs that run on datum AI. (With reworked cockroach AI as proof of concept) (#60694)
Simple_animals / mobs are the biggest lie in this code-base. They're far from simple and have an extreme god-object problem. Especially when you get to /hostile, where there is so many procs, vars, and what not, that you can't make any interesting additions without snowflaking the hell out of the code.

This PR hopes to help kill this problem by introducing a new /living subtype, /living/basic. The idea of this refactor is to slowly start moving all old simple_animals to this new system, moving over behaviors like charging and more extravagant mobs like megafauna over bit by bit similar to how newfood was implemented.

One of the other big goals of this refactor is to move many of the fringe simple animal behaviors into either AI datums, or components/elements. (Some of which still needs to be done in this PR).

As a proof of concept, I created the base mob/living/basic, and moved cockroaches over to the system. Since cockroaches have both a passive, melee and ranged mob.

This PR does slightly affect balance as the behavior isn't 1-on-1 due to it no longer running on the janky /hostile behavior, but I tried to keep the effects to a minimum, and the glockroach and hauberoach are not spawnable through many means as far as I know.
2021-08-30 16:22:24 +01:00
Gurkenglas
781af013d7 fix ntnet circuit components (#60917)
* fix ntnet

* fix typos and switcheroos

* whoops, tracked a test circuit json.
2021-08-18 20:46:24 -07:00
Ghom
e1171b31cb quirks taken are now recorded by the blackbox. (#60581) 2021-08-02 22:17:33 -07:00
Watermelon914
069c76f629 Revert "makes the tram more powerful than you can ever imagine (#60381)" (#60537)
This reverts commit 55d876d1be.
2021-07-30 12:17:34 -07:00
ma44
7b5e83e1e9 Revives PR #58579; Sligh refactor to AI datums that allows for basic support of subtrees (#60249)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: coiax <yellowbounder@gmail.com>
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Matthew J. <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: Jonathan Rubenstein <jrubcop@gmail.com>
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Jordan Brown <Cyberboss@users.noreply.github.com>
Co-authored-by: Fikou <piotrbryla@onet.pl>
Co-authored-by: Emmanuel S. <emmanuelssr@gmail.com>
2021-07-28 17:56:31 -07:00
Mothblocks
bd6873fd4d Remove nanites (#60473)
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2021-07-28 16:00:56 -07:00
Kylerace
55d876d1be makes the tram more powerful than you can ever imagine (#60381) 2021-07-27 03:23:23 -07:00
Rohesie
4c21166e4f Job refactor: strings to references and typepaths (#59841)
* Job refactor: strings to references and typepaths
2021-07-18 20:48:47 +02:00
coiax
e4d8795e9c Add new Wallets! station trait (#59877)
Add a new simple station trait, that replaces everyone's ID with a
    wallet containing said ID, as well as their starting money, and if
    they're lucky, a little bonus surprise.

        In addition, adds a force variable to station traits, which will
        always enable them, rather than having to edit weight and probability
        of rolling a trait of that sign (postive, negative).

Co-authored-by: Rohesie <rohesie@gmail.com>
2021-07-04 10:20:42 +01:00
Timberpoes
ec2938c72c Refactors quirk code. (#59618)
Adds new signal - COMSIG_MOB_EQUIPPED_ITEM. Signal sent at the same time COMSIG_ITEM_EQUIPPED is and allows something to Register for every time a mob equips an item. Replaced a process() in /datum/quirk/badback with signals relating to this. Holds a weakref to any backpack it has registered signals with for use in its own remove() proc.

Removes snowflake code in /datum/quirk/light_step - This quirk no longer uses GetComponent to directly modify a component. Instead, the same code has been shifted into the component itself, which now checks for TRAIT_LIGHT_STEP and mods the volume and range accordingly.

Refactors quirk code in general - Quirks no longer do major logic in New() and no longer qdel themselves in New(). You now fully instantiate a quirk assigned to a var, then call /datum/quirk/proc/add_to_holder(). Various scenarios that shouldn't happen now get handled in this proc and calling code can cleanup properly. Quirks "support" having no quirk_holder - Since their default state is no quirk_holder until the quirk is added to a holder, and similarly quirks can be removed from a holder as well. Destroying a quirk with a quirk_holder will remove it from the quirk_holder properly. qdeling a quirk_holder will clean up any quirks attached to them.

Rethinks processing quirks - Quirks no longer all process automatically. The new logic changes mean their previous need to process() just to check if their quirk_holder had been QDELETED so they didn't become runtime factories has been removed by the refactored code. The few quirks that still process require processing_quirk = TRUE which will start them processing when added to a quirk_holder and stop processing on removal. This means there should be some many hundred fewer quirks process()ing 24/7 every shift.

Subtypes item quirks - A number of quirks are designed to give items to the player. There's code duplication and varying implementation issues, so item quirks have their own subtype with a proc and some vars to handle this. Quirks will no longer fail to give items at all (some quirks actually explictly qdel'd the items they give if the user had no free hands or slots) and will drop items on the floor in the worst-case scenario. Players will always get the opportunity to see messages related to item quirks as these are in a code path that, when the quirk is first added to a new mob, will either output immediately if the mob has a client, or wait for the mob to have a client otherwise.

"Roundstart quirks" paradigm removed - Quirks now have a path to add unique effects that aren't replicated if the quirk is transferred from one mob to another - add_unique(). Item spawning and other similar one-shot logic is done here. This means that adding a quirk to a mob will trigger the one-time effects. Transferring it between mobs (for example, slimepeople changing bodies or swapping a golem shell) will not. roundstart_quirks var renamed to just quirks since it genuinely is just a list of quirks the mob has from any source - Whether roundstart, admin or transferred.

Family Heirloom quirk - Heirloom is now a weakref.

Nyctophobia quirk - No longer process()es, now Registers COMSIG_MOVABLE_MOVED. Every footstep in the dark will slow you back to walking.

Reality Dissociation Syndrome quirk - No longer snowflakes behaviour for mindbreaker toxin on process. Now mindbreaker toxin has the anti-hallucination functionality built into its already existing HAS_TRAIT(M, TRAIT_INSANITY) check in on_mob_life.

Tongue Tied quirk - Now uses .getorganslot(ORGAN_SLOT_TONGUE) to find the tongue instead of locate() in internal_organs

Obsessed antag - Thanks to the Family Heirloom quirk now holding a weakref to the heirloom item itself, this antag type will no longer get the steal heirloom objective if the heirloom doesn't exist (ie. the weakref is null or fails to resolve, meaning the item has been destroyed)

Various quirks that were impossible to remove before are now removable - Examples being light step (which no longer directly modifies the footstep component) and bad back.

In addition, adds some extra documentation overall and improves compliance with code requirements in a number of procs (but certainly not all).

Probably various other little changes here and there to make the above all mesh together.
2021-06-13 15:47:15 -03:00
Watermelon914
b84a9f97b2 Integrated Circuits (Wiremod) (#59232)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com>
Co-authored-by: Maurukas <66576896+Maurukas@users.noreply.github.com>
2021-05-25 11:15:36 -07:00
tralezab
16c87a0aad tramprocess only fires on maps with trams (#58940) 2021-05-08 16:16:09 -07:00
Thalpy
0500771072 [Ready] Fermichem part 2.3 Adds a new reagent: Eigenstasium (#56918)
Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-03-26 19:56:04 -07:00
MMMiracles
5f3e12178e Tramstation: choo choo MORE MAP COMIN' THROUH (#56509)
* cool map bro!

* security

* perma

* secfull

* secman

* medstart

* engine2

* atmos start

* barrrr

* bar2

* bar3

* civil

* lower

* barrrr

* barrrrrr

* start

* cargo

* sci

* j

* servicedecal

* civildecal2

* service decal2

* service decal 3

* service decal 4

* pip

* decal4

* decal8

* arse!

* arrivals

* arrivals 2

* ai

* aifix

* vault+techstorage

* medbay

* bridge 1

* sec 3

* sectest

* squish squish

* securitywork

* secmore

* config setup

* tram

* cargo work

* escape

* disposalfuck

* i hate pipes

* disposalsfull

* SEC

* grav

* bads

* researchwip

* caw

* hguhwhuh??

* apc+air_alarm

* engie

* sm

* stttt

* aisat

* areas

* camera wip

* camera 2

* secam

* shuttle shit or something idk

* aaaa

* path nodes + waypoint navs

* almost there

* pull

* unnecessary file

* standardize

* tram choo choo!!!

* tgm

* testmerge feedback fixes

* map work

* test

* test2

* i hate

* THERE

* trams without pulling upstream like an idiot (#3)

TRAM

* fast tram fast TRAM

* fuck turfs

* tram collisions, tram cooldowns (#4)

lol

* ass

* tram but real

* forgot the ,

* code improvements, fixes, and tram call buttons (#5)

* unnecessary check gone, nulls now scrubbed (#6)

* fancy tram

* feedback changes

* AT fix

* feedback changes

* incin+engine atmos wooo!

* missing grav gen cable

* more feedback changes + diagonal shuttle wall

* bottom floor explodes into airless asteroid instead of space now

* even more feedback changes

* area change

* update to iron sheets

* ore smelter wrong dirs

* path changes agagagagaga

* no more fabs

* atmos fixes + more general fixes

* Creates SStramprocess and Makes Movement Use That Instead of Timers (#7)

* makes SStramprocess a child of SSprocess and makes tram obj use it

* gets rid of continue_movement() in favor of SStramprocess

* remove fake tram

* tgm baby

* maintenance update + chode tram

* hopefully makes the tram choke the server out less (#9)

tries to put brakes on the tram

* bad id console

* more maint stuff

* Big bundle of fixes and additions for trams (#10)

* BANG TING OW

* fixes docs, makes everyone always take damage, fixes bump text and span

* control prevention... maybe?

* combat mode no longer triggers trams

* tram conflicts + tram console

* medical changes + tram lift console

* bot pathing in tunnels

* tram whiteship + bad area string fix

* -station fixes
-tram monorail
-tram monorail grinding + achievement

* trail these noots

* rail

* yee

* diner bots + xeno changes

* Tram TGUI FINALLY (#11)

* bflehgfwblilbrga

* Update TramControl.js

* --fix, --lint

* more ui

* brokendimmer now doesn't try to load content, static data updates, MORE sanity.

* finishing off tram sprites

* cleaning up dmis

* Portal Improv

* re-removes icons

* relay moved, map fix

* fixed? (#12)

* rd machines

* relay moved, upload moved to sci, service lathe access, typo

* maint stuff

* tgm

* medical overhaul, more maint junk

* comments out achievements for testing

* space hole + spare

* actual tram blender fix according to known blender method

* tgm

* trail these

* removes depreciated tram content + accidental changes during pulling

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-03-11 18:43:57 +01:00
Thalpy
5bfab4a84b Fermichem 2.4 - C2 medicine recipe adaptations and atunements to the new mechanics (#57104)
Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-02-27 14:10:53 -08:00
Qustinnus
cc46f7cd5e Adds new station traits that give deathrattle implants (#57174)
Add a family of related station traits to the pool. One set provides
deathrattle implants for a randomly chosen department, such as Service
or Command.

The other provides deathrattle implants to the entire station in a
single group.

Co-authored-by: Fikou <piotrbryla@onet.pl>
2021-02-26 17:02:41 +00:00
Qustinnus
bb8faec7a1 Adds a subsystem for ai movement (#57111)
* done

* straight walk

* movement

* yep

* removes unused macro

* done

* Update ai_movement.dm
2021-02-23 22:29:32 +01:00
Thalpy
864d6ca09b Fermichem part 2.1: Adds a reaction/reagent lookup GUI! (#56868)
Adds a new GUI that can be opened from the chem dispenser that will let you look up all reactions and reagents presently in the game (except secret recipes).

For the colours:
purple - clicking this will give you a recipe
blue - clicking this will give you a reagent
green - clicking this will turn it off (or it's also green if the reagent is present in the associated beaker the UI is linked to)
red - clicking this will turn it on

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-02-19 20:41:59 +02:00
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
Thalpy
56f7ac0c0a Reaction rates, pH, purity and more! Brings a heavily improved, less explosive and optimised fermichem to tg. (#56019)
Brings a heavily improved, rewritten, and optimised fermichem to tg. I saw that tg seemed receptive to it, so I thought I’d do it myself. If you know of fermichem – there’s a lot changed and improved, so looking at other documents regarding it will not be accurate.

Revamps the main chemistry reaction handler to allow for over time reactions instead of instant reactions. This revamp allows for simultaneous reactions, exo/endothermic reactions and pH consuming/producing behaviours. Most of the reactions in game will now inherit an easy one size fits all reaction.

Temperature mechanics

    Temperature affects reaction rate
    The higher it is, the faster it is, but be careful, as chem reactions will perform special functions when overheated (presently it DOESN’T explode)
    Temperature will increase or decrease depending on the exo/endothermic nature of the reaction

pH mechanics

    Each reaction requires the pH of a beaker to be within a certain range.
    If you are outside of the optimal, you'll incur impurity, which has a negative effect on the resultant chem
    pH of a beaker will change during a reaction
    Reacting Impure chem effects can vary from chem to chem, but for default will reduce the purity of other reagents in the beaker
    Consuming an impure chem will either cause liver or tox damage dependant on how impure it is as well as reducing consumed volume
    Purity can (presently) only be seen with a chemical analyser
    Impure chems can purposely be made by making the reagent with a low, but not explosive, purity.
    A chem made under the PurityMin will convert into the reagent’s failed chem in the beaker.

Optional catalysts

    Reactions can use an optional catalyst to influence the reaction - at the more framework exists from tmeprature, reaction rate and pH changes as a result of a catalyst. Catalysts can be set to only work on a specific reagent subtype. It is preferable to those building upon this code that optional catalysts only affect a subsection of reagents.
    Presently the only catalyst that uses this is Palladium synthate catalyst - a catalyst that increases the reaction speed of medicines.

Reaction agents

    These are reagents that will consume themselves when added to a beaker - even a full one, and apply effects to the total solution. One example being Tempomyocin which will speed up a reaction, or the buffer reagents which change the pH.

Competitive reactions

These reactions will go towards a certain product depending on the conditions of the holder. The example one given is a little tricky and requires a lot of temperature to push it towards one end.
New and charged reactions

(see the wiki for details)

Acidic /basic buffer - These reagents will adjust the pH of a beaker/solution when added to one. If the beaker is empty it will fill it instead.

Tempomyocin - This will instantly speed up any reaction added it is added to, giving it a short burst of speed. Adding this reagent to a reaction will give it a suddent speed boost up to 3x times - with the output purity of the boost modified by the Tempomyocin's purity.5u per 100u will give you 2x, 10 u per 100u will give you 3x. IIt caps at 3x for a single addition, but there is nothing preventing you from adding multiple doses for multiple boosts.

Purit tester - this will fizzle if the solution it is added to has an inverse purity reagent present.

A few other reactions have been tweaked to make sure they work too. An example being meth - see the wikipage linked above.
A note on all reactions

    The one size fits all reaction for all chems generally won’t create impure chems – it is very forgiving. The only thing to remember is to avoid heating reactions over 900 or you’ll reduce your yield, and try to keep your pH between 5 -9.

This PR doesn’t have specific example chems included (except for the buffers) – they will be atomised out and they use the mechanics in more depth
A note on plumbing

I reached out to Time Green and we worked together to make sure plumbing was fine. Time Green did some of his own tests too, and surprisingly it doesn't look like much needs to be changed.
2021-02-11 17:09:07 -03:00
Qustinnus
2c71202bdb Makes station traits less common (#56726)
The chance for station traits overall has been reduced, while the
weight of some traits have been changed.
2021-02-08 09:59:00 +00:00
Qustinnus
95731342b9 [READY] Adds station traits: Small modifiers that can randomly be chosen each round (#56309)
This PR adds station traits which are essentially small changes to a normal round that can be used to create small variations in how a round might play out, sometimes there might be only one, very simple trait, but you might have a round where they have a somewhat bigger impact, to make rounds feel slightly more different from each other.

The following traits have been added:
Positive:

    Lucky winner - Free pizza and beer every 6-12 minutes
    Galactic Grant - Larger starting funds for cargo
    Premium internals boxes - emergency box has flare + radio as bonus
    Bountiful bounties - Bounties pay 20% more
    Strong supply lines - Imports 20% cheaper
    Filled maint - More loot in maint
    Fast shuttle - Cargo shuttle is faster
    Free scarves - Free scarfs if a slot is free

Neutral:

    Bananium shipment - Clown starts with 5 sheets of bananium (Neutral because this helps noone but the clown)
    Unnatural atmosphere - Lava planet can get more restricted gasses
    Unique AI - Random lawset at roundstart for AI
    Ian adventure - Ian teleports to a random spot on the station
    Glitched PDAs - PDA's have a different beep
    Announcer intern - Changes the announcement messages to sound like they're from an intern at Centcom

Negative:

    Carp infestation - Carp event is more common and can start earlier
    Weak supply lines - Imports 20% more expensive
    Blackout - Station lights are partially broken around the station
    Empty maint - Less loot in maint
    Overflow bureacracy mistake - Random overflow job (From a vetted list)
    Late Arrivals - Everyone starts in arrivals
    Random spawns - Random spawn location (by drop pod)
    Slow shuttle - Cargo shuttle is slower

Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com>
Co-authored-by: coiax <yellowbounder@gmail.com>
2021-02-05 15:49:49 -08:00
RaveRadbury
2a910f2f99 Adds Extrovert and Introvert Quirks (#56490)
Adds Extrovert and Introvert quirks. Removes the free bar moodlet, gives it to extroverts, makes a corresponding library moodlet for introverts. Introvert and Extrovert are blacklisted and therefore mutually exclusive.

Seems a bit thin, could we do x?
Yeah sure, and I'd appreciate feedback on where you'd like to see these quirks go. I want to start basic with "where do they spend their free time?" Rather than trying to do something big like moodlets for speaking a lot/little, especially because that seems a bit unbalanced and we already have a quirk that penalizes speech. I'm also looking to avoid unrealistic stereotypes, speech penalties to introverts are kind of unreasonable, introverts aren't inherently bad at talking, they just like alone time.

Why make it free?
I'm taking away a pre-existing moodlet that was free for everyone, also positive quirks are capped at 6 and I see this quirk as being essential to character building so I would prefer not to make someone pick between giving any sort of depth to their character and their powergaming loadout.

Having players define their character as introverted or extroverted and reinforcing the decision through gameplay mechanics is a great way to get them thinking about their character beyond an avatar to make other spacemen horizontal with. I'd argue that it is as foundational as decisions like gender, species, and age.
This opens up the library as a social space, as the two people who take introvert might occasionally run into each other when they are recovering mood and sanity there.
2021-01-30 21:28:12 -03:00
LemonInTheDark
319d7079c3 Revert "Finishes the allocation refactor (#55965)" (#56137)
This reverts commit 87234f3fd8.
2021-01-13 01:17:59 +00:00
TiviPlus
87234f3fd8 Finishes the allocation refactor (#55965)
#53841 continuation
I recall that the reason for infinite stuns and such was that the priority wasn't being cleared properly when something hitched and I fixed it and I don't remember where exactly but it works now (TM)
A variation of this is TMed on TGMC and it works fine
2021-01-11 15:42:00 -03:00
TemporalOroboros
c7ab3a8907 Fixes NTNet logging runtime (#55892)
SSnetworks can log when it's passed a text network ID.
2021-01-03 22:52:44 -08:00
WarlockD
56345975ba The Great Radio Rework: NTNET Part 1 of many. (#54462)
Machinery networking refactor.
2020-12-30 21:54:34 +01:00