Commit Graph

230 Commits

Author SHA1 Message Date
Joan Lung ce13143d9d Replaces yet more istypes with helpers (#20806)
* uses more istype helpers

* oranges is inefficient
2016-10-10 17:48:35 +13: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
TheCarlSaganExpress 36d6695319 Requested changes to #20637 (#20701)
* Requests by Phil

* Additional Code
2016-09-28 08:54:42 +02:00
TheCarlSaganExpress 7e1331bc04 PDA Adjustments (#20637)
* Adjustments to the PDA. Ejecting a cartridge from the PDA no longer falls to the ground.

* Requested Changes
2016-09-26 14:57:30 +13:00
Remie Richards 00738bd2a3 More than 2 hands!? WHAAAAAAT 2016-09-02 16:10:16 +01:00
Remie Richards 81d2298992 Drone Phone! (#19722)
* Drone Phone! A PDA application that allows certain people (Janitors, Engineers, Atmos Techs, Roboticists, HoPs, RDs and Captains) to ping drones to alert drones (low, med, high, crit priority) about their area.

* Removes arg from previous implementation

woops
2016-08-10 12:18:15 +12:00
Fox-McCloud 146d14a26e Refactor Uplink Refunding 2016-07-24 09:21:37 -04:00
oranges 8c9308acca Merge pull request #18613 from Core0verload/runtime_down
Puts down two runtimes
2016-06-17 13:40:03 +12: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
c0 458a38cf21 Puts down two runtimes 2016-06-16 06:46:26 +03:00
Jack Edge e13725b179 Refactors all (F) links into using a define
🆑
bugfix: Clicking the (F) link when an AI talks in binary chat will
follow its camera eye, the same as when (F) is clicked for its radio
chat.
/🆑

FOLLOW_LINK is a define that creates the clickable (F) link, so it
doesn't have to be typed painstakingly out every time we want to give
that link to an observer.
2016-06-03 15:29:28 +01:00
bgobandit d430ca29ab fixes the bugs of the jordie 2016-05-18 14:27:26 -04:00
Robustin d1a2d1d0bd SLIP-SANITY (#17096)
* Chemo

* CHEMO

* Chemo

* Update growninedible.dm

* Corrected math

* decimals needs 0's

* NOW EVERYBODIES HAPPY YAYYY

* Updated Botany nerf

* Conflict correction & tweaks
2016-05-10 22:52:05 -05: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
duncathan salt 0f04ea79a0 Merge pull request #16401 from Tytynguyen/atmosrounding
Atmospheric readings are now accurate to 0.01%
2016-03-31 12:04:48 -06:00
Tytynguyen 91f618a5a7 Atmospheric readings are now accurate to 0.01% 2016-03-26 13:43:20 -07:00
c0 2b6128d56e Kills PDA snowflakey close button 2016-03-21 07:38:33 +03:00
c0 6e4d3c05a0 fix 2016-02-26 08:44:08 +03:00
c0 eb7cad946a PDA subtypes are moved from PDA.dm to PDA_types.dm 2016-02-26 06:08:39 +03:00
AndrewJacksonThe2nd 583c2c3dea Fixes 2016-02-21 15:46:16 -08:00
Bjorn Neergaard 4ef2667ff2 Rewrite supply packs/cargo orders 2016-02-07 04:45:55 -06:00
Bjorn Neergaard 29fdf73cc6 tgui power monitor; linegraph component 2016-02-05 17:06:04 -06:00
Fayrik a674179746 Now using attack logs for pai history. PAI to pAI. Removed unnecessary spacing on if statements. 2016-01-31 19:29:36 +00:00
Fayrik b9162fbb3e Tweaked card ejection slightly. 2016-01-31 00:25:51 +00:00
Firecage 7f96592b87 Merge Conflict Fix 2016-01-27 13:29:38 +02:00
MrPerson e1b3815539 Fixes some awful defines to not be hacks 2016-01-22 19:07:37 -08:00
Firecage d1327d4076 Merge conflict fix 2016-01-19 10:02:50 +02:00
Bjorn Neergaard 5cfc60d9da tgui radios; clean up frequency code 2016-01-18 14:28:33 -06:00
Bjorn Neergaard 4a617062d8 Refactor uplinks; fix up tooltips and make uplink more interactive 2016-01-18 14:25:52 -06:00
Firecage 0cb6814c18 Merge conflict fix 2016-01-17 19:15:30 +02:00
Firecage 332bde0f4f Does the rest of the if()'s/ else's 2016-01-17 19:03:12 +02:00
duncathan 9066bc7c4f Merge branch 'master' of https://github.com/tgstation/-tg-station into listmos
Conflicts:
	code/controllers/subsystem/air.dm
	code/datums/gas_mixture.dm
	code/game/objects/items/devices/scanners.dm
	code/modules/mob/living/carbon/human/species.dm
	code/modules/mob/living/carbon/life.dm
	tgui/assets/tgui.css
	tgui/assets/tgui.js
	tgui/scripts/interfaces/atmos_filter.ract
2016-01-13 20:07:21 -06:00
Cheridan 6c9fa9eb72 Merge pull request #14389 from phil235/VisibleMessageRefactor
Refactor the visible_message() proc to be faster in some cases.
2016-01-09 22:16:57 -06:00
Kyle Spier-Swenson 3c5cdbefe3 forgot to typecast properly 2016-01-04 23:42:45 -08:00
phil235 e225fbc850 - Refactor the visible_message() proc to be much faster.
- Replacing some "for(var/mob/o in viewers()) show_message()" by "visible_message()".
- Replacing some "show_message()" by " << "..." " instead.
- Fixes being able to see the results of the health and slime analyzers while blind.
-
2016-01-04 22:49:27 +01:00
duncathan b18c6c2c5c Merge branch 'master' of https://github.com/tgstation/-tg-station into listmos
Conflicts:
	nano/assets/nanoui.js
	nano/bower.json
	nano/templates/atmos_filter.dot
2016-01-02 18:02:54 -06:00
Kyle Spier-Swenson 64fc9ffc4c Removes some : in cartridge code 2016-01-02 15:14:34 -08:00
KorPhaeron 4b78a51361 Wrong place 2015-12-30 19:44:22 -06:00
KorPhaeron 1fee3c83a6 Span classes 2015-12-30 19:12:56 -06:00
duncathan 8392974ad0 fixes associative list; adds gas_overlay to "datum gases" 2015-12-29 22:50:09 -06:00
duncathan 17f167bcb7 associative list 2015-12-29 13:33:12 -06:00
KorPhaeron 7cdc7fc4b0 PDA formatting 2015-12-28 19:07:14 -06:00
duncathan b18cb5fca8 making shit compile 2015-12-28 08:31:20 -06:00
KorPhaeron 6481c95acd PDA fixes 2015-12-27 10:31:38 -06:00
Bjorn Neergaard 34b717afb4 radio_controller -> SSradio, SSbp -> SSnpc 2015-12-04 22:25:24 -06:00
spudboy555 f4fb0f2886 Fixed the message alert on the librarian's PDA. 2015-12-02 13:33:41 -08:00
Remie Richards b6209e4508 Merge pull request #13139 from AnturK/XXXFREEINSULATEDSWITHEVERYPURCHASEXXX
Adds Send To All to Lawyer/Captain cartridges
2015-11-27 20:58:03 +00:00
AnturK e36853d7c9 Convert bots to simple animals - Updated 7.0 2015-11-26 22:06:07 +01:00
Razharas e0508ad572 Merge pull request #13050 from MrStonedOne/connectlagfixthankspjb
[Ready] Fixes the 2 minutes of interface lag (such as ready button not working) when a client connects.
2015-11-25 20:43:45 +03:00