Commit Graph

152 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
Joan Lung
b5b4037e2e More istypes replaced with helpers (#20767)
* shouldn't you be merging these by now

* my oh my do we have a lot of these

* a fellow pedantic shit
2016-10-03 13:40:13 +13:00
phil235
6809603669 Changes obj/effect/blob,spider,swarmer,energy_net,spacevines to be ob/structures instead, since you can hit and destroy them.
Adds a large ash and large molten item decal (for future use)
simplifies decal/cleanable/replace_decal() code a bit.
Changes construction() proc to on_construction() for consistency, same for deconstruction().
Made a deconstruct() proc for machinery and computer (also for future use).
2016-09-27 19:58:27 +02:00
Xhuis
edf84b49de Fixed an exploit allowing instant plant growth 2016-09-11 11:14:59 -04:00
unknown
fd80927d75 Fixed bug with adding ambrosia gaia to hydro trays. 2016-08-29 14:53:45 -07:00
Cheridan
d51316f7d1 Hydroponics Multiplier Insanity 2016-08-11 13:37:21 -05:00
ma44
7a4c553584 Tweaks saltpetre some more and fixes a bug where the self sustaining upgrade provides less nutrition when it's upgraded (#19601)
Tweaks saltpetre some more and fixes a bug where the self sustaining upgrade provides less nutrition when it's upgraded
2016-08-01 12:38:15 +12:00
ma44
b01460c2bf Update hydroponics.dm (#19575) 2016-07-30 19:35:05 -05:00
ma44
6fe50a3601 Indentation fix for #19477 (Saltpetre rounding bug fix + tweak) (#19482)
* Update hydroponics.dm

* Update hydroponics.dm

* Update hydroponics.dm
2016-07-25 22:52:48 +02:00
ma44
77efba7837 Update hydroponics.dm 2016-07-23 12:57:20 -05:00
ma44
9762ed71fe Update hydroponics.dm 2016-07-22 20:04:43 -05:00
ma44
417a103a80 Update hydroponics.dm 2016-07-22 19:47:48 -05:00
ma44
c155b71978 Update hydroponics.dm 2016-07-22 19:45:51 -05:00
Xhuis
6289801964 Hydroponics changes 2016-06-17 10:46:55 -04:00
Cruix
ac0bad5d61 Added priority overlay system. (#18225)
Added priority overlays to atoms, which will not be removed when overlays are cut and will always remain on top when new overlays are added. This requires everyone to use add_overlay() and cut_overlays() instead of overlays += and overlays.Cut(). These procs are found in __HELPERS/icons.dm, and the priority overlay list is found in game/atoms.dm. Everything else is replacing deprecated overlay manipulation.
2016-06-17 10:11:53 +12:00
oranges
9c451faa2c Merge pull request #18534 from Core0verload/ash_fix
Fixes unkillable ash drake (+ more runtime fixes)
2016-06-15 10:44:20 +12:00
c0
9fdbe269d6 More fixes 2016-06-13 12:43:25 +03:00
phil235
3b8af6f5ff Fixes grille/New() not calling ..()
Blood drips icons are now in blood.dmi instead of drip.dmi (which only had the 5 drip sprites).
Moved projectiles, guns, casings and ammo boxes to be in the right files. Please don't put your gun with its projectile, ammo casing and ammo box all the same file.
I split growing.dmi into 5 smaller files so we don't get close to the 512 icon limit again. Each seed has a var to indicate which icon file to use when planted.
Fixes code for heavy pulse laser projectile to be less awful.
2016-06-11 23:18:26 +02:00
bgobandit
179d641c32 Plant-B-Gone and napalm now do what they should. (#18395) 2016-06-09 18:52:43 -05:00
Xhuis
68b51d88cf Hydroponics tray changes and new plants (#18366)
You can now remove all plants and weeds from a hydroponics tray by using a spade on it. This process takes five seconds.

Hydroponics trays now have a unique variable, using_irrigation, that replaces the previous iteration of irrigation hoses that used the anchored variable to track it instead.

Fixes a possible runtime error that can occur when using irrigation hoses to transfer non-water reagents (specifically nutrients, although it hasn't been tested with any other reagents).

Added meatwheat, which is mutated from normal wheat plants. It's essentially a blood-red version of wheat that can be crushed into a meat slab by activating it with an empty hand. These meatwheat clumps are slightly bloodier than normal meat, but it still works for recipes that use normal meat slabs.

Added ambrosia gaia, which is mutated from ambrosia deus. It's yellow, glows brightly, and contains only earthsblood (renamed adminordrazine). The plant is destroyed after a single harvest, and its product can be planted in an empty hydroponics tray to cause it to become self-sufficient, no longer requiring nutrients, water, or weed/pest removal. Gaia-blessed trays will glow bright yellow in comparison to normal trays, and gaia-blessed soil will turn yellow. Both will emit light.

Added cherry bombs, which are mutated from blue cherries. They're orange and have a black stem, and start with a tiny amount of black powder in them. Activating them in an empty hand will ignite them and cause them to explode after three seconds, with explosion strength varying based on potency (at the most, it's around that of a minibomb).
2016-06-09 18:40:06 +12:00
Jordie
4c8f8ae53e Merge pull request #18154 from PKPenguin321/plant-analyzer-repath
Repaths plant analyzers
2016-06-03 16:41:02 +10:00
PKPenguin321
cf71a5833f repaths plant analyzers
so they are no longer children of regular analyzers
2016-06-01 22:44:03 -07:00
LatD
65a0027979 Merge remote-tracking branch 'refs/remotes/tgstation/master' into Research 2016-05-28 01:37:55 +03: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
LatD
6e6474ee9e Imprinter origin and req lvls 2016-05-22 23:46:05 +03: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
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
Remie Richards
9aaf4ffc40 Merge branch 'master' of https://github.com/tgstation/-tg-station into BEES_glorious_BEES
Conflicts:
	icons/obj/hydroponics/equipment.dmi
2016-03-21 05:03:33 +00:00
Remie Richards
be0b16a6aa Reagent Bees! Bees come from a beebox and pollinate nearby hydroponics plants, improving the health/yield/removing pests from the plants. While pollinating they build up resources to build honeycomb, honeycomb contains honey (a mild healing reagent that is very nutritious) any spare resources (50 bee_resources) are converted into new bees. honeycombs can be ground up to get the honey and other reagent inside them in an All In One Grinder.
Beeboxes have honey_frames which determine the amount of honeycomb+bees they can maintain.
Bees now have a beegent (Bee reagent, geddit?) that they use during their attacks AND that their produced honeycomb contains, this allows you to farm chemicals using bees.
2016-03-21 04:51:16 +00:00
c0
d513f52244 Adds Plant Samples for future use 2016-03-15 04:29:36 +03:00
c0
08bdcc3024 Plant Refactor 4 2016-03-07 12:46:12 +03:00
c0
3d0792c003 Plant Refactor: Icons 2016-03-07 05:38:45 +03:00
c0
a690abcf92 Plant Refactor: Seeds 2016-03-04 02:35:51 +03:00
Firecage
332bde0f4f Does the rest of the if()'s/ else's 2016-01-17 19:03:12 +02:00
MrStonedOne
b50e8d2a63 removes a bunch of unneeded spawns
spawns have a high overhead.

I only went for easy targets, almost every spawn could be removed with a few subsystems in place to handle delays or cooldowns
2016-01-02 18:23:02 -08:00
Firecage
c933363062 Adds the toolspeed var and adds it to most usages of tools which has a timer 2015-11-21 19:24:14 +02:00
phil235
db67825974 Fixes being able to stun AI and MMI forever with flashbang, preventing them from using their mech. Brain mobs can no longer get flashed or flashbanged. Silicons are no longer affected by the sound bang of the flashbang (since they have no ears).
Fixes a runtime with two blob reagents.
Fixes a reference not being removed when hydro tray is destroyed.
Laser pointer can no longer weaken AIs (no eyes).
2015-11-10 22:06:54 +01:00
Incoming
fb8002f583 Removes Plant People as a race
Plantpeople are just podpeople without the "healing in light" mechanic. I believe they were originally included in case someone wanted to develop them into a roundstart race, but since no one's done that they've just been doing two things in the code:

1. Tricking wizards who use the magic mirror into picking plant over pod and then getting confused why they aren't healing.
2. Making turning into a plant based human slightly too likely in the staff of change.
2015-10-16 03:57:54 -04:00
phil235
6ee5ab6680 Merge branch 'master' of https://github.com/tgstation/-tg-station into DnaMonkeyStuff
Conflicts:
	code/__HELPERS/unsorted.dm
	code/modules/admin/verbs/one_click_antag.dm
2015-09-19 22:34:30 +02:00
phil235
f90ee4aa8c - Fixed monkey starting with no dna.
- 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.
2015-09-19 22:18:28 +02:00
Tokiko1
941b86873c Adjusts mutation probabilities of Left4zed. 2015-09-17 06:56:07 +02:00
Firecage
dfae1e0b53 Changes a lot of del() to qdel() 2015-08-16 23:33:22 +02:00
bgobandit
7a613fc2b6 Adds several new reagent reactions to hydroponics. 2015-08-07 13:44:13 -04:00
Firecage
4688c2c969 Fixes proc arguments 2015-07-15 23:52:35 +02:00
Iamgoofball
a8ec1c76df Merge branch 'master' of https://github.com/tgstation/-tg-station into graphics
Conflicts:
	code/ATMOSPHERICS/atmospherics.dm
	code/game/machinery/computer/computer.dm
	code/game/objects/items/weapons/explosives.dm
	code/game/objects/structures/crates_lockers/closets/fireaxe.dm
	code/game/objects/structures/musician.dm
	code/game/objects/structures/tables_racks.dm
	code/game/objects/structures/window.dm
2015-06-23 12:54:26 -07:00
phil235
ae8c69f9a7 Merge pull request #9955 from kingofkosmos/spanspaceremoval
Unnecessary space removal from spans and messages
2015-06-15 18:20:04 +02:00
Iamgoofball
a00e11520c Merge branch 'master' of https://github.com/tgstation/-tg-station into graphics 2015-06-14 15:42:15 -07:00
Cheridan
ec8cd61d4c Merge pull request #9808 from Incoming5643/march_of_the_snowflakes
WJohn's Hyper Customizable Lizard Sprites
2015-06-14 17:40:20 -05:00
kingofkosmos
c8d79e7034 Removed unnecessary spaces in these situations:
"span class = '" changed to "span class='"
"'> " changed to "'>"
2015-06-14 12:13:19 +03:00
Iamgoofball
c2256d41fc BAR NOW SHOWS UP ON THE OBJECT YOU'RE INTERACTING WITH 2015-06-13 13:58:08 -07:00