Please refer to #20867 and #20870 for a easier view of the changes. Those two PRs show all meaningful changes (hopefully) and doesn't show the files changed with just 3 lines changed.
This PR does three things:
It makes all children of /obj/ use the same damage system.
Previously to make your new machine/structure be destroyable you needed to give it a var/health, and its own version of many damage related proc such as bullet_act(), take_damage(), attacked_by(), attack_animal(), attack_hulk(), ex_act(), etc... But now, all /obj/ use the same version of those procs at the /obj/ level in code/game/obj_defense.dm. All these obj share the same necessary vars: obj_integrity (health), max_integrity, integrity_failure (optional, below that health level failure happens), and the armor list var which was previously only for items, as well as the resistance_flags bitfield. When you want your new object to be destroyable, you only have to give it a value for those vars and maybe override one proc if you want a special behavior but that's it. This reorganization removes a lot of copypasta (most bullet_act() version for each obj were nearly identical). Two new elements are added to the armor list var: fire and acid armor values.
How much damage an obj take depends on the armor value for each damage category. But some objects are INDESTRUCTIBLE and simply never take any damage no matter the type.
The armor categories are:
-melee(punches, item attacks, xeno/animal/hulk attacks, blob attacks, thrown weapons)
-bullet
-laser
-energy (used by projectiles like ionrifle, taser, and also by EMPs)
-bio (unused for this, only here because clothes use them when worn)
-rad (same)
-bomb (self-explanatory)
-fire (for fire damage, not for heat damage though)
-acid
For machines and structures, when their health reaches zero the object is not just deleted but gets somewhat forcedeconstructed (the proc used is shared with the actual deconstruction system) which can drops things. To not frustrates players most of these objects drop most of the elements necessary to rebuild them (think window dropping shards). Machines drop a machine frame and all components for example (but the frame can then be itself smashed to pieces).
For clothes, when they are damaged, they get a "damaged" overlay, which can also be seen when worn, similar to the "bloody" overlay.
It refactors acid. See #20537.
Some objects are ACID_PROOF and take no damage from acid, while others take varying amounts
of damage depending on their acid armor value. Some objects are even UNACIDABLE, no acid effect can even land on them. Acid on objects can be washed off using water.
It changes some aspect of damage from fires.
All /obj/ can now take fire damage and be flammable, instead of just items. And instead of having just FLAMMABLE objs that become ON_FIRE as soon as some fire touch them (paper), we now have objects that are non flammable but do take damage from fire and become ashes if their health reaches zero (only for items). The damage taken varies depending on the obj's fire armor value and total health. There's also still obj and items that are FIRE_PROOF (although some might still be melted by lava if they're not LAVA_PROOF).
When a mob is on fire, its clothes now take fire damage and can turn to ashes. Similarly, when a mob takes melee damages, its clothes gets damaged a bit and can turn to shreds. You can repair clothes with cloth that is produceable by botany's biogenerator.
It also does many minor things:
Clicking a structure/machine with an item on help intent never results in an attack (so you don't destroy a structure while trying to figure out which tool to use).
I moved a lot of objects away from /obj/effect, it should only be used for visual effects, decals and stuff, not for things you can hit and destroy.
I tweaked a bit how clothes shredding from bombs work.
I made a machine or structure un/anchorable with the wrench, I don't remember which object...
Since I changed the meaning of the FIRE_PROOF bitflag to actually mean fire immune, I'm buffing the slime extract that you apply on items to make them fire proof. well now they're really 100% fire proof!
animals with environment_smash = 1 no longer one-hit destroy tables and stuff, we give them a decent obj_damage value so they can destroy most obj relatively fast depending on the animal.
Probably a million things I forgot.
If you want to know how the damage system works all you need is the three obj vars "obj_integrity", "max_integrity", "integrity_failure", as well as the armor list var and the resistance_flags bitfield, and read the file obj_defense.dm
You can no longer use TK on a mirror to change your
appearance while far away from the mirror. You have
to be adjacent to it. Fixes#18823
You can no longer normally use shattered mirrors, they
now properly become shattered. Yes, you could shatter
a mirror and still use it, stealthily. Honk.
Dismemberment support added as well as a way to use the limbs of another species for dismemberment for visually identical species
Flying var changed to species flag
Replaces typesof(path) - path with subtypesof(path) in obvious places. I was a bit conservative, there's probably a few more places that could use this.
- Fixed bugs with monkeyize/humanize: 7803 (humanized monkey nobloodtype)
- Fixes 9298 monkeyed ling have troubles humanizing themself (already fixed?)
- Fixes despawning clothes when monkeyizing. 11855
- Replaced check_dna_integrity proc by simpler has_dna proc when required.
- created set_species() proc
- fixed space retrovirus not transfering SE (despite having a domutcheck()). Still need to check if it needs a name = real_name.
- I renamed mecha/var/dna to dna_lock to avoid confusion
- I renamed an armor var in a species proc to armor_block to avoid confusion with species/var/armor.
- I removed many if(dna) checks in lots of files.
- I removed duplicate defense procs between human/proc/X and dna.species/proc/X since dna is now always set.
- Anatomic panacea from changeling removes alien embryo correctly. 6247
- Fixes runtime when trying to put dna-less brain mmi into a dnalocked mech.
- Removed carbon/var/list/features, we now only have dna.features and prefs.features
- Remove hulk mutation from lizards and other species (Fixed 6413); only real humans can acquire hulk. (less work on sprites for each ones, fixes lizard tail not in hulk color)
- Fixes cloning not setting up correctly dna UE and dna.real_name
- I fixed the issue with sucked+cloned ling being unable to absorb
- I fixed issue with changeling proc checking if they have the dna already not working.
- Fixed 4095, low health hulk with DAA getting stuck in loop of acquiring/losing hulk.
- I added a second layer for mutations to differientate mutations that go below and above the body layer (Fixes 7858)
- Fixes 10048, the transform to initial appearence button was fucking up the dna.
- Fixes cloning not setting up correctly dna UE and dna.real_name
- Fixed the issue with sucked+cloned ling being unable to absorb
- Fixed issue with changeling proc checking if they have the dna already not working.
- Fixed 4095, low health hulk with DAA getting stuck in loop of acquiring/losing hulk.
- Added a second layer for mutations to differientate mutations that go below and above the body layer (Fixes 7858)
- Fixes 10048, the transform to initial appearence button was fucking up the dna.
Fixes NOCLONE and CLUMSY being in both disabilities and mutations. they're now only disabilities.
Fixes minttoxin not gibbing people with the fat disabilities.
Fixes some runtimes, replacing usr by user in some places.
Fixes mutation overlays being removed when updating overlays.
Remove the now unused mob/var/list/mutations and human/var/blood_type
Fixed some formatting in preferences.dm
Random lizard bodies will finally have color!
Pushes features almost all the way to the DNA side of thing, the mob side is only needed during character creation.
Note that changes to the save file will invoke a one time per character runtime for legacy characters as the save file purges mutant_color, this is as far as I can tell harmless, has no effect on the player, and is self correcting.
The ressurection spell can only be used while dead/dying and charges at all times. When used the lich gains a new body at the site of their phylactery and is stunned for a short while. Meanwhile the old wizard body crumbles to dust leaving all the wizards worldly possessions on the ground. Anyone who sees the corpse crumble will also get a cardinal direction pointing towards the wizard.
Every time the wizard dies this way, the time between ressurections is increased by a minute. To take a lich out of the game for good, either destroy the body before the lich can cast the spell again, or destory the phylactery and kill the wizard one last time.
Liches spawn with robes and spells intact, but nothing else, everything collected on their original body stays there.
As a balance issue, this spell can't be used in the den, the item must be bound after arriving at the station.
Adds a nice black wizard robe ensemble for liches.
Magic mirrors (save for a special badmin only one) can no longer skeletonize people.
Adds a hopeful mulligan fix to wizard rounds problems. Also corrects an adminlog message.
sets every instance of race changes to use hardset_dna instead of directly replacing the datum (needs more testing to be sure I didn't break shit)
removes the invisible man race (aka the generic) and shadowlings from the new green slime mutation toxin while I'm in the area
Moving do_attack_animation() proc to mob/living
Fixing the pixel offset issue from beds especially rollerbed.
Fixing the nograv bouncing stopping because of another animation being used.(lying down, jittering, attack animation)
Replaces Holodamage with Stamina damage, if your stamina damage exceeds your current health, you get weaken(5)'d. Stamina heals itself slowly over time.
Makes the hallucination enemies deal more stamina damage than they did holodamage, but stamina damage heals now so it's mostly for just seeming threatening at the moment.
Adds the Disabler, a gun that does stamina damage. It has a range of your screen, but no more. Adds a disabler crate to cargo (security lock)
Fixes Lasertag ED209's because they were busted as shit
Reduces ED209's view range to 9 from 12, which was several times longer than your screen view, now is only a little bit more
Lastertag now does stamina damage instead of an instant stun for that GRITTY LASERTAG EXPERIENCE
Death of the istype invasion from slimes, previously every single color of slime was its own kind of mob, and every single one of those slimes also had an adult form which was a different mob.
There is now only one kind of slime, reliant on new var is_adult and old var colour to determine how it looks. All baby slimes functioned identically outside of icon and core, and all adult slimes functioned identically to each other and to the babys save for a bit higher Health and more capacity to break shit.
A nice side effect is that this solves any inheritence issues of baby slimes growing up since it's still the same mob, though it doesn't solve the same issues for adult slimes splitting.
Also fixed a few annoying but rare bugs (like getting ghosted because you got DC'd and your slime self split and you weren't around to get mind transfered)
The following runtime has occured 18248 time(s).
runtime error: Cannot execute null.IsIndexCut().
proc name: isWireCut (/obj/item/device/radio/proc/isWireCut)
source file: radio.dm,185
usr: Azerthene Severn (/mob/living/carbon/human)
src: the security radio headset (/obj/item/device/radio/headset/headset_sec/department/med)
The following runtime has occured 165 time(s).
runtime error: bad index
proc name: recalculateChannels (/obj/item/device/radio/headset/proc/recalculateChannels)
source file: headset.dm,261
usr: Burningface (/mob/new_player)
src: the security radio headset (/obj/item/device/radio/headset/headset_sec/department/engi)
It also makes the mirror automatically shave women when used.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5760 316c924e-a436-60f5-8080-3fe189b3f50e
I've tested it a fair bit, but there may be bugs, so please report those if you run into them.
Added an ismetroidadult() helper
Improved L6 code.
Made the syndie shuttle console impervious to bullets.
Made mirrors breakable.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5187 316c924e-a436-60f5-8080-3fe189b3f50e
Committing this early to allow pete to commit something involving the .dme file which would probably conflict otherwise.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4514 316c924e-a436-60f5-8080-3fe189b3f50e