Commit Graph

84 Commits

Author SHA1 Message Date
Mervill
09ea5ad2e5 w_class now uses defines 2016-12-01 21:33:14 -08:00
Joan Lung
4cddd81120 Suicide now uses the pronoun helpers (#20973)
* This doesn't actually matter, because you're dead forever once it happens...

* is this entire pr chaff for something else

* you'll do it? nah, fuck that I'll do it
2016-10-18 14:36:38 +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
erwgd
a68a0a912b bone dagger now contains no materials (#20575) 2016-09-18 15:25:14 -05:00
Jack Edge
a841bd14f5 Code cleanup; silicons, melee, hallucinations
- Cleaned up paint.dm
- Everything else should be self explanatory
- Removed braindamage part of esword, since you can't reach that; it
  would be handled by attack_self()
2016-06-24 14:03:44 +01:00
LatD
907fc36e5c Merge remote-tracking branch 'refs/remotes/tgstation/master' into Research 2016-05-24 22:17:44 +03:00
LatD
fe76e64641 Origin tech changes and some fixes 2016-05-17 20:57:01 +03:00
TehZombehz
076fc0df79 Adds Bone Weaponry (#17672)
* Adds Bone Weaponry

Adds Bone Spears, Axes, and Daggers, all craftable.

* '''Balance'''

I listen to the suggestions of others.

* Fixes
2016-05-14 18:31:36 -05:00
bawhoppen
b7a7f7c470 2 small changes (#17543)
Survival Knife sprite and sandbag layer fix
2016-05-12 21:53:59 -05:00
erwgd
0078f91d8a Added hacked autolathe design for butcher cleaver
Defined materials for butcher cleaver
2016-04-12 20:01:26 +01:00
erwgd
f0a6af827e Added bowl design to biogenerator.dm
Added recipes for fork and drinking glass to autolathe_designs.dm
Defined materials for fork, bowl, drinking glass
2016-04-12 19:39:09 +01:00
Cheridan
b271395b06 Merge pull request #16573 from bgobandit/carrotrobustness
Minor knife changes.
2016-04-04 17:47:09 -05:00
bgobandit
73bb67a1ea typo 2016-04-03 07:02:59 -04:00
bgobandit
5e3727a85f Minor knife changes. 2016-04-02 03:40:26 -04:00
KorPhaeron
b388e76f9c Knives and thermal protection 2016-03-30 13:28:38 -05:00
c0
6c9be9c82d Adds breathing tube implant, changes how heart works, reworks arm-mounted implants 2016-02-25 12:50:45 +03:00
phil235
8b11d87b1d Merge branch 'master' of https://github.com/tgstation/-tg-station into VisionUpdateRefactor
Conflicts:
	code/ATMOSPHERICS/components/unary_devices/cryo.dm
	code/_onclick/hud/alert.dm
	code/_onclick/hud/hud.dm
	code/datums/mutations.dm
	code/datums/wires/robot.dm
	code/game/atoms.dm
	code/game/gamemodes/blob/overmind.dm
	code/game/machinery/alarm.dm
	code/game/machinery/machinery.dm
	code/game/machinery/suit_storage_unit.dm
	code/game/objects/items/weapons/tanks/tanks.dm
	code/game/objects/items/weapons/tools.dm
	code/game/objects/structures/morgue.dm
	code/modules/admin/verbs/adminjump.dm
	code/modules/atmospherics/machinery/atmosmachinery.dm
	code/modules/mob/inventory.dm
	code/modules/mob/living/carbon/alien/humanoid/death.dm
	code/modules/mob/living/carbon/alien/larva/death.dm
	code/modules/mob/living/carbon/brain/death.dm
	code/modules/mob/living/carbon/carbon.dm
	code/modules/mob/living/carbon/human/death.dm
	code/modules/mob/living/carbon/human/human.dm
	code/modules/mob/living/carbon/human/human_damage.dm
	code/modules/mob/living/carbon/human/life.dm
	code/modules/mob/living/carbon/human/species.dm
	code/modules/mob/living/carbon/human/species_types.dm
	code/modules/mob/living/carbon/life.dm
	code/modules/mob/living/carbon/monkey/death.dm
	code/modules/mob/living/life.dm
	code/modules/mob/living/living.dm
	code/modules/mob/living/silicon/ai/ai.dm
	code/modules/mob/living/silicon/ai/death.dm
	code/modules/mob/living/silicon/ai/life.dm
	code/modules/mob/living/silicon/pai/death.dm
	code/modules/mob/living/silicon/pai/pai.dm
	code/modules/mob/living/silicon/robot/death.dm
	code/modules/mob/living/silicon/robot/life.dm
	code/modules/mob/living/silicon/robot/robot.dm
	code/modules/mob/living/silicon/silicon.dm
	code/modules/mob/living/simple_animal/guardian/guardian.dm
	code/modules/mob/login.dm
	code/modules/mob/mob.dm
	code/modules/projectiles/gun.dm
	code/modules/reagents/chemistry/reagents/blob_reagents.dm
	tgstation.dme
2016-02-04 14:34:45 +01:00
phil235
81ce777ec2 - you now only see turfs when inside gas pipes.
- I renamed some vars of datum/hud to be more selfexplanatory
- Moved all datum/hud mob code into the hud folder.
- fixed alien's zone selection button not using the correct sprites.
- I removed the update_hud() proc (that needed to be removed).
- Fixed a typo in /mob/living/carbon/ContractDisease , using "internals" instead of "internal" (very different things)
- Fixed doTeleport() calling Entered() twice on the destination area.
- To reference a mob's selected zone, you now use a direct mob var ("H.zone_selected" instead of "H.zone_sel.selecting")
- mobs lose certain screen objects var ("healths", "zone_sel", "internals", etc) which are now vars of the mob's datum/hud instead.
- the Blind spell is now done via the blind mutation instead of the blind disabilities.
- Give to mobs a version of forceMove(), so the mob is always properly unbuckled, his pull stopped, his vision updated, etc.
- The "user" var of mob/camera/aiEye/remote is renamed to "eye_user" to avoid confusion.
- reset_view() is replaced by reset_perspective(). Now all changes to client.eye and client.perspective are done with this proc.
- I reworked /obj/machinery/computer/security code, changing camera is instantaneous now, as well as cancelling.
- I reworked /obj/machinery/computer/camera_advanced code as well.
- I changed /obj/item/mecha_parts/mecha_equipment/mining_scanner's meson view to be constant instead of by intermittent.
- Fixes not being able to use /obj/item/device/camera_bug while buckled.
- removed admin_forcemove() proc, admin force moving now uses forceMove() simply.
- Removed the client var "adminobs"
- Added var/vision_correction to glasses.
- Added a thermal_overload() proc for glasses, to remove copypasta in emp_act code.
- Remove the hal_crit mob var
- We no longer delete the mob's hud everytime he logs in.
- Added a stat == dead check in mob's metabolize() so we immediately stop metabolizing if one of the chem kills the mob.
- Being inside disposal bin lowers your vision, like wearing a welding helmet.
- removed the remote_view mob var.
- I changed advanced camera EYE, some fixes, removed unnecessary code when the eye moves, now the mob client eye properly follows the camera mob.
- fixes mob var "machine" not being nullified on logout.
- larva/death() was calling two "living_mob_list -= src"
- I made the Blind screen objects into a global_hud instead of giving one to each mob (like damage overlay).
- I untied tint and eye_blind, TINT_BLIND doesn't give you eye_blind=1.
- gave a visual overlay when inside locker (vimpaired)
- when inside disposal/gas pipes you get sight |= (BLIND|SEE_TURFS)
- glasses toggling updates (atmos meson toggle): DONE
- The new adjust procs serve to properly change eye_blind etc and call vision update procs when needed.
- I added an on_unset_machine() proc to handle perspective reset for camera consoles.
- I moved consequences of eye_check fail inside eye_check() procs themselves.
- I fixed vision updates being fucked by forceMove, especially pipe vision.
- I decided that damage overlay not appearing when dead.
- mob's hud_used is no longer deleted on each login()
- I refactored mob huds a bit, creating subtypes for each mob (/datum/hud/human)
- f12's hud toggling is now available to all mobs
- gave borgs a low_power_mode var so unpowered borg do not use stat= UNCONSCIOUS (which made things weird since you were unconscious but not blind)
- Fixed double Area entering when forced teleporting.
- I fixed larva pulling not being broken when cuffing them, and larva not seeing handcuff alert (and they can resist by clicking it)
- I removed pull updates from life() since it onyl checked for puller's incapacitation.
- I renamed camera/deactivate() to toggle_cam() to be more accurate.
- I fixed mmi brain being immortal (by removing the brain and putting it back)
- I simplified mmi brain emp damage.
2016-02-04 00:33:16 +01:00
PKPenguin321
1b4b672af9 carrot shivs
git went rough on my ass and im not happy about it
2016-01-29 22:05:47 -08:00
bawhoppen
5c52fb44cb fixes periods 2015-12-24 08:47:59 -06:00
Lularian
f77ac2a14e tactical gear 2015-12-22 13:59:02 -06:00
xxalpha
deb60ae309 Replaced /proc/is_sharp() with /obj/item/proc/is_sharp(). 2015-09-24 03:08:28 +01:00
bear1ake
f697ae90f5 removes a bunch of .0 2015-09-10 20:57:30 +09:00
xxalpha
cfb5e724b6 Material container, all items can have materials, wake me up
cant wake up

go to sleep debug
2015-07-01 03:34:47 +01:00
Orange Borg
d8bc3acea2 Stop triggering myself when viewing fork code 2015-06-28 18:48:40 +12:00
oranges
58c460a361 Fork eating no longer requires mouth zone sel
Instead, if there is a fork load you will simply eat the fork load.
2015-05-07 15:13:06 +12:00
phil235
0eb80a8607 Makes the standard kitchen knife fit inside your pocket. 2015-04-28 00:36:39 +02:00
phil235
752032628f Remove kitchen/utensil/spoon. Changes /kitchen/utensil stuff to simply be /kitchen.
Butchering spiders now is done in one step, not leg after leg. Changed simple_animal/harvest proc.
Kitchen knives are now weapon/kitchen/knife.
Fixes eating omelette with fork.
Changed some code to use is_sharp() instead of multiple type checks (spacevines and leather code).
Removes utensil/knife (we already have kitchen/knife).
2015-04-27 23:54:28 +02:00
Xhuis
a5c9a7292f Makes butcher's cleaver a child of kitchen knife 2015-01-05 17:23:03 -05:00
Xhuis
e7a9a0bdfc Makes the butcher cleaver a normal-sized item 2015-01-04 14:21:27 -05:00
Razharas
208b59c30e Fixed stuff tkdrg pointed out
Added comment to dualsaber and hulk checks to explain whats going on
Added defines that converts to mutation names
Fixed grammer again
2014-12-28 10:49:04 +03:00
Razharas
9a27fe7c8d Conflict fix
Yeah makes it all work
2014-12-21 06:12:33 +03:00
phil235
d5a7d82959 Fixes a lot of "the the" in messages. 2014-12-16 22:59:55 +01:00
Razharas
21a2c2d21e Made clumsiness into disability
I really dont want to make clumsy_act()
2014-12-14 08:04:48 +03:00
Razharas
0921aa201f Added datum mutations
Also removed some mob vars like sdisabilities and merged the usability
with disabilities
Removed need for mutations var, they are not handled in dna
Removed blinded var, now its handled by eye_blind being bigger than zero
Ands lots, lots of other shit in files that used mutations
2014-12-12 04:48:11 +03:00
phil235
537280b4b9 Removing many instances of the no longer used second argument of message_admins() proc.
Replacing "for(var/mob/M in viewers()) M.show_message()" by "visible_message()" or audible_message()" in many places.
Changing a few span classes.
2014-10-05 01:29:30 +02:00
Firecage
6c7af5eb32 SPANCLASSES!!!!! 2014-08-26 09:52:13 +02:00
Rolan7
e88528771d Merge branch 'master' of https://github.com/tgstation/-tg-station into Issue236_Trays
Conflicts:
	code/game/objects/items/weapons/kitchen.dm (Resolved, we were both removing snowflakey tray code)
2014-05-19 03:36:07 -04:00
Rolan7
a36afba82a Merge branch 'master' of https://github.com/tgstation/-tg-station into Issue236_Trays
Conflicts:
	_maps/map_files/tgstation.2.1.2.dmm (The map was deleted)
	code/game/objects/items/weapons/kitchen.dm (Someone fixed up tray attack code a little, whereas I moved trays to a subclass of bags and made the attack code very simple by comparison.  Went with my solution.)
2014-05-18 20:50:38 -04:00
Hornygranny
937170994d tray hit restored to glory 2014-05-16 16:36:53 -07:00
Hornygranny
10b4e9e138 Snowflake garbage removed 2014-05-16 15:22:37 -07:00
Jordie0608
4078973a5c Unidentinization 2014-05-13 02:18:21 +10:00
Jordie0608
dfd2cc4b60 Changed suicide messages to visible_messages and fixed relative pathing 2014-05-13 01:44:29 +10:00
Rolan7
f2493b4c37 Makes trays a subclass of bag.
This somewhat changes how items are placed on them, but for the better as it's more consistent with existing mechanics.
Hitting someone with the tray still scatters the contents around!  Works on nonhumans.
Placing icons on the tray still makes them show up on the tray.  Using the tray on a table now places the items onto the table, or places the tray itself if it's empty.  Robots can't lose their tray this way, I checked.
Service borgs can actually use their tray to carry things!  Trays can hold all sorts of stuff, as long as it's small...
A service borg can carry the nuke disk around.  The pinpointer does follow it correctly.
If the service borg stashes its tray module, dies, explodes, gibselfs, or is forced to stash its modules by damage, it drops all the tray's contents on the ground.

Fixes #236 (service borgs can't use trays) and #2991 (Items on food trays can't be picked up).  Didn't address #1919, the layer issue.

Fixes the "bajillion lines changed" with the maps.
2014-05-07 13:04:22 -04:00
phil235
57bba34352 missed a parenthesis 2014-04-19 21:12:10 +02:00
phil235
7314993d76 Fixing rolling pin/tray attack stuff
* simplify the attack code.
* fix messages and lack of sound when attacking with the rolling pin.
* rolling pin and tray will now use their attack verbs hopefully.
2014-04-19 20:53:45 +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
Hornygranny
9d3f8f6a2d second pass 2014-02-15 20:11:12 -08:00
Hornygranny
9e14c22747 Reduces throwspeeds on all items to realistic levels. 2014-02-15 19:58:03 -08:00
hornygranny
e0d0cedf36 passed over everything with throwforce 2014-02-13 18:06:50 -08:00