Commit Graph

33 Commits

Author SHA1 Message Date
phil235
5f835bfc26 Obj damaging system, acid damage, and fire damage refactor (WIP) (#20793)
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
2016-10-10 11:14:59 +13:00
phil235
2d2975f783 Some preliminary changes before the damage refactor PR. The changes here do absolutely nothing gamewise.
This just adds some vars that the refactor will use. Putting this in a separate PR prevent the damage refactor PR from becoming too big (number of files changed) and hard to read and review.

Introduces the resistance_flags bitflag that replaces unacidable and burn_state.
Moves the armor var from item to /obj level and gives specific armor values to many objects, the armor list also gets two new armor types: fire and acid, which will be used in the refactor. the new fire and acid armor values are given to plenty of items.
2016-09-27 22:33:08 +02:00
Ergovisavi
72f9b60190 Fixes some issues with anomalous crystals 2016-09-19 20:30:38 -07:00
Ergovisavi
8605809c57 New colossus loot, the "Anomolous Crystal" 2016-09-07 00:58:15 -07:00
Joan Lung
bcfe0be2d0 Potted plants now layer properly (#19546)
* Potted plants now slow you down slightly

* we manage to pull her away

* no message
2016-07-30 12:18:12 -05:00
Joan Lung
fa257f92ab Misc fixes (#19375)
* Misc fixes

* river

* delta

* waterfall

* cloudburst

* thunderstorm
2016-07-20 20:12:49 +12:00
Remie Richards
ae43c4908b Fixes some Alternate Appearance issues (#19258)
Fixes Alternate Appearances clobbering each other
Fixes Viewed Alternate Appearances not being cleared out during an atom's Destroy()
Fixes Kor's AA plants.
properly removes viewing_alternate_appearances AAs
2016-07-12 10:07:49 +12:00
KorPhaeron
74e451e7ce Sneaking Mission 2016-06-19 14:39:39 -05:00
coiax
961a6c4c26 Adds potted plants to cargo packs (#18662)
🆑 coiax
rscadd: Potted plants can now be ordered from cargo.
/🆑
2016-06-19 14:05:18 -05:00
Jack Edge
546bb633cd Adds two new holodeck levels
- Winter Wonderland
Apparently no one paid for christmas decorations, and it's
incredibly cold and low pressure. But it's a good counter
to a burn mix.

- Anthophila
"A simulation of a bee colony? Why is this in the restricted
section?" - Victim of the holodeck bee massacre
2016-06-02 16:34:41 +01:00
Joan Lung
2cfb2d8eed Layers are now defines (#17949)
* Layers are now defines

* this looks better

* GAS_phil_LAYER

* no message

* remove the three unneeded defines

* no message
2016-05-27 22:16:21 +02:00
KorPhaeron
8aabf3d5f5 Removes some old sprites 2016-05-18 00:50:07 -05:00
phil235
0caa59b21a First commit of this big PR
These are the files with just tiny tweaks. Mostly modify an object's attackby so it does "return ..()" instead of "..()".
If there are other things in this commit, the PR's description will explain them.
2016-04-24 20:26:24 +02:00
KazeEspada
81f60f84f0 fixed an edgecase where you could spam cut a tree and receive multiple logs. 2016-02-26 23:46:09 -07:00
KazeEspada
8aeb2678e0 You can now cut down trees! You can use anything sharp to do so, and it will produce 10 logs. The more force the item has, the faster it cuts. 2016-02-24 23:15:19 -07:00
KazeEspada
cd4b5c17ea Tree Cutting. Implements stump sprites. Work in progress on cutting. 2016-02-23 13:57:10 -07:00
KorPhaeron
571d30a25c Volcanic rocks 2015-12-15 23:31:14 -06:00
KorPhaeron
d8a37204e7 Makes burn_state use defines 2015-12-13 05:36:55 -06:00
Ikarrus
8759f56f6f Squashed Commits 2015-06-27 00:09:16 -06:00
Remie Richards
4bebfaefc3 Procedural Map Generator System 2015-02-15 12:08:02 +00:00
tkdrg
bff20264da Fixes ppgrass ausbush having wrong icon_state 2015-01-18 17:25:14 -03:00
tkdrg
94520e04e0 Fixes ausbushes icon_state for the subclasses 2014-12-03 21:34:02 -03:00
phil235
3d0778e873 Small grammar fix. 2014-10-11 17:44:54 +02:00
Kyrah Abattoir
997e1310c5 More name fixing, lowercasing objects, proper-ing unique objects, plural-ing some stuff that needs it. 2014-05-01 23:07:35 +02:00
Incoming
3432aaf583 Adds a christmas tree to the bar
Adds a festivus pole to the science break room
Adds a santa outfit to the captains office so he can spread cheer to the crew
2013-12-08 13:23:55 -05:00
Cheridan
6bc2d76003 SPRITE UPDATE & FIXES
-Fixes a bug with the crew monitoring computer vanishing entirely when broken.
-Fixes a bug with baton rechargers not displaying properly when the baton is fully charged.
-Adds a define for a decorative item for the RD's office. :)

-New sprites for mining lanterns, telescreens (with directionals), directionals for noticeboards, and a service bell. Ding ding!

-Deletes plasma.dmi, which was unused. The plasma tile overlays that are used are in tile_effects.dmi.
2013-04-27 00:40:00 -05:00
aussprites
6251ff6ea2 fixing typo with path.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5300 316c924e-a436-60f5-8080-3fe189b3f50e
2012-12-12 16:24:18 +00:00
Aussprites
89f2ee157d Added stuff for christmas. 99% done by Carn all I did was poke around and finish it off. Cracker/gift sprites done by Tanknut.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5292 316c924e-a436-60f5-8080-3fe189b3f50e
2012-12-10 05:35:40 +00:00
aussprites
5f36fdcea7 added ..() to new(), thanks to Giacom for telling me why
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5258 316c924e-a436-60f5-8080-3fe189b3f50e
2012-12-04 18:38:03 +00:00
aussprites
1dd83e6803 >added defines to flora.dm
>added icon_states to ausflora.dmi
>added a tree to pinetrees.dmi
>centcom came by and decorated the trees in the bar and chapel

Centcom Report
Have a merry griffmas and a happy new round.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5255 316c924e-a436-60f5-8080-3fe189b3f50e
2012-12-04 14:23:00 +00:00
petethegoat@gmail.com
0c400d1a75 More fixes for flora because I'm terrible.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5109 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-18 15:48:42 +00:00
petethegoat@gmail.com
a2cb5199c6 Fixed a BUNCH of typos in flora.dm.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5108 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-18 15:26:25 +00:00
petethegoat@gmail.com
e789d6048f Added defines for snow and various snowy flora, including trees, grass, and bushes.
Fixed a mis-indented update_icon in floor/attack_hand(). Asteroid floors and such should no longer change when you click them.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5107 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-18 15:22:13 +00:00