Commit Graph

252 Commits

Author SHA1 Message Date
SkyratBot
5d20d87d10 [MIRROR] Fixes projectile runtime (#6553)
* Fixes projectile runtime

* Update projectile.dm

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-27 16:43:06 +01:00
SkyratBot
a14b1dadb5 [MIRROR] CanPass refactor (#6527)
* CanPass refactor (#59804)

* CanPass refactor

Co-authored-by: Rohesie <rohesie@gmail.com>
2021-06-25 22:33:51 +01:00
SkyratBot
5326760cb3 [MIRROR] Makes turfs persist their signals, uses this to optimize connect_loc (#6465)
* Makes turfs persist their signals, uses this to optimize connect_loc  (#59608)

* Makes turfs persist signals

* Splits connect_loc up into two elements, one for stuff that wishes to connect on behalf of something, and one for stuff that just wants to connect normally. Connecting on behalf of someone has a significant amount of overhead, so let's do this to keep things clear

* Converts all uses of connect_loc over to the new patterns

* Adds some comments, actually makes turfs persist signals

* There's no need to detach connect loc anymore, since all it does is unregister signals. Unregisters a signal from formorly decal'd turfs, and makes the changeturf signal persistance stuff actually work

* bro fuck documentation

* Changes from a var to a proc, prevents admemems and idiots

* Extra detail on why we do the copy post qdel

* Makes turfs persist their signals, uses this to optimize connect_loc

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-06-23 04:23:48 +01:00
SkyratBot
7d1d0e1fad [MIRROR] Refactors most spans into span procs (#6315)
* Refactors most spans into span procs

* AA

* a

* AAAAAAAAAAAAAAAAAAAAAA

* Update species.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-16 00:24:49 +01:00
Matthew J
9fe21539c9 quick patch (#6332) 2021-06-15 20:31:00 +01:00
SkyratBot
f8042b6306 [MIRROR] Adds Neon Carpet (#6302)
* Adds Neon Carpet (#59140)

Adds a couple varieties of neon carpet.
Makes decals care about their plane in addition to their layer.

* 0

* A

* a

Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-15 18:12:49 +01:00
SkyratBot
6f3b151bb8 [MIRROR] Fixes a bunch of harddels that are sourced from player action (#6252)
* Fixes a bunch of harddels that are sourced from player action

* Mirror!

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
2021-06-11 03:13:33 +01:00
SkyratBot
5880be0168 [MIRROR] (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc (#5524)
* (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc

* WHEW THAT WAS EASY

* Update ammo.dm

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-05-07 22:39:27 +01:00
SkyratBot
129f09b657 [MIRROR] Hollowpoints and similar attacks/weapons double existing armor, not add total armor, to the their targets (#4984)
* Hollowpoints and similar attacks/weapons double existing armor, not add total armor, to the their targets (#58114)

* Hollowpoints and similar attacks/weapons double existing armor, not add total armor, to the their targets

* a

* Update tools.dmi

* Update tools.dmi

Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-04-17 17:18:04 +01:00
SkyratBot
1a7cb09623 [MIRROR] Fixes runtimes from firing projectiles, adds unit test for firing guns (#3828)
* Fixes runtimes from firing projectiles, adds unit test for firing guns (#57345)

* Fixes runtimes from firing projectiles, adds unit test for firing guns

Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
2021-03-04 01:02:50 +00:00
SkyratBot
7b226dd6e1 [MIRROR] RangedAttack now takes modifiers. (#3706)
* RangedAttack now takes modifiers. (#57214)

* RangedAttack now takes modifiers.

Co-authored-by: Gurkenglas <gurkenglas@hotmail.de>
2021-02-28 12:25:00 +00:00
SkyratBot
b8c2f72733 [MIRROR] moves gun related icons to guns folder (#3568)
* moves gun related icons to guns folder (#57077)

moves ammo icons, projectile icons and hitscan effect icons to guns folder
renames projectile.dmi to ballistic.dmi so its less confusing
moves rcd ammo from ammo.dmi to tools.dmi with the rcd

* moves gun related icons to guns folder

Co-authored-by: Fikou <piotrbryla@onet.pl>
2021-02-22 02:07:33 +00:00
SkyratBot
d757510356 [MIRROR] Fixes reflection of hitscan beams against tiles (#3493)
* Fixes reflection of hitscan beams against tiles (#56881)

Co-authored-by: Ranged <nickvanderkroon@ gmail.com>

* Fixes reflection of hitscan beams against tiles

Co-authored-by: NotRanged <rangedvdk@gmail.com>
Co-authored-by: Ranged <nickvanderkroon@ gmail.com>
2021-02-18 21:04:19 +00:00
SkyratBot
b332b46b65 [MIRROR] Remove hideous inline tab indentation, and bans it in contributing guidelines (#3394)
* Remove hideous inline tab indentation, and bans it in contributing guidelines

* a

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-15 15:32:02 +00:00
SkyratBot
495b35a679 [MIRROR] Converts all uses of modifiers to lazy access to avoid memes in future (#3331)
* Converts all uses of modifiers to lazy access to avoid memes in future

* Update work_tools.dm

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: KathrinBailey <53862927+KathrinBailey@users.noreply.github.com>
2021-02-13 11:06:39 +00:00
SkyratBot
8007eb1578 [MIRROR] Refactors sharpness to use a bitfield (#3301)
* Refactors sharpness to use a bitfield (#56817)

Refactors sharpness to use bitfield instead of bitflags in case someone wants to add more types of sharp things, or unique behaviour with them

* Refactors sharpness to use a bitfield

* Update bullets.dm

Co-authored-by: Sparkezel <53384660+Sparkezel@users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-11 23:57:06 +00:00
SkyratBot
b511bc53e6 [MIRROR] Makes emitters hitscan (#3047)
* Makes emitters hitscan (#56579)

* Makes emitters hitscan

* a

Co-authored-by: NotRanged <rangedvdk@gmail.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-03 22:37:40 +00:00
SkyratBot
39685c1057 [MIRROR] ACTUALLY fixes shooting yourself with a gun (#2299)
* ACTUALLY fixes shooting yourself with a gun (#55687)

* ACTUALLY fixes shooting yourself with a gun

Co-authored-by: silicons <2003111+silicons@users.noreply.github.com>
2020-12-24 12:30:47 +01:00
SkyratBot
1459ec2edc [MIRROR] fixes the clusterfuck of projectile issues (#2199)
* fixes the clusterfuck of projectile issues (#55495)

* fixes the clusterfuck of projectile issues

Co-authored-by: silicons <2003111+silicons@users.noreply.github.com>
2020-12-17 08:05:01 +01:00
SkyratBot
afce3e2a94 [MIRROR] pass_flags handling refactor + rewrites a part of projectiles for the n-th time (#2097)
* 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.)

* pass_flags handling refactor + rewrites a part of projectiles for the n-th time

Co-authored-by: silicons <2003111+silicons@users.noreply.github.com>
2020-12-09 23:44:54 +01:00
SkyratBot
e52038974a [MIRROR] Foam darts and other unembeddable bullets will no longer leave ghost shrapnel (#1796)
* Foam darts and other unembeddable bullets will no longer leave ghost shrapnel (#54994)

Projectiles are assigned the ability to try embedding by the presence of a shrapnel_type variable being set on them, whether or not they actually have a set of embedding stats in their embedding var. By default, children of /obj/projectile/bullet have a shrapnel type set to a generic embedded bullet item, including things like foam darts and lollypop projectiles which shouldn't be able to embed (and certainly not embed as a bullet). While they had their embedding vars set to null, they still had their shrapnel_type set to the embedded bullet type, meaning shooting a person with a dart gun or whatever would leave a failed shrapnel item on the ground where they weren't supposed to.

This fixes that by requiring both a defined shrapnel_type AND a defined embedding var for the embedding stats. Any projectiles without both won't be able to try embedding. I also manually put 'shrapnel_type = null' on any bullet subtypes with embedding = null just to be safe and for consistency.

* Foam darts and other unembeddable bullets will no longer leave ghost shrapnel

Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
2020-11-24 08:34:46 +00:00
SkyratBot
b8d9874c27 [MIRROR] Converts all A && A.B into A?.B (#1292)
* Converts A && A.B into A?.B (#54342)

Implements the ?. operator, replacing code like A && A.B with A?.B

BYOND Ref:
When reading A?.B, it's equivalent to A && A.B except that A is only evaluated once, even if it's a complex expression like a proc call.

* Converts all A && A.B into A?.B

Co-authored-by: ZeWaka <zewakagamer@gmail.com>
2020-10-13 23:19:25 +02:00
SkyratBot
970a2b03d6 [MIRROR] Mobility refactor: no more update_mobility() (#1233)
* Mobility refactor: no more update_mobility()

* Update robot.dm

Fixes robots.

* megadumb

* Update robot.dm

* weh

* Update gunpoint_datum.dm

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-10-10 02:31:35 +02:00
SkyratBot
b5b151adcd [MIRROR] Fixes projectile impacts + messages, embedding, adds deployable landmines (#930)
* Fixes projectile impacts + messages, embedding, adds deployable landmines (#53436)

* icon and alert anim

* hmm

* projectile and embed fixes

* cap mine

* clean up, fix some issues with projectile embeds

* light

* doc

* icon

* awkward

* icon again

* Fixes projectile impacts + messages, embedding, adds deployable landmines

Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
2020-09-23 14:45:02 +02:00
SkyratBot
d355e433d7 [MIRROR] Execution/gunpoint shots work properly with pellet clouds, buffs piercing wounds a bit (#541)
* Execution/gunpoint shots work properly with pellet clouds, buffs piercing wounds a bit (#52995)

Made a few changes to gunpoints and some related mechanics while tidying up and adding docs. Here's a quick list

-Execution (point blank help intent shot aimed at the mouth) and gunpoint shots now apply their bonuses to every pellet fired rather than only the first, generally making them gushier. They also buff wound power as well as damage
-You can no longer punch yourself while holding someone up to trigger the charged shot
-You can no longer purposely fail executions and gunpoints with pax or whatever to endlessly spike the damage in a loaded round
-Attacks with extremely high wounding power can now outright dismember limbs regardless of mangled status. The threshold is high enough that it mostly applies for admin edited weapons or execution shots with shotguns (or people with the frail quirk!)
-Piercing wounds make further wounds a bit easier to apply to give them a bit more power
-Hellguns now cost 2250 credits instead of 2000 to make them a bit harder for random crew to get
-Adds special bouncy L6 rounds for admins to use to bounce off anything and everything en-masse

Also as a minor note

Projectiles with no trajectory (meaning they were likely spawned in manually) now qdel themselves on bumping something, rather than runtiming helplessly

* Execution/gunpoint shots work properly with pellet clouds, buffs piercing wounds a bit

Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
2020-08-27 03:14:47 +02:00
SkyratBot
3bd294f26f [MIRROR] Defines damage flags. (Hopefully without 50+ commits) (#491)
* Defines damage flags. (#53158)

* Defines damage flags. (Hopefully without 50+ commits)

Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
2020-08-24 22:52:31 +02:00
SkyratBot
f088ef3ce4 [MIRROR] Fixes an embed runtime (#373)
* embed runtime (#52912)

* Fixes an embed runtime

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-08-17 23:32:27 +02:00
Ryll Ryll
a97c51b30b [READY] Wounds part 2: Piercing wounds, dismemberment changes, housekeeping (#51786)
* pierce the heavens

* starts doing projs

* continue pierce

* before armor

* before sharpness redefine

* rename sharp defines, before further implementation

* finishing undoing atk_type back to sharpness

* neatens up sharpness defines, FALSE -> SHARP_NONE

* more piercing, removes brute damage bleed, bubblegum no longer wound

* starts letting embeds get in on the fun

* half with embed

* work on dismembering

* continued embed work

* more moving bandaging to limbs

* more dismemberment work

* removing embed pierce stuff

* tweaking bullets

* more docs and work on dismemberment

* spans, piercing, guns

* dismemberment and scar fixes

* bee changes

* bullets embedding

* more bullet and dismember work

* dismemberment, surgery, piercing, formaldehyde,

* pleases travis

* pierce smite

* nicer on blood

* Auto stash before rebase of "tgstation/master"

* more neatening

* wounds only consider up to 35 damage, wounds on l6 and 762

* updates hulk

* balance

* defines

* lower slug to 50 brute to accommodate wounds

* adds differentiation for having flesh/bones/both in mobs

* moves scar descs to json, renames organic_state

* excises removed healing skill

* fixes logs, inconsistencies, some balance changes

* untab

* slight compress

* a

* kills pointed global list

* dmdoc

* halfway through roh

* finishes roh review

* okay NOW i finished roh's reviews

* roh roh roh your boat

* gently down the stream

* global lists

* list ops, fix scanner for bone gel improvised fix

* travis moment

* sounds added and moved

* pellet clouds can join the fun fully, slight gun balancing for wounds

* doc moment

* unconflicts myself

* update hulk

* Update code/_onclick/item_attack.dm

Co-authored-by: Rohesie <rohesie@gmail.com>

* crying ascii face

* final rohview

* oops

* final final

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-07-23 22:20:09 -04:00
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
Ryll Ryll
0f6496a55c [READY] Adds Medical Wounds: Bamboo Bones and the Skin of Your Teeth (#50558)
About The Pull Request

This PR adds medical wounds, new forms of injuries that people can suffer that cause debilitation and complications, and often require more than what can be found in a medkit to treat. But let's be honest, big complicated walls of text about medical changes make people's eyes glaze over easily- so I created a handy infograph to explain the basics!

Also there's a full guide here!

dreamseeker_2020-04-18_20-42-19.png

The infograph may not be fully up to date with the specifics of the PR's status, but it'll be updated along with major changes so people have something to use as a crash course for familiarizing themselves with how wounds function. I also have another infograph with all 9 of the possible initial wounds coming, and will be up soon. You can also find the longform design doc here with more info on the broad details, including descriptions of treatments: hackmd whee
What this does

There's a lot to cover, but here's the bullet points of the main features and changes:

    Getting lots of damage on a limb can result in wounds, with more damage causing worse wounds. These can range from dislocated joints and minor cuts to compound fractures and fourth degree burns, and can affect you in different ways depending on what bodypart they're applied to (namely with broken bones).
    You can damage individual bodyparts on clothing (only jumpsuits for now) through the use of lasers and sharp weapons. Bodyparts that reach max damage are considered "shredded" and will not apply any protection for that zone until it is repaired with cloth. If all zones are disabled, the entire piece of clothing is shredded and unwearable until repaired with 3 cloth. Jumpsuits give a small amount of wound protection, and since sharp weapons and lasers generally get extra wound bonuses against bare flesh, even a plain jumpsuit provides decent protection from a few laser shots or scalpel stabs.
    Lasers gain a powerful niche versus unarmored/lightly armored carbons! As noted above, lasers can shred clothing and burn away zones of jumpsuits in 2 shots each, after which the target's bare flesh is exposed (barring other clothing), and lasers excel at dealing burn wounds against uncovered skin. Think big, nasty charring!
    Bleeding is now totally limb based, and gauze is as well. Bleeding is also 95% cut wound based, meaning sharp weapons make you bleed rather than just having 40+ brute on a limb.
    The more wounds and damage you get on a bodypart, the easier it'll be to gain more severe wounds. Wounds are arranged from Moderate, to Severe, to Critical in increasing severity, and you'll generally have to suffer the lesser ones before getting the worse ones.

dreamseeker_2020-05-15_03-15-59.png
Above: Someone having an incredibly bad day from bloodloss

dreamseeker_2020-05-04_22-29-29.png
Above: Scars from healed wounds

ShareX_2020-05-15_06-55-20.png
Above: Actual combat involving someone's head getting cracked

Here's a quick, if non-exhaustive, list of things I have left to do before I consider it feature complete

Finish adding treatments for each wound type/severity (mostly surgeries/triage for critical wounds)
Add second winds for bad injuries to give the victim a chance to get away
Flesh out severe & critical injuries in general
Find sprites for the bonesetter, bone gel, and anything else that might be needed
Add the medical items for treating the less severe wounds to the station
Polish code and remove any redundancies I left behind

    Quick balance pass to make sure nothing is horribly abuseable

Why It's Good For The Game

Adds a flexible new system for representing damage on carbons with injuries that can be treated in different ways. Moderate wounds from getting toolboxed or sliced with a scalpel can usually be treated by a buddy or even by yourself with the right tools, but getting flayed with a fireaxe or a laser gun emptied into your bare skin may require extra attention or even surgery in bad cases! Also makes laser guns cooler and more like 40k lasguns that can flash fry people (cool!)

This should also make spessmen more resilient and harder to kill outright, while still adding consequences and complications to getting hurt. Wounds aren't immediately fatal, but they can do things like slow down interactions, deal damage over time through infections, and generally make you more fragile until fixed. They can also give you a "second wind" on being applied that gives you a small adrenaline boost (or whatever) to help disengage and escape immediate danger.
Changelog

🆑 Ryll/Shaps
add: Introduces medical wounds, new injuries that can happen to fleshy carbons when they sustain lots of damage on a bodypart. There's quite a lot of change here, but you can read the guide at: https://tgstation13.org/wiki/Guide_to_wounds and an extended changelog is available here: https://hackmd.io/l_FI9b3tSqa_woDadewJXA
add: Introduces scars and temporal scarring! Healing a wound leaves a scar behind that can be seen by examining someone twice rapidly, and if Temporal Scarring is enabled in character prefs, surviving a round with scars will save them to be granted at roundstart another round! Let your body tell stories!
tweak: Bleeding is now fully bodypart-focused, and 95% of bleeding comes from cut wounds from sharp weapons. Gauze is applied on a limb-by-limb basis, and helps staunch bloodflow rather than totally stop it. Notably, you no longer bleed just from having 40+ brute damage on a limb.
del: Organic bodyparts are no longer disabled at maximum damage, but are easier to cause wounds to
add: O2 medkits in emergency lockers have been replaced with new emergency medkits with basic tools for diagnosing and treating wounds and basic damage
tweak: Herapin now rapidly increases bleeding on all open cuts, rather than causing bleeding by itself. The more cuts on the target, the more it will affect them.
tweak: Neckgrab table slams now hit the targeted limb rather than just the head, with a large chance to dislocate or break a bone
tweak: Sharp weapons and burning weapons can now shred zones on jumpsuits, disabling protection on that limb. Damaged clothes can be repaired with cloth.
tweak: Slaughter demons now deal less raw damage, but gain the ability to cause cut wounds, which becomes more powerful with each attack on a humanoid but resets when bloodcrawling.
/🆑
2020-06-12 23:47:33 +12:00
Ryll Ryll
a4b69dbbbb Projectiles embed their shrapnel in the locations they hit (#50990) 2020-05-08 19:03:25 -07:00
Akrilla
37f9ba480e Fixes resting and small projectile change (#50348)
About The Pull Request

Fixes resting so you're now not dense - can fit inside containters etc. Projectiles also once again hit resting players, but will pass through corpses. If you're not able to move, use items, or stand, or you're just dead, bullets go over you.
Why It's Good For The Game

Fixes #50332
Fixes #50322
Fixes #50236
Fixes #50076
Fixes #50370
Changelog

cl
fix: Fixes resting and projectiles.
/cl
2020-04-06 10:20:41 +12:00
Ryll Ryll
5c174800fb Grenades and projectiles can have shrapnel and embed, all carbons can suffer embeds, some bullets can ricochet, sizable refactor of embedding (#49634)
About The Pull Request

It annoyed me that we have a perfectly good frag grenade item, and a perfectly good shrapnel component, but no crossover episode between the two. This remedies that, and does a lot, lot more.

dreamseeker_2020-03-30_05-01-13.png

dreamseeker_2020-03-30_05-01-26.png

Big points:

    Adds new component: pellet_cloud, which can be used by ammo casings, guns, and landmines to spray shrapnel and display aggregate hit messages ("You're hit by 6 buckshot pellets!" vs "You're hit by the buckshot pellet in the X" x6). All gun ammo that shoot multiple pellets now use this component on firing.
    Adds stingbangs, premium less-lethal grenades that shoot off lots of stinger pellets, to cargo. Frag grenades are also reworked to have smaller booms, but shoot off lots of shrapnel shards. You can jump on top of these grenades to absorb a portion of the shrapnel to save those around you! There's an achievement for dying this way, called "Look Out, Sir!"
    Projectiles can now embed items/shrapnel. Adds .38 DumDum ammo to cargo that does less damage and has negative armor pen, but can embed in people. This is the only ammo that currently embeds.
    Bullets can now ricochet off walls, structures, and machinery (harder surfaces are more likely to ricochet). Only standard .38 and Match Grade .38/.357/L6 ammo can ricochet, with Match Grade being much better at ricocheting. You can buy Match Grade .38 from cargo and Match Grade L6 ammo from the nuke uplink, while Match .357 is admin only.
    Armor now protects you from harmful embeds, taking the better of the bullet/bomb armor on the affected limb. Armor penetration can modify this of course, and many blunt embeds like stingbangs and DumDum bullets are significantly worse if you have even 1 armor.

Other misc fixes/changes

    Refactored the embed element a bunch and fixed it creating new elements for every instance rather than expected bespoke behavior. There are new /obj/item helpers for modifying and adding embedding.
    Fixes #49989: Spears can no longer embed in turfs cause their sprite is annoying to me, it's generally harder for most things to embed in turfs
    Fixes #49741: New carbon helpers for removing embedded objects
    Fixes #46416: Handles embedded objects getting qdel'd or moved while embedded
    Renamed the old shrapnel component for RPG loot to MIRV to avoid confusion
    Repathed frag grenades from under minibombs to under base grenades, and added explosion vars to base grenades

Why It's Good For The Game

Fixes a bunch of janky design with embeds, adds lots of new avenues for projectile and grenade variety, ricochets and collateral damage are fun!
Changelog

🆑 Ryll/Shaps
add: Adds stingbangs to cargo (and one in the sec vendor premium), premium less-lethal grenades that shoot off a giant swarm of stingball pellets to help incapacitate swarms of people in tight quarters. You can jump on top of a live one to be a hero and absorb a bunch of shrapnel, same with frag grenades. There's even an achievement for dying to a grenade you jumped on!
add: Projectiles can now embed in people! Or at least grenade shrapnel and the new .38 DumDum ammo, now available in cargo, can. DumDum rounds excel against unarmored targets, but are pricey and do poorly against armored targets.
add: Bullets can now ricochet! Or at least, standard .38 and the new .38/L6 Match Grade ammo can. Match Grade ammo is finely tuned to ricochet easier and seek targets off bounces better, and can be purchased from cargo (for the .38) or nuke ops uplink (for the L6), but standard .38 ammo has a chance to ricochet as well.
tweak: Frag grenades now have smaller explosions but shoot off a bunch of devastating shrapnel, excellent for soft targets!
tweak: Shotguns and other multi-pellet guns now print aggregate messages, so you'll get one "You've been hit by 6 buckshot pellets!" rather than 6 "You've been hit by the buckshot pellet in the X!" messages. Bye bye lag!
balance: Armor can now protect against embedding weapons, taking the best of either the bullet or bomb armor for the limb in question away from the embed chance. Some weapons are better at piercing armor than others!
/🆑
2020-04-03 16:58:38 +13:00
spookydonut
cea5360e4b Updates codedocs with links (#49497)
About The Pull Request

Updating the best written documentation with the new linking feature.
2020-02-25 08:17:45 +13:00
ShizCalev
7209ac3c93 Removes unnessacary math defines 2020-02-17 23:09:09 -05:00
Emmett Gaines
2cf7728494 Removes the bitflag helpers (#49106) 2020-02-03 16:26:00 -05:00
vuonojenmustaturska
40657c9ccd removes a bunch of unused/bad helpers (#48969)
* a commit

* Update code/controllers/subsystem/persistence.dm

Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com>

* Update code/__HELPERS/text.dm

Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com>

* Update advance.dm

* Update security_officer.dm

* Update text.dm

* Update unsorted.dm

Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
2020-01-28 16:22:20 +01:00
KomradeSpectre
db878e848b Adds a new element, Self-Knockback. (#47938)
* Adds a new element, Self-Knockback.

* Squashes a potential edgecase runtime in projectile_selfknockback before it can even happen.

* Allows item_selfknockback to interact with dense turfs now.

* Made self-knockback utilize the Element Bespoke flag to allow custom force and speed values on attachment.

* fixes newline issue, adds a usage comment.

* fixes the newline issue in self-knockback for real this time, thanks TortoiseGit.

* i swear on god almighty if this doesn't fix the newline issue, i'll eat a shoe.

* Testing newline lint
2019-11-25 21:34:14 +00:00
nemvar
a148cae769 Kills obj/item/projectile in favour of obj/projectile (#46692)
* Kills obj/item/projectile in favour of obj/projectile

* Resolves conflicts properly

* fixes that one map

* it lives
2019-10-06 13:37:24 -04:00
nemvar
1ead3e8ae7 Fixes morph movement and replaces magic numbers. (#46358)
* fixes morph speed shizz

* fixes morph movement
2019-09-06 16:23:28 -07:00
Rob Bailey
2029163d33 playsound vary boolean define conversion (#46254)
About The Pull Request

Converts every single usage of playsound's vary parameter to use the boolean define instead of 1 or 0. I'm tired of people copypasting the incorrect usage.
Also changes a couple of places where a list was picked from instead of using get_sfx internal calls

This was done via regex:
(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\)) to match 1
(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\)) to match 0
full sed commands:
/(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\))/\1TRUE\2/ 1 to TRUE
/(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\))/\1FALSE\2/ 0 to FALSE

I'm not very good with regex and these could probably be optimized, but they worked.
Why It's Good For The Game

Code usability
2019-08-30 18:45:20 +12:00
kingofkosmos
c3ea51908d Adds "you" to local visible_messages (#45631)
* adds "you" to some combat visible_messages.

* more you-messages and attack verbs to present tense.

* small fixes

* more additions and small fixes

* few message tweaks

* Fixes a typo and few other wordings.
2019-08-06 02:15:34 -07:00
py01
353ef81789 Magic projectile fixes (#45484)
* magic projectile changes

* fixes var path

* undoes magic changes

* magic proj changes

* am checkchaange

* removes bad refactor

* proper am check on mag missile

* locker staff fix
2019-07-27 19:58:58 -07:00
zxaber
aaaee29a63 [READY] Re-works the Durand ability (#45144)
* Woo shields

* reshuffle, adding a sound

* Re-organizing

* better defines for the signals I had

* new stuff

* fixes

* Replaced all instances of "defence" with defense"

and other small changes.

* oof

* spelling, and a forgotten check

* you, upgraded, improved, yes
2019-07-27 02:06:33 -07:00
Whoneedspacee
03f7432511 New RPGLoot Affixes + Component Additions (#44188)
* knockback component can now be reversed, has projectile and gun handling, and hostile simplemob handling

adds signals for hostile mobs attacking, altering projectiles before firing, and for when projectiles successfully hit their target

moves knockback handling to a general proc

adds ishelpers for guns and projectiles

* no more weird projectile handling it can just not apply the effect if the component somehow goes away

lifesteal actually works now instead of being a blank file, applies a flat healing effect when you hit something

* fixes up comsig stuff

adds new components to the fantasy prefix and suffix

knockback now handles throwing anchored objects

lifesteal now properly heals the target with projectiel weapons

adds summoning component to handle mob summoning with item attacking and such

adds fired_from variable to handle what a projectile was fired_from, firer would be the mob that fired and fired_from would be the gun, in the case of an autoturret, fired_from and firer would be the same

adds shrapnel component, fires projectiles around a fired projectile when it hits

adds igniter component to set attacked mobs on fire

* no more shrapnel on items that can't use it

summoning items now summon at least one mob maximum

adds specific weighted projectile types for shrapnel to prevent broken options being picked

removes the reverse var from knockback component and instead just handles negative thrown turf
2019-06-03 11:00:12 +12:00
vuonojenmustaturska
6a106bc877 Remove reagent ids and use typepaths where applicable (#44166)
cl Naksu
code: reagent IDs have been removed in favor using reagent typepaths where applicable
fix: mechas, borg hyposprays etc no longer display internal reagent ids to the player
/cl
2019-05-31 21:57:26 +12:00
zxaber
3fdd7746ef Deflection tweaks with the MK-I Ripley in mind (#43304)
* (deriuqer) yrammuS

* Also this

* Guess I'll do it this way, then

* You can hit the arms now, too

* Update code/game/mecha/mecha.dm

requested by ShizCalev, committed by Zxaber

Co-Authored-By: zxaber <37497534+zxaber@users.noreply.github.com>

* Update mecha.dm

* commited a comment
2019-04-02 20:59:57 +02:00
ShizCalev
a26ffb2040 Fixes wormhole projectors for pacifists (#43096)
* Fixes wormhole projectors and gravity manipulators for pacifists

* code cleanup

* didn't mean to push that!

* removes gravgun

* Update code/modules/projectiles/ammunition/energy/portal.dm

Co-Authored-By: ShizCalev <ShizCalev@users.noreply.github.com>
2019-03-14 15:28:03 -04:00
Menshin
8d11af1748 * Fix a runtime on mecha syringe gun hitting that prevented reagent transfer (#42642)
* Reverted some hastily (and wrongly) made changes to prehit() procs
2019-02-04 22:06:15 +13:00
kevinz000
5d4143f923 Emergency projectile fix #42544
Okay, oranges was right and I'm stupid.
Stops the server from crashing from a beam rifle, jesus.
2019-01-28 20:22:32 +13:00