Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.
Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.
(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
Converts many proc overrides to properly use list/modifiers, fixes some spots where modifiers should have been passed, calls modifiers what it is, a lazy list, and cleans up some improper arg names like L, M, C, and N. Oh and I think there was a spot where someone was trying to pass M.name in as a string, but forgot to wrap it in []. I fixed that too.
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.)
* Adds the sect of the Ever Burning candle
* make the burning sacrifice 20 seconds instead of 10
only made it 10 seconds for testing purposes, also make the "unmelting" clothing red instead of blue to be more red candle-ish
* make another check at the end of the candle fuel rite
The candle fuel rite will now check if the sacrifice is still on fire and dead at the end of the rite, you can technically extinguish them and only light them on fire at the last moment but it's fine god won't notice
* make the unmelting wax rite actually fireproof clothing hood/helmets
so yes you can supposedly get 2 fireproof for the price of one, but since hardsuit and hoodie are allegedly just one big connected suit it sort of make sense.
I also took away the forced color from the fireproofed clothing as making it mesh well with most clothing ended badly so now you can only tell its unmelting by the name.
* few improvements to rites
makes a tighter if check for the unmelting was helmet thing. adds a sound effect at the end of each rite, gives the sect a max favor of 10 000 instead of 1000 which I could've sworn was originally the case but apparently not.
* change the for loop
* Do the thing that cobby asks
I still kept the for loop for the candle fuel for reasons cited above. In other news I just learned that the word SPAM came from a Monty python skit
* WHY CAN IAN BE SET ON FIRE AAAAA
* what if we kissed on the burning altar
* change the for loop to an if check for the sacrifice
also added a bunch of early returns which forces me to set chosen sacrifice to null a whole lot more
* updqte sect description
Basically, all ethereal charge capacity and interactions have been scaled upwards by 20x.
Power wise, ethereals now hold up to 3000, with the max safe threshold being 2000. For reference, upgraded powercells can hold 2500, with high capacity holding 10K).
All appropriate values have been tweaked to match this change. There shouldn't be ANY sort of noticeable difference in game, aside from power sources depleting faster, and a few values which I decided to tweak for balance reasons. They are: power cell draining time is 1.5 seconds longer, and light draining time is 0.5 shorter. Also, draining cells has less of a punishment multiplier upon the cell now, (originally, the the cell lost 33x as much as you received. now its 12x). (to avoid returning to this in why its good, I did this because now that ethereals are capable of holding more, I can afford to have less of a punishment, while still maintaining a reasonable level of punishment).
Also some minor code and grammar improvements.
* このコミットの中が未来です
* Adds Rites
* 💻
* remove bible global
* last minute code changes 😏
* review brah
* waaa_fb
* ⛪
Review stuff, Doc stuff, You can now coax a user to the platform for !!FUN!!
* Update code/modules/religion/religion_sects.dm
Co-authored-by: spookydonut <github@spooksoftware.com>