Commit Graph

3921 Commits

Author SHA1 Message Date
Qustinnus
707fc287b4 Replaces intents with combat mode (#56601)
About The Pull Request

This PR removes intents and replaces them with a combat mode. An explanation of what this means can be found below
Major changes:

    Disarm and Grab intents have been removed.
    Harm/Help is now combat mode, toggled by F or 4 by default
    The context/verb/popup menu now only works when you do shift+right-click
    Right click is now disarm, both in and out of combat mode.
    Grabbing is now on ctrl-click.
    If you're in combat mode, and are currently grabbing/pulling someone, and ctrl-click somewhere else, it will not release the grab (To prevent misclicks)

Minor interaction changes:

Right click to dissasemble tables, racks, filing cabinets (When holding the right tool to do so)
Left click to stunbaton, right click to harmbaton
Right click to tip cows
Right click to malpractice surgery
Right click to hold people at gunpoint (if youre holding a gun)
Why It's Good For The Game

Intents heavily cripple both the code and the UI design of interactions. While I understand that a lot of people will dislike this PR as they are used to intents, they are one of our weakest links in terms of explaining to players how to do specific things, and require a lot more keypresses to do compared to this.

As an example, martial arts can now be done without having to juggle 1 2 3 and 4 to switch intents quickly.

As some of you who saw the first combat mode PR, the context menu used to be disabled in combat mode. In this version it is instead on shift-right click ensuring that you can always use it in the same way.

In this version, combat mode also no longer prevents you from attacking with items when you would so before, as this was something that was commonly complained about.

The full intention of this shift in control scheme is that right click will become "secondary interaction" for items, which prevents some of the awkward juggling we have now with item modes etcetera.
Changelog

cl Qustinnus
add: Intents have been replaced with a combat mode. For more info find the PR here: #56601
/cl
2021-02-04 16:37:32 +13:00
Kylerace
4802c43165 Fixes Several Holodeck Infinite Materials Exploits (#56587) 2021-02-03 15:43:54 -08:00
necromanceranne
98642bfe97 Changes fireman carrying from a trait on gloves to a skillchip (#56593) 2021-02-03 13:31:01 -08:00
LemonInTheDark
20d2fb6787 reverts Adds Neon Carpet (#55782), it appears to have been causing massive amounts of maptick (#56496)
It appears to have been causing massive amounts of maptick, this'll need a testmerge so we can test my hypothesis
2021-02-03 06:27:53 +00:00
Qustinnus
032c5c0f96 Adds tactical chairs (#56549) 2021-02-02 12:37:22 -05:00
ATH1909
7f1b876ba1 You can now make damp rags by dipping a bolt of cloth in a sink (#56337)
Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-01 22:49:58 -08:00
necromanceranne
0d97087d38 Fixes up the crate climbing element being incorrectly removed when opened (#56518) 2021-02-01 21:08:20 +01:00
ArcaneMusic
a5576c0101 Vend-A-Trays can be moved onto tables (#56503)
Vend a trays are mapped onto kitchen tables and bar counters. They can't be moved back onto the table with deconstructing the table. This gives them the table passflag, allowing them to be just moved back onto the tabletop.
2021-01-30 22:17:25 -03:00
Tristrian
a4a7cf03bf Adds missing duffelbags for some jobs and update their respective vendors and closets. (#56505)
add: Added duffelbags for Science, Botany, Virology, Genetics, Mining and Chemistry.
2021-01-30 19:36:00 -05:00
Kylerace
98f58208c8 Refactors Holodeck to Use Map Templates, Again! Black Magic OOM Crashing No Longer Included (#55645)
Refactors the holodeck to use map templates instead of copy_contents_to, which every maintainer seems to have complaints about.

Fixes #41485 because the matches become part of the spawned list created by ssatoms
Fixes #54789 because the holodeck area no longer has the NO_TELEPORT flag
Fixes #55676 because the map templates cant be changed midround unlike the program copies in the centcom z level
Fixes #49318 because the holodeck no longer creates new areas like the original did

This pr also changes initTemplateBounds to be a /datum/map_template proc instead of a parsed_map proc. This was mainly so I wouldn't have to duplicate vars between map_template and parsed_map. It's also nice because there's no longer a parsed_map proc inside the map_template file, especially when it didn't need to be a parsed_map proc.

The holodeck sims wont take up space in the centcom z level any more (which allows for more possible programs in the future), and map templates are more heavily tested. This is also a chance to future proof the holodeck against bugs. Holodeck also seems more responsive. This should allow for a second custom holodeck in some future ruin as well, although that of course will not be in play for the near future because of the offstation content ban. Also I documented the fuck out of the holodeck
2021-01-30 11:56:29 -03:00
TemporalOroboros
1f1b58bb26 Adds Neon Carpet (#55782)
* Adds emissive carpet, adds plane support to decal element

- Adds a basic abstract/debugging emissive carpet
- Makes decals capable of supporting plane
- Adds auto-smoothing decals

* Adds simple neon carpet variations

* Adds neon carpet reagents and recipes

* Refactors emissive blockers to allow multiple layers of emissive / emissive blocking objects

- Splits the emissive and emissive blocker plane masters into several plane masters which handle different layers of emissiveness.

* Makes neon carpet tile stacks emissive

* Rearranges and docs some emissive plane masters

- Folds the overlay lighting plane master into the emissive planes since it is also used to mask the lighting plane

* Fixes null mats_per_unit stack recombining after splitting

- I think I broke this a while ago when I reworked how stacks handle materials. Whoops.
- This basically only effects carpet at the moment. Good thing I did this when I did!

* Adds neon carpets to cargo

- Adds a cargo supply crate containing a _lot_ of neon carpets for 3000 credits

* Fixes neon carpet highlights leaking through vending machines and such

- Turns out vending machines axed their own emissive blockers whenever they updated their icon because they cleared their managed_vis_overlays...
- Generic emissive blocking has been elementized and some update_overlays procs have been straightened out.

* Fixes id_arg_index for the emissive blocker element

* Commits @Rohsie's suggestions
2021-01-25 01:55:04 -08:00
cacogen
c1af6eb1bd Painting Exhibit tweaks (#56349)
* Painting Exhibit tweaks

- Replaces use of C variable with named variables (e.g. crayon, canvas, current_canvas) in artstuff.dm for readability
- Simplifies painting structure's descriptions and moves wirecutting and persistence tutoring to a notice shown on Examine()
- Adds autodoc for two painting structure vars
- Adds a new desc_with_canvas var to painting structure that's used to set its description when it has a canvas
- Adds a new update_name_and_desc() proc to painting structure called when a canvas is added or removed
- Makes it so painting structures are named based off the painting rather than keeping their generic name

* Changes default names to refer to the "exhibits" as exhibit mountings

- Changes "Secure Painting Exhibit" to "Curated Painting Exhibit" as it's more intuitive
2021-01-25 00:37:25 -08:00
Qustinnus
a6a334285a refactors climbing into an element (#55978)
Co-authored-by: Fikou <piotrbryla@onet.pl>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com>
2021-01-24 13:56:16 -08:00
coiax
5ea2c1dfb4 Reworks skittish quirk to be automatic (#56048)
* Reworks skittish quirk to be automatic

🆑 coiax
tweak: The Skittish quirk will now cause you to automatically dive into
a locker/crate if you move into it while it is closed. Walk to avoid
this behaviour.
/🆑

This makes the quirk more useful, while also making it more thematic,
since the "diving into" behaviour can't be disabled, only supressed by
walking.

The cost is unchanged, as the quirk in its current form is overcosted at
2 points.

The emergent effect of skittish people diving into closets when caught
into explosions is definitely a feature, and not a bug.

* Reworks skittish into a element

Skittish is now an element attached to mobs, when the TRAIT_SKITTISH is
added, rather than code that runs on every single Bump of a closet.

Some crates that don't function like normal crates, like the "loot
mastermind" crate, or the wooden crate than can only be deconstructed,
are not divable into.
2021-01-23 02:28:38 -08:00
Timberpoes
1989497576 Frame stacking fix and unit test addition. (#56287)
* Reverts #56205

* Allow things without density to bypass checks

* The rest of the owl

* The rest of the owl

* Doc and tweak

* More feex

* RCD machine frame unit test

* I suck

* AAAAA

* Bad at unit tests

* Revert unit tests (for including in another PR)

* Fix windoor_assembly return logic

* Comment /mob/living/proc/PushAM logic

* Windoor assembley logic tweak

* Fix frame stacking

* Unit test

* Better wording from macros?
2021-01-22 21:18:05 +08:00
Jack LeCroy
928b5b8b32 Monkey Martial Arts (#55583)
Moves martial arts to mob/living and lets monkeys use them.

Monkeys have got arms so they should be able to do cool martial arts.
2021-01-20 21:30:21 +02:00
TemporalOroboros
b3d66908a8 Fixes showers overexposing washed targets (#55894)
Makes showers consistently expose washed atoms to 5u of their internal reagents
Makes showers effectively double the reagents targets are exposed to as per a comment by ArcaneMusic

Apparently there were balance concerns over synthflesh showers capable of instantly healing and de-husking anyone you put under them.
2021-01-16 00:25:00 -08:00
TemporalOroboros
976c1fcb8c [READY] Bespoke Datum Mats (#55296)
* Bespoke Material Backend

- Adds support for bespoke materials:
  - Reimplements [/datum/material/var/id]
  - Ports GetIdFromArguments from SSdcs
  - Adds a wrapper define for GetMaterialRef
  - Adds [MATERIAL_INIT_BESPOKE]
  - Adds [/datum/material/proc/Initialize]
- Does not actually add any bespoke materials

- [ ] TODO: Code docs
- [ ] TODO: Actually adding bespoke materials

* Some has_material procs and cleaning up some spaghetti

- Adds a pair of has_material procs for use in checking whether a given atom has a given material

* Adds meat

- Adds bespoke meat variants
  - Does not make them accessible
- Shuts up the linter

* Implements bespoke meat

- Makes the material container preserve bespoke materials
- Makes the sheetifier accept bespoke materials
- Makes the autolathe accept bespoke materials
- Makes the gibber produce bespoke meats

* Makes butchering produce bespoke meats

This is jank and really needs to be folded into a unified butchering and gibbing system

* Material documentation

- Adds, fixes, and touches up some documentation

* Material container insertion callback

- Changes the proc used to expand the material container's material list ot a proc used to check whether a material fits into a material container
- Instantiating new materials is no longer O(n) relative to the number of autolathes in existence.

* Makes processing meat conserve materials

- Makes bespoke meat carry over into meatballs

* Makes preserving custom materials an option

- Implements the ability to turn preserving custom materials _off_ for processor recipes

* Fixes all bespoke materials of the same type using the same singleton

- We use ids now, not just types.

* Makes the fat sucker produce bespoke meats

- Because consistency is good.

* Fixes autolathes merging bespoke stacks into normal stacks.

* Makes the callback to test materials for holdibility optional

- @Floyd

* GetMaterialRef -> GET_MATERIAL_REF

- We capitalize macros.

* Removes an extraneous callback

- Makes the sheetifier use functionality I didn't notice I implemented a few commits ago.

* Makes mob and species meat null compatible

* Fixes the ore silo

- The ore silo had really snowflake material handling that has been brought in line with the rest.
- The materials should show up in the correct order.

* Fixes minor lathe bugs

- Fixes stack_traces caused when lathes tried to fetch materials using reagent typepaths
- Fixed the selective reagent disposal topic. I have no idea how long this has been broken.

* Various documentation fixes

- Clarified a couple comments
- Removes an extraneous ?. operator
- Fixed mat floor tiles having bugged reagent temperatures

* More fixes

-/datum/material/meat/mob -> /datum/material/meat/mob_meat
- Adds atom typecheck to material containers.

* Fixes old typepaths
2021-01-15 23:39:58 -08:00
TemporalOroboros
032cb8c6de Adds toggling shower's refills (#55895)
Adds the ability to toggle showers water reclaimers with a multitool
Adds some delta_time handling to showers.
2021-01-15 22:30:31 -08:00
Manybones
0db301f905 Wooden tables now obey The Law of Conservation of Mass (#56156)
## About The Pull Request
Fixes Issue https://github.com/tgstation/tgstation/issues/56152 making wood tables deconstruct at they should be.

Bug vivisection:
Okay, see here? This is the proc for creating a table, we can introduce three arguments. One of them is _buildstack. _buildstack overrides Buildstack on initialize, a variable used for storing the type of raw "ore" that the table is supposed to drop in deconstruction. Here is supposed to be null unless we want to override the buildstack with another ore.

```DM
/obj/structure/table_frame/proc/make_new_table(table_type, custom_materials, _buildstack) 
	var/obj/structure/table/T = new table_type(loc, _buildstack)
	T.frame = type
	T.framestack = framestack
	T.framestackamount = framestackamount
	if(custom_materials)
		T.set_custom_materials(custom_materials)
	qdel(src)
```

What happened? The proc for building a wood table from a wooden frame, shown below, passed the "type" variable, used for storing the type of table_frame, as a _buildstack argument to the make_new_table proc. This overrides the buildstack variable of the final wooden table, causing it to drop a wooden frame as it was an ore on deconstruction. 

```DM
/obj/structure/table_frame/wood/attackby(obj/item/I, mob/user, params)
[...]
		if (toConstruct)
			if(material.get_amount() < 1)
				to_chat(user, "<span class='warning'>You need one [material.name] sheet to do this!</span>")
				return
			to_chat(user, "<span class='notice'>You start adding [material] to [src]...</span>")
			if(do_after(user, 20, target = src) && material.use(1))
				make_new_table(toConstruct, null, type)
```
This is funnier (not very much, to be honest) when we consider that deconstructing with a screwdriver would drop a frame normally, causing it to drop two frames. We could repeat this ad nauseam, essentially cloning wood frames in place as we pleased.

So TL;DR: this is another of those simple but hard to hunt bugs that would be prevented with testing and a null on its right place.
2021-01-15 15:41:21 -05:00
Coffee
5278d01a88 Fixes null-named painting issue (#56113)
There was an issue where you could name paintings nothing, which would cause issues with persistency. This was because the stripped_input didn't actually check that you put something in, so the PR adds that check. It now ensures, both when saved and loaded, that there is a title. If not, it sets them to the default 'Untitled Artwork'
2021-01-13 12:15:33 -05:00
Coffee
653d75e429 Flesh to stone no longer makes you immune to bleeding, refactors bleedsuppress into a trait (#56078)
Being hit by the Flesh to Stone makes you bleed immune to prevent you from getting petrified while bleeding, and bleeding out while turned into stone. However, it doesn't make you vulnerable when you get unpetrified. This is a bug. This also makes bleedsuppress into a trait, as both is broken and should be a trait.
2021-01-11 14:59:48 -03:00
spessbro
857c2823ed what did he mean by this (#56042)
Potato goofed 7 months ago so here's a fix (Fridges were defaulting to a force of true, which was... jank)
2021-01-09 21:09:30 -08:00
spessbro
1772943a2c improves cardboard box and supplypod code (#56043)
Doesn't let force default to TRUE just in case someone tries to open when they're not supposed to.
2021-01-10 00:07:08 -03:00
Krysonism
0ec12f8ae8 Vend-a-trays can sell anything! (#56018)
Vend-a-trays can now accept any item, not just food and drinks.
2021-01-08 22:32:54 -05:00
Krysonism
e092eb7427 [READY]Da small cytology update. Banana glutton and proper clown mob reagents. (#55694)
* HONK!

* HENK!

* HUNK!

* HJONK!
2021-01-08 22:29:00 +01:00
LemonInTheDark
6d1cb94ffb LINDA Reforged (#55604)
Speeds up gas movement significantly
Documents the intent and finer details of the atmos system (Thanks dunc)
Fixes excited groups constantly rebuilding, this broke 4 years ago
Fixes superconductors just straight up not working
Allows turfs to sleep while inside an excited group
Adds a new subprocess to SSAir to support rebuilding in this state
Most heat based behavior no longer relies on being inside a fire
Adds a new element to support doing this cleanly
Adds a new subprocess to SSAir to support doing this while a turf is asleep
Refactors air_update_turf to allow for finer control
Makes apcs take damage in heat to prevent infinite plasma fire diffs
Cleans up immutable gas mixtures to make them work properly when the mix has gas in it
Planetary turfs no longer create a new copy of themselves each time they process. We instead use a global
immutable mix
Cleans up a typed for loop in reactions
Canisters will take damage from outside heat now
Speeds up excited group dismantle
Increases the superconductor threshold by 200k
Cleans up some roundstart ATs on some ruins
Uses /turf/open/var/excited to track if a turf is actively processing, preventing a |=
Prevents openspace from trying to melt
Tweaks a canister examine line
Makes planetary turfs reset to base when broken down as part of an excited group
Makes it impossible for planetary turfs to rebuild, just like space tiles
Fixes closed turfs not activating their replacement when destroyed by moving closed -> open turf activation to
the adjacent air subsystem. They were activating and then going back to sleep before adjacent air got a chance
to tick.
Fire alarms will trigger when the area gets too cold for humans
2021-01-08 08:14:08 +01:00
TiviPlus
b4a93a3cdf Optimized Getallcontents (#55964)
Optimized Getallcontents, split up it's component procs
2021-01-07 14:36:16 -08:00
zxaber
e016ea8a02 Fixes AI laws being eaten by the garbage collector in certain conditions (#55984)
Extra AIs created by players will no longer lose their laws shortly after they are created.
2021-01-07 12:36:57 +00:00
MrMelbert
4b9869b97d Allows you to tuck the nuclear authentication disk (and plushes) into bed. (#55940)
Adds an element, the tuckable element. Objects with this element can be tucked into bed by hitting a bed with it.

You can now make beds by hitting them with a blanket.
You can now tuck plushes into bed.
You can now tuck the disk into bed, too.
2021-01-05 17:57:11 -05:00
小月猫
fc73fe2b3c Mechanical Curtains (#55751)
good for better mapping, I have seen some mappers wish to utilize fancy curtains on their rooms windows (for example, a psychologist office) but wanted to be able to have privacy when with a patient, which curtains can be opened from either side of the window, and shutters just dont fit the theme, this way mappers can add in curtains which are button operated and cant be opened manually, basically, it functions like a shutter, only it looks and acts like curtains (can be destroyed like one, etc... it is literally a curtain subtype)
2021-01-02 17:38:10 -08:00
Ryll Ryll
91a8cf6cf7 You can now mount things from the side (#55741) 2021-01-01 12:29:57 -08:00
AnturK
adcd4af1ff Meat statue fixes (#55790)
Fixes few statue bugs with textured materials.
Makes materials use managed filters. This can have side effects on things that already had unmanaged filters on.
2020-12-30 11:47:57 -05:00
Qustinnus
f66ca34626 Refactors monkeys into a species (#55614)
Changes monkeys from carbon subtype to species.
2020-12-30 16:30:15 +01:00
Azarak
14031d6daa Fixes mapping processes not clearing up all flora (#55785)
Such as spawning ruins or generating terrain. This also makes so cleaned rocks properly dont drop ash, but have to be mined
2020-12-29 20:44:08 -05:00
Ghom
7bc81e5831 Refactors how movetypes are added and removed, No timers this time. (#55444) 2020-12-28 17:57:51 -08:00
Fikou
2020341ef4 removes a / 2020-12-26 11:53:01 +01:00
Dex
ea55f4247d Fix falsewall (#55704) 2020-12-25 13:09:49 -08:00
EdgeLordExe
ab3c0e0332 [Fuck Shotties] Makes shotguns specialist weaponry. (#55663)
Shotgun slugs can no longer be made in an autolathe.
    Buckshot rounds can no longer be made in an autolathe.
    Frag12 rounds deal less direct damage, since they fucking explode.
    Pulse shot rounds deal less damage.
    Increased the cooldown on riot shotguns.
    Removed buckshot rounds from all maps.
    Combat shotguns start with beanbags.

Why It's Good For The Game

Shotguns have been overpowered for too long. NT is lasers , syndicate is ballistics.
2020-12-26 09:37:47 +13:00
spessbro
9977571adc fixed it (#55615)
headspikes don't give you a random head when you deconstruct them (except when maploaded)
also they look like they were supposed to with the head impaled
2020-12-24 01:02:37 -08:00
Emmanuel S
60ea630c6d Base construction console refactor (#55451)
Refactors base construction consoles to be generic instead of only being meant for building the aux shuttle. The current aux base construction console behaves the exact same.

This PR is A step towards minichem, as I'll be using base construction code in it pretty heavily. More information about the whole minichem thing in this design doc

In terms of player-facing changes, this PR has made possible a neat admin-only base construction console that can be used to construct things anywhere on the z level.
Why It's Good For The Game

The current base construction console code was snowflakey and didn't follow particularly great coding practices. This fixes that and provides a solid foundation for future work.
2020-12-23 09:09:28 +13:00
tralezab
68ba29ec4f Fixes artwork not being able to be named (#55475)
* whoops!

* Update artstuff.dm
2020-12-21 14:48:56 -08:00
ArcaneMusic
1c82c73d83 Adds hydroponics shrubs, allowing botanists to grow hedges. (#55496)
Replaces one of the rainbow seeds in the exotic seeds crate with a pack of shrub seeds.
Adds a new, growable seed species for shrubs. Shrubs, when planted (similar to kudzu!) plants a solid, weak barrier in hedges.
These hedges block vision, unless trimmed. Thankfully, we already have a hedge trimming skillchip, so using a sharp implement on the hedge will make it non-opaque.
2020-12-21 01:14:14 -08:00
Ghom
cd1d49112c Fixing a very old issue about lizard snouts and hoods, fake mustaches and similars. (#55574)
Fixing a little visual issue with certain hoods, fake mustaches and similars making lizard snouts magically disappear when worn.
2020-12-20 16:28:52 -08:00
Rob Bailey
cb01640043 Filterrific! (#55246)
Filter refactor + In Game Filter Editor
Accessed via VV in the dropdown of atoms. "Edit Filters.
Makes filters actually usable.

Co-authored-by: ghgh <hghgh>
2020-12-18 20:05:20 +02:00
interestingusernam3
580542accc Prevents bypassing the bluespace anomaly core limit by destroying demon portals (#55456)
This replaces the bluespace anomaly core that can be dropped by demon portals with a 3.6% chance with a soul stone.
2020-12-12 19:30:11 +00:00
wesoda25
d625978fd3 Ash lizards don't know galactic common (#55408) 2020-12-11 19:49:20 +00:00
Mickyan
f32784075b Changes painting frame description to explain how they work (#55414)
spellcheck: changed the description of painting frames to better explain how to remove paintings and whether the frame is persistent
2020-12-10 23:46:40 +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