Commit Graph

469 Commits

Author SHA1 Message Date
Celotajs
190d0a0384 Replace alert usage with tgui_alert (#58419)
Pretty much every alert() call is replaced with tgui_alert, except one I replaced with tgalert as a fallback. If tgui_alert exists, why not use it?
2021-05-20 22:43:27 +12:00
Kylerace
08df8798ce (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc (#58340)
Co-authored-by: Jared-Fogle <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
2021-05-07 03:54:03 -07:00
Sparkezel
5347d9ead5 fixes single tank bombs (#58818)
* fixes single tank bombs

* move qdel later
2021-05-06 15:45:28 -04:00
LemonInTheDark
4e53d8c4bc Removes some boiler plate from working with atmos code (#58885)
Everything that called turf.assume_air and turf.remove_air was already updating turfs, and all that not tying

the two together did was add more boiler plate, and break things when people forgot about it.

This shouldn't add any overhead outside of hotspots, but I think that's trivial
2021-05-05 01:31:30 -04:00
LemonInTheDark
a924226b50 React optimization + event based processing for tanks, canisters and pipelines (#58418)
* Makes tanks only process when needed, rather then doing it constantly

* Makes portable atmos machines only process when needed, makes adding and removing atmos machinery cheaper, makes the tank processing logic actually work properly

* Makes pipelines only react() when their mix changes, fixes a ton of misuses of update_parents that were causing about 10ms of load for atmos just from reconcile_air()

* Adds in a new reaction framework alongside the old one for profiling related reasons

* whoops

* Cleanup, removes the react profiling code, I've chosen a direction to go here

* Cleans up some code, adds comments describing how to interact with portable atmos machines/tanks and their
mixes, adds a blurb to Atmospherics.md about the topic as a whole, leaves a line of bread for someone to follow
if I get hit by a bus in 2 days (Knock on wood)

* Removes priority from reactions, moves priority groups to the defines file

* whoops

* Converts air_contents to _air_contents, replaces all the out of file things that used it with return_air()

* Replaces the canister air contents uses, converts it back to air_contents, I decided I didn't like the _

* Fixes
2021-04-30 12:29:29 +02:00
TemporalOroboros
9f598a9662 Makes the explosive compressor and blastcannon actually use the TTVs they're given + the explosion changes to support that. (#58015)
* Adds explosion SFX to the blastcannon and explosive compressor

- Extracts the explosion SFX and screenshake proc from the SSexplosions explosion handling proc and lets the explosive compressor and blastcannon use it.

* Miscellaneous changes

- Adds defines for the internal explosion arglist keys
- Reverses the values of the explosion severity defines
- Changes almost everything that uses `/proc/explosion` to use named arguments

- Removes a whole bunch of argname = 0 in explosion calls.

* Removes named callback arguments.

* Changes the explosion signals to just use the arguments list

Adds a simple framework to let objects respond to explosions occurring inside of them.

Changes a whole bunch of explosions to use the object being exploded as the origin of the explosion rather than the turf the object is on.

Makes the explosive compressor and blastcannon actually use the TTVs they are given.

Adds support for things responding to internal explosions.
Less snowflake code for the explosive compressor and blastcannon calculating bomb range.*
Less confusing explosion severity defines.
Less opaque explosion arguments

*does not guarantee that the solution to letting them actually use the TTV is any less snowflake.
2021-04-26 17:31:25 -07:00
cacogen
f64b03ec22 Uses the update_icon_updates_onmob element to update the flash's onmob sprite (#58674) 2021-04-26 01:00:21 -07:00
cacogen
52cbeaf943 Burnt-out flashes are more obvious (#58628) 2021-04-23 23:09:18 -07:00
Seris02
0a457d9346 Reduces the amount of unsorted chat messages (#58192) 2021-04-08 00:17:22 -07:00
ArcaneDefence
3476d18620 Fixes multiple issues related to suicides (#58178) 2021-04-06 16:40:10 -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
Kylerace
01f899c946 At first i thought that i was being forced to add a feature 🤮 but then i realized i was being encouraged to refactor 😄. Electrified chair is now a component instead of a failure (#57117) 2021-03-03 05:05:52 -08:00
thebleh
5ac89d4256 Makes assembly parts not fall out of their holder when picked up (#57096)
Co-authored-by: thebleh <email@example.com>
2021-02-22 21:00:50 -08:00
Fikou
eea0599511 moves gun related icons to guns folder (#57077)
moves ammo icons, projectile icons and hitscan effect icons to guns folder
renames projectile.dmi to ballistic.dmi so its less confusing
moves rcd ammo from ammo.dmi to tools.dmi with the rcd
2021-02-21 13:58:33 -05:00
TemporalOroboros
e4079c87b8 update_appearance (#55468)
Creates update_name and update_desc
Creates the wrapper proc update_appearance to batch update_name, update_desc, and update_icon together
Less non-icon handling code in update_icon and friends
Signal hooks for things that want to change names and descriptions
99%+ of the changes in this are just from switching everything over to update_appearance from update_icon
2021-02-19 12:06:18 -03:00
LemonInTheDark
5c22a0cfc1 Converts many proc overrides to properly use list/modifiers, lots of other smaller things (#56847)
Converts many proc overrides to properly use list/modifiers, fixes some spots where modifiers should have been passed, calls modifiers what it is, a lazy list, and cleans up some improper arg names like L, M, C, and N. Oh and I think there was a spot where someone was trying to pass M.name in as a string, but forgot to wrap it in []. I fixed that too.
2021-02-16 09:18:46 -05: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
Timberpoes
40c0123c46 Flash immune cyborgs are now immune to flash. (#56774) 2021-02-10 02:07:23 -08:00
Qustinnus
707fc287b4 Replaces intents with combat mode (#56601)
About The Pull Request

This PR removes intents and replaces them with a combat mode. An explanation of what this means can be found below
Major changes:

    Disarm and Grab intents have been removed.
    Harm/Help is now combat mode, toggled by F or 4 by default
    The context/verb/popup menu now only works when you do shift+right-click
    Right click is now disarm, both in and out of combat mode.
    Grabbing is now on ctrl-click.
    If you're in combat mode, and are currently grabbing/pulling someone, and ctrl-click somewhere else, it will not release the grab (To prevent misclicks)

Minor interaction changes:

Right click to dissasemble tables, racks, filing cabinets (When holding the right tool to do so)
Left click to stunbaton, right click to harmbaton
Right click to tip cows
Right click to malpractice surgery
Right click to hold people at gunpoint (if youre holding a gun)
Why It's Good For The Game

Intents heavily cripple both the code and the UI design of interactions. While I understand that a lot of people will dislike this PR as they are used to intents, they are one of our weakest links in terms of explaining to players how to do specific things, and require a lot more keypresses to do compared to this.

As an example, martial arts can now be done without having to juggle 1 2 3 and 4 to switch intents quickly.

As some of you who saw the first combat mode PR, the context menu used to be disabled in combat mode. In this version it is instead on shift-right click ensuring that you can always use it in the same way.

In this version, combat mode also no longer prevents you from attacking with items when you would so before, as this was something that was commonly complained about.

The full intention of this shift in control scheme is that right click will become "secondary interaction" for items, which prevents some of the awkward juggling we have now with item modes etcetera.
Changelog

cl Qustinnus
add: Intents have been replaced with a combat mode. For more info find the PR here: #56601
/cl
2021-02-04 16:37:32 +13:00
HugoOdaX
4e2ffd1338 Makes blast doors/shutters and blast door controllers buildable and deconstructible (#56486) 2021-01-31 12:53:00 -08:00
Gamer025
260054bcba Fix elevators (#56117)
Currently elevators are broken since they try to use the z level of the assembly inside the button to determine how to move
The assemblies z level is however always 0 and instead the z level of the button containing the assembly must be used
This fixes this
2021-01-14 08:35:47 -05:00
John Willard
102fdf8f8f Flypeople can get flashed from any direction (#55724) 2021-01-09 12:10:30 -03:00
LemonInTheDark
6d1cb94ffb LINDA Reforged (#55604)
Speeds up gas movement significantly
Documents the intent and finer details of the atmos system (Thanks dunc)
Fixes excited groups constantly rebuilding, this broke 4 years ago
Fixes superconductors just straight up not working
Allows turfs to sleep while inside an excited group
Adds a new subprocess to SSAir to support rebuilding in this state
Most heat based behavior no longer relies on being inside a fire
Adds a new element to support doing this cleanly
Adds a new subprocess to SSAir to support doing this while a turf is asleep
Refactors air_update_turf to allow for finer control
Makes apcs take damage in heat to prevent infinite plasma fire diffs
Cleans up immutable gas mixtures to make them work properly when the mix has gas in it
Planetary turfs no longer create a new copy of themselves each time they process. We instead use a global
immutable mix
Cleans up a typed for loop in reactions
Canisters will take damage from outside heat now
Speeds up excited group dismantle
Increases the superconductor threshold by 200k
Cleans up some roundstart ATs on some ruins
Uses /turf/open/var/excited to track if a turf is actively processing, preventing a |=
Prevents openspace from trying to melt
Tweaks a canister examine line
Makes planetary turfs reset to base when broken down as part of an excited group
Makes it impossible for planetary turfs to rebuild, just like space tiles
Fixes closed turfs not activating their replacement when destroyed by moving closed -> open turf activation to
the adjacent air subsystem. They were activating and then going back to sleep before adjacent air got a chance
to tick.
Fire alarms will trigger when the area gets too cold for humans
2021-01-08 08:14:08 +01:00
小月猫
fc73fe2b3c Mechanical Curtains (#55751)
good for better mapping, I have seen some mappers wish to utilize fancy curtains on their rooms windows (for example, a psychologist office) but wanted to be able to have privacy when with a patient, which curtains can be opened from either side of the window, and shutters just dont fit the theme, this way mappers can add in curtains which are button operated and cant be opened manually, basically, it functions like a shutter, only it looks and acts like curtains (can be destroyed like one, etc... it is literally a curtain subtype)
2021-01-02 17:38:10 -08:00
ATH1909
0192fd19e5 fixes high confusion levels blocking rev conversions and removes help intent disabling the usage of tacticool flashing (#55750) 2020-12-28 01:54:02 -08:00
silicons
160175ee8b pass_flags handling refactor + rewrites a part of projectiles for the n-th time (#54924)
Yeah uhh this'll probably need testmerging even after it's done because yeah it's a bit big.
If y'all want me to atomize this into two PRs (pass flags vs projectiles) tell me please. Pass flags would have to go in first though, in that case, as new projectile hit handling will rely on pass_flags_self.
Pass flags:

Pass flags handling now uses an atom variable named pass_flags_self.
If any of these match a pass_flag on a thing trying to pass through, it's allowed through by default.
This makes overriding CanAllowThrough unnecessary for the majority of things. I've however not removed overrides for very.. weird cases, like plastic flaps which uses a prob(60) for letting PASSGLASS things through for god knows why.
LETPASSTHROW is now on pass_flags_self
Projectiles:

Not finalized yet, need to do something to make the system I have in mind have less unneeded overhead + snowflake

Basically, for piercing/phasing/otherwise projectiles that go through things instead of hitting the first dense object, I have them use pass_flags flags for two new variables, projectile_phasing and projectile_piercing. Anything with pass_flags_self in the former gets phased through entirely. Anything in the latter gets hit, and the projectile then goes through. on_hit will also register a piercing hit vs a normal hit (so things like missiles can only explode on a normal hit or otherwise, instead of exploding multiple times. Not needed as missiles qdel(src) right now but it's nice to have for the future).

I still need to decide what to do for hit handling proper, as Bump() is still preferred due to it not being as high-overhead as something like scanning on Moved(). I'm thinking I'll make Moved() only scan for cases where it needs to hit a non-dense object - a prone human the user clicked on, anything special like that. Don't know the exact specifics yet, which is why this is still WIP.

Projectiles now use check_pierce() to determine if it goes through something and hits it, doesn't hit it, or doesn't go through something at all (should delete self after hitting). Will likely make an on_pierce proc to be called post-piercing something so you can have !fun! things like projectiles that go down in damage after piercing something. This will likely deprecate the process_hit proc, or at least make it less awful.

scan_for_hit() is now used to attempt to hit something and will return whether the projectile got deleted or not. It will delete the projectile if the projectile does hit something and fails to pierce through it.

scan_moved_turf() (WIP) will be used for handling moving onto a turf.

permutated has been renamed to impacted. Ricocheting projectiles get it reset, allowing projectiles to pierce and potentially hit something again if it goes back around.

A new unit test has been added checking for projectiles with movement type of PHASING. This is because PHASING completely causes projectiles to break down as projectiles mainly sense collisions through Bump. The small boost in performance from using PHASING instead of having all pass flags active/overriding check_pierce is in my opinion not worth the extra snowflake in scan_moved_turf() I'd have to do to deal with having to check for hits manually rather than Bump()ing things.
Movement types

UNSTOPPABLE renamed to PHASING to better describe what it is, going through and crossing everything but not actually bumping.
Why It's Good For The Game

Better pass flags handling allows for less proc overrides, bitflag checks are far less expensive in general.

Fixes penetrating projectiles like sniper penetrators

This system also allows for better handling of piercing projectiles (see above) without too much snowflake code, as you'd only need to modify on_pierce() if you needed to do special handling like dampening damage per target pierced, and otherwise you could just use the standardized system and just set pass flags to what's needed. If you really need a projectile that pierces almost everything, override check_pierce(), which is still going to be easier than what was done before (even with snowflake handling of UNSTOPPABLE flag process_hit() was extremely ugly, now we don't rely on movement types at all.)
2020-12-10 09:29:27 +13:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
spookydonut
0383c19ac2 Minor refactor to signal handlers to remove potential sleeps (#54649)
About The Pull Request

These are legacy sleepers, the remaining 12 are non-trivial to fix.
2020-11-23 09:49:12 +13:00
ArcaneMusic
6f56db6c56 Mousetrap the movie (#54965)
I forgot to check more than ismouse() on the mousetrap side, because I am blind.
This adds the extra checks for israt() and isregalrat() to the trap triggering.
2020-11-15 12:23:06 -08:00
Timberpoes
665f34e560 Improves admin logging for when TTV valves get opened. (#54776)
Basically just reformats the logging code for TTVs when valves get opened. It's a bit more verbose, giving a bit more detail in general. It also has line breaks, because it makes things easier to read.

I've also added the ability for signals to hold a logging string. In this case, a signaller creates a signal and attaches a logging string. If the signal is received by any signallers attached to a TTV, it stores the last logging string associated with that signal. Functionally, this means that TTVs can now ask their attached signaller for the logging string of the last signal it received and display it as part of the logging string.
2020-11-06 12:50:58 -05:00
skoglol
4748e14b74 fixes onetank icon 2020-11-02 21:49:29 +01:00
ZeWaka
9629feed35 Converts A && A.B into A?.B (#54342)
Implements the ?. operator, replacing code like A && A.B with A?.B

BYOND Ref:
When reading A?.B, it's equivalent to A && A.B except that A is only evaluated once, even if it's a complex expression like a proc call.
2020-10-13 16:43:53 -03:00
ArcaneMusic
efe62dfaba Cleans up rat related features and makes Regal Ratking a rare spawn from mouse migration event. (#54191) 2020-10-07 11:55:42 -07:00
Timberpoes
1f23cc281d Enforce preserving parent proc return values across ui_act call stacks (#53964)
All ui_act procs should call parent by default. All procs should preserve the value of the parent proc when it's TRUTHY and pass it down the call stack. No UI should be interactible when its flags or state indicate it should not be, except when explicity overriden by child procs intentionally disregarding parent return values to achieve a specific goal.
2020-09-26 11:52:39 -03:00
tralezab
79457e4b0d Gives Public Mining on Icebox an Elevator, and just a TON of lift fixes so they're viable to map with. [MULTI-BEE] [:pslime: in the chat] (#53728)
add: Icebox now has an elevator! I just took the trousers of every shaft miner to batter town, word.
2020-09-26 01:05:13 +01:00
Timberpoes
94963c7489 Fixes oversight with "tactical combat spinning" and flashes (#53823)
Using the spin emote can no longer let you RNG your way out of new flash mechanics.

Mobs have a new flag that is set to when they start spinning and unset when they stop.

Flashes now use this new flag when calcing deviation.

Tactical combat spinning using the spin emote now results in a full deviation flash when it may previously have resulted in a failure or half-deviation flash.

Emotes should either not influence combat at all (spin on floor when both players share the same loc, this was already handled by same-loc code), or negatively influence combat for the emote user (spin in all other circumtances, which is what this PR addresses).
2020-09-20 06:51:08 -03:00
Timberpoes
6914d0c046 Fix flash runtime, improve flash logic (#53784)
image

Flash + Emp = Flash with no user = Runtime.

Additional logic has been put in place to handle this.

I've also robustified the calculate_deviation proc to have explicit returns in every code path and simplified it to only care about the direction the victim is facing compared to the attacker's position.
* Magic numbers are bad because wizards are bad

* Rohesie feex
2020-09-18 03:04:16 -03:00
EdgeLordExe
1765037329 Nerfs Flashes [Edge Awards 2020] (#53604)
Flashes now deal stamina damage and micro-stun, they deal higher damage than batons BUT they have a severe disadavntage in form of directionality. Stamina damage and the duration of the micro stun is determined by direction your enemy is facing.
2020-09-15 20:14:01 +01:00
Donkie
53b212ddf2 Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#52981)
* Process procs now properly use deltatime when implementing rates, timers and probabilities

* Review fixes

* Geiger counters cleanup

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

* Moved SS*_DT defines to subsystems.dm

* Rebase fix

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

* Implemented suggested changes by @AnturK

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

* Send delta_time as a process parameter instead of the defines

Also DTfied acid_processing

* Dtfied new acid component
2020-09-08 10:24:05 +02:00
Ghilker
60355138f8 Crystal Event: flavor texts, signaler, balancing and mob differentiation (#53340)
This PR adds a bunch of flavor texts to the different devices and structures that are used during the event, all to make clearer to the players what to do without too much troubles.
Also i added the ability to use the normal Analyzer+signaler to close the portals and achieve the same result of dropping the crystals.

This PR have more stuff inside: I tweaked the health of the mobs to be balanced around the "toolbox damage" (around 15), so that in 2 or 3 hits they'll fall. I tweaked the damage so that those mobs are all around pretty dangerous, plus each one gets a personal effect: the minion gets a smoke effect on death, the thug gets a random teleport when hit and a dodge ability, the recruit can smash delete walls on touch, the killer is fast and shoot a freezing ray to slow down victims, the boss has an AoE tesla-like attack can dust mobs if they are in crit conditions (thus consuming them)
spawned anomalies don't explode anymore.
You can sacrifice someone to the crystal to increase the spawn delay by 5 seconds permanently
tick for the event is once every 2 seconds, have to use raw numbers to define the duration (15 minutes)
2020-09-01 18:53:43 -03:00
Rob Bailey
7efb8a3382 removes licensed_sound folder (#53142) 2020-08-24 06:21:12 -07:00
Rohesie
eda7c6ca55 Overlay lighting component (#52413)
Sparks no longer lag, projectile beams move super smoothly, same with mobs and whatnot. This also allows for easy expansion into directional lights, field-of-view, wee-woo rotating lights or whatever.

It does have a downside: things right-clicked or checked through the alt+click tab will show the light overlay:


This is a BYOND limitation, very well worth it IMO.

🆑
add: Smooth movable lighting system implemented. Projectiles, sparks, thrown flashlights or moving mobs with lights should be much smoother and less laggy.
balance: Light sources no longer stack in range, though they still do in intensity.
/🆑
2020-08-22 14:56:38 +12:00
Jared-Fogle
4027285701 Voice analyzers will no longer accept any message when not recorded (#53033) 2020-08-20 02:55:19 -03:00
Jared-Fogle
45c14f6330 Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking (#52761)
Adds SIGNAL_HANDLER, a macro that sets SHOULD_NOT_SLEEP(TRUE). This should ideally be required on all new signal callbacks.

Adds BLOCKING_SIGNAL_HANDLER, a macro that does nothing except symbolize "this is an older signal that didn't necessitate a code rewrite". It should not be allowed for new work.

This comes from discussion around #52735, which yields by calling input, and (though it sets the return type beforehand) will not properly return the flag to prevent attack from slapping.

To fix 60% of the yielding cases, WrapAdminProcCall no longer waits for another admin's proc call to finish. I'm not an admin, so I don't know how many behinds this has saved, but if this is problematic for admins I can just make it so that it lets you do it anyway. I'm not sure what the point of this babysitting was anyway.

Requested by @optimumtact.
Changelog

cl
admin: Calling a proc while another admin is calling one will no longer wait for the first to finish. You will simply just have to call it again.
/cl
2020-08-20 09:11:28 +12:00
LemonInTheDark
d71a896267 Tweaks voice analyzers, pulsing a grenade's bomb wire now uses the grenade's timer delay. (#52710)
Makes suicide bombing with voice analyzers harder, while keeping the more fun behavior by adding some tells and delays.
Things attached to a grenade's pulse wire use the grenades timer, rather then just insta booming.
2020-08-11 20:02:36 -03:00
Jared-Fogle
7df16c595e Confusion will no longer continue to confuse after being cured (#52286)
* Confusion will no longer continue to confuse after being cured

* Grammar comment fix

* Move to status effect

* Remove test per request

* Make confusion a status effect, confusion curing now completely neuters the confusion

* set_confusion changes, get_confusion

* Fix confusion going down twice per tick

* Change strength = to proc

* Move procs to status_procs
2020-08-05 16:36:00 -03:00
Rohesie
6ff08e1c69 Color standardization, vars moved, and signals (#52574)
Defined all the existing light_color values.
    Moved their definitions to colors.dm
    Made white the default color. It was so already, but that was very obscured.
    Moved the atom light-related variables to the atom definition.
    Wrapped changes to variables such as light_color into procs that report the event through signals.
    Moved the light_on variable to the atom level, also adding a signal for its changing, to represent toggling lights.
    Cleaned up a little bit of code in where new variables were defined before redefinitions.

This is all atomization to reduce changes in #52413
None of this affect gameplay at all, it's all code cleaning and refactoring.

There's more colors to standardize, a search for color = will find lots of targets, and I see little need to have both the LIGHT_COLOR and COLOR patterns, but I don't want to make this PR bigger than it already is.
2020-08-04 13:59:48 +12:00
Daniel Hultgren
dd359582d4 Fixes #51574 - Added a whitespace sanitizing proc (#52350)
* Fixed #51574 - Added htmlrendertext and implemented it for the voice analyzer

* Made a htmlrendertext regex static

Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>

* Made a htmlrendertext regex static again

Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
2020-07-24 22:32:27 +02:00
LemonInTheDark
d3f9b70c0f Adds a message modification packet to saycode to allow for unordered parsing of operator chars, like ;, #, :, or % (#51790) 2020-07-18 18:18:23 +02:00
Aleksej Komarov
0cf00a2645 tgui 4.0 (#52085)
* tgui 4.0 hyper squash

* Upgrade dependencies
2020-07-16 20:13:04 +02:00