Commit Graph

131 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
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
kevinz000
a50c6a2c6f Grills now properly tesla bolt when things are tossed at them (#20634)
* tesla_grills

* balance
2016-09-24 19:54:12 +12: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
PKPenguin321
f2b6543c1b tesla grille nerf (#20412) 2016-09-13 09:07:47 +12:00
Joan Lung
fbe2430ff8 Moves all beam icon states to beams.dmi 2016-09-10 13:09:44 -04:00
PKPenguin321
08ecbf63ee fixes grilles exploding machines 2016-08-27 13:37:28 -07: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
Joan Lung
60b32ddd85 Simple animals can now have a set amount of damage to deal to objects in place of normal melee damage 2016-07-30 09:14:53 -04:00
Joan Lung
fa12bbacd6 Slightly more construction value is required to unlock scripture 2016-07-08 07:58:59 -04:00
MMMiracles
69c676617b Making Space Great Again (implying it ever was): Part Uno (#19085)
Adds space ruins. Balance not included.
Simple mob ghosts actually work now.
Puzzle1 ruin removed due to issues with projectiles.
2016-07-05 00:02:42 +12:00
oranges
99620ffe76 Merge pull request #18481 from phil235/PlantsGunsShit
Moving code around
2016-06-13 00:14:29 +12:00
phil235
3b8af6f5ff Fixes grille/New() not calling ..()
Blood drips icons are now in blood.dmi instead of drip.dmi (which only had the 5 drip sprites).
Moved projectiles, guns, casings and ammo boxes to be in the right files. Please don't put your gun with its projectile, ammo casing and ammo box all the same file.
I split growing.dmi into 5 smaller files so we don't get close to the 512 icon limit again. Each seed has a var to indicate which icon file to use when planted.
Fixes code for heavy pulse laser projectile to be less awful.
2016-06-11 23:18:26 +02:00
Remie Richards
fda2c699fc Automatic conversion via Regex 2016-06-11 18:37:48 +01:00
Nerd Lord
c51b1503ac clockwork windoors 2016-06-04 10:27:27 -04:00
Nerd Lord
3793e6187a Addition Ratvar conversion effects and related changes 2016-06-03 23:19:13 -04: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
RandomMarine
8b3a4a1570 Makes map placed broken grilles act normally. (#17678)
* Adds proper mapstart broken grilles

* Adds proper mapstart broken grilles
2016-05-16 22:10:01 -05: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
0480790b0a Same things but with structures now. 2016-04-24 20:38:33 +02:00
duncathan
a2a554c48a Merge branch 'master' of https://github.com/tgstation/-tg-station into turfs
Conflicts:
	code/game/objects/explosion.dm
	code/game/objects/items/stacks/sheets/mineral.dm
	code/game/objects/structures/girders.dm
	code/game/objects/structures/grille.dm
	code/game/turfs/turf.dm
	code/modules/events/spacevine.dm
	code/modules/events/wormholes.dm
	code/modules/mining/mine_items.dm
	code/modules/mob/living/silicon/robot/robot.dm
2016-04-03 18:22:20 -06:00
Supermichael777
b525ae0273 I cannot into code too deep 2016-03-30 00:14:14 -04:00
Supermichael777
1d3e9b1817 thanks to remie for reminding me to check things 2016-03-30 00:00:11 -04:00
Supermichael777
22f42d497a oooopps 2016-03-29 23:51:18 -04:00
Supermichael777
11e0a04f78 BZZZZT 2016-03-29 23:44:52 -04:00
duncathan
5bf31463da removes simulated turfs; adds space gas mixture for space 2016-03-10 17:27:01 -06:00
Menshin
ca679f5da2 Added passflag checking for A*. 2016-01-30 13:51:52 +01:00
Firecage
d1327d4076 Merge conflict fix 2016-01-19 10:02:50 +02:00
xxalpha
6d56fafa1c fasdasdjaidfhasiufh
conflix

fuck that

mistake

Clearer if
2016-01-17 20:14:02 +00: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
xxalpha
6ff3817a89 Repath windows (oh god), nerf normal windows ex_act. 2016-01-16 18:27:16 +00:00
xxalpha
2cc55c3ba0 Changed floor ex_act to not break grilles & src if under r-windows. 2016-01-16 17:43:33 +00:00
xxalpha
4dd308c278 fix
glass windows no strong

Affect all levels if in devastating range.
2016-01-09 23:00:24 +00:00
Vincent
16303c1c1f Changes flag name from ABSTRACT to NODECONSTRUCT
Removes holo-tables and holo-windows since those typepaths are no longer needed.
Updates Z2 to reflect this.  Removes spurious tag tags in Z2.
2015-11-30 20:26:03 -05:00
Vincent
0218d51938 Better fireaxe-grill interactions 2015-11-27 15:38:37 -05: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
Ergovisavi
3737234b9c -Adds swarmer as a language, makes them only able to speak to each other
-Fixes a few structures/machines taking non brute/burn damage from attack_animal
-Adjusts girders to be a little less resistant to explosions
-Span classes all the swarmer messages, bumps their health up to 40
-Adds ability for swarmers to dismantle machines and disable cameras. Some are obviously protected.
2015-08-27 22:10:30 -07:00
Firecage
4688c2c969 Fixes proc arguments 2015-07-15 23:52:35 +02:00
Swag McYolosteinen
d826a19f81 Merge pull request #9934 from nukeop/rcd
Makes RCDs more useful
2015-07-08 16:03:31 +02:00
Iamgoofball
a8ec1c76df Merge branch 'master' of https://github.com/tgstation/-tg-station into graphics
Conflicts:
	code/ATMOSPHERICS/atmospherics.dm
	code/game/machinery/computer/computer.dm
	code/game/objects/items/weapons/explosives.dm
	code/game/objects/structures/crates_lockers/closets/fireaxe.dm
	code/game/objects/structures/musician.dm
	code/game/objects/structures/tables_racks.dm
	code/game/objects/structures/window.dm
2015-06-23 12:54:26 -07:00
Remie Richards
ee1e30717a Merge pull request #9980 from LaharlMontogmmery/ContentTransfer
Container Content Transfer - Good for Review (Again...Again.)
2015-06-21 00:09:19 +01:00
oranges
ea1df76a6d Hitby messages removed, may help with singularity lag from throwing 2015-06-19 15:32:56 +12:00
LaharlMontogmmery
373c918a4a Going through some hOOPs - bit of a overhaul. 2015-06-18 17:40:35 +02:00
Iamgoofball
c2256d41fc BAR NOW SHOWS UP ON THE OBJECT YOU'RE INTERACTING WITH 2015-06-13 13:58:08 -07:00
barackobama
a6ae5dbe47 Increase max ammo for RCD, allow RCD to be loaded
with glass, metal, and plasteel, allow RCD to build
and deconstruct grilles and windows, add three RCDs
to the Engi-Vend machine
2015-06-13 15:40:06 +01:00