Commit Graph

44 Commits

Author SHA1 Message Date
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
Joan Lung
5de5ada0cd Proselytizers can now convert lattices (#23146) 2017-01-21 19:06:24 -05:00
Joan Lung
062b5c4013 clockwork catwalks 2017-01-15 14:53:01 -05:00
Joan Lung
3f0009b12e Ratvar will now convert lattices to clockwork lattices 2017-01-15 11:45:45 -05:00
RandomMarine
4f8bf3e614 Catwalks now drop two rods when deconstructed. Also fixes metal duplication exploit. (#22488)
* catwalks now drop two rods

* fixes closets dropping more metal than takes to build
2016-12-29 10:06:14 +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
Incoming5643
f64e2664be Lets lattice spawn in ruins by removing overzealous deletions (#19965) 2016-08-20 17:03:18 -05: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
duncathan
e86cf0f280 praise the good lord, for the game finally compiles 2016-03-29 19:04:37 -06:00
duncathan
b9950c4358 turf/open and turf/closed 2016-03-29 13:38:56 -06:00
duncathan
12a6205372 Merge branch 'master' of https://github.com/tgstation/-tg-station into turfs
Conflicts:
	_maps/RandomRuins/SpaceRuins/asteroid4.dmm
	_maps/RandomRuins/SpaceRuins/spacebar.dmm
	_maps/RandomZLevels/Academy.dmm
	_maps/RandomZLevels/beach.dmm
	_maps/RandomZLevels/caves.dmm
	_maps/RandomZLevels/research.dmm
	_maps/RandomZLevels/snowdin.dmm
	_maps/RandomZLevels/spacebattle.dmm
	_maps/RandomZLevels/undergroundoutpost45.dmm
	_maps/RandomZLevels/wildwest.dmm
	_maps/map_files/AsteroidStation/AsteroidStation.dmm
	_maps/map_files/BirdStation/BirdStation.dmm
	_maps/map_files/DreamStation/dreamstation04.dmm
	_maps/map_files/DreamStation/z5.dmm
	_maps/map_files/EfficiencyStation/EfficiencyStation.dmm
	_maps/map_files/MetaStation/MetaStation.v41I.dmm
	_maps/map_files/MiniStation/MiniStation.dmm
	_maps/map_files/TgStation/tgstation.2.1.3.dmm
	_maps/map_files/generic/z4.dmm
	_maps/map_files/generic/z5.dmm
	_maps/map_files/generic/z6.dmm
	_maps/templates/lavaland_surface_prisoner_crash.dmm
	_maps/templates/lavaland_surface_seed_vault.dmm
	_maps/templates/lavaland_surface_ufo_crash.dmm
	code/game/asteroid.dm
	code/game/atoms.dm
	code/game/gamemodes/cult/runes.dm
	code/game/gamemodes/malfunction/Malf_Modules.dm
	code/game/machinery/computer/arcade.dm
	code/game/objects/structures/lattice.dm
	code/game/turfs/simulated/floor/fancy_floor.dm
	code/game/turfs/simulated/floor/misc_floor.dm
	code/game/turfs/simulated/floor/plasteel_floor.dm
	code/game/turfs/simulated/walls_misc.dm
	code/game/turfs/turf.dm
	code/modules/events/spacevine.dm
	code/modules/mining/mine_turfs.dm
	code/modules/mob/living/living.dm
	code/modules/mob/living/silicon/robot/robot.dm
	code/modules/mob/living/simple_animal/bot/cleanbot.dm
	code/modules/mob/living/simple_animal/bot/mulebot.dm
	code/modules/mob/mob_movement.dm
2016-03-10 23:07:21 -06:00
duncathan
5bf31463da removes simulated turfs; adds space gas mixture for space 2016-03-10 17:27:01 -06:00
Tkdrg
e6c0cd286f Attempts to fix lattices not GCing sometimes 2016-03-05 14:01:06 -03:00
Nerd Lord
f458c2cead The blob eats nondense things in all cases.
Probably fixes one or two bugs in the process.
2015-11-20 21:03:43 -05:00
xxalpha
36ae116a48 Added another mode for smoothing (smooth with all subtypes). 2015-09-23 00:55:10 +01:00
xxalpha
6bdd100eb6 Lattices and catwalks now use generic icon smoothing.
Put another check in smooth code to prevent runtimes
2015-09-19 14:55:09 +01:00
bear1ake
f697ae90f5 removes a bunch of .0 2015-09-10 20:57:30 +09:00
xxalpha
b9db8ce854 A few qdel fixes. 2015-08-27 13:15:41 +01:00
Firecage
4688c2c969 Fixes proc arguments 2015-07-15 23:52:35 +02:00
Samuel Rowe
b8ce5bc7cf E 2015-05-06 15:31:09 +12:00
xxalpha
c25576ad6a Merge remote-tracking branch 'upstream/master' into catwalkmachines
Conflicts:
	code/game/objects/structures/lattice.dm
2015-03-20 17:02:00 +00:00
xxalpha
790bdd90b0 Fixes cables being destroyed when creating plating out of catwalk space. 2015-03-18 19:17:04 +00:00
xxalpha
13e291a4e9 Merge remote-tracking branch 'upstream/master' into catwalkmachines
Conflicts:
	code/game/turfs/turf.dm
	code/modules/power/power.dm
2015-03-06 19:19:09 +00:00
xxalpha
15dacd50b1 Replaces cancable var with two new procs.
Clean up.
2015-02-21 20:15:03 +00: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
paprka
ac85775b02 catwalk fixes 2015-01-28 19:30:21 -08:00
paprka
58b10962dc clicking on the lattice will now construct a catwalk as well 2014-12-29 05:24:48 -08:00
paprka
acd40bdde8 further updates smoothing and icons 2014-12-28 00:17:19 -08:00
paprka
0e4903bd83 Merge branch 'master' of https://github.com/tgstation/-tg-station into walkthecat
Conflicts:
	_maps/map_files/TgStation/tgstation.2.1.3.dmm
2014-12-26 18:35:12 -08:00
paprka
3ca6d769a1 adds catwalks 2014-12-26 17:38:55 -08:00
paprka
404da4dbdd code optimizations 2014-12-25 13:28:05 -08:00
paprka
a6acdeb3c2 initial commit 2014-12-25 13:07:06 -08:00
Razharas
7758a0afed Ok now explosions shall work properly
Changed severity to target, make items not destroy themselves on
severity lower than 1, all that stuff
2014-12-05 23:21:48 +03:00
Razharas
ff456ebaf4 Unwinded most of shit
Meh
2014-11-19 21:36:45 +03:00
Hornygranny
c8ffcf51ae lattice and grille deconstruction refactor 2014-11-07 13:36:28 -08:00
Lo6a4evskiy
82f869c9a6 Updated to resolve conflicts 2014-09-06 13:34:43 +04:00
Firecage
6c7af5eb32 SPANCLASSES!!!!! 2014-08-26 09:52:13 +02:00
MrPerson
9eee3e5067 First pass at a qdel() garbage collection system for tgstation
Works pretty well. If it can't GC something, it'll just del() it and be done.
Speed is amazing, holy shit.

New procs you should be aware of:
qdel(atom/movable) - sets up an object for garbage collection. Call this rather than del(atom/movable).
atom/movable/Destroy() - called right before the object is GC'd, so it still has a loc. Also called if the object is del()'d.
new controller - garbage.dm has all the details on this. Basically it nulls all references on GC'd objects and force del() them if necessary.
Generally speaking, objects should use Destroy() for behavior prior to deletion rather than Del(). You should also always call the parent so the object gets the right gc_destroyed var set.

ISSUES:
Tries to GC mobs atm. This actually works for new players, not so much for humans/monkies/simple_animals/anything. I'm guessing it needs to clear out their mind and HUD and maybe other things.
Gibbing is really bugged. It works, but the overlays just sit there for awhile and ugh. I'm very tempted just to del() mob/living and mob/camera and call it a day.
qdel() equipment doesn't unequip the item.
Pipes don't generally GC correctly. Debugging suggests they get referenced in many pipenets and that isn't cleared properly. However some do work fine. Need assistance here.
Bots don't GC, probably in the radio controller.
Lots of other shit doesn't GC but it's hard to find them because of the pipe spam.
I think I'm calling Destroy() twice by accident.
2014-02-23 14:55:12 -08:00
johnsonmt88@gmail.com
867b21c7ce File restructuring!
This brings down a bunch of defines from /code/defines/obj.dm unto their appropriate files.

I've moved morgue.dm from game/machinery into game/objects/structures since that file contains no machines.

I've reorganized the objects/items/stacks folder and made a 'sheets' and 'tiles' folder to keep things separate

I've separated stool_chair_bed.dm into its own folder which now contains the files: stools.dm, chairs.dm, bed.dm and alien_nests.dm to make it a little easier to go through.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4582 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-29 18:00:30 +00:00
johnsonmt88@gmail.com
d36387607f More file structure stuff.
- The folders themselves are now finished
- Next I'll go through each file and organize them
- Lastly I'll start pulling the object definitions out of /code/defines/ and put them into their respective files.

**Note to committers**
Make sure the .dme file updates when you update to this revision. If necessary delete the .dme and svn-update.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4546 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-26 01:20:02 +00:00