Commit Graph

133 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
Remie Richards c50fa5729c Merge branch 'master' of https://github.com/tgstation/-tg-station into many_hands_make_light_work 2016-09-10 20:28:23 +01:00
pubby 9f3e1fa9df Modernize ingredient boxes 2016-09-05 21:05:47 -05:00
Remie Richards 00738bd2a3 More than 2 hands!? WHAAAAAAT 2016-09-02 16:10:16 +01:00
bgobandit 27e355d16b Fixes another batch of typos. 2016-08-30 20:57:28 -04:00
oranges 5e5c84d47b Merge pull request #19879 from Bawhoppen/poop
Changes miner breath mask to gas mask
2016-08-16 10:26:30 +12:00
Lularian c717fb88da what is it good for 2016-08-14 07:04:33 -05:00
KorPhaeron 43a16713f1 Blueprints for everyone 2016-08-11 04:04:16 -05:00
Core0verload e78451796f Mining tweaks, fixes and balance changes (#18697)
Tweaks and QoL changes:
    Kinetic accelerator now supports seclite attachment.
    Miners now have a special heavy duty headset, it differs from regular supply headset only in sprite.
    Miner's roundstart crowbar now spawns in box instead of backpack.
    Preserved legion core no longer sparks and has a telling desc.

Balance changes:
    All cyborgs are now ash-proof. Mining cyborg starts with ash-proof sprite to fit dark mining style. All borgs are superior to humans at their module's job, it makes sense for mining cyborg to come with ash-proof hull by default - after all, mining borgs can't deploy shelters to sit out ash storms.
    Ash-proof plating upgrade was replaced with Lavaproof tracks. This upgrade allows mining cyborgs to roam lava safely.
    Mining cyborg module now includes a tiny welding tool for basic self-repair. This welding tool holds 4 times less fuel than the one used by engineering cyborgs. It also includes a small fire extinguisher.
    Miners start with a box of 3 brute and 1 burn paths instead of a single brute patch. This compensates for recent path nerf that dropped amount of reagents in single path more than in two.
    Explorer's belt slot amount is increased by one, while mining belt crafted from sinew still has 5 slots.

Fixes:
    Updates miner's corpse and mining wardrobe with new lavaland gear.
    Fixes envy's knife path.
    Fixes wing potion's misguided racism.
    Fixes #18796. Fixes legion's nullspace corpse drop bug and two related runtimes.
2016-06-28 21:58:57 +12:00
Joan Lung e6efbdf88f Cogscarab storage is no longer painted cardboard (#18821) 2016-06-22 18:48:36 -05:00
Joan Lung b941a47a60 Adds cogscarabs to clock cult (#18685)
* Adds cogscarabs to clock cult

* playstyle string

* info

* oh good going

* no static

* delay it eating all the metal

* scarab removal service

* cog

* ree

* error handling

* todo: languages = RATVAR

* isclockmob

* very large box

* faintly glowing eyes
2016-06-19 17:26:35 +02:00
Jack Edge 049d23cde9 Merges birdboat survival boxes into mainline
- Made new survival+radio boxes, and set Birdboat jobs to use them.
- Also deleted some unneeded lines in boxes.dm
2016-05-12 16:36:25 +01:00
TechnoAlchemist 4705efa6da Adds new items to the mining vendors. (#17362)
* Adds new items to the mining vendors, also adds tracking implanter since that didn't exist before.

* woops

* Fixes tracking implants for miners, makes medipens not OD you on tricord.

* Actually doesn't OD on tricord now

* Chemical changes.

* Upgraded the jaunter into the wormhole lifebelt

🆑 coiax
rscadd: The Free Golems have developed the jaunter into the  wormhole
lifebelt, which automatically teleports the user when they fall in a
chasm or suffer a major medical emergency. Must be worn on the belt to work.
/🆑

Please don't mistake a random teleportation in crit for saving a user's
life, the Supply channel gets a notification, but suit sensors are
required to find them, and there's no guarantee the location picked is
safe (for example, the Toxins Test Site is a valid jaunt destination,
along with in the middle of the slime cages in Xenobiology).

* Adds modification kit.

* Golem ship now has its own /area

And a bluespace beacon.

* 5 tick medijaunt, no radio, golem jaunters + areas

The number of ticks before a medical emergency jaunt happens is now
five. No radio message is produced.

Free Golems now have no restrictions on what they can purchase. Wormhole
jaunters now specifically drop golems near their ship.

* Modkits remove the race restrictions from KAs.

* Buffs buffs buffs

I'd say something, but I'm sure I'd regret it later.

* Advanced lifebelts, golem superiority

* Removes modkit from minervendors, adds modkit to RnD!

* COMPILE DAMN YOU!!

* I made it compile

* Honor to my country, not to you :(

* fuck

* h-haha?

* Kor you know I would never actually ban you

* i could personally care less for HBls adminning style
2016-05-11 22:19:47 -05:00
Core0verload a66c2f4418 Machine/computer boards and frames refactor (#17300)
* Map Changes

* Machine/console boards and frames refactor

* More board changes
2016-05-08 12:11:18 +02:00
bawhoppen 216f321030 ree copypaste 2016-05-03 20:09:27 -05:00
bawhoppen 0a83426f54 removes trailing returns 2016-05-01 17:33:18 -05:00
bawhoppen 7aa5e85dba fixed memes 2016-05-01 16:48:29 -05:00
Lularian 31ced651d0 commits, what are they good for 2016-05-01 00:51:17 -05:00
Razharas 6f8b1bc295 Merge pull request #17124 from MrPerson/wrapped_up_nicely_with_a_bow
Removes monkeycube and chocolate unwrapping
2016-04-29 16:03:59 +03:00
Jack Edge fa018861e8 New cargo crates to buy
Also some minor spelling fixes I noticed.

🆑 coiax
tweak: Internals Crate now contains breath masks and small tanks.
rscadd: Metal foam grenade box crate added for 1000 points
rscadd: Added two Engineering Mesons to Engineering Gear Crate
tweak: Engineering Gear now costs 1300
rscadd: Breach Shield Generator Crate added for 2500 points
rscadd: Grounding Rod Crate added for 2500 points
rscadd: PACMAN Generator Crate added for 2500
rscadd: Defibrillator Crate added for 1500
rscadd: Nanotrasen Customs report that some wide band suppliers have
been providing "alternative" firing pins. Nanotrasen reminds all
crewmembers that contraband is contraband.
/🆑

Laser tag firing pins (only allow gun to be fired with laser tag armor
of the appropriate colour) added to contraband.
Special clown firing pin (prank your friends) added to contraband.
2016-04-27 16:20:06 +01:00
MrPerson 1a3aaff808 Removes monkeycube and chocolate unwrapping
Pointless time wasters that add nothing to the game experience. Also removed the two wrapped sprites for completeness.
2016-04-25 18:20:01 -07:00
KorPhaeron 3527347160 Shock Revolver 2016-04-18 21:29:43 -05:00
RandomMarine af01ed7e00 Golem ship tweaks and additions 2016-04-09 21:19:38 -07:00
bawhoppen af51a66e37 Adds sandbags
* sandbgs an stuff

* mmmm

* fucking sandbags

* okokok

* aaaaaaaaaaaaaaaaaaaaaah
2016-04-02 23:52:12 -04:00
TehZombehz 6fb6da13a7 One line change 2016-03-31 03:54:02 -05:00
TehZombehz 229a90ba10 Reorganized for standards 2016-03-31 02:53:52 -05:00
TehZombehz 0f26065c64 HOPEFULLY removes conflicts
First attempt ev
2016-03-30 17:12:55 -05:00
TehZombehz 2e5012e9d4 Typo
VEGETARIAN
2016-03-29 19:25:47 -05:00
TehZombehz acd351bc15 Type replacement 2016-03-29 08:10:04 -05:00
TehZombehz da31e890ab Changes Kor requested #1 2016-03-29 01:06:37 -05:00
TehZombehz 326eaf17c6 Small compression 2016-03-28 23:26:23 -05:00
TehZombehz e13840ffde Adds random ingredient food packages to chefs
Adds various ingredient boxes, a random one of which is chosen for the
chef to start with. Also adds soysauce bottles preset items.
2016-03-28 22:58:03 -05:00
TehZombehz a6a338ae76 More typo fixing
I swear I'm good at english
2016-03-28 02:43:21 -05:00
TehZombehz c83cc45ab2 Regular and smiley paper sack are now wearable if modified
Use a sharp object on an empty regular or smiley face paper sack to
craft their respective wearable paper sack hats.
2016-03-28 01:59:44 -05:00
TehZombehz fe35d72828 Requirement to hold paper bag to change design removed 2016-03-28 00:01:50 -05:00
TehZombehz 37a3c4373b Adds craftable paper sacks
Adds craftable paper sacks
2016-03-27 23:37:43 -05:00
bawhoppen ab947d1868 nevermind about that spare shell 2016-03-23 03:08:41 -05:00
Lularian 79ea910a64 box 2016-03-23 02:56:12 -05:00
c0 d206a14644 Fixes 2016-03-12 15:14:50 +03:00
c0 ed8239d840 Wall mounted flashes are now buildable 2016-03-12 15:14:48 +03:00
phil235 15d8e0a96f I refactored how a mob resisting out of a closet that is itself inside something is done.
Fixes not being able to resist out of an unlocked unwelded locker. Now both moving and the resist button  work (except for the cardboard box).
You can no longer spam breakingout message ouf of a closet by moving while inside.
Wrapping and unwrapping a locker no longer unwelds it magically.
I refactored closet/crate/item package wrapping.
You can packagewrap belts and other storage items in which the package wrap item doesn't fit.(it does currently have the unintended side effect of giving you the "doesn't fit in X" message when wrapping there storage items though).
2016-03-03 20:20:34 +01:00
SouDescolado 3b257854f0 Merge pull request #1 from tgstation/master
Merge shit
2016-01-05 14:44:37 -02:00
SouDescolado 92b3c84a22 Make the code beautiful
Less lines, same code.

Trying to fix merge conflict.

Gah
2016-01-05 14:36:39 -02:00
Lularian cb50a25772 gives barman his cool stuff again 2016-01-03 19:35:49 -06:00
bawhoppen 3543175c51 Revert "fixes attempt two" 2016-01-03 19:05:52 -06:00
Lularian f5bc4b6b4f woops 2016-01-03 17:50:20 -06:00
KorPhaeron d8a37204e7 Makes burn_state use defines 2015-12-13 05:36:55 -06:00
Steelpoint ac57b4ee03 InitalCommit 2015-10-12 11:59:33 +08:00
Steelpoint b5ded1c9e8 InitalCommit 2015-10-03 21:22:29 +08:00