Commit Graph

12627 Commits

Author SHA1 Message Date
Coffee
f1e339b86d Adds binds for targeting the eyes and mouth (#55299) 2020-12-10 19:17:22 -08:00
Jared-Fogle
0a77d27a1b Replace direct poi_list manipulation with element (#55416)
Replaces GLOB.poi_list |= src and GLOB.poi_list -= src with an element that handles it directly.

More consistent code, especially when a lot of code couldn't decide how to add/remove (some |=, some -=, some .Remove, etc).
2020-12-10 23:30:25 +00:00
Jared-Fogle
7d3fd4355f Everything that uses maptext now uses the class that makes it actually readable (#55420)
Adds a MAPTEXT macro that wraps the given text in the maptext class, the thing we use for Runechat to make it so you can actually read it. Everything that sets maptext now uses this.
2020-12-10 23:25:46 +00:00
LemonInTheDark
92f509ea80 Revert "Refactors how movetype flags are added and removed and the floating animation (#54963)" (#55432)
This reverts commit b8425c003a.
2020-12-09 19:30:28 -08:00
silicons
160175ee8b pass_flags handling refactor + rewrites a part of projectiles for the n-th time (#54924)
Yeah uhh this'll probably need testmerging even after it's done because yeah it's a bit big.
If y'all want me to atomize this into two PRs (pass flags vs projectiles) tell me please. Pass flags would have to go in first though, in that case, as new projectile hit handling will rely on pass_flags_self.
Pass flags:

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

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

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

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

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

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

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

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

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

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

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

Fixes penetrating projectiles like sniper penetrators

This system also allows for better handling of piercing projectiles (see above) without too much snowflake code, as you'd only need to modify on_pierce() if you needed to do special handling like dampening damage per target pierced, and otherwise you could just use the standardized system and just set pass flags to what's needed. If you really need a projectile that pierces almost everything, override check_pierce(), which is still going to be easier than what was done before (even with snowflake handling of UNSTOPPABLE flag process_hit() was extremely ugly, now we don't rely on movement types at all.)
2020-12-10 09:29:27 +13:00
Ghom
b8425c003a Refactors how movetype flags are added and removed and the floating animation (#54963)
I wanted to refactor how movetype flags are added and removed into traits to prevent multiple sources of specific movement types from conflicting one other. I ended up also having to refactor the floating animation loop (the one that bobs up and down) code in the process.
Why It's Good For The Game

A way to avoid conflict from multiple sources of movement types.
This also stops melee attacks, jitteriness and update_transform() from temporarily disabling the floating movetype bitflag altogether until the next life tick.

Tested, but i'm pretty sure improvements could be made.
Changelog

cl
fix: jitteriness, melee attack animations and resting/standing up should no longer momentarily remove the floating movement type.
/cl
2020-12-10 09:28:32 +13:00
Qustinnus
8737e8cb80 Small do-after refactor (#55172)
This is an alternative to the PR Ryll made, it does some things similar e.g. the default limit of 1 interaction per target for a person, however, it refactors do_afters to support overrides for max interaction counts and unique sources.

For example, stripping uses the item being stripped as the source, allowing you to strip multiple items, but not the same item multiple times.

I've also fixed most other edge-cases this could cause where balance would be affected, but feel free to point out any I might've missed, this'll probably require some longer-term testmerging.
2020-12-07 13:04:51 -08:00
Qustinnus
4650a5d7ee Sound Environments - Adds reverb and echo to rooms (#55333)
Jack and Style figured out that sound environments can be cancelled by setting some settings in Echo. By default audio has no reverb, but if a sound environment is selected in playsound_local it will become a reverb sound.

This makes every room sound a bit different. The only caveat is is that if you move into another room, Already playing sounds will transition into the new environment, which sounds odd.

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-12-07 11:53:58 +02:00
Fikou
aa9c58f1f8 Reworks the champion's hardsuit (#55337)
fixes hiero staff recall mesage not working
Reworks the champion's hardsuit
changes:
name: champion's hardsuit -> berserker hardsuit
armor: (MELEE = 65, BULLET = 50, LASER = 50, ENERGY = 60, BOMB = 50, BIO = 100, RAD = 100, FIRE = 80, ACID = 80) -> (MELEE = 30, BULLET = 10, LASER = 10, ENERGY = 20, BOMB = 10, BIO = 100, RAD = 10, FIRE = 100, ACID = 100)
doesnt have ert stripping time so its shorter
it cant hold the pka or cutter on itself, but it carries knives, resonators, spears and the crusher
adds berserk mechanic: with every hit you take thats not from yourself, you get berserk charge equal to the damage dealt to you divided by 4, if its a projectile attack this value is multiplied by 1.5, so a 20 damage melee hit gives you 5 charge, while a 20 damage projectile gives you 7 charge
use berserk ability with 100 charge to go berserk
you move a bit faster, you hit 2 times faster, you get a cool color and your melee armor is massively increased for the duration (about 10 seconds?), but you cannot shoot guns during the effect
2020-12-06 23:47:12 -08:00
Fikou
3a73cd32a7 snow golems now have chunky fingers trait instead of noguns trait (#55342)
was i drunk when i coded that
basically they can now shoot guns that have a trigger guard golems can use
2020-12-06 00:53:21 -08:00
Ryll Ryll
a2ed9324f6 Slimes no longer parse speaker names and sayverbs for orders (#55344)
So, on the Hear() proc, the 'message' argument is the fully composed HTML message, including the Urist McBeard says, " part of it. This means that if you or your sayverb have any of the slime order keywords when addressing them, they'll latch onto that as if it was your order. This PR makes it so they only listen to what you said.
2020-12-06 00:52:44 -08:00
IndieanaJones
e5b40d30de Fixes Issues with Herald (#55242) 2020-12-05 19:54:39 +01:00
Qustinnus
f887155b27 Kills oldfood, Puts newfood on top. (#55160)
Slays the last of old-food, making new-food the new normal.

Co-authored-by: MrMelbert <kmelbert4@gmail.com>
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-12-04 00:11:47 -08:00
zxaber
2a6c90a706 Fixes borg upgrades with action buttons being broken (#55305)
Fixes #55257
You can probably also currently install upgrades somehow stuck to your hand, and if so this would also fix that.
2020-12-03 22:54:38 +00:00
Jordan Brown
51ba68be76 Merge pull request #55268 from AutomaticFrenzy/patch/docs-from-github-wiki
Migrate some docs from the GitHub wiki into the repository
2020-12-03 11:17:06 -05:00
ArcaneDefence
b732848eb1 'cause it shouldn't happen (#55288) 2020-12-02 15:29:22 -05:00
Timberpoes
5d6e6e81ab Extends the IC chat filter to be checked in two major renaming procs (#55217)
About The Pull Request

Honestly, I'm not sure this is the... Correct solution? But people more familiar with this will likely show me da wae.

Prohibits creating names that can't actually be spoken in-character due to chat filters by adding CHAT_FILTER_CHECKs to the procs that handle sanitising them.

For admin-utilised renaming procs, they'll be given a simple alert box to warn them their chosen name contains words prohibited by the IC chat filter and be allowed to confirm or cancel out.
Why It's Good For The Game

If you can't speak the name IC, chances are the name shouldn't be allowed at all. Players may occasionally be forced to ahelp certain names because they contain words prohibited in chat filters.
2020-12-03 09:07:11 +13:00
LemonInTheDark
80e99f00f5 Fixes new players harddeling when the player logs out (#55295) 2020-12-02 14:41:55 -05:00
AnturK
af4a88cbb6 Calms down the linter. (#55312) 2020-12-02 13:50:57 -05:00
Ghom
016ce6093c You can('t) whisper into comms in crit. (#54970)
* Stops critted people from speaking into the radio.

* Whitelist implementation and removal of unreachable/unused code.

* Woops.
2020-12-02 19:00:13 +01:00
Tad Hardesty
70e468b891 Merge branch 'master' of https://github.com/tgstation/tgstation into patch/docs-from-github-wiki 2020-11-30 21:25:43 -08:00
ATH1909
6cf64a54b1 Makes the usage of force_threshold in the attackby() proc for simplemobs consistent with the way it's used everywhere else (#55023)
## About The Pull Request

Namely, this means that a simplemob's immunity to melee attacks of force X or lower now accounts for that simplemobs damage multipliers to various damage types. It also means that simplemobs with a force_threshold of X are now immune to melee attacks of force X or lower, not melee attacks with a force less than X (<= vs. <).

## Why It's Good For The Game

**tldr;
This make the code for simplemob "your stick must be this strong to deal damage" thresholds more consistent.**

Xenomorphs, xenomorph larvae, barehanded monkeys, slimes, and simplemobs in general all multiply the damage of their attacks by the relevant damage resistance multiplier BEFORE checking it against the force_threshold of the simplemob they're attacking, and also check to see if their damage is <= the force_threshold of the simplemob they're attacking (instead of requiring it to be strictly < the force_threshold of the simplemob they're attacking).

As for balance concerns, while this will affect juggernauts *slightly* (as they'll now be immune to force <= 10 melee weapons instead of just force < 10 melee weapons), I'm not too worried about that. What I _am_ worried about is blobbernauts, who, after this change, will be immune to brute melee weapons of force 20 or lower (due to their 0.5 brute damage multiplier). You will, of course, still be able to welder them just as effectively as you could before, but I'm worried that this could make blob-aligned blobbernauts even stronger than they already are.
2020-11-30 13:00:08 -05:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
Timberpoes
7fd363f990 Fixes oversight where pAIs are not able to select headset radio channels from encryption keys (#55215)
pAI integrated headsets are the only headsets that don't have `subspace_transmission = TRUE` - Ordinarily they're not able to install encryption keys, so this isn't necessary or useful to them.

However, selecting departmental channels based on the installed encryption key is a function locked behind `subspace_transmission = TRUE` and I think the fact this flag isn't set when the pAI installs its encryption keys upgrade is most likely an oversight.

This should fix all issues where pAIs get fancy encryption keys like Captain ones, but are unable to utilise any frequencies except the default ones that come pre-enabled (such as the Cap key coming with only Sec/Command enabled and having all others disabled).
2020-11-30 12:14:48 -05:00
Tad Hardesty
eb895036cf Add "Important Types" info from neersighted's "Common Variables and Functions" 2020-11-29 23:13:09 -08:00
NightRed
52c1d15fa6 Tweaks to temperature code (#55216)
This is a small tweak that makes skin temp raise up faster when cold in response to ice moon being harder.
This also makes a change to mobs in statis beds no long hold bed temp in some quantum lock but stops the natural stabilization. This means that is you put a frozen/superheated mob on the floor or a statis bed they will balance tot the room temp over time. The mob is not physically separate from the room in a statis bed and all life functions are still suspended.
2020-11-29 23:04:59 -05:00
Ryll Ryll
5e878f504c Kills the quickswap shortcut (#55209) 2020-11-28 23:58:20 -08:00
Timberpoes
8c14a99278 Feex (#55228)
Missing ! meant that if an upgrade was unequippable, it would be installable. If it wasn't unequippable, it wouldn't be installable. This is fixed.

No reason I can see for cyborg upgrades to pass through the attack chain if they fail to get installed in general. Most other things stop immediately if they fail. Removed ugly if-then-else chain as a result. I'm sure someone will correct me if I'm wrong on this, it's 2:15am and I want to sleep.

(Note from lemon: the logic was quite literally backwards, I am depressed)
2020-11-28 18:33:29 -08:00
Ghom
f77d48bc36 Fixing robot upgrades sometimes not being removed from lists. (#54842) 2020-11-28 08:01:34 -03:00
Jared-Fogle
96597d3157 Remove duplicate definitions of /obj/effect/ex_act, explicitly noop it (#55076)
/obj/effect/ex_act had several different re-definitions to make it a noop. The original definition would randomly delete it, which is bad news when a lot of /obj/effects are just that--effects, that shouldn't be blown up.

The ones that actually do want to be blown up (like decals) already have their own implementations. The one in place was never ran, and nobody had problems with it.
2020-11-28 07:55:26 -03:00
ArcaneMusic
f7bc436a51 Hauberoach's now properly give correct feedback if you're immune to their headspike. (#55079)
Hauberoaches now give a different, clearer line of dialog when stepped on by a pierce immune carbon mob.
2020-11-28 07:54:03 -03:00
Fikou
7a52265b65 taming improvements (#55086)
tame var is now set to true on the tamed proc, not right before the tamed proc in feeding proc so if an admin atom proc calls tamed the mob is tamed
vatbeast no longer overrides its faction to neutral because it already sets the action to the tamer's
2020-11-28 07:52:53 -03:00
Ryll Ryll
1b9777df1f Changes grenade proc names to be more clear (#55181)
Grenades have, for the longest time, used the proc name preprime() to refer to arming a timed grenade so that it will boom in a few seconds, and prime() to refer to the grenade actually going boom (or releasing foam or anything else grenades do when they go off). This was very confusing, so now these two procs are called arm_grenade() and detonate().
2020-11-28 07:44:28 -03:00
Fikou
22c32aa428 recolored skeleton sprites (#55185)
skeletons no longer have eye sprites
i recolored skeleton sprites a bit
2020-11-28 07:43:15 -03:00
Jared-Fogle
bee63ff37a Fixes incapacitating sleep test failure, general test touch ups. (#55196)
Fixes the random incapacitating sleep test failure
Tests now provide the option to use a custom turf, by default uses plasteel tiles instead of space
Tests now reserve turf instead of just using a corner in CentCom (which had unaccounted for tiles)
2020-11-28 07:36:02 -03:00
tattlemothe
faf14d545a Updated strip menus (#55094)
Partiallyfixes #34369

Modified xenomorph, monkey, dog, and parrot strip menu UI to be like humanoids'. Also fixed an issue with parrot strip menu where it wouldn't refresh once you removed its headset, and fixed an inconsistency where human handcuff/legcuff removal buttons were different.
2020-11-28 11:41:31 +13:00
Ryll Ryll
d4f2a1dbb2 Fixes male underwear/shirts poking through clothes (#55139)
While investigating a strange intermittent issue with skirts and such randomly losing a pixel in the crotch they weren't supposed to, I found another underwear/undershirt issue. Female characters and plural characters with a female bodytype wearing mens underwear and a fitted outfit would have an errant pixel from the undershirt/underwear show through the crotch/armpits where the outfit lost pixels due to fitting. Underwear and undershirts now undergo the same pixel fitting as other clothes to ensure this doesn't happen.
2020-11-26 21:11:43 -05:00
LemonInTheDark
aef7adfc3b Removes a source of ian harddels, keeps mcgruffs bed discription from getting overwritten at roundstart, moves the bed claiming feature to just the dogbed typepath, none of the subtypes, this applies to buckling too (#55158)
Removes a source of ian harddels, keeps mcgruff's bed description from getting overwritten at roundstart, moves the bed claiming feature to just the dogbed typepath, blacklisting subtypes. This applies to buckling too.

This means that a dogbed can only ever belong to one dog. Fuck you.
Remake of #54892, github doesn't like force pushes, not sure why
2020-11-26 21:10:01 -05:00
MrMelbert
3eaa11cba1 Fixes picked up bees, again (#55053)
Bees don't actually have a set icon state, their entire existence is their mutable appearance. This creates problems when something checks for the bee's icon state, like mob_holders. So, this PR sets their icon_state to the corresponding base bee icon on initialization. Visually identical to before, because the overlays / mutable appearance covers it, but their icon_state is no longer null.
2020-11-26 14:53:52 +00:00
TemporalOroboros
9f694d82ea Fixes cyborgs in general replenishing stack modules from external sources (#54935)
* Cyborg stack fix

- Makes cyborgs capable of recycling floor tiles again

* Touches up module code

- Makes module code slightly more OOP-compliant
- Speeds up module creation by an imperceptable amount
- Reworks how borg modules handle stacks
2020-11-26 00:45:52 -08:00
Timberpoes
e7ff79bcbe Feex (#55144)
For whatever reason we hardcoded the health value for drills at 200 brute damage before they can gib. 200 brute damage was picked as it was double the max health of /mob/living/carbon/whatever and double the max health was like, the cap on brute damage when someone is really, really, really, really dead.

Enter simplemobs. Their max health is regularly under 100, which means a hardcoded value of 200 brute damage to trigger gibbing effects is bad. Not that it matters anyway, because simplemobs also brute damage cap at maxHealth instead of maxHealth * 2 so the only simplemobs that could be gibbed by mech drills are those with 200 or more health.

This has been changed. Simplemobs now cap out at maxHealth * 2 damage, in line with all other /mob/living while drill code has been changed to check for maxHealth * 2 when gibbing instead of a hardcoded 200.
2020-11-25 13:44:01 -08:00
Ghom
4c31b0e116 CanUseTopic() refactor. (#54747)
* CanUseTopic() refactor.

* Forgot about default_can_use_topic. Tested and working.

* Update bin.dm

* no-nonsense.
2020-11-25 13:12:12 +01:00
NightRed
fb51b24d21 Humans have more complicated body temperatures (#54550)
This changes how carbon/humans stabilize body temperature, and changes how damage and wounds are applied based on temperature.

Humans now have a core body temperature along with body temperature. The core temperature is used for natural stabilization and what viruses like fever and shivers target by raising or lowing the core temperature of the mob.
The standard body temperature still exists and acts exactly the same for most items at this time but is now treated as surface temperature in humans.

Damage from body temperature for humans is now based on the core temperature instead of body temperature now.
Humans will now receive burn wounds when the body (surface) temperature is to high for to long.

This causes you to see alerts for the area temperature before you take damage in most cases improving visibility of dangerous situations.
2020-11-24 22:37:36 -08:00
ArcaneMusic
bf39caca6a Refactors Pastries into newfood. (#54996)
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
Co-authored-by: Floyd <Floydje123@hotmail.com>
2020-11-24 16:18:10 -08:00
Jared-Fogle
cf9ae02e39 Fixes #55112 - Swapping items no longer eats things (#55122)
Quick swapping items no longer hides them in the mobs contents
2020-11-24 14:54:01 -08:00
Yenwodyah
d214170810 make sure slowdown effects get removed when items are unequipped (#54947) 2020-11-24 18:21:01 +08:00
Ghom
a786c73988 Fixing the point emote being both usable and unusable (#55063) 2020-11-24 18:11:07 +08:00
prodirus
cb6f29808d one character fix (#55067) 2020-11-24 18:01:54 +08:00
Qustinnus
41157f5d6b Moves grown food to newfood (#55040)
Moves grown food to newfood
Gives trash element support for callbacks for item creation override
2020-11-23 14:00:23 -08:00
Jared-Fogle
22b05cc3d1 Reload verbs when the client goes into a new mob (#55106)
Try this experiment at home:

    1.Ctrl shift click your ghost
    2.Notice that you still have the Ghost tabs, and you don't see OOC > Ghost, uh oh.

This happens for more than ctrl-shift-clicking, it happens a lot with event mobs.

This reloads verbs on /mob/Login, aka when the client goes into a new mob (or when they reconnect).
2020-11-23 13:47:53 -08:00