Commit Graph

1352 Commits

Author SHA1 Message Date
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
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
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
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
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
Watermelon914
375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07: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
LemonInTheDark
f90e8cf7a3 Fixes a bunch of harddels that are sourced from player action (#59371)
Sourced from #59118 and a cursed project I'll pr later, This pr contains a lot of harddel fixes for stuff that pops up after a player interacts with something. I'm not gonna list them all here because there's something like 60 130, check the commit log if you're curious

Oh and I moved ref tracking screaming to a separate define, and made some optimizations to the thing in general. I think that's it, this pr is a bit of a frankenstine
2021-06-10 21:44:23 -03:00
tralezab
2b58a36bea nuke pinpointer's process proc has some god damn code standards (#59579) 2021-06-10 01:04:49 -07:00
Rohesie
d990b71da2 set_anchored() (#59532) 2021-06-08 12:07:34 -07:00
tralezab
e3a1bf443a Sorts the traitor panel (#59489) 2021-06-04 21:34:49 -07:00
Emmett Gaines
43c5dc8bfa Makes obj_integrity only updated through procs (#59474)
Having things updating integrity directly is just going to cause more problems down the line as more elements and components depend on being notified of integrity changes. It's an easy mistake to make so making it private should deal with the problem.

get_integrity() might be useful in the future but is mainly a side effect of making obj_integrity private as that also disallows reads.
2021-06-04 11:48:05 -03:00
SmArtKar
a559023dd0 Fixes morph attacks flooding your chat (#59454) 2021-06-03 11:09:21 -03:00
RandomGamer123
85af535668 makes reality phase not be affected by bag of holding (#59404) 2021-06-01 21:44:21 +02:00
Mothblocks
e2b929974e Remove a bunch of old gamemode code (#59067)
* Beep beep gamemode removal coming through

* More cleaning

* More cleaning

* Clean up station_was_nuked

* Station nuke source

* Remove name

* More unused functions

* Remove antag rep, which was unused in dynamic

* Remove more antag rep stuff, which was UNUSED IN DYNAMIC

* Station goals outside of mode

* Remove setup_done

* Remove player lists

* Move some older procs

* Fix simulations

* Attempt to fix this stupid case sensitive bullshit

* Revert "Attempt to fix this stupid case sensitive bullshit"

This reverts commit 8693c02d67602543d7d4b92130a7a32cd973e5bf.

* ???

* Delete icons/Testing directory

* Move station_goals global definition
2021-05-29 11:03:41 +02:00
Watermelon914
0a276d3d6a blob-multiz-fix (#59326)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-05-27 04:36:24 -07:00
Kylerace
e13fe75590 use SIGNAL_HANDLER REEEEEE (#59242)
makes as many procs as i can find use the SIGNAL_HANDLER define which i assumed they all already did
2021-05-24 15:28:02 -04:00
SgtHunk
d223f8f4ae Slaughter demons use right-click to Slam rather than CtrlShiftClick (#59225)
Moves the slam function of slaughter demons to right-click rather than have it use Ctrl+shift+click.
2021-05-24 12:36:02 -04:00
Kylerace
999fa5508d Removes SIGNAL_HANDLER_DOES_SLEEP and makes signals synchronous (#59176) 2021-05-20 23:11:34 -07:00
Kylerace
d8fc3410f4 fixes traps not adding connect_loc in base type (#59196) 2021-05-20 21:49:41 -07:00
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
itseasytosee
fda5abc8a3 The changeling spacesuit no longer has a battery hud (#59036)
Also allows this property to be put on other suits
2021-05-15 17:59:54 -07:00
Timberpoes
8bc6e78859 Fix issues I created where dynamic gives out multiple incorrect antag datums to ineligible people and gives 1 too many traitor objectives. (#59099) 2021-05-14 17:18:26 -07:00
John Willard
fe3dbe6b46 Removes Revolutionaries becoming enemies of the revolution (#59015)
* Don't become an enemy of the revolution if you're a rev

* Im an idiot, thanks

Co-authored-by: Jordan Brown <Cyberboss@users.noreply.github.com>

* untested code moment

* i hope this works

* Update revolution.dm

Co-authored-by: Jordan Brown <Cyberboss@users.noreply.github.com>
2021-05-14 16:47:54 -04:00
tralezab
132a755aa3 Componentizes Duffelbag Curse and turns it into an RPGloot modifier (+ curse announcement element) (#59029)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-05-14 01:03:45 -07:00
Timberpoes
f36c7fa43f Split malf AI antag datum away from traitor, enable malf AI roundstart ruleset. (#59064)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-05-13 02:39:16 -07:00
coiax
3bef1c1104 Fix blazing oil not being damaged by sprayed water (#58992)
🆑 coiax
fix: Blazing Oil blobs can now be damaged by sprayed water from fire
extinguishers, as intended.
/🆑

Because the mechanism of how the water damages the blob has changed, the
extinguish damage has been increased, otherwise you had to empty a fire
extinguisher to kill even one single blob tile.
2021-05-12 02:02:48 -07:00
Ryll Ryll
d7bc2ca203 fixes infinite range changeling stings (#58946) 2021-05-08 22:57:11 -07:00
Timberpoes
b516771420 Fix Wizard Loadouts from the Wizard Spellbook crashing the server. (#58939) 2021-05-08 16:15:15 -07:00
John Willard
ddd4185aba Fixes bloodbeam for real (#58855) 2021-05-08 03:55:38 -07: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
tralezab
ff3a34a6b4 refactors is_flying_animal into simple_flight element (#58914) 2021-05-06 23:38:53 -07:00
interestingusernam3
71626c6d90 Changes how the messages for becoming an eldritch monster look (#58896)
Co-authored-by: Your mother <mothmilk666666666666@tfwno.gf>
2021-05-06 21:04:14 -04:00
ZeWaka
b86aaf3307 Fixes bitwise flag negation errors. (#58870)
These have been in the codebase for many years. Love, ZeWaka
2021-05-05 01:37:56 -04:00
Seris02
ff2f6abe83 Sort the majority of the rest of the unsorted chat (#58821)
* FINALLY IT IS DONE FUCK

* tip of the round into ooc

* adds cyopod chat messages to the info chat filter

* last one I promise probably, mob spawner messages to info filter

* holoparasite, round will start in x and keybinding conflict to respective filters

* removed motd from constants, made it infoplain surrounded instead

* changed info to infoplain
2021-05-05 05:57:40 +03:00
ATH1909
ec0671af2e heretic blade teleports are now invoked by using them in-hand (#58526)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-05-02 02:01:31 -07:00
Celotajs
574c81a143 Resolve chameleon GAGS item issues (#58808)
This PR fixes issues with the chameleon jumpsuit and sneakers. In addition to that, it properly defines setting for GAGS worn and inhand icons instead of having them be in Initialize() for specific item types. Names for the prisoner jumpsuits and wheelys have also been reverted to how they were before the GAGS PR.
2021-04-30 22:16:18 -07:00
ATH1909
ef1f79d7e3 The shivering symptom now actually chills you like it says it does instead of heating you up (#58181)
* ice ice baby

* broader species compatibility

* are you HAPPY NOW?

* should make the code compile

* Apply suggestions from code review

Co-authored-by: Aki Ito <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>
2021-04-30 01:42:11 -04: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
tralezab
175ab549b1 fixes heretics (#58679)
This bit of code didn't specify that the new thing was what the variable was, and without that information byond assumes you want to create what the variable is typed to (a generic proc holder spell)
2021-04-26 01:16:09 -07:00
tralezab
0d34a1cbce IAA now properly removes martyrdom when you reinstate escape objectives (#58689)
fixes #58610 (IAA suffering, multiple copies of the same objective)

Escape > martyrdom removed escape,

martyrdom > escape didn't remove martyrdom.
2021-04-26 01:03:13 -07:00
Celotajs
fb2d71495b Convert jumpsuits, jumpskirts and sneakers to GAGS (#58514) 2021-04-25 17:01:36 -04:00
Mothblocks
7e4de07506 Remove all gamemodes except Dynamic (#58470)
Removes all /datum/game_mode except dynamic. Eventually, all of mode and game_mode will be removed, and Dynamic will become an ingrained system. Every single other gamemode was unmaintained at best and poisoned other code at worst. Currently all tg servers run 24/7 Dynamic, so the time to act is now.

* Remove gamemode references from age checks

* Monkey

* Remove heretics

* Remove BBs

* Refactor uplinks and remove clown ops

* Remove nuke ops

* Removes and refactors cult

* Remove extended

* Remove and move out meteors

* Removes wizard

* Remove sandbox

* Remove changelings

* Remove traitors

* Remove revs

* Remove gangs

* Remove changing mode and voting for new gamemodes

* get_candidates signature fix

* Summon ERT and NERD in their own panel

* Remove some old unneeded age_check stuff

* Fix old signatures of get_uplink_items

* Use Extended like config for dynamic.json

* Fix discounted gear
2021-04-25 01:55:10 -07:00
tralezab
4f47f52ddc Generally brings about half the heretic antag code up to our code standards, more or less (#58557)
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
2021-04-24 14:02:39 -07:00
EdgeLordExe
c5dd5dd1ca Buffs rust path (#58060) 2021-04-22 22:06:51 -07:00
Y0SH1M4S73R
b41d644ea1 Heretic Target Selection Dialog Tells you Which Possible Targets are on the Same Team as You (#58603)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-04-22 22:05:11 -07:00
Seth Scherer
9656428c10 Grammatical Changes in Codex Cicatrix's rust path (#58537)
Changes harm intent to combat mode.
2021-04-20 02:37:41 -04:00
Mothblocks
9a21cc2382 Fix a lot of nonhuman species being unable to strip (#58499)
Fixes #58495. Also splits every inherent_traits list into multiple lines, so that future traits can be added without conflict or hard to read diffs/blames.
2021-04-18 12:22:23 +01:00
interestingusernam3
065c89a57a Minor code readability improvement to default values of the breakouttime var (#58456)
Replaces time expressed in deciseconds with time expressed in deciseconds but with use of the MINUTES and SECONDS defines for readability.
2021-04-17 02:30:30 -07:00