Commit Graph

1258 Commits

Author SHA1 Message Date
phil235
6cfd99ec00 Moving shit around and APC repair bugfix (#20912)
* Moving shit around so turfs aren't defined in code/modules/mining .
Fixes APC's integrity not being reset to max when a broken APC is repaired.

* derp

* More turf and turf procs moved.

* fixing merge conflicts again.
2016-10-12 09:48:47 +02:00
oranges
437129c3f1 Merge pull request #20888 from erwgd/ReplacementLightsHaveMetal
Replacement lights no longer require 60 metal in autolathe
2016-10-12 09:02:15 +13:00
phil235
cc947b1eeb Fixes spacevines being immune to melee attack (typo). (#20907)
Fixes robotic legs missing a side to their sprite.
Fixes blob attacks destroying objs below intact floors (the blob's attack does not remove the floor's tile)
Now all objs hidden below floors don't take damage from fires, instead of just pipes and cables.
2016-10-12 09:01:03 +13:00
Shadowlight213
335c0ad690 Ports VG's antimatter engine shield sprites and adds the AM engine to cargo (#20744)
* Ports VG's antimatter engine shield sprites

* crate name
2016-10-11 09:57:04 +13:00
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
erwgd
7603a62c5b Removed MAT_METAL=60 requirement from replacement light autolathe design, removed MAT_METAL=60 from replacement light materials 2016-10-10 00:01:36 +01:00
Cheridan
db5b96f78d Merge pull request #20863 from ChemicalRascal/master
Make compressor efficiency good, not bad
2016-10-09 17:57:05 -05: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
erwgd
112507d263 Replacement lights contain 60 metal 2016-10-09 20:30:33 +01:00
James Denholm
308db99837 Make compressor efficiency good, not bad
Previously, compressor rpm decayed as such: max(0, rpm - [(rpm^2*efficiency)/COMPFRICTION]), where COMPFRICTION is very large.

As such, an increase in efficiency increased the rate that compressor rpm decayed at, efficiency being between 1 and 4).

This commit changes that equation to max(0, rpm - [(rpm^2)/(COMPFRICTION*efficiency)]), ergo, an increase in efficiency decreases the rate of rpm decay, making it up to four times slower instead of four times faster.
2016-10-09 01:43:02 +11: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
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
Joan Lung
dff4db726a Replaces a bunch of istypes with their proper macros (#20739)
* Replaces a bunch of istypes with their proper macros

* i'm not sure doing a 100+ file changed pr on a whim is something you do when bored
especially if you do it by hand because you never actually learned the regex that would let you automate it

* i'm just... gonna do this, because that check was true a lot and it shouldn't matter
2016-09-30 20:21:08 +02: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
Kyle Spier-Swenson
f71dc2c9a3 Orbits are now a subsystem (#20632)
* Sleepless perfect orbits #MOGA
We bind to Moved() and use datums and lists to track the orbits, no more sleeps, no more delay.

* Adds some null checks to orbit checks

* Forget to set orbiting.
Also sets orbiters before orbiting, to avoid edge cases of deleting a list then recreating it.

* Improves orbit, adds subsystem for orbits.
Most orbit loc changes will happen on move, subsystem runs every 2 ticks to make up for when that isn't the case.
2016-09-24 19:52:49 +12:00
oranges
bfa8f46b90 Merge pull request #20580 from ChangelingRain/lightenlightdrainamount
Clockcult powerdraining is more likely to cause lights to burn out
2016-09-24 19:49:38 +12:00
Cyberboss
1a3a9135c2 Disconnected tesla arc power fix 2016-09-19 13:01:00 -04:00
Joan Lung
3f3683066e Clockcult powerdraining is more likely to cause lights to burn out 2016-09-18 17:49:20 -04:00
oranges
213eb800d0 Merge pull request #20483 from lzimann/patch-15
Singularities eating a supermatter will now only play the sound to mobs in its z-level
2016-09-15 15:24:41 +12:00
kevinz000
177045c980 [Ready]Electrical Chemistry (Tesla grenades) (#20448)
Teslium is now easier to make, and as with most electronics, no longer mixes with water.

tesla_act and tesla_zap both now have arguments to specify whether they explode machinery. By default only the tesla engine will explode machinery. This means that Tesla Revolvers will no longer cause a large area to implode if there is no one nearby the target of it to shock. This also means that tesla-grill bolts will no longer blow things up.
2016-09-15 12:59:23 +12:00
Cheridan
37944a1100 Merge pull request #20464 from ChangelingRain/whenibreakpatternibreakgroundirebuildwhenibreakdowniwakeupmoreawakethaniveeverbeen
Fixes magboots, engiborgs, and drones being able to move in space
2016-09-13 12:14:31 -05:00
Leo
f8bda98e27 The sound only plays for people in the singulo's z level 2016-09-12 19:01:40 -03:00
Joan Lung
179b0b532d Merge branch 'master' of https://github.com/tgstation/tgstation into idigtilmyshoveltellsasecretsweartotheearththatiwillkeepitbrushoffthedirtandletmychangeofheartoccur
Conflicts:
	code/game/objects/structures/grille.dm
	icons/effects/beam.dmi
2016-09-12 17:14:39 -04: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
Joan Lung
dc930b9da8 this is so fucking dumb 2016-09-11 18:38:14 -04: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
fbe2430ff8 Moves all beam icon states to beams.dmi 2016-09-10 13:09:44 -04:00
Cheridan
94bb371f30 Merge pull request #20402 from ChangelingRain/iwasabillionlittlepiecestilyoupulledmeintofocusastronomyinreverseitwasmewhowasdiscovered
Makes cult structures destructible and readds them
2016-09-10 11:43:59 -05:00
Joan Lung
d9e96145a4 Makes cult structures destructible and readds them 2016-09-08 09:54:01 -04:00
Joan Lung
6863867b0e The supermatter will no longer irradiate mobs on other zlevels when it explodes. (#20356)
* The supermatter will no longer irradiate mobs on other zlevels when it explodes.
Not if, when.

* ENTIRE OTHER ZLEVELS

* not like it fails
2016-09-08 11:35:16 +02:00
Cheridan
5304510121 Merge pull request #20303 from ChangelingRain/shootmedownofcourseimthesinfuloneherebutnowivefoundareasontofeelnofear
Bubblegum's charge now goes the full distance to the target
2016-09-04 13:38:25 -05:00
Joan Lung
266bacf4c8 Bubblegum now charges past its target's location 2016-09-03 12:09:08 -04:00
Remie Richards
897e8c5b88 Merge branch 'master' of https://github.com/tgstation/-tg-station into many_hands_make_light_work
Conflicts:
	code/game/objects/items/weapons/storage/storage.dm
2016-09-02 18:04:18 +01:00
Remie Richards
00738bd2a3 More than 2 hands!? WHAAAAAAT 2016-09-02 16:10:16 +01:00
PKPenguin321
afa17a66bd blacklists lattices from the tesla 2016-08-29 21:11:03 -07:00
oranges
b5903be779 Merge pull request #20136 from ChangelingRain/asinglewhisperedtruthcanbreakchainsbreakalliesforgefriendsintoenemiesandenemiesintofriends
Being in front of the particle accelerator is now actually dangerous
2016-08-28 12:44:17 +12:00
oranges
f800987765 Merge pull request #20083 from PKPenguin321/explosive-tesla
[READY] Explosive Tesla, Take 2
2016-08-28 12:42:22 +12:00
PKPenguin321
a8f893d343 fixes runtime with grav gen 2016-08-27 15:38:44 -07:00
PKPenguin321
58f43daee3 makes nuke and grav gen properly destroy when zapped 2016-08-27 15:20:25 -07:00
Joan Lung
8015693e14 Being in front of the particle accelerator is now actually dangerous 2016-08-26 15:29:54 -04:00
PKPenguin321
438d8d8047 a few tweaks
- makes tesla bomb immune so it wont destroy itself
- makes lights spew fire when they explode instead of the regular explosion
- makes cameras with EMP immunity also have tesla immunity
tesla can now keep itself fully contained (at least on box)
2016-08-24 19:23:18 -07:00
Shadowlight213
7e09f1bc77 Removes SMES power failure.
changes exception system to use critical_machine variable on machines.
Tcomms machines and the AI have their areas exempted.
If the PA is assembled, engineering is exempted.
2016-08-22 19:24:59 -07:00
Shadowlight213
ed46af79fc Oh. 2016-08-21 22:00:00 -07:00
Shadowlight213
15f91e8058 Improvements. 2016-08-21 21:54:25 -07:00
Shadowlight213
74ae1a75fb Adds the grid check random event from baystation. 2016-08-21 21:22:43 -07:00
oranges
4feb383535 Merge pull request #19904 from ChangelingRain/refusethetrappingsofalifethatwouldseeyoudeadandweaveyourownfromotherpeopleslifegivinglives
Containment fields can no longer contain megafauna
2016-08-18 14:14:45 +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
f8a2021a49 it took me five seconds to realize what you meant fuck off 2016-08-15 18:28:03 -04:00