Commit Graph

56547 Commits

Author SHA1 Message Date
MrMelbert
8dfd1fb627 Converts tippable behavior from cows and medibots to a component (tip over anything with adminbus) (#59705)
This PR converts cow-tipping and medibot-tipping into a component, /datum/component/tippable. Cows and medibots now use the tippable component to control their tipping behaviors.

This PR also goes through a few atom_attack_hand signals and makes them all send the same arguments.
2021-06-23 00:39:22 -03:00
LemonInTheDark
6fcbce39cd Makes turfs persist their signals, uses this to optimize connect_loc (#59608)
* Makes turfs persist signals

* Splits connect_loc up into two elements, one for stuff that wishes to connect on behalf of something, and one for stuff that just wants to connect normally. Connecting on behalf of someone has a significant amount of overhead, so let's do this to keep things clear

* Converts all uses of connect_loc over to the new patterns

* Adds some comments, actually makes turfs persist signals

* There's no need to detach connect loc anymore, since all it does is unregister signals. Unregisters a signal from formorly decal'd turfs, and makes the changeturf signal persistance stuff actually work

* bro fuck documentation

* Changes from a var to a proc, prevents admemems and idiots

* Extra detail on why we do the copy post qdel
2021-06-22 23:12:34 -04:00
TemporalOroboros
298725bf29 Fixes bodybags, cargo crates, and directional lighting. (#59709)
Fixes a couple bugs created by the neon carpets PR:
* Bodybags can once again be closed. (Fixes #59704, Fixes #59747)
* Cargo crates no longer report having delivered an emissive blocker
* Directional lighting no longer masks the emissive plane.
2021-06-22 19:35:45 -03:00
Kyle Spier-Swenson
4b04f9012d Removes animate that almost never did anything from parallax (#59759)
This animate wouldn't run if the jump was too big, meaning we were only ever animating 1 or 2 pixels of parallax, and i do not believe the cost on the server nor the client is warranted for how unnoticeable this animation is.
2021-06-22 18:57:39 -03:00
MMMiracles
651ad9272b Tramstation Tram "Upgrades" (#59277)
The tram now smashes through walls instead of phasing through them. Spawns sparks and shakes the screen for nearby observers as the tram kool-aids its way through obstructions.
The tram now equal-opportunity smashes through most machinery and structures. If a structure is normally not anchored by default (girders, lockers, closets, ect), it will unanchor them and throw them while doing some damage. Machinery now actually gets destroyed when hit by the tram, which also fixes the issue with the recycler breaking the tram.
Tram platforms themselves have been made inherently indestructible to prevent them from ever breaking in any unexpected gameplay method.
The permabrig mouse has been moved to the general activity room instead of the room with the exposed APC wiring.
2021-06-22 13:31:37 -07:00
TemporalOroboros
305abeba22 Fixes infinite dispenser power (#59710)
Fixes an issue where update_total() could recurse and wind up double-counting a bunch of reagents.
Fixes an issue where reagent dispensers could withdraw negative power from their power cell. (Fixes #59663) (Pretty much just the two problems described here but in issue form)
2021-06-22 13:17:46 -07:00
LemonInTheDark
a16bdc9c9b Converts the enemies list to weakrefs (#59694)
This has some minor overhead, but listtargets isn't exactly a hot proc, so we should be just fine
2021-06-22 17:06:42 -03:00
Watermelon914
fd1c6ba5b0 Fixes explosions having a higher chance of delimbing you if they're weaker (#59662)
Don't know if it's an oversight or not, but currently, explosions delimb you if they're weaker. This PR fixes that by removing the division in the probability calculations and replacing it with a multiplication, whilst also changing the base probability value.

The value 16.6 was chosen because at devastation 3, aka max devastation, that will equal out to approximately 50%
2021-06-22 17:05:10 -03:00
Aziz Chynaliev
0dc279397f Port: fixes of SStimer subsystem from RU SS220 Paradise (#59718)
Unobvious problem spot

#define BUCKET_POS(timer) (((round((timer.timeToRun - SStimer.head_offset) / world.tick_lag)+1) % BUCKET_LEN)||BUCKET_LEN)

With tick_lag equal to 0.1, 0.25, 0.5, rounding of division is normal. But at other values it may be shifted either more or less due to the specifics of floating-point storage and processing. Numbers 0.1, 0.25, 0.5 have blank mantissa, unlike others which lead to numbers such as 245.0000004 when divided.
PS: tick_lag is rounded to the first two decimal places.


Fixes

    Rewrote the circular doubly linked list to a regular doubly linked list, because it could cause timers to loop infinitely.
    Fixed re-creation of a bucket if the timer does not have a callback.
    Added debug stat indicator RST to MC SStimer.
    Added optional ability to log dump all timers on crash.
    Fixed subsystem logic when a bucket position is misplaced due to division and rounding inaccuracy. The system now captures such rounding errors and restores the correct timer position.

References

[RU] SS220 Paradise port process from TGstation and fixes:

    ss220-space/Paradise#5
    ss220-space/Paradise#10
    ss220-space/Paradise#26
    ss220-space/Paradise#32
    ss220-space/Paradise#37

Contributors

    @semoro: fixes
    @Bizzonium: port

Changelog

cl Semoro and azizonkg
fix: Ported fixes of SStimer subsystem from RU SS220 Paradise
config: Added a new config var: flag/log_timers_on_bucket_reset
/cl
2021-06-22 23:06:40 +12:00
Fikou
24549d707b Toy Update (#59754)
* code

* sprite part 1

* sprites and mapping

* wa

* fix

* warden figure fix

* warden fix 2

* wahwah

* Update code/game/objects/items/toys.dm

* series

Co-authored-by: tralezab <spamqetuo2@gmail.com>
2021-06-22 00:17:26 -07:00
Greniza
8f610f0d27 New tile-coloring turf decals! (#59609) 2021-06-22 02:17:15 -03:00
RandomGamer123
36b2aca9eb Make smoke_all for cigarettes work correctly (#59698)
smoke_all wasn't actually being considered when computing the amount of reagents transferred to the body, but only the reagents removed from the cigarette prior to this.
This makes the amount of reagents that cigarettes transfer into your body when you smoke them actually dependent on the smoke_all factor.

Makes the changes made in #45711 (A similar pr) (c9c57c4419) actually work properly, as otherwise there really isn't much of a meaning to the smoke_all property.
2021-06-21 20:15:10 -07:00
Watermelon914
f7117797d4 Refactors dbcore and limits the maximum amount of concurrent async queries to a variable amount (#59676)
Refactors dbcore to work off a subsystem if executed async and limits the maximum amount of concurrent async queries to 25.

This has been tested locally on a mysql docker image and there were no crashes (as long as you didn't run it with debug extools) + data was getting recorded fine.
Why It's Good For The Game

May or may not resolve terry crashes, however, each query creates a new thread which takes up 2mb, preventing the game from using that 2mb. This can lead to ooms if they stack up, e.g. due to poor connectivity. This solves that issue.

maintainer note: this did not actually resolve the crashes, but has value anyway. Crashes were sidestepped fixed by finding out Large Address Awareness works


cl
refactor: Refactors dbcore.dm to possibly resolve the crashes that happen on Terry.
/cl
2021-06-22 09:33:42 +12:00
Jonathan Rubenstein
5d44d536e2 Change admins music title hiding to hide on media player (#59667) 2021-06-21 20:35:10 +01:00
Timberpoes
c9a9c2bf4d Change agent ID cards to jump to the front of wallets; disguise other more powerful ID cards (#59652)
Many moons after I reworked ID cards, I feel the Agent ID card needs a little bit of extra love.

This change adds an option during forging which allows the user to specify whether the agent ID card will force itself to the front-facing/visible ID slot in wallets.

This provides traitors with a way to effectively disguse any special ID cards and accesses they may have without making the agent ID card a must-buy TC tax. If your traitor strategy involves gathering many ID cards, this is a definite buff to an item that took a heavy hit to power in the rework.
2021-06-21 19:49:40 +01:00
coiax
e8d221dc6d Refactors mail and delivery code (#59730)
- Mail now uses weakreferences to minds, which means the presence of
  mail will not cause harddels, and persist between mindswaps or cloning
  or whatever horrible mob transfer things you've got going on.
- The code for creating a crate of mail has been refactored into a
  single proc, rather than having the same code twice.
- Instead of special casing reagents being delivered, instead
  reagent mail goodies are just regular bottle items like any other.
2021-06-21 19:26:57 +01:00
ATH1909
d2cfa2ae28 contractor baton cyborg stunning now uses left/right clicks, not combat mode (#59110)
Contractor batons will now stun cyborgs on a left click and harmbaton them on a right click, instead of stunning cyborgs if you're NOT in combat mode and harmbatonning them if you are.

Stunning a cyborg with a contractor baton now puts your contractor baton on cooldown, just like knocking a human down does. Don't worry, you can still easily chainstun/baton 'n' bash borgs with contractor batons.

Attempting to stun a cyborg with a classic baton or a telebaton will play a CLONGing noise, produce a special message, and put your baton on cooldown. Harmbatonning cyborgs with classic batons and telebatons still works, of course.

The code for classic batons, telebatons, and contractor batons has been doc'd slightly better and refactored a bit.

Some edge cases involving cyborgs who somehow both are clumsy and can wield a classic baton (or a telebaton, a contractor baton, etc.) have been accounted for. This shouldn't affect normal gameplay unless an admin tries some REALLY weird stuff.

None of the above changes have affected stun batons, as they aren't classic baton subtypes.
2021-06-20 22:37:44 -07:00
carshalash
9a4a0cc7bf I put this egg back together (#59744)
Uhhh, I made it so yolks give 5u instead of 4 when cracked into a beaker. Pretty much that

It's weird to not get enough yolk to make a cake when cracked into a beaker. Having to crack a 4th egg because you did it in the wrong container kinda sucks.
2021-06-20 22:24:32 -07:00
MrMelbert
447c45fe2c Fixes nuke ops lobby meta exploit(#59716)
This pr fixes #56332 (Being able to meta nukie spawn. There was a linked solution which amounted to telling the equip to not make noise, but this code is pain)

    Nuke ops leaders are given their paper during the memorize_code proc.
    Nuke ops are moved to spawn after memorize_code is called.
    So: nuke ops leaders got their paper before they were moved to the nuke ops spawn - allowing anyone to hear it that's nearby the spawn box.

This PR just moves the memorize_code call to after nuke ops are moved to their spawn, so it prevents the lobby from hearing the sound of the paper.
2021-06-20 16:17:43 -07:00
Rohesie
e03cd1aada Refactors move procs to support multitle objects (#59658)
Enter(), Entered(), Exit() and Exited() all passed the old loc forward, but everything except a single a case cared about the direction of the movement more than about the specific source.
Since moving multi-tile objects will have multiple sources of movement but a single direction, this change makes it easier to track their movement.

Cleaned up a lot of code around and made proc inputs compatible.

I'll add opacity support for multi-tile objects in a different PR after this is merged, as this has grown large enough and I don't want to compromise the reviewability.

Tested this locally and as expected it didn't impair movement nor produced any runtimes.
2021-06-20 14:55:37 -07:00
interestingusernam3
3f244b211d Splits documents.dm into secret_documents.dm and inspector.dm. (#59746)
This splits documents.dm into two files and adds dmdoc comments to the new secret_documents.dm. Also removed a few newlines from the inspector part.
2021-06-20 14:52:41 -07:00
Watermelon914
aae5949d20 Fixed signal ports receiving signals when a signal is not actually sent (#59745)
It's an oversight that signals are sent when ports are connected between each other. Signal ports should only receive updates when triggered.
2021-06-20 14:51:27 -07:00
MrMelbert
b5237254c4 (Hopefully) Stops cryopodded contract targets from breaking contractor uplinks (#59742)
This PR aims to stop contractor uplinks from breaking due to having a target cryopod. When a contract target enters cryosleep, it now manually rerolls the contract.

This PR is admittedly somewhat bandaid-y, as contractors are slotted for removal soon, apparently.
2021-06-20 14:40:27 -07:00
Fikou
f9767a23ab overheating of the laser minigun doesnt care about burst size anymore (#59733)
with autofire, burst size is always 1
2021-06-20 14:39:30 -07:00
dragomagol
09c0f20377 Correctly pluralize multiple projectiles (#59702)
When something gets hit by multiple projectiles whose names end in "s", an extra "s" gets added to pluralize them. Sadly \s doesn't add the es, so I've made a proc with the other conjugation methods and used it for projectiles.
2021-06-20 14:22:26 -07:00
Timberpoes
65cf3929ce Improves H.A.U.L. gauntlets and /datum/component/strong_pull code, fixing a couple of little issues in the process (#59550)
Does a bit of a logic re-write on the cargo gauntlets and their strong_pull component.

Cargo gauntlets themselves have been converted to use signals for equipping and unequipping.

Their component reference has been changed to a weakref so if the component is ever Destroy()ed for any reason outside of the gauntlets it doesn't hard del.

The strong_pull component now registers signals with parent in RegisterWithParent() instead of Init() and removing the strong grip is no longer a SIGNAL_HANDLER proc. It is now called by the signal handler for no longer pulling things and in Destroy(). This stops instances where pulling things and removing the gloves didn't remove the pull effect appropriately.
2021-06-20 14:12:10 -07:00
Emmett Gaines
5adb8df64a During unit tests, does extra verification on text based overlays (#59553)
This makes it so during unit tests, adding a text based overlay to something will runtime if the icon does not have an icon state matching that text. I would do this during normal compiles as well but getting the icon states from an icon is surprisingly expensive.

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-06-20 14:02:01 -07:00
ArcaneMusic
839a6d45bc Converts suspenders to GAGS. (#59537)
Suspenders were already basically given a greyscale sprite by me in the past, this converts them to GAGS allowing custom recolors of them through existing code already in place.
2021-06-20 13:54:32 -07:00
RandomGamer123
dd58c82ee6 Fix tachyon across z-levels (#59696)
Tachyon-doppler arrays now work when on a different z-level than the RD server provided both of them are on a station z.
Same applies for all things using the experiment handler component in fact.
2021-06-20 13:41:39 -07:00
Beatrice
1e476296e5 Digitigrade Paralysis BugFix (#59697)
* Fixing Digitigrade Legs, Adding Sanity Checks

- A limb's attach_limb proc now uses the set_owner() proc instead of setting the owner manually, fixing problems where limbs that were meant to be paralyzed were not
- Added a sanity check to set_usable_legs to ensure the value isn't set lower than 0

* Adds A Stack Trace to Set_Usable_Legs

- set_usable_legs now calls stack_trace() whenever it is provided with a negative value
2021-06-20 22:01:44 +02:00
Timberpoes
ed3dab2d21 Feex (#59683) 2021-06-20 21:55:07 +02:00
Bytube
f233026670 Fixes custom emotes not working with slimes (#59680)
Allows slimes to use hotkey emotes and custom emotes by removing /mob/living/simple_animal/slime from mob_type_blacklist_typecache in code/modules/mob/living/emote.dm, added by #22405
2021-06-20 16:47:48 -03:00
RandomGamer123
a7d9ae50f7 Makes mafia roleblocks actually end (#59673)
Fixes a bug where if you were roleblocked one night by a lawyer in mafia you would be roleblocked FOREVER by adding a single missed character ~
2021-06-20 16:27:56 -03:00
Y0SH1M4S73R
63e33bd709 Makes mutant bodyparts and mutcolors into editable genetic traits (plus a whole shitload of otherwise out of scope code improvements because I just HAD to touch old code) (#59636)
I noticed that various nonhuman body features can't be changed using genetics. I corrected this by adding a block to character genomes allowing you to edit features in the DNA console.
2021-06-20 16:20:09 -03:00
LatteKat
635dff1712 tgui input list improvements (#59668)
pressing enter or space now selects the selected button
duplicate keys no longer cause input lists to break
2021-06-20 01:22:12 -03:00
Timberpoes
1a0e64e890 Converts the new span_ procs to macros, fixing a few oversights/errors along the way (#59685)
This is a partial re-implementation of #59645

oranges has expressed a desire for the span_ procs to instead be macros.

I agree. Even though it's a small micro-optimisation, a well contained macro can be self-linting. I've already caught one edge case thanks to this in launch_pad.dm

Similarly, there was an edge case where a [ was escaped inappropriately (that errored out) in watercloset.dm and a case where a ] that should probably have been escaped actually wasn't in robot_defense.dm

I have opted to make an exception to the ALLCAPS convention for these macros.

I have guaraded these macros in parenthesis. In doing so, additional error states can be captured as part of the build process as malformed inputs will then cause errors and prompt further investigation.
2021-06-19 18:39:00 -03:00
Ryll Ryll
d25e17241f Fixes OOC heart commendations (#59543)
At some point in the last few weeks, the OOC heart commendations that players were polled for during the shuttle's return trip at the end of the round stopped appearing for people on the live servers, even though admin logs showed it was still calculating how many people were supposed to be asked, and it seemed to be working fine on my local server. My only guess is it might somehow be related to #58419 since that was the last PR to touch hearted.dm, even if it's not clear how it might've broken it.

I also neaten up the code for commendations a bit, making it so the procs are easier to follow and have less unnecessary checks. Also, the proc nominate_heart has been reworked to receive_heart, since it makes more sense for it to run on the person receiving the commendation as opposed to the person sending it. It will also properly cancel polling if the "how many to ask" check returns 0 people, rather than always polling at least one.

Edit: Figured it out, #58419 was indeed the culprit, it blindly replaced src with usr without considering that src and usr aren't necessarily the same thing (as it was here, since query_heart() was called by the ticker SS)
2021-06-19 18:26:42 -03:00
Beatrice
f9a2654135 Defibrillator Fixes + Code Cleanup (#59615)
Cleans up some of the defib code by reducing repeated code blocks, renaming certain procs, reducing unnecessary if statements, and adding flexability to certain aspects, like cooldown time. Additionally fixes some issues with the code, like visible messages not showing up for mobs who are wearing the source and shock_touching not using its provided damage values.

I have defined the combat paddles' emp_act change as a "Fix" because the comment appended to the combat variable, as well as the lack of sprites/clarity for emped syndicate defibs, made me feel this was unintentional. However, if this is seen as intentional, I will revert those changes to keep this a purely fix/cleanup-based PR
2021-06-19 18:25:20 -03:00
Krysonism
83b78e58fa Add ectoscopic sniffer to Robotics Labs (#59494)
This PR adds a new machine; the ectoscopic sniffer, to the robotics lab on each map.

The sniffer is small desktop machine used for detecting paranormal activity, it displays a green flash and a chime every time it is touched(as in attacked) by a ghost.

It has a single wire inside, when this wire is pulsed, it triggers the animation and chime, as if touched by a ghost, maybe some enterprising crewmember can use this to their advantage. When this wire is cut, the device won't trigger, no matter how many spooks or haunts touch it.

---

This PR is above all fun.

Of course, it can be used as the author of the previous PR intended; to alert the roboticists of souls willing to occupy a positronic brain.

Clever spacemen will always figure out how to use this kind of device for more creative parascientifc research.

It is still limited by its low bitrate and the very low quality of the information as compared to something like ghost court, since a single malevolent spirit is able to feed the living bullshit.

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-06-19 14:32:44 +01:00
OHJ4Y
ffeba6376b Modify surgical apron to hold additional medical items (#59622)
Exactly what it says on the tin. This PR makes surgical aprons hold more things.

Presently, surgical aprons only hold surgery tools, which any medical doctor would store in their medical belt/medkit. This PR aims to make surgical aprons a more viable (and fashionable) choice for doctors looking at their wardrobes.

Co-authored-by: GuillaumePrata <55374212+GuillaumePrata@users.noreply.github.com>
2021-06-19 14:23:02 +01:00
Watermelon914
21103dc00b Fixes integrated circuits not being able to have more components added to them (#59724)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-06-19 20:38:35 +12:00
SmArtKar
d1b7c94566 Luminescent fix (#59707)
Closes #59681
2021-06-18 23:17:58 -04:00
Timberpoes
f597a725d2 Removes the fake error texture floor tiles. (#59693)
* Removing is improving

* Remove icon from dmi

* Inhands repurposed to error states
2021-06-17 23:16:22 -04:00
RandomGamer123
3f7ca7b1f4 Fixes powerfist randomly not working when using mixed gas types (#59234)
Adds a bit of wiggleroom so QUANTIZE being called on gas_mixture.remove() doesn't randomly and occasionally makes the powerfist think there isn't enough gas. This seems to be the only feasible way of fixing it.

Adds a helper proc to do this generically
2021-06-17 11:59:11 -07:00
Rohesie
0ec599786a Adds a setter for density (#59529)
Adds set_density()
Fixes one instance of a duplicate density assignment on an object.
Comments two hacky usages of density which will have to forgo using the setter for now.

Lets us append code to the event of density changing.
Pretty sure this is leading up to some multitile object thing -Lemon
2021-06-16 15:06:10 -07:00
Arkatos1
7118e73280 Swarmer HUD cleanup and improvements (#59659)
This PR cleans up and improves Swarmer HUD:

They are now a subtype of a generic living HUD, which brings them a generic living healthdoll and pull icon (should they be able to pull).
Swarmers will now show severity of their injuries as a red screen overlay to the user.
Swarmer's abilities now have tooltips to clarify their use upon mouse hover. Abilities names and descriptions were slightly changed and cleaned up to accomodate for this change and to be more useful to the player.
2021-06-16 14:23:28 -07:00
tralezab
6514a20c1f dullahans be undead (#59641)
Dullahans now have the undead biotype instead of the organic one.

Any depiction i've ever seen of dullahans has them as undead. Cool? Cool. They don't breathe or eat, so...
2021-06-16 14:15:39 -07:00
Arkatos1
f6094eda39 Smartfridge cleanup (#59672)
This PR cleans up and fixes a smartfridge code a little bit:

Documents variables on the base smartfridge machine
Fixed a bug where smartfridges showed incorrect sprite states because they counted component parts (like matters bins) in their calculations.
Maximum number of allowed items will now be counted correctly, as they will also not count component parts in their calculations.
Replaces old updateUsrDialog() with a modern tgui equivalent, so UI will send updates to all involved parties properly (Smartfridge has autoupdates turned off).
2021-06-16 13:41:12 -07:00
brotherbeyondd
0c9d6d3aee Revert "prevent SSinput from constantly reporting null movements (#59558)" (#59650)
This reverts commit 6c2d17bb15.

Fucky movement fix oranges is literally threatening me.

I feel like I've messed up somewhere here...

Either way this is causing movements to be a bit fucky where one input counts as two in a direction.
2021-06-16 12:38:52 -07:00
RandomGamer123
b98e6b2de5 Fix amanitin dealing less damage than before (#59562)
Co-authored-by: coiax <yellowbounder@gmail.com>
2021-06-16 19:48:09 +01:00