Commit Graph

53 Commits

Author SHA1 Message Date
Cyberboss
3930510003 Fixes gravity generator qdel loop 2017-02-13 12:24:01 -05:00
Cyberboss
5959ac32cc Refactors atom/Initialize. Fixes ruins being initialized twice (#22778)
* Refactors atom/Initialize

Captialized for compiling correctness and to be more inline with Destroy

Will now be called from atom/New if the world initialization loop in SSobj has already run. Should always call the base.

Now comes with the `roundstart` parameter indicating whether or not it was called by SSobj or atom/New

Other fixes/tweaks:
- Renamed a proc called Initialize in abduction consoles to Setup
- Removed /obj/item/device/radio/headset/headset_sec/department: Broken and referenced literally nowhere in the code
- Removed a spawn from the Initialize of turbine_computer which made literally zero sense
- Generalized the proc which fixes RND servers with no id set

Reasoning: It's better to check roundstart per function than to have to duplicate code in New and Initialize. Think of it as a safer New for atoms. If we move enough stuff to it, initial map load performance will increase due to less New calls

* Fixed a thing

* Actually, fuck the police

* >Expecting a merge without errors

* >Not calling ..() in New

* Sanic

* Fix the headset bug

* Makes sure the map loaders dew it right

* Fixes ruins being initialized twice

* Rename roundstart -> mapload

* Revert "Rename roundstart -> mapload"

This reverts commit 667c327fd2ccfa3ce4f4db52eac03f9e8b0f6812.

* Remove unrelated change

* A more direct solution to map loads

* And now we shouldnt need this warning

* Add the new var to SSobj recovery

* Revert "Revert "Rename roundstart -> mapload""

This reverts commit dee07dbd5e4696554ac43aae5b91cce743b9b9e0.

* Line endings
2017-01-23 09:37:45 +01:00
kevinz000
33a502a03b Update gravitygenerator.dm (#22971)
Prevents gravity generator from being thrown, and therefore completely destroyed by meteorshots.
2017-01-14 11:56:06 +13:00
Cyberboss
e4296736d8 Fixes a gravgen Destroy runtime 2016-12-20 16:39:23 -05:00
Cyberboss
6fe4e76863 As you wish 2016-11-06 20:53:31 -05:00
Cuboos
bf079d29d4 POWER TOOLS TAKE 2. (#20923)
New power tools for the CE! It's like goof's golden tools but less memey and makes more sense, power tools are much faster than normal tools and take the place of two.

Hand drill, activate to switch between between screwdriver bit and bolt bit (screwdriver/wrench)

Jaws of life, activate to switch between a cutting head and prying head, can also open powered doors like a xeno. Cutting head cuts your head off if you suicide with them. I wanted to make the prying head gib your head but i couldn't figure it out.

Reworked how construction handles sounds and added a new "usesound" var to obj/items. This is useful if you want to add another tool or item that makes a send when it's being used. Also useful if you want to replace a sound for an item or if you have an item with a choice of sounds (like if you have two versions of a sound sound you want to play)

CE now gets a unique white tool belt, exactly the same as a regular tool belt, just a re-skin.

CE also spawns with the new power tools and an experimental welder, CE will be the ONLY one to spawn with these tools, might make him a more valuable target for traitors. I figured this would be acceptable considering most heads are not antag enabled (i think)

Also i added a welding tool sound for reasons... figured might as well add some more sounds while i was reworking it.
2016-10-14 10:19:23 +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
dc930b9da8 this is so fucking dumb 2016-09-11 18:38:14 -04:00
Joan Lung
266bacf4c8 Bubblegum now charges past its target's location 2016-09-03 12:09:08 -04: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
Firecage
58ee32f8e3 Fixes borgs not being able to finish scooters + misc changes. 2016-07-18 16:25:09 +02:00
AnturK
48df887fad Fixes #17701 2016-06-18 19:22:59 +02: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
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
Nerd Lord
3656ca9d40 The gravity generator is no longer permanently destroyed by the blob. 2016-03-10 10:29:40 -05:00
Bjorn Neergaard
5975449a31 Fix gravity gen logging during init 2016-02-09 23:45:02 -06:00
Bjorn Neergaard
cbd37b6e77 Fix gravity generator runtime
Checking turf Z is silly when mob checks make more sense

The following runtime has occured 53 time(s).
runtime error: Cannot read null.z
proc name: shake everyone (/obj/machinery/gravity_generator/main/proc/shake_everyone)
  source file: gravitygenerator.dm,360
  usr: null
  src: the gravitational generator (/obj/machinery/gravity_generator/main/station)
2016-02-09 23:04:58 -06:00
Xhuis
6c2edbec55 Disables gravgen rad pulses showing up in asay/logs 2015-09-30 13:39:10 -04:00
Xhuis
5f99b313cc Radiation changes 2015-09-26 13:33:27 -04:00
duncathan
51c09f16bf makes all Destroy()'s return properly 2015-08-31 00:21:01 -06:00
MrStonedOne
19ef482d87 Finishes carnmc's shuttle rotation feature.
Under carn shuttles, When shuttles dock at a docking port that is not the same direction as them, they rotate their bounding box, and they do magic i don't understand to rotate where the turfs get placed.

But it doesn't rotate the items or smoothwall or handle pixel_xy or any of that.

This fixes that.

Shuttle rotation will call /atom/proc/shuttleRotate(degrees)
Default behavior handles most cases, and overrides handle edge cases.

Shuttle walls don't smooth wall or obey directions, so I just rotate their icon using matrix transform, its dirty but it works.

See: https://tgstation13.org/msoshit/powrightinthekisser.png or https://tgstation13.org/msoshit/fuckingshuttles.png
2015-07-20 04:28:45 -07:00
Firecage
4688c2c969 Fixes proc arguments 2015-07-15 23:52:35 +02:00
kingofkosmos
1d14471d00 Ellipses to waiting messages. Warning-spanclasses to failing messages with an exclamation mark. 2015-04-24 20:50:50 +03:00
phil235
081bae6740 Fixes broken ui action button for toggling chef apron's sleeves and owl's wings.
Fixes surviving suicide
Fixes suicide damage overlays.
Fixes ninja regen "clothes warm" spam message. (moving rad armor check outside of apply_effect)
Fixes ninja smoke bomb count.
Fixes dead shaved corgi
Fixes lipozine still being in code.
Fixes flattening boxes requiring them to have their window opened.
Fixes armor softening message from disarm attack.
Fixes player being forced to play spiders without choosing.
2015-04-14 13:54:36 +02: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
Thunder12345
744940c8a8 Fixes #6615
All instances of "Your clothes feel warm" have been given a full stop.
Couldn't actually confirm in testing due to never getting the warm
clothes message, but I don't see why it wouldn't work.
2014-12-27 18:32:45 +00: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
Lo6a4evskiy
82f869c9a6 Updated to resolve conflicts 2014-09-06 13:34:43 +04:00
Giacomand
bc945b6c92 Fixes the gravity generator not updating your gravity status, so you stop floating. 2014-06-13 20:17:11 +01:00
Cheridan
3a0bd3de28 Merge branch 'master' of https://github.com/tgstation/-tg-station into MeteorsSuck
Conflicts:
	code/game/turfs/simulated/walls.dm
2014-05-13 14:03:42 -05:00
Alex
7091c012e9 Merge pull request #3625 from Giacom/gravity_layer
You can now walk behind the three top parts of the gravity generator, to...
2014-05-06 20:08:00 +01:00
Giacomand
4f8a312275 You can now walk behind the three top parts of the gravity generator, to be able to fix a space breach in the middle of it. 2014-05-02 16:35:54 +01:00
Cheridan
4d8160ab14 meteorhit() is kill 2014-04-22 12:16:02 -05:00
ikarrus
32ea63d08a Replaces the GravGen alarm with a louder, more distressing sound. 2014-04-15 22:55:05 -06:00
Giacomand
65602cb72d Added admin logging for the gravity generator. 2014-03-25 10:12:33 +00:00
Giacomand
1a9da0ba47 You will fall over in zero gravity, but you won't make a noise. This was important because it told players whether someone was stunned or dead, when it was changed it just added confusion.
You can no longer slip in zero g.

Added an admin subtype of the gravity generator which admins can spawn to create a pre-setup gravity generator.
2014-03-23 16:21:08 +00:00
MrPerson
2858bf1c18 Fix for changling powers arm blade and fleshy space suit.
More del(AM) -> qdel(AM) and Del() -> Destroy()
Fixes a terrible bug that would have meant players could only ghost once.
2014-03-21 22:26:50 -07:00
Giacomand
64c9e253f2 Typo fixes. I'm keeping the comma-less but. 2014-03-15 17:44:34 +00:00
Giacomand
cc4dd68bdf Added a new gravity generator which will produce gravity for the station.
Sprites by Ausop, which he posted in his sprite thread.

The gravity generator is very sturdy, as it is almost indestructible, but explosions can break it and it will need repairs.
Changed C4 to stop del()'ing and instead will only use ex_act().
Added an interact_offline variable for machines that will allow you to interact with them even if they are depowered. The gravity generator only uses this at the moment.

Removed the stun that people get when gravity changes.
Shuttles have gravity still.

Added a gravity generator room to the west of Engineering. It is very secure, with a foyer and requiring CE or Captain access. There are instructions on the table for repairing and enabling/disabling the machine.
2014-03-15 16:59:48 +00:00
AlexanderUlanH
1d6981c2d3 Remove name checks 2014-02-19 17:23:57 -05:00
Giacomand
f1e7637bab Disabled the game using set background by making all instances of it use a define, which can be changed in code/_compile_options.dm
Testing has revealed that it reduces the sluggishness of the game, though it will spike from lag when the singularity is loose. Thanks to ChuckTheSheep for suggesting it.

Server owners who want to keep set background enabled can do so by changing the define.
2014-01-10 18:32:28 +00:00
Aranclanos
90b894fe66 Made all the machinery use ..() on the Topic(), instead of having a copy pasta everywhere to see if the human is dead or others. This will stop dead AIs interacting with machineries or others. 2013-07-03 13:16:53 -03:00
d_h2005@yahoo.com
42f41da2b4 Committing patch for Carn.
Fixes issue 1334
Fixes issue 1327
Fixes issue 1335
Fixes issue 1329

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5781 316c924e-a436-60f5-8080-3fe189b3f50e
2013-02-25 18:35:09 +00:00