Commit Graph

26 Commits

Author SHA1 Message Date
bgobandit
666f28aa49 Adds lumps of coal. (#22346) 2016-12-23 09:33:22 +13:00
Mervill
09ea5ad2e5 w_class now uses defines 2016-12-01 21:33:14 -08:00
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
Jack Edge
a841bd14f5 Code cleanup; silicons, melee, hallucinations
- Cleaned up paint.dm
- Everything else should be self explanatory
- Removed braindamage part of esword, since you can't reach that; it
  would be handled by attack_self()
2016-06-24 14:03:44 +01:00
KorPhaeron
d8a37204e7 Makes burn_state use defines 2015-12-13 05:36:55 -06:00
bgobandit
984582f6ba tweaks and shit 2015-12-10 15:48:22 -05:00
bear1ake
f697ae90f5 removes a bunch of .0 2015-09-10 20:57:30 +09:00
Ikarrus
8759f56f6f Squashed Commits 2015-06-27 00:09:16 -06:00
phil235
467e102b49 Fixes trash disappearing when washed in a sink.
Fixes waffle trash being named "waffles".
Replacing some stat/weakened/stunned checks with incapacitated()
Fixes meat cutlets and steak not including meat type in their name (e.g. raw corgi meat cutlet)
Harvesting meat from simple animals now takes time, has a sound, and can be done with any sharp item.
2015-03-03 00:07:08 +01:00
phil235
faba71fcca Cooking overhaul: adding tablecraft food recipes, customizable food, food ingredients (from bay)
- converted the microwave recipes to tablecraft recipes
- Added customizable food (thanks iamgoofball)
- added food ingredients (from baystation)
- changing food recipes a bit (replacing stuff with the new food ingredients)
- repurpose the microwave to actually cook certain food items.
- bowl is no longer trash but a reagent_containers/glass that is used in salad/soup recipes
- Changed the hunger system a bit, sugar becomes a normal reagent again. Adding a junkiness var to foods to drain mob satiety.
- milk carton is now a condiment bottle
- slight buff to vitamin
2015-02-05 16:48:25 +01:00
Incoming
698debad08 Cleans up the trash.dm 2014-02-13 10:35:02 -05:00
Incoming
39e67ae092 Jay Owen demands that this pull be merged.
Crush a can for Jay Owen.

He has leukemia, please crush a can for Jay Owen.

His only wish is to see a can crushed live in our game.

Sprites by Nienhaus
2014-02-12 21:30:44 -05:00
Kyrah Abattoir
225a906eda code/game/objects/items/* (root) lowercase pass
code/game/objects/items/devices/* lowercase pass
2013-11-20 19:15:00 +01:00
Cheridan
2dd68fc86d Janitor/Wire/Hydro Sprite Stuff.
-Adds janitor cart sprites for pete. Removes trash.dmi and merges it with janitor.dmi.
-Moves the 8 separate wire .dmis and puts them in their own folder.
-Moves plants.dmi into the flora folder.
-Adds sprites in hydroponics-related .dmis for my upcoming project. Greatly cleans up hydroponics.dmi
2013-03-29 23:33:40 -05:00
petethegoat@gmail.com
786242f9b2 Big text styling overhaul. Mostly affects reagent related stuff.
Adds a new 'userdanger' class, which is bold and red. 'danger' is now just red. Adjusts all dangerous messages I could think of to use the appropriate class.

Trash items can now be washed away in sinks.

Removes the robodropper, on account of it being awful. Borgs get a normal dropper instead.

Changes the probability of blood spatter from attacking someone from 33 to item.force * 2

Path changes:
/obj/item/weapon/reagent_containers/ld50_syringe > /obj/item/weapon/reagent_containers/syringe/lethal
/obj/item/weapon/reagent_containers/ld50_syringe/choral > /obj/item/weapon/reagent_containers/syringe/lethal/choral
possibly some others? i think this is it.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5815 316c924e-a436-60f5-8080-3fe189b3f50e
2013-03-06 17:44:49 +00:00
petethegoat@gmail.com
c4382905e5 Stamps are applied based on the icon_state of the stamp. Saves a switch.
They are also offset by a random amount.

Sosjerky is now properly named.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4857 316c924e-a436-60f5-8080-3fe189b3f50e
2012-10-13 18:55:09 +00:00
johnsonmt88@gmail.com
28aabc9810 More file structure stuff!
Cleaned up the files themselves.
Everything in code/game/objects should now be in proper files or places with the exception of the files in the /weapons/ sub-folder.

There's two instances of me not following the exact file structure.
- /obj/item/brain has been moved to a file in mob/living/carbon/brain
- /obj/item/clothing/mask/facehugger has been moved into mob/living/carbon/alien/special
Both of these may not make sense according to the object structure, but they do make sense logically. If it's a problem just move them.

Next up: Finish the files in the weapon folder, then start moving defines down.


My god I hope I havent broken everything.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4547 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-26 03:32:58 +00:00
sieve32@gmail.com
459c558898 -Make holodeck eswords a child of obj/item/weapon/holo instead of regular eswords, clumsy check removed as a result, and you can no longer do things like cutting through walls or doors or what have you. (Fixes Issue 665)
-Redid icons to be more optimized at compile by setting icon = 'icons/folder/icon.dmi' instead of just icon = 'icon.dmi', meaning that Dream Maker doesn't have to search through every single file for every single .dmi. This shouldn't lead to any errors because of how I went about it, plus the fact that Dream Maker would have freaked out if I screwed something up. Also moved around 2 icons that weren't sorted well.

r4146 compile time: 1 minute, 40 seconds
r4147 compile time: 45 seconds

[VGTG]

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4147 316c924e-a436-60f5-8080-3fe189b3f50e
2012-07-23 00:48:51 +00:00
giacomand@gmail.com
d4c0a8130f -Fixed there being no return link when a "No SQL server" message appears on the Library Computer.
-Increased the amount of lights you get from adding glass to the Light Replacer.
-Emagging the light replacer is one way.
-You can add lights to the light replacer to add uses.
-You can unload the trash bag by clicking on it.
-Vodka now heals toxin damage.
-Made light tubes the same price as light bulbs.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4114 316c924e-a436-60f5-8080-3fe189b3f50e
2012-07-19 17:03:36 +00:00
johnsonmt88@gmail.com
11a3b7e26d Pacman generators now accept their proper mineral sheets as fuel
Janitor Cyborgs can no longer make nuke ops auto-lose by picking up the nuke disk.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3673 316c924e-a436-60f5-8080-3fe189b3f50e
2012-05-26 02:29:52 +00:00
baloh.matevz@gmail.com
18ccabb33a - Removed support for the ONBACK and ONBELT flags.
- Replaced them with a whole range of inventory slot flags. These now govern whether an item can or can't be placed in a certain inventory slot. See setup.dm for information on the flags. These flags only affect humans tho, as humans are the only beings with an inventory to talk of.
- Standardized some gun code and some other pieces of code as I came accross them. I hate indented variable definitions!

This commit should not bring any change whatsoever to the game from a player's perspective.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3659 316c924e-a436-60f5-8080-3fe189b3f50e
2012-05-25 07:38:36 +00:00
petethegoat@gmail.com
2190408f0f Massively improved trashbags. PICK UP EVERYTHING! Fixed issue 209.
Slightly improved mops, and got rid of the "X attacks the blood with the mop!" message.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2557 316c924e-a436-60f5-8080-3fe189b3f50e
2011-11-26 15:58:50 +00:00
Superxpdude@gmail.com
39e3cbe08b Commiting some stuff for Petethegoat from this thread: http://nanotrasen.com/phpBB3/viewtopic.php?f=7&t=5744
For those too lazy to read the thread:
Vending machines now have a switch inside the maintenance panel that when flipped, turns off those pesky advertisements.
A bunch of unused delivery locations have been removed.
You can no longer attack yourself with that bag of cheesie honkers you just finished eating from. Mining Satchels and trashbags now default to picking up everything on one tile.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2027 316c924e-a436-60f5-8080-3fe189b3f50e
2011-08-19 23:58:44 +00:00
rastaf.zero@gmail.com
4f7030a426 Jack Rost updates:
-more dismantable consoles:
--Teleporter
--Supply ordering console
--Supply shuttle console
--Power Monitor
-new circuit boards (both constructable and destructable)
--Supply ordering console (programming 2)
--Supply shuttle console (programming 3)
--Outpost Status Display(programming 2)
--Operating Computer (programming 2, biotech 2)
-R&D Console circuit now requires programming 4 (was 6).


Balagi updates:
-Trash bag: works as mining satchels but for trash.
-Started redesign computers code
-fixed candles sprites
-trashbag now has "in hands" sprite
-fixed emagging supply shuttle console

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1883 316c924e-a436-60f5-8080-3fe189b3f50e
2011-07-18 19:17:58 +00:00
rastaf.zero@gmail.com
1f31f809cd Fixed some runtime errors.
Backporting from ss13.ru:
- added trash: foor eaten food leaves empty картонный boxes and plates, husks. Janitors are doomed.
- new sprite for Soylent Viridians
- randomized pill sprite offset (as for fruits, tiles, papers).
- now chemmaster first assign label to pill, then dispence it.
- added sprite for trash bag. Wil be added to code soon.
Code by Jack Rost, sprites by Farart.

- added candle. Code by Balagi, sprites by Farart.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1879 316c924e-a436-60f5-8080-3fe189b3f50e
2011-07-18 03:02:45 +00:00