Commit Graph

648 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
bdcb16113a Adds a few turf istype helpers (#20754)
* a very calming act
when the world is too much, too fast

* i'm tired
but i have to be efficient, infinite

* lick your lips at the sight of me
a fantasy made reality
2016-10-01 19:25:46 +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
Lzimann
eaabbede28 Merge branch 'master' of https://github.com/tgstation/-tg-station into RemieRichards-prostheticsssss
# Conflicts:
#	code/_onclick/hud/human.dm
#	code/modules/surgery/bodyparts/dismemberment.dm
2016-09-21 19:47:47 -03:00
Cheridan
a930355581 Merge pull request #20572 from AnturK/godisdead
Removes Hand of God gamemode.
2016-09-20 13:46:52 -05:00
oranges
4be4672b89 Merge pull request #20488 from phil235/TalkWheel
Talk wheel
2016-09-20 21:42:52 +12:00
AnturK
93f444fd38 Removes Hand of God gamemode. 2016-09-18 13:32:26 +02:00
phil235
8e8061e851 Wearing colored glasses colors your vision, if you want to. (#20499)
* Adds semi-transparent colored fullscreen overlays which are used by glasses with tint_color.
Currently only red, blue, and green are available. And only nightvision glasses currently have a tint_color when worn (green).

* Completely rewrites how I did color tinting. We now use datum/client_colour and the client's color var.
I fixed items in our inventory UI being colored when using client.color.
I added an altclick() option on all glasses to toggle a new pref regarding the use of glass coloring your view.
I made a lot more glasses use vision coloring.
I fixed Thermal HUD Scanner not having its action button to switch hud type.
2016-09-17 16:28:50 +12:00
phil235
143e4ce172 Made the wheel system generic, so future coders can make different wheel types.
I gave the talk wheel to aliens, monkeys and cyborgs.
2016-09-16 14:45:05 +02:00
Joan Lung
db19c0bb8f Fixes items calling attackby on themselves 2016-09-15 07:54:50 -04:00
phil235
37d1ea6108 Make sure talk_wheel_icon var is properly deleted when hud is deleted.
Add a hotkey for the talk wheel: H (hotkey mode) and Ctrl+H.
Fixes not being able to use the wheel and talk button while stunned.
2016-09-13 15:22:41 +02:00
phil235
e916f2aa3c derp 2016-09-13 01:18:50 +02:00
phil235
76f6ef21c3 Males the talk wheel more fleshed out. 2016-09-13 01:07:52 +02:00
phil235
443a4501ec Carbon Dismemberment , second attempt. (#20461)
* - I rearranged X_defense.dm mob files, more damage_procs.dm.Here's what's inside:
* X_defense.dm: is for the procs of attacks onto the mob, all the XXX_act() proc (things happening to the mob), as well as protection check and get procs (armor, ear prot, projectile dismemberment)
* damage_procs.dm: actual damage procs like adjustBruteLoss() getfireloss, any proc that handles damaging.

- some bugfixes with gibspawner effects.
- monkey's bodyparts can be dismembered and are used to create its icon.
- brains are no longer carbons.
- all carbon have bodyparts that can be dropped when the mob is gibbed.
- adminspawned bodyparts now have a default icon.
- robotic parts are now a child of bodyparts.
- health analyzer on alien/monkey shows damage on each limb
- added admin option to add/remove bodyparts for all carbon (instead of just remove on humans)
- Fixes keycheck message spam for janicart and all when trying to move.
- Fixes bug with buckling to a scooter while limbless.
- removed arg "hit_zone" in proj's on_hit() because we can already use the def_zone var (where hit_zone got its value)
- Fixes mob not getting any damage when hit by a projectile on their missing limb, despite a hit message shown). carbon/apply_damage() now when we specify a def_zone and the corresponding BP is missing we default to the chest instead of stopping the proc. Consistently with how human/attacked_by() default to its attack to chest if missing limb.
- Fixes mini uzi icon when empty and no mag (typo).
- I renamed and changed a bit check_eye_prot and ear prot
- renamed flash_eyes to flash_act()
- I made a soundbang_act() similar to flash_act but for loud bangs.
- added a gib and dust animation to larva.
- husked monkeys
- no damage overlay for husk or skeleton.
- damage overlay for robotic limb now.
- no damage overlay when organic bodypart husked.
- one handed human with a bloody hand still get a bloody single hand overlay.
- fix admin heal being unable to heal robotic bodyparts.
- slightly touched robotic bodypart sprites (head one pixel too high)
- Fixes 18532 "beheaded husk has hair".
- Fixes 18584 "Ling stasis appearance bug"
- no more eyes or lipstick on husks.
- can remove flashes/wires/cells from robot chest and head with crowbar.
- Fixes not being able to surgically amputate robotic arm/leg.

* More merge conflict fixes and adding the new files I forgot to add.

* of course I forgot birdstation

* More typos and stuff I forgot to undo.

* Fixing a typo in examine.dm
Removing an unnecessary check.
Making admin heal regenerate limbs on all carbons.
Monkey-human transformation now transfer missing limbs info and presence of a cavity implant.
NODISMEMBER species can still lack a limb if the mob lacked a limb and changed into that new species.
Changeling Regenerate ability now also regenerate limbs when in monkey form. (and remove some cryptic useless code)

* Fixing more conflicts with remie's multihands PR.

* Fixes runtime with hud when calling build_hand_slots().
Fixes lightgeist healing not working.
Fixes null.handle_fall() runtimes with pirate mobs.
Fixes typo in has_left_hadn() and has_right_hand().

* Derp, forgot to remove debug message.
2016-09-12 19:33:50 +02:00
phil235
65bd7d1f4d First draft of the talk wheel concept. 2016-09-12 19:17:40 +02:00
Remie Richards
cb6094c831 and I curse it yet again! 2016-09-11 23:01:40 +01:00
Remie Richards
0335ceac83 I curse the name Shadowlight123 2016-09-11 23:00:38 +01:00
Remie Richards
791a13ba9f Corrects stupid var access (Robot Hud) 2016-09-11 22:50:36 +01:00
Remie Richards
45e32960cd Corrects stupid var access (Human Hud) 2016-09-11 22:50:01 +01: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
Joan Lung
d9e96145a4 Makes cult structures destructible and readds them 2016-09-08 09:54:01 -04:00
Remie Richards
00738bd2a3 More than 2 hands!? WHAAAAAAT 2016-09-02 16:10:16 +01:00
Joan Lung
1bbfb0cd9f Makes telekinesis less bullshit 2016-09-01 20:08:58 -04:00
Joan Lung
ea9d9c3261 Converts Vanguard to a status effect (#20208)
* Converts Vanguard to a status effect

* bolding

* do that first, don't runtime first

* gooooof
2016-08-31 09:29:45 +12:00
Xhuis
f45c024b67 Adds framework for status effects (#19939)
* Adds framework for status effects

* Completes the Renew define

* Lots of work, refactoring

* Further work on status effects

* Gives status effects autism

* Fixes and stuff
2016-08-28 16:15:44 +12: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
oranges
01b0e4edaf Merge pull request #19843 from ChangelingRain/itseasiertostandbackandletsomeoneelsespeakforyoubutitsnotalwaysthebestchoice
Blob overmind HUDs now handle being observed slightly better
2016-08-15 00:01:36 +12:00
oranges
bbf8889d9c Merge pull request #19810 from KorPhaeron/blueprint_fix
Refactors area creation
2016-08-15 00:01:00 +12:00
Joan Lung
fd68ebc21c Blob overmind HUDs now handle being obvserved slightly better 2016-08-12 10:12:48 -04:00
Joan Lung
81329edda6 Clockcult fixes and tweaks (#19795)
* Clockcult fixes and tweaks

* die but don't stay dead

* stay dead but never die

* instinct

* unreadable dark magic

* idiocy knows no bounds

* danger close

* like four fucking times faster

* superdynamics
2016-08-12 09:06:21 +12:00
KorPhaeron
43a16713f1 Blueprints for everyone 2016-08-11 04:04:16 -05:00
Joan Lung
39e4ca8de1 Merge pull request #19012 from Shadowlight213/observehud
Adds letting ghosts see the hud of the human or borg they observe.
2016-08-08 09:05:36 -04:00
Joan Lung
722472091b Servants of Ratvar know the overall cult status at all times (#19728)
* Servants of Ratvar know the overall cult status at all times

🆑 Joan
rscadd: Added the clockcult "Global Records" alert, which clock cultists can mouse over to check a variety of information on the clockcult's status, including living servants, number of caches, CV, tinkerer's daemons, if there's an unconverted AI, what clockwork generals can be invoked, and what scripture is unlocked.
/🆑

Added a tooltip style for clockcult, for fancy clockcult tooltips.
2016-08-08 09:41:42 +12:00
Shadowlight213
1a8dfe22c2 fixes empty inventory issue 2016-07-28 14:11:50 -07:00
GunHog
62ced82c3b Fixes Queen Finder Screen Loc
I am stupid and did not set the variable correctly. I thought I fixed it
though.
2016-07-27 08:40:58 -05:00
Shadowlight213
7f642978ef fixes 2016-07-26 14:03:43 -07:00
Shadowlight213
2d69b0ad19 Makes the hud work with borgs. 2016-07-26 13:46:16 -07:00
Shadowlight213
7a6f378e17 Merge branch 'master' of https://github.com/tgstation/tgstation into observehud 2016-07-26 11:53:23 -07:00
oranges
9860a2d2c9 Merge pull request #19317 from GunHog/Xeno_Queen_Finder_For_Mista_Jay
Adds Queen Finder for Xenos
2016-07-16 12:02:33 +12:00
GunHog
a607211dfb Adds Queen Finder for Xenos
- Xenos now have a "queen sense" which tracks the queen like a
pinpointer.
- Added WJ's custom sprites for all non-queen Xenos.
- Modded the alien type finder to support queen finding
2016-07-14 13:36:18 -05:00
Core0verload
e666d2e76b ports pockets (from Animus Green) and adds them to some clothing.
This PR ports pockets (from Animus Green) and adds them to some clothing.

 Shoes that support storing items now use pockets system.
 Some hats have 1 small pocket.
 Detective's hat spawns with a flask in it.
 Clown's mask has a single tiny top-secret pocket. Honk!

This PR also includes two or three path fixes. It also fixes internal storages (pockets, storage implant) having less "max depth" than external ones.
2016-07-14 19:36:26 +12:00
Joan Lung
fe28096320 Adds dextrous guardian (#19254)
Added dextrous guardians to the code, able to hold and use items and store a single item within themselves.

Dextrous guardians do low damage on punches, have medium damage resist, and recalling or leashing will force them to drop any items in their hands.
2016-07-13 11:25:00 +12:00
Joan Lung
fc712102a9 Merge pull request #19213 from coiax/no-cache-alert
Servants of Ratvar get an alert if they have no tinkerer's cache
2016-07-09 08:17:08 -04:00
coiax
4c5e478ed6 Observers can auto-orbit meteors; space dust event (#19142)
* Observers can auto-orbit meteors; space dust event

During a meteor shower, observers can automatically orbit
threatening meteors and watch them hit the station.

Added Major Space Dust event, which is a meteor shower
containing only space dust.

Reduced chance of RNG meteor event.

Fixes bug where meteors wouldn't move when spawned.
2016-07-09 18:16:11 +12:00
Jack Edge
77e13395d8 Now uses the correct names 2016-07-08 16:49:29 +01:00
Jack Edge
84745260f3 Servants of Ratvar get an alert if they have no clockwork cache 2016-07-08 14:09:31 +01:00
coiax
8bbe45f412 AI APC hacking improvements (#19203)
* AI hacking timer moved to AI mob from APC

* Adds APC hacking alert

* Adds notification when hacking an APC
2016-07-08 08:18:37 -04:00
oranges
1ef0690c9c Merge pull request #19166 from Core0verload/dexterous
Fixes dextrous not working on hostile mobs
2016-07-08 09:54:29 +12:00
c0
b43417f613 Fixes dexterous not working on hostile mobs 2016-07-07 08:05:03 +03:00