Commit Graph

171 Commits

Author SHA1 Message Date
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
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
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 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
oranges 77b736d48f Properly guard air removal in some atmos machines (#20543)
* Properly guard removing air from empty tiles in some atmos machines

Scrubbers had the guard, but were trying to access gases before
checking, leading to a lot of needless runtimes. dp vents did not seem
to check at all

* remove stray bracket
2016-09-19 15:08:42 +02:00
A-t48 4f40d955b1 Fix scrubbing freon\water vapor + fix labelling canisters with freon\water vapor (#20301)
* Fix a bunch of atmos stuff

* undo whitespace fixes

* remove whitespace fixes
2016-09-04 22:24:29 +02:00
Iamgoofball 82da7f1042 Removes chem gas leftovers (#20297)
She, goof. She.
2016-09-03 19:16:17 -04:00
AndrewJacksonThe2nd 42dbcf2f89 abhzsaxbhgszabnxzhbjmnzshbjmzdsxbmh 2016-09-02 16:01:52 -07:00
AndrewJacksonThe2nd 2953360310 Removes reagent gas, Misc changes, REAGENT CODE OPTIMIZATION 2016-09-02 15:04:51 -07:00
AndrewJacksonThe2nd 15eac23ac3 CHEMICAL GAS & Reworks 2016-08-31 19:35:39 -07:00
AndrewJacksonThe2nd 64643ee402 code memes 2016-08-30 23:37:12 -07:00
AndrewJacksonThe2nd f405ed6603 GOOFMOS: FREON REWORK and WATER VAPOR 2016-08-30 23:25:32 -07:00
Iamgoofball 634662d6b4 Adds Freon to the game (#20188)
* Adds Freon to the game

* MAP CHANGE MEMES

* hahahahafuck

* YOU SAW NNOTHING

* fuqq

* sd

* Fixes

* Fixes2

* fixes

* BALANCE

* mob icecubing ALSO FUCK YOUR STATUS EFFECT CODE @Xhuis

* i play pokemon go every day

* Reworks icecubing

* sjyuhdjzsadjhm x jymhuxzc

* Final Pass

* kmJCBQADVNWVBOJRFJN

* changes

* nnjhdxsjhjh
2016-08-31 08:58:55 +12:00
KorPhaeron 074bc50fb4 Damage Multiplier Config 2016-08-18 20:19:19 -05:00
Kyle Spier-Swenson ce5d98c7d6 Tweaks space wind probability curve.
Basically, before move_prob would be 50% if the pressure was exactly equal to the atoms resistance value, 100% if it was exactly double, etc.

Now that number is 75% if the difference is exactly pressure_resistance, but we minus 25% from the number, meaning it's still 50% if the difference is exactly pressure_resistance, but it raises and lowers fasters otherwise.

We also don't even attempt to move if the move_prob is lower than 25%, to avoid the issue where even small differences make everything move over time.
2016-08-08 16:53:20 -07:00
oranges 9863833219 Merge pull request #19688 from Cruix/gas_mix_fix
Possibly fixes a possible bug in possible atmos code.
2016-08-05 12:09:06 +12:00
unknown 02f18af893 Fixed a bug in atmos code. 2016-08-03 03:10:41 -07:00
unknown 5ea9203c7f Added some has_buckled_mobs() checks. 2016-08-02 23:39:29 -07:00
Kyle Spier-Swenson c9831c4afd [Ready]Makes space wind great again! (#19494)
* Makes space wind great again!
Space wind is now a scaling percent to move on pressure differences.
Space wind percent to move scales with pressure amount, and other modifers:
Actively moving (as in holding down a move key) reduces chance of getting moved by space wind by 30%
Having a wall or densed anchored object to your left or right (in terms of direction to be moved) will lower your chance to be moved in space wind by 20% in each direction. (so a wall on both sides is 40%) (Only applies to mob's with limbs)

* does the mrp
2016-07-28 09:43:51 +02:00
Cheridan 3855216314 Merge pull request #19220 from MrStonedOne/patch-228
makes some atmos procs have the right pathing
2016-07-10 09:56:57 -05:00
Kyle Spier-Swenson 83e4404f7b Planetary atmos (#19189)
* Planetary atmos
Turfs marked as planetary_atmos will revert back to their default state as if the upper atmosphere mixes with it reverting it.

* Fixes Planetary Atmos being treated as space.
2016-07-09 18:18:31 +12:00
Kyle Spier-Swenson da095c2cb4 makes some atmos procs have the right pathing
Seriously? Two separate procs under the same name. loc is typed to /atom/ so this made no sense to do.
2016-07-08 16:06:48 -07:00
oranges c2542801fe Merge pull request #18637 from lzimann/patch-9
Adds admin message when canister with BZ is open
2016-06-18 11:36:20 +12:00
Leo cbf976affd fix it 2016-06-17 20:10:14 -03: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
Leo 7d0d4d3740 Admin message for BZ gas 2016-06-16 17:08:19 -03:00
Kyle Spier-Swenson 235b79fb5a StonedMC, the bastard love child of GoonPS and CarnMC (#17987)
Basically, they key difference between StonedMC and CarnMC is that when multiple ticks want to run at the same byond tick, we divvy up the tick between the subsystems, rather then allow one subsystem to hog it all.

The key difference between StonedMC and GoonPS is that we allow the subsystems to tell us how to divvy up the tick using flags and priority.

The new SS_ flags allows us to select behaviors that used to be piggybacked as side effects of dynamic wait or default but sometimes unneeded behavior.

Dynamic wait is 100% gone, lower priority and SS_BACKGROUND are better more refined ways of doing this when combined with MC_TICK_CHECK

I have by design never looked at the inners of goonPS, so this is all original code but I know it uses two loops because of comments by goon devs on reddit threads, that design didn't make sense before, but when I can tell a SS how much of a byond tick it is allowed to have, knowing how many need to run this tick is helpful I also know a bit more about how it works from piecing together comments in #vgstation.

Detailed list of changes:

Subsystems now have flags, allowing fine grain control over things like rather or not it processes, inits, rather it's wait is how long between runs (post run timing) or how long between starts, and rather or not late fires should cause the next fire to be earlier.

Mc now has two loops One loop handles queuing shit, one loop handles running shit.

MC now splits up tick allotment rather than first come first serve Subsystems can even request a bigger share using higher priorities. (It will even resume subsystems it paused if other subsystems hadn't used as much as it predicted they might need)

Default fps is now 20 This is related enough to the MC and it's a change that's really long since over due

All code oddities are most likely to be necessities to lower overhead on the mc since it runs every tick
2016-06-16 18:01:16 +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
Core0verload 77d70b9955 Finishes boards refactor (#18392)
This PR finishes work started in #17300 by making all the machines use apply_default_parts(src) for components initialization.

It also adds two new board sprites, one for Abductor boards and one for Ravtar boards:
board board_a board_r

There are no deconstructable Ravtar machines yet, sprites are added for future use. Abductor sprite is used only by Seed Vault's plant DNA modifier. It wasn't made by actual abductors, but it was surely made by aliens.

Boards now have a new var: def_components. It is a list containing replacement paths for default parts. For example, list(/obj/item/weapon/stock_parts/matter_bin = /obj/item/weapon/stock_parts/matter_bin/super) would make machine spawn with super matter bins instead of basic ones by default.

Console screens that were used in machines instead of glass sheets are replaced with actual glass sheets. Support for sheets as machine components was added in a previous PR
2016-06-10 13:13:33 +12:00
AnturK 19eb97ae18 Moves some list initializations to New
Fixes missing ..() calls in New()
2016-06-07 18:39:13 +02:00
Lzimann 233a5bba82 Hopefully fixes conflicts. 2016-06-02 22:37:18 -03:00
Lzimann f5dd3b8623 Adds BZ gas to atmos filters. 2016-06-02 19:48:44 -03:00
Lzimann a7c6223b7d Adds a way to filter BZ gas with scrubbers and air alarms 2016-06-02 19:23:41 -03:00
Razharas 9fdae2fe4e Merge pull request #17576 from LatD/Research
[Ready for test/merge] R&D level remake
2016-06-02 18:41:43 +03:00
MrPerson 7713a547cd Canisters dump their contents when they burn up (#18043)
Fixes #16713
2016-05-30 18:53:38 -05: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 907fc36e5c Merge remote-tracking branch 'refs/remotes/tgstation/master' into Research 2016-05-24 22:17:44 +03:00
Razharas f4a82e7054 Makes space 250 times less potent
Fix https://github.com/tgstation/-tg-station/issues/17814
2016-05-23 05:03:50 +03:00
LatD 6e6474ee9e Imprinter origin and req lvls 2016-05-22 23:46:05 +03:00
oranges 6486b588c6 Merge pull request #17333 from nullbear/less-wetness-updates.-Ice-sliding-in-no-slips-
Wetness stuff.
2016-05-21 14:46:09 +12:00
Cheridan 23d8de67c9 Merge pull request #17445 from bgobandit/ayygentb
Adds BZ, a hallucinogenic gas. [MAP EDIT]
2016-05-19 18:14:18 -05:00
Cheridan 40c9119697 Merge pull request #17727 from Razharas/HEPipeFix
Fixes HE pipes not working in space and lava
2016-05-19 04:51:00 -05:00
bgobandit d430ca29ab fixes the bugs of the jordie 2016-05-18 14:27:26 -04:00
bgobandit b94ce1968b Merge branch 'master' of https://github.com/tgstation/-tg-station into ayygentb
Conflicts:
	_maps/map_files/MetaStation/MetaStation.dmm
2016-05-18 03:13:37 -04:00
Razharas da40045cfa Makes space great again
Makes space heat conductive
Makes lava really heat conductive
2016-05-17 10:02:23 +03:00