Commit Graph

1608 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
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
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
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
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
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
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
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
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
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
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
Time-Green
ad9090bf59 Adds seethrough component (#69642)
Adds a seethrough component!
Standing behind a big object with this component will make the object transparent:

https://youtu.be/nnyWMJakVtE

And no one else can see it:

And yes you can click through it thanks to the power of plane masters!

Standing behind a tree is a pretty big meme and people will have to either shift right click or bump into you to ever find you. This makes it so much better to implement big objects, since they no longer obscure the tiles behind them
It's also useful for existing big objects, like billboards and the likes

🆑
qol: You can now see through big trees when you stand behind them!
refactor: Adds a seethrough component to make it easier to add big stationairy objects without reducing visibility
/🆑

Info

This is done by sending an override overlay to the user that obscures the normal object and plays an animation.

It registers an ENTERED signal on specific turfs. Those tiles in which it hides stuff is defined as a list of list coordinates, for which I made a global list with some defines. It's really crappy and I'd appreciate some feedback on that
2022-09-24 22:51:57 -07:00
MrMelbert
45516f4741 Adds macros to help with common set_- and adjust_timed_status_effect uses (#69951)
* Adds helpers for status effect application
2022-09-24 11:04:26 -04:00
ShizCalev
feadabf1a4 Moves signal overrride warnings to it's own log file (#70034)
I'm tired of seeing it in the runtime log. If the signals_log file exists, that means something needs to be fixed. Enjoy.

admin: Moved signal overriden stack_trace warnings to it's own log file.
2022-09-20 22:46:07 -07:00
Watermelon914
452970b35f Fixes FOV exploit with gasmasks (#70017)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2022-09-20 14:29:20 -07:00
John Willard
48bf156206 Removes canuserrotate from simple rotation's screentip (#70002)
Removes canuserrotate from rotation context

Removes the check on whether the user can rotate a chair or not, in the screentip context message.
We shouldn't check to see if a person can or can't rotate a chair or not, they will instead get the feedback when they try to rotate it if they fail, but it's better if the screentip let them know it's a mechanic that exists.
2022-09-19 23:10:09 -07:00
Watermelon914
8606dd6ff0 Fixed USB ports not working (#69920)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2022-09-16 08:01:44 -07:00
san7890
b6900a6d27 Fixes Bread Smite Causing Some Fucked Up Shit (#69853)
* Fixes Bread Smite Causing Some Fucked Up Shit

Hey there,

So basically, when you had the bread smite done on you, you were _just_ added to the contents of the bread. Nothing more. That means that you could pick it up. You couldn't add it to your bag (it would always return back into your hand(?)), but it would create some weird oddities that was just cursed in general. Let's make it so you can't hold the container that you are contained within by giving you HANDS_BLOCKED.

* actually we don't need the named arg

lets get rid of the cursed thing entirely

* removes sanity check

* we do a bit of component trolling

THIS TOOK ME TWO HOURS FUCK YOU

* removes cruft comment

* cleans up code a teeny bit, upgrades to incapacitated

* wait that named arg is still there wtf

* Review Time

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>

* wrong operator and wrong order of operations

* null out the container

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>

* checks to see if container is qdeld

* weakref time

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-09-15 08:12:31 -04:00
Tim
c8b45b3e99 Add Alt RMB and Ctrl RMB screentips (used for Simple Rotation) (#69726)
* Add Alt RMB and Ctrl RMB to screentips

* Add Ctrl and Alt RMB screentips to defines
2022-09-15 00:45:24 -04:00
Tim
8f59a6dbac Fix plasma cutter or guns that burn not being able to ignite plasma (#69584)
* Plasmacutter projectiles now deal BURN instead of BRUTE
* BURN projectiles now properly detonate plasma and explodables.
2022-09-14 23:43:58 -04:00
ShizCalev
8108c009a4 Slightly rewords customizable reagent holder examine message (#69880) 2022-09-14 10:47:24 -04:00
ShizCalev
b5aea612b9 tackle runtime fix (#69849) 2022-09-13 13:02:51 +12:00
lizardqueenlexi
be635bd6c0 Fixed a bug that causes sliced food to have significantly fewer reagents than intended. (#69733) 2022-09-08 08:22:04 -04:00
Mothblocks
584d1b2927 Load circuit components from USB ports on demand, saving 0.5s of init time (0.7s on prod) (#69664)
We create 2,383 circuit components (on whatever map I was looking at on Sybil at the time, don't know) from USB ports every round, quite pricey. This makes them initialize once when a USB is first plugged in.
2022-09-03 17:22:45 -07:00
Mothblocks
85b4c78f8b Micro-optimize RegisterSignal, saving 0.3s of init time (#69638)
About The Pull Request

Caches some vars, merges some statements by abusing x = y returning y. Goes from .53ms per call to .45ms per call, saving over .3s of init time due to its call count.
2022-09-04 09:35:09 +12:00
skylord-a52
be0e6efdf6 [IDB IGNORE] [MDB IGNORE] Makes the icons/mob folder sane (#69302)
About The Pull Request

Reorganizes the entire icons/mob folder.

Added the following new subfolders:

    nonhuman-player (this was initially just called "antag", but then I realized guardians aren't technically antags)
    simplemob
    silicon
    effects (for bloodstains, fire, etc)
    simplemob/held-pets (for exactly that -- I wasn't sure if this should go in inhands instead)
    species/monkey

Moves the following stuff:

    All human parts moved into species, with moth, lizard, monkey, etc parts moved to corresponding subfolders. Previously, there were some moth parts in mob/species/moth, and others just loose in mob. Other species were similar.
    icemoon, lavaland, and jungle folders made into subfolders of simplemob
    All AI and silicon stuff, as well as Beepsky et al. into the silicon folder, simplemobs into the simplemob folder, aliens into the nonhuman-player folder, etc.
    Split up animal_parts.dmi into two bodyparts.dmi which were put in their respective folders (species/alien and species/monkey)

Code changes:

    Filepath changes to account for all of this
    Adds a check when performing surgery on monkeys and xenos, because we can no longer assume their limbs are in the same file
    Turns some hardcoded statues and showcases that were built into maps into objects instead

Things I'd like to do in the future but cant be assed right now:

    Remove primarily-antag sprites from simplemob/mob.dmi (Revenant, Morph, etc.) and put them in the nonhuman-player folder
    Split up mutant_bodyparts.dmi into different files for Tizirans, Felinids, monkeys, etc and put them in their own folders. Those may have once been meant primarily for mutated humans but that's now how they're being used right now.
2022-09-03 11:52:54 -07:00
GuillaumePrata
aec14ffc8f Wings and tails give anyone better tackling values. Moths and lizards that lose theirs will have worse values instead. (#69078)
About The Pull Request

Late and atomized version of #67791 with some extra changes.

Changes are:

1 - Anyone with wings will have a +2 tackle offense (same as riot armor or gigantism mutation)
2 - Moths without or burnt wings will have -2 tackle offense (same as dwarfism or clumsy)
3 - Anyone with a lizard tail that is wagging it, will have 1+ tackle defense (same as being fat)
4 - Lizards without a tail will have -1 tackle defense (same as being slightly drunk)
5 - Fly people have a higher chance of breaking their spine after splatting themselves into a window/wall (+6 same as clumsy)

Made 3 new traits and gave them to Lizards, Moths and Flypeople, swapped the old islizard to check for one of these traits instead.

This way it is easier for anyone that reads these species' code to know that they have an unique interaction with our tackling system without having to dig into component code.
And thanks for the suggestion Kapu.
Why It's Good For The Game

This makes Moths have an interesting round start niche as security and push them to behave differently than humans if they decide to opt into tackling.

It is fun to steal flashbangs and exploit the weakness that Moth officers have right now, if moths are better at tackling and more likely to use it, it opens another thing you can exploit when engaging against security.

The breakpoints for tackling are on windows of 2 so while it might look like a lot (Riot suit value), if I gave only 1 for moths they would have a 50% chance of being better than other species while tackling.
Inconsistencies are not interesting on species. It would be quite annoying if plasmamen had a coin toss on being cold resistant or self igniting every time they engage with the system.

The flypeople change is there just because the idea of a Fly officer smacking themselves into a window and breaking their spine is funny.

And as was requested by maintainers, it now checks for anyone with wings and lizard tails for the tackle buff, go have your fun Frankstein builders and Officers that can get Xeno to give you a wing potion.
Changelog

cl Guillaume Prata
balance: Anyone with wings or a wagging lizard tail will have a small bonus to their tacklling offense/defense.
balance: Moths and lizards that lose their wings/tail will have worse tackling values instead.
balance: Fly people don't take splatting themselves on windows/walls easily and have a higher chance to get a bad result from that.
/cl
2022-09-02 10:08:11 +12:00
vincentiusvin
dee581702c Fix combustible flooder temperature param not being parsed. (#69583)
" TEMP" != "TEMP"
Fixes #69579
2022-09-01 10:32:34 +01:00
Fikou
e82f728b09 medical/security modsuit updates and modules (#69194)
tweaks the colors on the security modsuit to be lighter, i think i did that on the original pr but it got reverted due to merge conflicts
makes the standard quick carry module have nitrile level carrying instead of latex level
environmental bodybags are now always pressurized
adds medical and security hardlight bags, which are environmental bags you can use to move people through space, security ones can be sinched to prevent escape
adds a medical version of the prisoner capture module, for patient transport, prisoner capture and patient transport now use the medical/security holobags, medical one deploying them faster. when you move too far out of range the holobag dissipates
adds a defibrillator module, extends shock paddles
adds a thread ripper module, this module temporarily rips away the matter of clothing, to allow stuff like injections, surgery, defibrillation etc through it
adds a surgery processor module, essentially a portable surgery computer like borgs have
fixes a bug where you can unwield defibrillator paddles just after starting the do_after to defib onehanded
fixes a bug where the modsuit gps would have a broken name when renamed
2022-08-31 16:59:39 -07:00
scriptis
8be2c1e2d2 TGUI for techfabs (#69353) 2022-08-30 20:28:11 -07:00
itseasytosee
f21b87d4a2 Butchering requires you to be in combat mode. (#69510)
This was an oversight that occurred when intents were replaced with combat mode

	if(user.a_intent != INTENT_HARM)
		return

was never replaced by its combat mode equivalent.
This is relevant today because it makes it impossible to preform surgeries on dead monkeys (you will just butcher them)
2022-08-28 18:28:48 -07:00
MrMelbert
fa57972f5c Quickie mob_harvest component code improvement to follow guidelines (#69466)
* Quickie mob_harvest code check

* Review
2022-08-27 22:27:12 -04:00
Jacquerel
bcadead566 Chasm Fishing (#69252)
Adds the capability of fishing in chasms.
Chasms contain Chasm Chrabs, which are cute little crustaceans you can eat or put in an aquarium.
More importantly, chasms contain everything which has ever fallen into a chasm.
Falling into a chasm is no longer instant permanent round removal... as long as someone is willing to do some fishing, which means your chances of return haven't necessarily increased that much.

Potential rescuers (or people lamenting about how they dropped their necropolis chest into a hole) should also beware, chasm crabs are actually young Lobstrosities and there's a rare but not insubstantial chance that you'll fish one of them up instead, which won't make it very happy.

If you somehow come back to life inside a chasm (generally only likely by being a changeling or some admin interference, but perhaps you have some kind of implant which does it) you'll climb back out again, so holes are no longer a way of disposing of a changeling for good. You think The Thing would be defeated if you threw it down a hole?
Ethereals can't manage this because falling into a chasm causes too much damage and they simply smash on the way down.

add: You can now fish in chasms, and might manage to catch things that careless miners have dropped in there.
add: If your pole is long enough to reach into a deep hole, you might catch crabs.
balance: Changelings can climb out of chasms if you throw them into one.
imageadd: An icon of a nice little crab, who will grow up into something less nice.
add: You can craft fishing equipment from various lavaland materials, so that Ashwalkers can fish up dead miners before you.
add: You can sometimes find worms while digging up tiles, if appropriate for that material.
2022-08-25 20:13:36 -07:00
MMMiracles
acc846f0c9 adds sheep (#69318)
* adds funny sheep (need non-placeholder sprites still)

* indent this

* code suggestions

* components all the way down

* async

* sprites + reference

* think i did this right

* Update code/datums/components/mob_harvest.dm

Co-authored-by: san7890 <the@san7890.com>

* steal shiz's suggestion pt1

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>

* steal's shiz's suggestion pt2

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>

* steal's shiz's suggestion pt3

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
2022-08-25 09:02:09 -04:00
LemonInTheDark
4d6e8caa85 Fixes a spurious runtime off the drift component (#69345)
* Fixes a spurious runtime off the drift component

If a loop is made non active, then we end up allowing for double
applications of the component, which throws errors because the old
component (and it's loop) still exist by that point.

This resolves that
2022-08-24 23:25:31 -04:00
tattle
d91390a447 [IDB IGNORE] The Great Sweep: Moving dmis into subfolders (part 1) (#69416)
Moves singulo and supermatter dmis into obj/engine, renamed from obj/tesla_engine
Moves Halloween, Christmas, and misc holiday items to obj/holiday
Moves lollipops to obj/food
Moves crates, closets, and storage to obj/storage
Moves assemblies to obj/assemblies
Renames decals.dmi to signs.dmi ...because they're signs and not decals
Moves statues, cutouts, instruments, art supplies, and crayons to obj/art
Moves balloons, plushes, toys, cards, dice, the hourglass, and TCG to obj/toys
Moves guns, swords, shields to obj/weapons
2022-08-24 20:49:35 -03:00
ShizCalev
6725f94a7f Fixes drones being shy of mobs they can't see! (#69385)
fix: Drones will no longer by shy when invisible mobs are around! (eg phased revenants, bloodcrawling slaughter demons, ect)
2022-08-23 14:27:51 -07:00
ShizCalev
b477a620e5 Limb targeting fix (#69405)
* makes targeting limbs work again
2022-08-23 21:17:30 +02:00
LukasBeedellCodestuff
714a1cfd77 Ports rideable pigs from Aether (With changes to make them basic mobs) (#69248)
Adds rideable pigs from aether(With changes to make them basic mobs)
Pigs now drop pork, and you can cook it into pork chops.
2022-08-21 22:36:17 -07:00
ShizCalev
50f8a03502 Converts a bunch of things over to get_random_valid_zone() (#69331)
refactor: A bunch of things that used to not do anything (or just fall back on the chest) when targeting a limb that someone was missing will now be far more likely to attack another limb!
2022-08-21 16:27:12 -07:00
ShizCalev
85f0b27efc Fixes engraved component runtime on destroy() (#69323)
..() nulls the parent
2022-08-21 16:22:38 -07:00
san7890
9c5f767247 Adds Name to Combustible Turf Flooder Logging (#69346)
* Adds Name to Combustible Flooder Logging

Hey there,

Basically, these logging messsages operated off the name of the parent, which appeared to be a datum of some kind, which caused some null bullshit caused here:

Basically, instead of doing that, let's use the var we create earlier in this proc to actually give us a name. Great!

* actually let's add a period there

* Revert "actually let's add a period there"

This reverts commit 2a5f9e1b990e8105ae6a49ed979977153f6903e9.
2022-08-21 16:17:07 -07:00