Commit Graph

49 Commits

Author SHA1 Message Date
Joan Lung
38ec5563dc Fixes slips 2017-06-19 14:57:25 -04:00
Joan Lung
2672d88800 Renames stun effects and changes stun input values as preliminary work for changing stuns to status effects (#28524) 2017-06-18 23:03:51 -03:00
Lzimann
5a618297ce Replaces the default output with the to_chat wrapper. 2017-03-10 01:32:05 -03:00
Kyle Spier-Swenson
12570805bd Closes the Pool. (#23150)
* Delete pool.dm

* Removes usage of PoolOrNew

* Wrap up
2017-01-22 16:00:23 -05:00
bgobandit
a8b2d1f8b8 Foam no longer spreads to transit space turfs. (#22787)
* Foam no longer spreads to transit space turfs.

* Blacklists lava and chasms for foam; blacklists transit turf for xeno weeds

* wait wtf was I thinking
2017-01-07 19:42:42 +13:00
Kyle Spier-Swenson
dedb16826e Speeds up world init. (93s -> 49s) (#21992)
* Speeds up world init.

* Armor is now new inited for obj and the first level of subpaths.
* Actions is now lazyinited and deleted with empty.
* Actiontypes is now only inited when actually used and deleted once it pre-fills actions with the action buttons.
* Pipes now prefill their node list(s) in new() using new /list/ (count) syntax to speed up the list initaliztions and remove the init proc.
* Pipes no longer store their item version, instead creating it on the fly when deconned
* Walls no longer store their metal stacks, instead creating it on the fly when deconned.
* obj, walls, floor, plating, item, machinery, structure, pipe, pipenet, atom, and movable no longer have an (init) proc. (along with a few other smaller examples)
* Atmos can pass checking is now a var with the ability to have a proc be call in advance cases.
  * (as a side effect, I had to fix a few things that were calling atmosCanPass rather then using the pre-calculated list, this should speed up chemfoam and flame effects greatly)

* Reverts upload limit
(remind me one day to defuck this, it could easily be a config thats not editable by vv to make changes easier)

* Makes apc update icon a bit faster.
APC new is some what high on the profile of world init, still not sure why, but this stood out as a waste of cpu so i fixed it.

* Fixes runtime with atmos backpack water tanks.

* Makes smoothing faster (and fixes turfs smoothing twice at init)

* Makes apcs init faster by replacing some spawns with addtimer

* fix transit turfs.
2016-12-08 21:50:15 +13:00
phil235
2dc956bea0 Merge branch 'master' of https://github.com/tgstation/-tg-station into Color_washing
# Conflicts:
#	code/game/gamemodes/clock_cult/clock_scripture.dm
#	code/game/gamemodes/clock_cult/clock_structures.dm
2016-10-31 19:59:00 +01:00
Iamgoofball
8c77f30770 Makes foam less garbage
only took me 6 months and phil saying I can't make any new PRs until it's fixed

foam now only divides by 7, and it won't apply the reagent's effects unless the lifetime is a multiple of 7
2016-10-21 10:07:44 -07:00
phil235
240f3a4c49 Adding var/list/atom_colours to /atom .
The var will be used to store the various coloring that happen for the atom so that we can separate paint coloring from color that must be inherent to the atom (an initial color for example), or from certain coloring effect like revenant's blight, mob electrocution's black color, admin edit of the color var, green color from holding the greentext item, etc.
The list has four elements, used for four categories:
ADMIN_COLOUR_PRIORITY for admin varedits and very rate color effect like holding the greentext item (and other effects that should prime over any other potential source of coloring even temporary effects).
TEMPORARY_COLOUR_PRIORITY for short color effects like revenant blight on mob, mob electrocution making you all black for a couple seconds, effects that should be appearing above paint coloring.
WASHABLE_COLOUR_PRIORITY for pretty much all paint coloring like colorful reagent on mobs, coloring turfs with paint, etc.
FIXED_COLOUR_PRIORITY for color inherent to the atom, like a blob's color, any object with a color value given in its definition.

Fixes electocution animation on mob not making the mob all black (with the skeleton overlay blinking over it)
Spray cleaner and soap can now wash paint off mobs, turfs and objects.
2016-10-19 01:51:30 +02:00
phil235
1ea0e47aa4 Visible_message() when being attacked by melee or projectile is replaced by a simple message only to the target instead of all viewers.
The message when firing a gun is removed.
To keep things balanced melee attacks (punches, alien attacks, animal attacks, etc...) now show a visual effect (similar to what we current have with item attacks.
Fixes muzzle flash effect not appearing for mech guns.
Fixes muzzle flash effect not appearing for certain ranged animal.
Fixes the item attack effect not being visible to camera viewers and mech occupants.
Fixes toy guns foam dart not dropping on the ground when shooting a mob on the same tile as us.
Fixes toy smg magazine sprite being invisible sometimes.
Fixes foam dart not facing the correct direction when fired.
Changes the bullet projectile sprite to have a slight tracer effect so as to be more visible.
2016-10-13 19:21:30 +02: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
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
fb9f2a6bb5 Tweaks smoke and foam layers 2016-09-04 17:57:29 -04:00
Jack Edge
7aef42ae8b spawn() removal on effects_*.dm 2016-06-25 17:50:47 +01:00
Kyle Spier-Swenson
0d6bbbb412 stop the pills (#18703)
* RedPills Processing

Now you have to use START_PROCESSING(SSname, thing) (and STOP_PROCESSING)

* Fixes a minor bug.
2016-06-20 12:07:44 +02: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
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
0caa59b21a First commit of this big PR
These are the files with just tiny tweaks. Mostly modify an object's attackby so it does "return ..()" instead of "..()".
If there are other things in this commit, the PR's description will explain them.
2016-04-24 20:26:24 +02:00
AndrewJacksonThe2nd
40e766c6d0 AAAAAAAAAAAAAAAAA 2016-03-27 12:04:33 -07:00
AndrewJacksonThe2nd
f54132e74b Foam and Conveyor Belts now process as fast as possible, Adds the Fast Process subsystem 2016-03-25 03:56:01 -07:00
KorPhaeron
7cebbae3f6 Foamed Metal 2016-01-24 19:40:02 -06:00
xxalpha
6aaf9c43a6 Made foam transparent and changed its layer to be above mobs. 2016-01-22 23:57:18 +00:00
phil235
d3ee910211 Makes effect system code more OOP.
obj/effect/effect is now renamed obj/effect/particle_effect for better usability.
datum/effect/system and /datum/effect/effect/system are now both /datum/effect_system.
Fixes a bug where wall mounted igniters (and other spark producing objects) didn't produce sparks sometimes.
Moved explosion_particles.dm into the effect_system folder, because it has effect_systems code.
2015-10-21 23:28:29 +02:00
phil235
47909d525f Changes smoke to behave more like foam. Each covered tile has one smoke cloud. This makes smoke clouds much less random, especially in terms of reagent application.
Also smoke reaction now uses the TOUCH method instead of VAPOR, to differentiate smoke and foam. Mob without internals or gas masks also ingests reagents in the smoke.
Moved nanofrost smoke code to effects/effect_system/effects_smoke.dm
2015-10-15 21:52:37 +02:00
Razharas
ad9fa24d5f Merge pull request #11515 from xxalpha/PLmD_69pXpk
Tweaked foam spread logic, foam layer.
2015-09-01 18:33:22 +03:00
xxalpha
d0701c4088 Tweaked foam spread logic, foam layer.
Better

Changelog

PERFORMANCE

get_turf(loc) is still superior
2015-09-01 00:33:33 +01:00
duncathan
51c09f16bf makes all Destroy()'s return properly 2015-08-31 00:21:01 -06:00
phil235
d2a4024e7f reagent reaction() now use more methods. Instead of just INGEST or TOUCH, we now have INGEST (for injection, ingestion), TOUCH (for splashing), PATCH (for patch application and blob attack), and VAPOR (for smoke, foam and spray application).
- TOUCH no longer transfer reagent by default, it's now only used for touch based effect like being flammable when touched by fuel or you and your stuff being acided when touched by acid).

- PATCH does no transfer of its own (but actual patches code do make a transfer) but is used for touch effect that ignore clothes and protection (blob attacks, patches effect going through hardsuits)

- VAPOR does reagent transfer but it takes into account clothing protection

Fixes a typo in humanoid/get_permeability_prot
Fixes acid splashing on objects not destroying it. Fixes acid splashing on turf not destroying objects on the turf.

Changed damp rag smothering code a bit.

Blob Smoke now doesn't do anything.
2015-08-09 14:23:12 +02:00
phil235
6a0be8b9a3 Fixes sleeping smoke never disappearing. Also switching processing.Add(src) to processing |= src.
Makes the empty space on the chem bottles sprites clickable.
Fixes a runtime with reagent_containers/throw_impact()
2015-07-31 15:01:35 +02:00
phil235
3e9ab4e3c1 Merge branch 'master' of https://github.com/tgstation/-tg-station into SmokeFoamBuff
Conflicts:
	code/ATMOSPHERICS/atmospherics.dm
	code/__HELPERS/unsorted.dm
	code/game/objects/items/weapons/tanks/watertank.dm
	code/modules/reagents/Chemistry-Recipes.dm
2015-07-16 14:09:12 +02:00
Firecage
4688c2c969 Fixes proc arguments 2015-07-15 23:52:35 +02:00
phil235
d4cdd8eaa1 iron foam is now blue steel color just like aluminium foam.
Fixes metal foam from backpack firefighter watertank.
Fixes nanofrost not freezing shut vent scrubbers.
Atmos backpack watertank now starts full of water.
Change foam layer to Objlayer +0.1 so that it is above foammetalstructure so it doesn't hide the dissolving animation and also above tables.
Buff foam and smoke: smoke/foam contains four times the amount of reagents that was inserted in them, for balancing.
Add a little more smoke clouds for tear gas grenade.
Removed the no longer needed max_lifetime smoke var.
Reagent_dispensers (watertank) now show how much reagents they have left upon examination.
Fixed some code formatting in reagent_dispensers.
Fixes nanofrost temperature lowering effect that wasn't working.
Adjusted reagent volume in blob spore smoke because of the buff.
Change to sorium and ldm: effect varies with created volume.
If you are close to a powerful vortex you are thrown, otherwise you are just moved instead.
Vortex blobs now only make you step if you are far from it when reaction hits, otherwise it throws you. The vortex blob range gets +1 to compensate. Also the range and effect depends on the reagent volume which means lower effect for blobspore smoke.
2015-07-09 19:49:06 +02:00
phil235
ac63896910 - Foam/moke lifetime is no longer affected by reagents volume.
- Remove show_message argument from blob reagent reaction_mob()'s and remove the if(show_message) send_message(). Now send_message is called directly on each blob strike.
- Changed blob reagent effects to depend on volume so blob spore smoke isn't deadly.
- Breathing smoke now reduces its life expectancy and calls reaction(INGEST) with the accurate amount of reagent.
- Adjusted the effects on mobs of some other reagents.
- Adjusted reagent amounts in chem grenades.
2015-06-24 20:58:22 +02:00
phil235
5242108c4d a few fixes 2015-06-22 01:39:32 +02:00
phil235
b0cd6d34b1 Lots of work on acids, smoke, foam, reagents reaction() proc.
- fixed the fraction argument in reaction(...., INGESTED, fraction) so the proper amounts of each reagent react, not all of it.
- slight optimization of datum/reagents/reaction()
- small optimization /datum/reagent/proc/reaction_mob
- the smoke's reagents no longer do direct transfer upon crossed()/move() but uses "reagents.reaction( mob, TOUCH)" only.
- fixes no ingesting smoke if it's in the dark.
- removed block gas smoke effect flag from clown mask and other non "actual" gas mask.
- refactor how protection against touched chems being absorbed is done. get_permeability_protection() to get that protection. No more

simple RNG get touched or not, now the amount that touches you depends on your protection and the volume in question.
- changes acid_act to take volume into account.
- chem_smoke now uses process() just like foam, we remove the reaction from crossed() and Move(), it's only done in process() now.
- optimization of effect/smoke, OOP! And now all smoke effects use objprocessing instead of shitty sleep/spawn
- removed mob var/coughedtime.
- add a volume check to item/acid_act(), there's a threshold to be able to melt and then a probability to melt (acidpwr&volume).
- greatly lowered the amount of reagent in the smoke from dead blobspore (so the volume isn't enough for melting)
- human/acid_act(): damage to limbs depends on acidpwr&volume.
- fixes metalfoam not working.
- smoke powder: only one start() call.
- Amound of smoke objects depends on amount of smoke recipe created.
- Adds an argument to add_reagent() to block automatic call of handle_reaction()
- When using reagents/proc/trans_to(), reactions are now only handled after every reagent is transfered and not before.
- Amount of smoke objects depends on amount of smoke reagent created.
- radius of foam reaction depends on amount of foam reagent created.
- The amount of other reagents inside the smoke/foam decides the life expectancy of the effect.
- The amount of reagents in each small smoke cloud/foam cell depends on the amount of other reagents in the initial reaction but also

how much smoke/foam was created (more smoke means dilution of the reagents).
- smoke/foam's reagent reaction on mob decreases the life expectancy of the effect (to avoid reagent duplication)
- The amount of reagent reacting with atoms is less if the life expectancy is high.(to avoid reagent duplication)
- The amount of movement from the smoke now depends on the number of smoke clouds created.
- removing some useless code in chem_grenade/prime().
- When calling human/acid_act(), item acid melting chance lowers after each each successful melt in the list, some of the acid is

"used" to melt that item so the next items have a lower chance to melt (to make melting every clothing harder).
- remove the banned reagent list from sprays, not needed anymore now that acid is nerfed.
- chem_grenade reaction, if there's no reagent left after reaction (smoke/foam/etc, reagents cleared) you don't get the steam effect

and immediate reaction with all atoms around the grenade explosion. (Fixes foam cleaner grenade deleting bloodstains around it as soon

as the grenade explodes, even if the foam hasn't reached the tile yet).
- melted storage items now drop their content instead of deleting everything.
2015-06-22 00:35:24 +02:00
Jordie0608
7357a10f68 more fixes 2015-05-11 20:27:16 +10:00
kingofkosmos
72749392d8 span classes removed from visible.messages 2015-04-24 20:50:51 +03:00
MrPerson
94c0c1598d Fixes cleaner grenades
Fixes #8757
Default for locate is "in world"!
2015-04-05 16:55:17 -07:00
MrPerson
b6c71dc50d Effect pooling
obj/effect/effect all pool themselves.
PoolOrNew() can now be passed a type and a list instead of a type and a location. In that case, the list will be passed to New() via arglist().
RCD's now delete their spark system and properly garbage collect.
2015-03-24 11:44:49 -07:00
Iamgoofball
e5a3694c0f Adds Napalm as a reagent and merges old napalm into Phlog. Fixes some foam stuff. 2015-03-08 19:43:17 -07:00
Iamgoofball
3964cb3126 Adds heart attacks properly. 2015-03-02 20:50:48 -08:00
Remie Richards
5fc7af7fbf attackby() now has an argument containing the parameters of the click that called it. Items placed on tables now center their icon where the user clicked. this is NOT true for racks, since racks look organised in their sprite.
Items reset their pixel_x and pixel_y values on pickup.
2015-02-19 13:02:43 +00:00
Cheridan
85ec168881 Foam spreading now respects type. 2015-02-14 13:32:32 -06:00
Cheridan
69b856f373 Saving before I ruin everything
Lightning works too
Cleans up old shit from Chemistry-Recipes.dm
2015-02-14 11:46:20 -06:00
Cheridan
284223102e Reagent foam works
TODO: Make metal foam work
2015-01-26 00:17:15 -06:00
Cheridan
aa3b7d9a75 Splits effect_system.dm into individual files. 2015-01-25 13:57:45 -06:00