Commit Graph

149 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
194398cbbd Merge branch 'master' of https://github.com/tgstation/-tg-station into PreliminaryDamageRefactor
# Conflicts:
#	code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
#	code/game/objects/effects/portals.dm
2016-09-29 01:44:27 +02: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
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
Joan Lung
ee9814465c Fixes a bit of brasscode 2016-09-13 17:11:57 -04:00
Joan Lung
0067bd1332 Adds brass, used to construct various brass objects (#20419)
* Adds brass, used to construct various brass objects

* brasshole

* give em the brass

* give em more brass

* DYNAMIC

* VAR MURDER SPREE

* brassy

* acceptaphil

* this is super against my general preferences but eeeeeh sure okay i guess
2016-09-13 12:16:28 +02:00
Joan Lung
cbf733dbc4 Does something, likely to be important, to blob (#19831)
🆑 Joan
rscadd: Once the blob alert message is sent in the blob game mode, all mobs get to see how many tiles the blob has until it wins, via the Status tab.
rscdel: Removed/merged a bunch of blob chems, you probably don't care about the specifics.
tweak: The remaining blob chems should, overall, be more powerful.
tweak: Shield blobs soak brute damage less well.
tweak: Flashbangs do higher damage to blobs up close, but their damage falls off faster.
experiment: Shield blobs now cost 15 resources to make instead of 10. Node blobs now cost 50 resources to make instead of 60.
experiment: Expanding/attacking now costs 4 resources instead of 5, and blobs can now ATTACK DIAGONALLY. Diagonal attacks are weaker than normal attacks, especially against cyborgs(which may be entirely immune, depending), and they remain unable to expand diagonally.
rscadd: Shield blobs no longer block atmos while under half health. Shield blobs are still immune to fire, even if they can't block atmos.
tweak: Blobs should block explosions less well.
rscadd: Blob cores and nodes are no longer immune to fire and no longer block atmos.
rscadd: Blobs can only auto-expand one tile at a time per expanding thing, and should be easier to beat back in general.
tweak: Blobbernauts now attack faster.
tweak: Blob Overminds attack mobs slower but can attack non-mobs much faster.
rscadd: Blob Overminds start with some amount of resources; in the gamemode, it's 80 divided by the number of overminds, in the event, it's 20 plus the number of active players, and otherwise, it's 60.
bugfix: You can no longer move blob cores into space, onto the mining shuttle, white ship, gulag shuttle, or solars.
bugfix: Blob rounds might be less laggy, if they were laggy?
tweak: Blobs don't heal as fast, excluding the core.
experiment: Blobs are marginally less destructive to their environment.
/🆑

Objective:
maybe possibly make blob something you can fight instead of wishing the blob didn't exist?
but also make the blob lethal enough that it can still deal with the crew if it knows what it's doing(and still lose if the crew is good instead of snowballing forever)
2016-08-17 15:48:28 +12:00
Joan Lung
79b226feb8 The Ark of the Clockwork Justicar can now be constructed even if Ratvar's rise is not an objective (#19864)
* The Ark of the Clockwork Justicar can now be constructed even if Ratvar's rise is not an objective

* you're so fucked

* behold

* clang
2016-08-16 10:24:36 +12:00
Joan Lung
60b32ddd85 Simple animals can now have a set amount of damage to deal to objects in place of normal melee damage 2016-07-30 09:14:53 -04:00
Joan Lung
fa12bbacd6 Slightly more construction value is required to unlock scripture 2016-07-08 07:58:59 -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
Remie Richards
b3b60b187b Manual repair of some edge cases. 2016-06-11 23:11:54 +01:00
Remie Richards
fda2c699fc Automatic conversion via Regex 2016-06-11 18:37:48 +01:00
Nerd Lord
c51b1503ac clockwork windoors 2016-06-04 10:27:27 -04:00
Nerd Lord
3793e6187a Addition Ratvar conversion effects and related changes 2016-06-03 23:19:13 -04:00
Xhuis
70795389df More stuff, no conflict fix yet 2016-06-03 15:07:49 -04:00
Xhuis
685d938481 Some more work or something, idk 2016-06-02 20:53:51 -04: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
coiax
4483d5275c Shuttle manipulator (#17436)
* Starting out on our tgui journey

* God tgui, why do you need to be updated

You're dynamically generated anyway

* Commit of stuff

* Further progress is being made

* Everyone loves buildscripts

* Further modifications to my incredible running script

* Starting to modify the minimap code to be better

* It's going well thusfar, I guess

* What have I done

* RIP minimap

* FUN FUN FUN FUN FUN

* Adds shuttle_manipulator.dmi

MUH HOLOGRAMS

* Is it done? IS IT OVER

* Peer review

* Some bug fixes

* Makes that damn greentext shut up

* Shuttle registration

* Made the Emergency Escape Bar more robust

No climbing on the bar.

* Do not stare into the operation end of the device

* Compile shame

* THE MOST DUMB

* Passive barmaiden

* Emergency shuttle memes

* MORE SAFETY CODE

* Fancy shuttle manipulator icons

* Smoothing it out

* We are going to have a lot of fun with this one

* Independent blobbernauts

* WABBAJACK WABBAJACK

* Message for attempting to authenticate old style

* Angry alert noise is back

* Revert "Independent blobbernauts"

This reverts commit 34d6af7c9c88cfc2864990cb37b586bb90163dd3.

* No parrot sleep plz

* Moves the special shuttle stuff to special.dm

* No Bartender like a Centcom Bartender

* Non-controversial map changes

- Backup shuttle moved closer to Centcom main structure, docking tube
created
- Moved shuttle import landmark to above Centcom main building
- Added shuttle displays to Conference Room
- Squashed the Chapel a bit in Metastation
- Made the docking port on Z2 massive
- Made the docking port on Metastation a lot larger

* Hacks and slashes at Box

A bunch of things are extended and squashed so Box shuttle dock can
support the MetaStation emergency shuttle.

* Some Metastationshit

* Never ending changes

* Wabbajack to TGM

* Modified the bar, I think that's all of them

* Stops Barmaiden wandering around

* More code review

* Whitspace, the bane of us all

* DIE WHITESPACE DIE
2016-05-26 15:15:19 +02:00
Jack Edge
8ff4486ab7 Fixes #17480; tabling not breaking glass tables
Fixes #17480.

Also catches a rare case where people would be thrown onto the tables
from afar by checking whether there are any mobs on the table with
a spawn call.

- Glass tables are now coloured by Nar'sie.
- Glass tables pregenerate and store their shatter debris.

🆑 coiax
fix: Glass tables now break when people are pushed onto them.
/🆑
2016-05-21 10:48:04 +01:00
Jack Edge
611e19e49a Window debris on creation, release on destruction 2016-05-13 21:50:03 +01:00
Jack Edge
d9bfa9e820 Removes materials from holodeck chairs and windows
- Breaking a chair with NODECONSTRUCT no longer produces materials.
- Breaking a window with NODECONSTRUCT now reliably does not produce
materials.
- Also moved the creation of debris into the window's shatter() proc,
because doing it on creation is dumb, and unreliable.
2016-05-12 16:30:38 +01:00
PKPenguin321
bf3b709a8e makes screwing windows 1 second faster 2016-04-29 20:46:58 -07:00
Joan Lung
6fc1d4fde4 Blobs can no longer eat the supermatter (#17205)
* Blobs can no longer eat the supermatter

* phil'd

* phil'd
2016-04-29 20:29:20 +02:00
phil235
43e98079f1 Removing some comments I had left in. 2016-04-24 21:12:04 +02:00
phil235
0480790b0a Same things but with structures now. 2016-04-24 20:38:33 +02:00
PKPenguin321
dbcb729f2a fixes a godawful message
jesus christ who wrote this garbage
2016-04-03 18:56:14 -07:00
Cheridan
c6ab8b0041 Merge pull request #16165 from ChangelingRain/cultlock
Nar-Sie will now corrupt airlocks, tables, windows, and windoors
2016-03-19 21:58:12 -05:00
Nerd Lord
f7a2348ef7 Nar-Sie will now corrupt doors, tables, windows, and windoors 2016-03-17 16:28:26 -04:00
xxalpha
688137c7dc icon smooth ss
adjustments

adjustements

atharrachaidhean
2016-03-12 23:57:45 +00:00
tkdrg
fa8cc5cd12 Merge pull request #14669 from xxalpha/shingles
Objects under rwindows don't break.
2016-01-17 17:30:57 -03:00
xxalpha
6d56fafa1c fasdasdjaidfhasiufh
conflix

fuck that

mistake

Clearer if
2016-01-17 20:14:02 +00:00
xxalpha
e4150ac88e Merge remote-tracking branch 'upstream/master' into shingles 2016-01-16 18:37:40 +00:00
xxalpha
6ff3817a89 Repath windows (oh god), nerf normal windows ex_act. 2016-01-16 18:27:16 +00:00
xxalpha
2cc55c3ba0 Changed floor ex_act to not break grilles & src if under r-windows. 2016-01-16 17:43:33 +00:00
Menshin
828c1ddf2c * Generalized AStar check for objects preventing passability
* Fixed AStar not detecting plastic flaps as impassable for mobs that can't pass them (fixes #14616)
2016-01-16 15:27:31 +01:00
tkdrg
7bf3834b5e Merge pull request #14487 from xxalpha/shingles
Floor level objects will now be protected from explosions until they are exposed.
2016-01-09 20:30:02 -03:00
xxalpha
4dd308c278 fix
glass windows no strong

Affect all levels if in devastating range.
2016-01-09 23:00:24 +00:00
bgobandit
b1dbe47bbf Windows give a message when repaired. 2016-01-06 01:30:19 -05:00
oranges
134a76cc8f Line ending apocalypse 2015-12-17 14:12:37 +13:00
MMMiracles
c384aae4c3 more map edits, loot table balancing, bug fixes, also ATV VROOM VROOM 2015-12-08 00:43:53 -05:00
MMMiracles
6c685d6d67 wew 2015-12-06 02:14:26 -05:00
MMMiracles
8ab579cb21 Merge branch 'master' of https://github.com/tgstation/-tg-station into snowiscold
Conflicts:
	icons/mob/animal.dmi
2015-12-04 18:55:10 -05:00
Vincent
6f6968773b Fixes #13418 2015-12-03 22:46:56 -05:00
MMMiracles
77b36e2415 iced windows, more ice variants of shit in general.
more stuff, ice everything.

wew

conflict fix
2015-12-01 16:45:09 -05:00
Vincent
bf530cc3dd Fixes untouchable windows
Sorry about that.  Fixes #13354
2015-12-01 11:54:09 -05:00
Vincent
16303c1c1f Changes flag name from ABSTRACT to NODECONSTRUCT
Removes holo-tables and holo-windows since those typepaths are no longer needed.
Updates Z2 to reflect this.  Removes spurious tag tags in Z2.
2015-11-30 20:26:03 -05:00
Vincent
05ae680b06 Fixing conflicts:
code/game/machinery/computer/computer.dm
	code/game/machinery/doors/windowdoor.dm
	code/game/objects/structures/window.dm
2015-11-29 19:02:30 -05:00
Vincent
026e6ee772 Sets up the the ABSTRACT flag to be used by machines and structures that should not be disassembled or break into parts.
This is specifically used by the holodeck for things that should be immune to disassembly.

Fixes invisible windoors in the holodeck.
Standardizes the fire axe's interaction with windows.
Fixes a runtime with holodeck tiles getting broken or burned.
2015-11-26 21:11:54 -05: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