Commit Graph

7448 Commits

Author SHA1 Message Date
LemonInTheDark
a625fc8038 Cleans up the fallout from plane cube (#70235)
* Cleans up the fallout from plane cube

Alright.
Makes cleaning bubbles respect planes
Adds support for updating overlays on move, fixing an issue with pointing at items
Adds better error messages for failing to provide args for mutable_appearance()
Fixes a bug where string overlays were not respecting insertion order

* Adds documentation for offset spokesman and offset_const

* Better stack trace

* Removes some redundant uses of cached MAs

At this scale, attempting to cache MAs like this has 0 impact on anything
And just makes things more messy then they need to be

* ensures fullscreen objects START offset, so things are always proper

* ensures chatmessages always have the right offset

* fixes compile

* whoops, the above lighting plane should actually be ABOVE the lighting plane

* fixes compile, also cleans up the fire overlay a tad

* Adds a unit test for plane masters that are shrunk by multiz being double shrunk

This is slightly hacky because of how I'm handing the plane master
group, but it's not THAT bad, and gives me some real good coverage

* Properly targets the seethrough plane at the game world plate. This fixes unit tests, and also just makes more sense

* whoops

* oh

* adds datum support for allocate(), cleans up a harddel from testing

* Makes camera chunks index at 1, and also makes them support non powers of two sizes, since that was unneeded

* fixes runtime in allocate
2022-10-20 09:00:02 +13:00
GoblinBackwards
5156834f16 Fixes mining modsuit storage breaking after recharging it with plasma (#70558)
* Adds QDELETED check to inserting items to storage
2022-10-19 16:05:12 +02:00
LemonInTheDark
cd3a778915 PKP Mind Virus: Glorfing Cigs edition (#69904)
* PKP Mind Virus: Glorfing Cigs edition

If you glorf while smoking you'll get the cig stuck in your throat, leaving you unable to breath, speak, or eat. Based off the sort of cig you have a random delay before you vomit up the cig. (Pipes last forever don't philoso-larp kids). Other players can help you by using the help action on you while you're hurt, which leads to something imitating the himelich manuver, a broken chest, and a vomited up blockage. Other forms of vomiting will work too, if that's even applicable.

Oh I fixed a bug in vomit code. Because paralyzing you forces you to the ground, thus changing your dir, paralyzing vomits always went down. This is cringe, easy fix tho.

Ah and I added some extra functionality to sound loops too. You can set them to pick and take from the provided list, then refilling it once it's empty. This keeps some variety while preventing the risk of repeat sounds

Oh and I added some new signals. Some misc ones, for force say and a different kind of help then the existing one, which I renamed. One for breathing, which I used to clean up leroxin. I was planning to hook this but didn't need to in the end.

One for vomiting too. and eating. Also added a way to update looping timer delays. Forgot about that, I also added variable delay for sound loops, because I thought it sounded better here.

Features audio courtesy of our very own san7890, and the quake jump sound.
2022-10-19 06:34:45 -04:00
John Willard
364cd38285 [MDB IGNORE] Makes only station areas, station areas. (#70182)
* Makes only station areas part of Statioj

* Makes only subtypes of /area/station be part of the station
* Removes Icemoon and Shuttles as a check for Anomaly placers as they aren't needed anymore, not being part of shuttles.
* Removes a ton of uses of NO_ALERTS where it is no longer needed.
2022-10-19 00:54:29 -07:00
Tim
e710af88f8 Fix item icons for action buttons to be center aligned (#70477) 2022-10-19 00:51:18 -07:00
ShizCalev
66ce1fffe2 Fixes negative value being passed to runechat fade animation timer (#70531) 2022-10-19 00:49:58 -07:00
Tim
09d88b31ee Wizard DLC - Tower of Babel (#69629)
About The Pull Request

This adds a new status effect called - Tower of Babel

Any carbon mob afflicted by the status effect will lose knowledge of every known language and gain a randomized one as a replacement. The affected mob will also be hit with a depressing moodlet that lasts for 15 seconds. Silicons are immune to all effects.

This effect is implemented in several ways:

    Tower of Babel wizard event (all crew on the station z level are affected. The wizard is not and gains mastery of every language to taunt their victims)
    Admin smite option
    Admin secret event (can be reversed)
    Staff of Babel (formerly the Staff of Sapping) will spawn during spawn magic wizard event
    Magicarp will randomly shoot bolts of babel
    Staff of Chaos will randomly shoot bolts of babel
    Overdosing on Mushroom Hallucinogen will temporarily and sporadically acquire the effect

The effect can be blocked or cured in several ways:

    Curators are given immunity
    Reading a book of babel (via lavaland loot) cures and gives immunity
    Reading a language book cures and gives immunity ONLY for that particular language

Note - The Tower of Babel does not allow tongueless, mute, or tongue tied people the ability to speak
2022-10-19 05:17:05 +00:00
san7890
4085e792ab End Of Creating Map Votes with One/Zero Options. (#70340)
Makes it so you can't call a map vote when there is less than two maps to choose from

Co-authored-by: VexingRaven <msgerbs@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-10-19 04:47:32 +00:00
san7890
2878345ebb Swaps sleep() to use SECONDS define, changes some sleep(1) to sleep(1 TICKS) (#70452) 2022-10-18 21:25:23 -07:00
MrMelbert
dc8fcf82c9 Silver slime extract created food isn't toxic to jellypeople (#70424) 2022-10-18 21:21:50 -07:00
Dani Glore
f416a517c8 Fix: Blood Deficiency removing more blood than intended (#70563) 2022-10-18 13:56:48 -07:00
Kylerace
53c93c9025 Quickie runechat op (#69137)
reintroduces the intermittent queuing behavior found in #65791 since i can actually recover that part. now after MeasureText() puts us in the player input portion of the tick it will queue a callback for the next tick to resume chat message creation

generate_image() is a highly overtiming proc, now its less so
2022-10-18 02:12:31 +00:00
MrMelbert
629379f524 Fixes contextual bare hand element improperly setting up its element ID (#70538)
Fixes contextual barehanded screentips being inaccurate if only LMB text is set
2022-10-16 21:57:33 -04:00
MrMelbert
b6824fd76c Fixes null thrower runtime with plant backfire element (#70540)
Fixes null thrower runtime
2022-10-16 07:39:33 -04:00
GoblinBackwards
813a20e9a7 Fixes runtime when exporting bounty cubes (#70535)
* Fixes runtime caused by trying to capitalize an object instead of its name, by making it now capitalize the name instead.
2022-10-16 07:29:16 -04:00
lizardqueenlexi
55aab3bc6b Fixed a couple of errors related to lizard tail DNA. (#70532) 2022-10-16 01:57:27 -05:00
san7890
a92438a6cb Checks Filters For Cross-Station Messages (#70273) 2022-10-15 00:19:55 -07:00
GoblinBackwards
99e4f9a59c Carries over carded AIs into crafted intellicards (#70402)
* AIs that are crafted into Intellitater/Lantern is now moved into the new intellicard.
* Allows intellitaters/lanters to be crafted with intellicards that have an AI inside of them.
2022-10-14 07:04:54 -04:00
itseasytosee
bcfd895c14 Functionality for custom human examine messages when possessed by an AI controller. Implements on humans with monkey AI (#70356)
The "They don't appear to be themselves" line on humans that have AI controllers is now controllable by the AI controller, and is only "They don't appear to be themselves" by default.
Monkeized human now have the line
2022-10-13 18:00:32 -07:00
tralezab
1ac2779ef8 Bileworm Health Patch: Evolutionary Leap, Vileworms, Proximity Spawning Rules, Better Loot (#70321)
* bileworm health patch

- bileworms start off easier
- vileworms are how they are now + a little tougher
- fixes bileworms breaking proximity spawn rules
- adds gold to bileworm loot

* ssticker

* diagonals readded to attacks\, map fix

* d-delete this

* Update evolutionary_leap.dm

* DONE
2022-10-12 22:48:41 +02:00
John Willard
41ca4962db Moves cleaning to an atom proc to afterattack signal (#70239)
* Hopefully fixes Cleaning

* Cleaning off window blood is now handled by the Window itself
* Cleanbots now have an advanced mop built into them, I am hoping in the future we can make cleanbots have their mops taken off, but I'm not good at spriting so it isn't a thing yet.
* Adds a pre_clean_callback to replace the should_clean arg (mostly)
* Removes the atom cleaning proc, replaces it with a signal for afterattack on a cleaning tool.

* Fixes and improvements

* adds a new define that allows pre_clean_callback to cancel cleaning entirely, used for mops to check for being wet or attacking buckets and such.
* Fixes cleanbots not properly working, removing their mop and just registering for a signal that bots send instead.
* Changes cleaner component to take proximity into account, that way we don't have to check it on each item's individual afterattacks, that way we don't have to call parent at the end either.
* Improves check_allowed_items a little bit because I hated how it was used for soap.

* Update cleaner.dm

* reviews
2022-10-12 11:22:04 +02:00
ShizCalev
c137b2f270 Fixes shields inhands (#70395)
Fixes #70377

Stobe shield has been broken for.... hell I don't even know how long lmao

cl ShizCalev
fix: Fixed some missing shield inhand icons.
fix: The strobe shield's inhand icon now plays the flashing animation when triggered again.
fix: The strobe shield will no longer blind the person holding it when it deflects a blow.
fix: The light from the strobe shield's flash no longer appears in your held inventory slot.
fix: Fixed the east facing left-handed strobe shield sprite being misaligned by two pixels.
/cl
2022-10-12 14:39:59 +13:00
MrMelbert
f32678fb13 Having very very low sanity will rarely cause hallucintions (#70311)
* Being insane now causes you hallucinations, and hallucination immune has been renamed to RDS immune, since it only works for the quirk.
2022-10-11 11:41:09 -04:00
MrMelbert
ced20c8e63 Converts silent to status effect + small cleanup of can_speak / can_speak_basic / IsVocal, and sign language (#69963)
* Gets rid of a lot of weird vocal checks
- unifies all vocal checks under can_speak and try_speak
- de-spaghettis a bit of sign language stuff
- introduce a silence status effect
2022-10-09 23:46:57 -04:00
Time-Green
6bfaadc6cf Removes inappropriate golden wheelchair usage (#70384) 2022-10-09 13:03:25 -07:00
itseasytosee
e0b706c36c Put clothing on people by clicking on them with clothing inhand + targeting correct area. (#69560)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-10-08 18:51:29 -07:00
ShizCalev
ec4f44f137 Fixes lighting overlays from an item sometimes showing up on inventory slots / backpack slots instead of from the mob holding them. (#70250)
Fixes lighting overlays sometimes showing in inventory slots / backpack slots instead of the mob holding them
2022-10-08 23:33:56 +02:00
MrMelbert
bc9ba63717 Adds a few (very) basic hallucinations, to keep people on their toes (#70251)
Spoiler alert!

    Adds a few extra "weird" fake body hallucinations.
        These just pop up a weird sprite somewhere in the view of the player.
        Another fun thing: Body hallucinations will appear to be floating if they spawn in nograv areas.
    Adds a "watcher" hallucination, a strange static figure that sticks on your screen until either a few minutes elapse. If you step out of view of it, then return, it will disappear.
    Adds a variant of the "fake death" hallucination which appears as if you were dusted.
    Adds two delusion - One that makes everyone appear to be ghosts, and one that makes everyone appear to be syndicates.
2022-10-07 20:18:21 -07:00
Twaticus
c7dde06668 [MDB Ignore]Hats DMI split (#70060)
Splits head dmi into separate files for both mob and obj icons. Kept similar to suit split categorization + some more. New files include beanie, bio, chaplain, costume, cowboy, default, hats(softcaps, fedoras, head caps, generic hats), helmet(helmets and other armored headgear/hoods), spacehelm, utility(hardhats, mostly work related hats), wizard.
Moves animal/pet head sitting icons to 1 folder, pets_head.dmi
Renames PAI head sitting icon file to pai_head.dmi
2022-10-06 21:37:06 -07:00
Yaroslav Nurkov
04ca99d7e9 NT Pay app. Money send on distance, transaction log! (#70108)
* base

* reasons

* GetToken proc, with a many remarks

* Add a way to change reason in transfer_money proc. Add a reasons.

* Reason to use the app. Commission. Standard application.

* Apply suggestions from code review - Tralezab

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>

* Tralezab & jlsnow301 advices. New format(everywhere)

* Nanotrasen

* Refactor TGUI(not me:( ). Fix useless capitalize

* Update code/modules/economy/account.dm

* Trans transforms in transaction

* coMmission. little autodoc mistalke. Translation != Transaction

* oops

* Merge Conflict

* ...

* back feats

* mistakes bye!

* ну да

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
2022-10-05 18:25:38 -04:00
ShizCalev
1a32f60cf4 [ready] adds unit test for missing inhand icons. fixes a bunch of missing inhand icons (#70037)
fix: Fixed a bunch of missing inhand icons.
fix: Fixed cables in electrical toolboxes not randomizing their colors.
fix: Fixed the wrong colored icon showing when trying to make cable cuffs out of cables.
fix: The collectable SWAT helmet is now using the proper icon again!
refactor: Pipecleaners and power cables now share a unified color system, so they're once again available in ALL the same colors.
imageadd: Updated the screwdriver belt overlay to represent the newer sprite.
imageadd: Added a bunch of new inhand icons. Special thanks to Twaticus for doing the helmets! <3
fix: Wirecutters now have an icon when inside a belt again!
admin: Added a new omnitool subtype that allows you to spawn all items in a typepath!
fix: Explorer gaskmasks now properly reflect their adjusted state when held.
fix: Fixed balaclavas having the wrong icon when pulled up.
fix: Fixed the base energy sword (admin spawn only) being invisible.
fix: The rainbow energy sword is now a little bit more rainbowy!
fix: Fixed an tk exploit with orange handcuffed shoes.
fix: The traitor outfit in the select equipment panel is now actually functional!
2022-10-04 10:20:24 -07:00
Tim
29227aab52 Mail Quirk Goodies DLC - Package Bonanza (#70091)
* Add mail goodies for neutral quirks

* todo later... hur hur hur

* Add mail goodies for quirks

* Move money goodie to random spawner effect

* Add more goodies to positive quirks

* Add more mail goodies for negative quirks

* Add pajama clothing to heavy sleeper mail goodies

* Ad fedora to mail goodies for gamer quirk

* Add trenchcoat to monochromatic quirk mail goodies

* Add mail goodies to all remaining quirks

* Fix linter error

* Add candle box to spirtual quirk mail

* Clean up code for mail goodies

* Rebalance generic goodies mail weight

* Add mail goodies quirk code comments

* Add more noir items for monochromatic

* Add 3 new random spawners icons

* Add nightcaps to heavy sleeper mail goodies

* Fix plushies random spawner to work correctly

* Add code comment explaining quirk weight value
2022-10-04 01:02:38 -04:00
MrMelbert
f9a7bdf8ca Station trait "Bot language malfunction" triggers on newly created station bots (#70278)
* Bot language malfunction triggers on new bots

* List
2022-10-03 23:54:39 -04:00
ATH1909
4aff0cddee self-respiration grants its nobreath trait at stage 4 again (#70233)
>:(
2022-10-03 23:43:09 -04:00
Tim
f5f6b26e2d Fix xeno hivemind talk causing hissing sound (#69844)
* Fix xeno hivemind talk causing hissing sound

* Fix dullahan speech arg

Add message_range and saymode to say arguments

Add new say args to other say procs

Add new say args to other say procs

* Revert "Fix dullahan speech arg"

This reverts commit abff2bec1a03c1270b2896faa547c465e046ad78.

* Fix speech_args to be list

* Refactor hulk speech signal handler

* Revert "Revert "Fix dullahan speech arg""

This reverts commit 58997930096ef6b7fa8a1c79395595e61db954c6.

* Change filterproof to be null like other say procs

* Remove unused COMSIG_MOB_SAY defines

* Readd defines for COMSIGH_MOB_SAY
2022-10-03 23:10:45 -04:00
scriptis
14c96d05b8 TGUI for Techfabs II: The Great Recategorizing (AND ICONS) (AND MECHFABS) (AND AUTOLATHES) (#69990)
I recategorized EVERY /datum/design/ IN THE GAME to be more UX friendly and I HATE MYSELF FOR IT
    I refactored techfab UI to WORK ANYWHERE for ANY MACHINE THAT USES /datum/design as a SET OF MODULAR COMPONENTS
    I moved a lot of DESIGNS EXCLUSIVE TO THE AUTOLATHE to also work IN PROTOLATHES
    I made MATERIAL ICONS animate between ICON STATES for STACKS
    I PUT ICONS IN ALL OF YOUR FABRICATORS
    I SOMEHOW DID ALL OF THIS WITHOUT LOSING ANY PERFORMANCE
    ALSO SUPPORTS COMPONENT PRINTERS AND MODULE DUPLICATORS

Other garbage:

    Fixed numerous spelling and consistency issues in designs
    Removed Machine Design (<x>) and Computer Design (<x>) from all relevant designs
    All designs are now in title case
    Numerous designs that were formerly autolathe exclusives can now also be printed at a protolathe (but not all); this is mostly just service equipment like drinking glasses and plates and silverware
    Circuits components can no longer be printed at a circuit imprinter (fixes 

    Integrated circuit components printed in the component printer/module printer cost twice as much than from an un upgraded circuit printer #67758)
    Designs that are not sensible for a department to have are no longer accessible to that department (read: medbay printing turbine parts)

Why It's Good For The Game

Improved UX for techfabs, but also for mechfabs and autolathes, and oh look it's pretty!

also I spent like eight hours doing nothing but categorizing /datum/designs and I'll cry if some version of this doesn't get merged eventually
Changelog

cl
refactor: mechfabs, autolathes, component printers, and module duplicators now use techfab tgui components
refactor: every single design is now categorized and subcategorized
refactor: mechfabs and autolathes are now in typescript
qol: techfabs now have icons for what you're about to print
qol: techfab material icons are now animated
qol: techfab material icons now fade when no materials are available
qol: techfab searching no longer lags like hell
qol: techfab searching now searches all recipes instead of just the current category
qol: techfabs now have subcategorization (stock part users rejoice)
qol: techfabs now announce when new recipes are available
qol: numerous other techfab ui tweaks
balance: some designs that were formerly autolathe exclusive can now be printed at some departmental techfabs
2022-10-04 11:09:50 +13:00
Gamer025
677827e87d Expands mob_tags logging (#70259)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-10-03 04:37:42 +00:00
John Willard
91f02f2a6b canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE (#69790)
* canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE

The most idiotic thing I've seen is canUseTopic's defines, they literally just define TRUE, you can use it however you want, it doesn't matter, it just means TRUE. You can mix and match the args and it will set that arg to true, despite the name.

It's so idiotic I decided to remove it, so now I can reclaim a little bit of my sanity.
2022-10-01 09:47:52 -07:00
tralezab
4e041ce765 The Link to the Changeling Hivemind has been Reestablished (#70193)
Readds the changeling hivemind, but in a simplified form.

    There is no linglinking. It was rarely used and imma be real with you, stupid.
    Hivemind isn't an unlocked ability, it is just a default.
    Bz still mutes lings
    Fallen changelings now get an agonizing message about being locked out. We love fallen changeling flavor
    Changelings have their Honorific names back! Hello, Mr. Omnicron!
    This does NOT readd changeling team objectives, or really anything encouraging teaming beyond the hivemind itself.

    I think antagonists have generally lost a lot of power versus the station, and this is one big way to pump up the heat for this antag in particular. Changelings, given an ability to possibly team up, are much MUCH scarier.
    One reason it was removed years ago was because teaming was too often, but back then there were entire gamemodes about changelings having team objectives and many other things to encourage it. I'm bringing us back to a point BEFORE all those design ideas were explored, because I don't think they worked out.

Add information about the changeling hivemind, and the dangers of being turned into a fallen changeling if you get betrayed to the Changeling Antag Info UI

Changelog

add: Changelings once again have reestablished their changeling hivemind, and can secretly communicate between each other.
fix: Fixed up the Changeling UI a bit, like for example some dimmers would never render.
2022-09-29 18:00:23 -07:00
SuperSayu
94cbfb30c3 Various assembly fixes. (#69772)
About The Pull Request

Fixes #69043 assemblies not providing a UI when part of a one-tank bomb. (This doesn't count voice analyzers, which don't have UI)
Fixes #68139 assemblies triggering themselves (and often turning themselves off).
Fixes timers ceasing to loop if the timer is set to less than the 3-second anti-spam threshold.
#69335, #68733 signalers occasionally runtiming due to qdel'd weak reference datums. Already addressed by another PR
Proximity sensors and mousetraps work on more wire datums, but proximity sensors are still buggy.
Igniter-sensor pairs can detonate fuel tanks properly, including plumbed fuel tanks. Fuel tank explosions scale with how much fuel is in them; this is slightly nerfed from existing values.

The fuel tank detonation code has been made generic, but other reagent dispensers have rigging turned off. If turned on with a varedit, you can rig and detonate water and other reagent tanks. Reagent tanks can theoretically both explode and spread reagents if it should happen to contain both welding fuel and other stuff. I have not actually tested this part of it, but I have detonated both water tanks and fuel tanks and each works correctly.

In making mousetraps work on wire datums, I had the opportunity to make it so that you could place a mousetrap in a door's wire and it would activate when someone passed through the door (useful to bolt a door open when someone authorized goes through, for example). This is a fun mechanic but does not make sense for a simple mousetrap to be so powerful, so it is disabled. Ideally, you could put the laser tripwire in a door's wires to do the same thing, but that would be a massive rework. Mousetraps still work in on-found mode for all wire datums, and will work on items with wiring datums (like C4 and chem bombs) when stepped on.

The signaler runtimes were a result of weak_ref datums being deleted, and the communications system not handling that. It's probably not ideal to run null checks in the post_signal loop, but I am not going to worry about it.

Many of the assemblies were not properly registering when the assembly holder was attached to an item. This was most important for proximity sensors, but that also has other problems that I haven't been able to track down.

The problem with UI not appearing was a result of the transition to TGUI however long ago that was; the proc that assures TGUI that you have the right item needed to be aware of one-tank bombs and similar, or else when you pass along an interact request it says "but you can't see it" and ignores you.
Why It's Good For The Game

Bugfixen.

The thing with the reagent dispensers only got this complicated when I realized that the plumbed fuel tank variant wasn't a subtype and therefore couldn't be rigged. And then... I basically just scaled it because the flat scale no matter the contents of the tank offended me. You could wrench open tanks, drain them entirely of fuel, rig them, and they would still go off like a pile of dynamite.

I used to have code in my branch that turned chem bombs into variants depending on the trigger, with mousetraps being mines for example. That's honestly the main reason I went out of my way to make mousetraps work better as assemblies. I could wish it were better supported, but mousetraps on grenade wiring will have to do for now.
Changelog

cl
balance: Welding fuel tank explosions have been scaled slightly down and require the fuel tanks to actually be full of welding fuel
fix: You can detonate welding fuel tanks with an igniter-sensor assembly
fix: You can reach your one-tank bomb's assembly controls by activating the item in your hand.
fix: Certain assemblies should no longer turn themselves off.
fix: Clumsy fools handling a mousetrap-based multi-part assembly may set it off by accident
/cl
2022-09-30 13:07:02 +13:00
Y0SH1M4S73R
9317472c29 Fixes a runtime when the MC invokes a varedited callback synchronously (#70172) 2022-09-29 14:23:30 -07:00
Tim
893604fda7 Fix psicodine to suppress all phobias (including claustrophobia and nyctophobia) (#70183)
Add TRAIT_FEARLESS to claustrophobia and nyctophobia
2022-09-29 10:45:33 -07:00
John Willard
dafbcf29bd Prosthetic surgery now checks if you can attach the bodypart (#70157)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-09-27 22:30:24 -07:00
GoldenAlpharex
4cf6151ee7 Fixes the skill cape drop pod's murderous tendancies (#70154)
Fixes the skill cape drop pod yeeting people's organs on impact
2022-09-27 16:56:39 -07:00
John Willard
243231eb48 Properly checks flags with & instead of == (#70130)
* Makes flags properly check themselves

Byond ref: https://www.byond.com/docs/ref/#/operator/&
Basically, flags should use & instead of ==
We can have more than 1 slot on any item, so it's preferred that we do this instead. Even if it doesn't immediately fix any problems, it's something that should be the standard anyways to prevent it from ever being a problem.

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-09-27 21:51:45 +00:00
tralezab
1810b85553 Heretics cannot be converted, and are immune to cult stun hands. Instead, the cult is rewarded for sacrificing them with the bloody bastard sword, an oversized SPIN2WIN funblade. + Soul Stealing Fantasy Affix (#69725)
About The Pull Request

Heretics can no longer be converted to a cult, as they follow their own Forgotten Gods.
Instead, Nar'Sie will reward the cult for managing to sacrifice one, with the bastard sword.
The bloody bastard sword has been cleaned up codewise and all that. Because it is a free reward instead of a (removed) progression mechanic of cult, it swings just a bit slower during the spin and doesn't have a jaunt. It's still a !fun! swinging sword of hilarity and death.
BLOODY BASTARD https://www.youtube.com/watch?v=ukznXQ3MgN0
Fantasy weapons can now roll "soul-stealing" weapons. They, on killing something, capture its soul inside the item.

    Add fail conditions that instantly end a spin2win, ala how 

    Mimes can now hold a baguette like a sword by right clicking it #69592 works

Why It's Good For The Game

Bloody bastard sword was fun, it made no sense that heretics were valid converts when they're already worshipping a DIFFERENT evil god granting them powers. Should be in a good spot as a nice little antag to antag special interaction. I fucking love antag to antag special interactions, we should have more of 'em

Fantasy affixes are always a neat thing to throw a new component into
Changelog

cl
add: Heretics can no longer be converted to cult. But sacrificing them is very valuable to Nar'Sie, and she will grant special weapons if you manage to do so.
add: Fantasy affixes can also include soul-stealing items!
/cl
2022-09-28 10:24:04 +13:00
LemonInTheDark
23bfdec8f4 Multiz Rework: Human Suffering Edition (Contains PLANE CUBE) (#69115)
About The Pull Request

I've reworked multiz. This was done because our current implementation of multiz flattens planes down into just the openspace plane. This breaks any effects we attach to plane masters (including lighting), but it also totally kills the SIDE_MAP map format, which we NEED for wallening (A major 3/4ths resprite of all wall and wall adjacent things, making them more then one tile high. Without sidemap we would be unable to display things both in from of and behind objects on map. Stupid.)

This required MASSIVE changes. Both to all uses of the plane var for reasons I'll discuss later, and to a ton of different systems that interact with rendering.

I'll do my best to keep this compact, but there's only so much I can do. Sorry brother.
Core idea

OK: first thing.
vis_contents as it works now squishes the planes of everything inside it down into the plane of the vis_loc.
This is bad. But how to do better?

It's trivially easy to make copies of our existing plane masters but offset, and relay them to the bottom of the plane above. Not a problem. The issue is how to get the actual atoms on the map to "land" on them properly.

We could use FLOAT_PLANE to offset planes based off how they're being seen, in theory this would allow us to create lens for how objects are viewed.
But that's not a stable thing to do, because properly "landing" a plane on a desired plane master would require taking into account every bit of how it's being seen, would inherently break this effect.

Ok so we need to manually edit planes based off "z layer" (IE: what layer of a z stack are you on).

That's the key conceit of this pr. Implementing the plane cube, and ensuring planes are always offset properly.
Everything else is just gravy.
About the Plane Cube

Each plane master (except ones that opt out) is copied down by some constant value equal to the max absolute change between the first and the last plane.
We do this based off the max z stack size detected by SSmapping. This is also where updates come from, and where all our updating logic will live.

As mentioned, plane masters can choose to opt out of being mirrored down. In this case, anything that interacts with them assuming that they'll be offset will instead just get back the valid plane value. This works for render targets too, since I had to work them into the system as well.

Plane masters can also be temporarily hidden from the client's screen. This is done as an attempt at optimization, and applies to anything used in niche cases, or planes only used if there's a z layer below you.
About Plane Master Groups

BYOND supports having different "maps" on screen at once (IE: groups of items/turfs/etc)
Plane masters cannot cover 2 maps at once, since their location is determined by their screen_loc.
So we need to maintain a mirror of each plane for every map we have open.

This was quite messy, so I've refactored it (and maps too) to be a bit more modular.

Rather then storing a list of plane masters, we store a list of plane master group datums.
Each datum is in charge of the plane masters for its particular map, both creating them, and managing them.

Like I mentioned, I also refactored map views. Adding a new mapview is now as simple as newing a /atom/movable/screen/map_view, calling generate_view with the appropriate map id, setting things you want to display in its vis_contents, and then calling display_to on it, passing in the mob to show ourselves to.

Much better then the hardcoded pattern we used to use. So much duplicated code man.

Oh and plane master controllers, that system we have that allows for applying filters to sets of plane masters? I've made it use lookups on plane master groups now, rather then hanging references to all impacted planes. This makes logic easier, and prevents the need to manage references and update the controllers.

image

In addition, I've added a debug ui for plane masters.
It allows you to view all of your own plane masters and short descriptions of what they do, alongside tools for editing them and their relays.

It ALSO supports editing someone elses plane masters, AND it supports (in a very fragile and incomplete manner) viewing literally through someone else's eyes, including their plane masters. This is very useful, because it means you can debug "hey my X is yorked" issues yourself, on live.

In order to accomplish this I have needed to add setters for an ungodly amount of visual impacting vars. Sight flags, eye, see_invis, see_in_dark, etc.

It also comes with an info dump about the ui, and plane masters/relays in general.

Sort of on that note. I've documented everything I know that's niche/useful about our visual effects and rendering system. My hope is this will serve to bring people up to speed on what can be done more quickly, alongside making my sin here less horrible.
See https://github.com/LemonInTheDark/tgstation/blob/multiz-hell/.github/guides/VISUALS.md.
"Landing" planes

Ok so I've explained the backend, but how do we actually land planes properly?
Most of the time this is really simple. When a plane var is set, we need to provide some spokesperson for the appearance's z level. We can use this to derive their z layer, and thus what offset to use.

This is just a lot of gruntwork, but it's occasionally more complex.
Sometimes we need to cache a list of z layer -> effect, and then use that.
Also a LOT of updating on z move. So much z move shit.

Oh. and in order to make byond darkness work properly, I needed to add SEE_BLACKNESS to all sight flags.
This draws darkness to plane 0, which means I'm able to relay it around and draw it on different z layers as is possible. fun darkness ripple effects incoming someday

I also need to update mob overlays on move.
I do this by realiizing their appearances, mutating their plane, and then readding the overlay in the correct order.

The cost of this is currently 3N. I'm convinced this could be improved, but I've not got to it yet.
It can also occasionally cause overlays to corrupt. This is fixed by laying a protective ward of overlays.Copy in the sand, but that spell makes the compiler confused, so I'll have to bully lummy about fixing it at some point.
Behavior changes

We've had to give up on the already broken gateway "see through" effect. Won't work without managing gateway plane masters or something stupid. Not worth it.
So instead we display the other side as a ui element. It's worse, but not that bad.

Because vis_contents no longer flattens planes (most of the time), some uses of it now have interesting behavior.
The main thing that comes to mind is alert popups that display mobs. They can impact the lighting plane.
I don't really care, but it should be fixable, I think, given elbow grease.

Ah and I've cleaned up layers and plane defines to make them a bit easier to read/reason about, at least I think.
Why It's Good For The Game
<visual candy>

Fixes #65800
Fixes #68461
Changelog

cl
refactor: Refactored... well a lot really. Map views, anything to do with planes, multiz, a shit ton of rendering stuff. Basically if you see anything off visually report it
admin: VV a mob, and hit View/Edit Planes in the dropdown to steal their view, and modify it as you like. You can do the same to yourself using the Edit/Debug Planes verb
/cl
2022-09-27 20:11:04 +13:00
LemonInTheDark
2d89c7d4d3 Fixes weather sounds (#69944)
* Fixes weather sounds

Timber changed the args to this signal in cbc6f35f54, and didn't update my code.
Damn you timber.

Thanks to that bro in coderbus who told me about this
2022-09-26 20:37:35 -04:00
LemonInTheDark
e5a2b0f16e Micros the lighting subsystem (Saves a second of init) (#69838)
About The Pull Request

Micros lighting objects, and their creation

We save a good bit of time by not walking space turfs adjacent to new objects.
We also save some time with micros in the actual underlay update logic.

I swear dude we spend like 0.8 seconds of init applying the underlay. I want threaded maptick already

Micros lighting sources, and corner creation

A: Corners were being passed just A turf, and then expected to generatecorners based on that. This is pointless.
It is better to instead pass in the coords of the bottom left turf, and then build in a circle. This saves like 0.3 seconds

B: We use so many damn datum vars in corner application that we just do not need to.
This resolves that, since it pissed me off. It's pointless. Lets cache em instead

There's some misc datum var caching going on here too. Lemme see...
Oh and a bit of shortcutting for a for loop, since it was a tad expensive on its own.

Also I removed the turfs list, because it does fucking nothing. Why is this still here.

All my little optimizations save about 1 second of init I think
Not great, but not bad, and plus actual lighting work is faster now too
Why It's Good For The Game

Speed
2022-09-27 09:56:35 +13:00
LemonInTheDark
72a5b79555 Removes overlay queuing, saves 6/7 seconds of initialize. Lightly modifies stat tracking macros (#69696)
* Removes overlay queuing, saves 6/7 seconds of initialize. Lightly modifies stat tracking macros

So we have this overlay queuing system right? It's build with the assumption
that the "add to overlay list" operation is real expensive, and is
thus useful to queue removals or additions.

It turns out that it just isn't, at least during init. In my testing the
operation of queuing took LONGER then the actual overlay add/remove did.

That's ignoring the cost of the subsystem's work.

I've also modified part of the stat tracking macro, since it took a good
bit of cpu time, and didn't seem to well, do anything. So far as I can
tell it always evaluates to 1
2022-09-26 08:46:46 -07:00