Commit Graph

125 Commits

Author SHA1 Message Date
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
Joan Lung
b5b4037e2e More istypes replaced with helpers (#20767)
* shouldn't you be merging these by now

* my oh my do we have a lot of these

* a fellow pedantic shit
2016-10-03 13:40:13 +13:00
Cyberboss
96087dcf67 Station Blueprints now contain wire legend (#20559)
Added a submenu to the Station Blueprints that lists wire color purposes for the round for NT made items
Does not list duds
Removed WIRE_ELECTRIFY as it was synonymous with WIRE_SHOCK
2016-09-23 10:24:57 +12:00
NikNakFlak
cc868cb606 Fixes wires being an interior designer hell (#20484)
* Whoever got a hold of these wire colors deserves a special place in hell

* AXED MORE

* Third times the charm
2016-09-14 08:47:51 +12:00
Remie Richards
00738bd2a3 More than 2 hands!? WHAAAAAAT 2016-09-02 16:10:16 +01:00
Jack Edge
c168146777 Syndicate bombs use world.time; explode faster
🆑 coiax
add: Syndicate bombs now use world.time to track their countdowns, the
same as shuttles and dominators. They will now explode slightly sooner
when a red button is pressed.
/🆑

- Syndicate bombs fast process so they can beep every second. It's
syncronised with the observer countdown for extra drama.
- As a balance change, this means that bombs have effectively a 25-50%
faster minimum timer.
2016-07-08 18:31:01 +01:00
oranges
079973558f Fix the admin log message for syndicate bomb logging 2016-05-31 22:18:53 +00:00
bgobandit
53a13376cb Boom wires have rudimentary logging. 2016-05-19 17:42:58 -04:00
phil235
08478cb872 Removes the voting cooldown fix and the say_log timestamp and coordinates.
Adds two files I forgot to add in the previous commit, somehow...
2016-04-29 18:51:14 +02:00
LatD
12f9d205e8 Syndicate bomb delay wire changed to one time use (#16790)
* Syndicate bomb delay wire

* Fixes delay wires

* Add bomb delay variables

* Forgot to remove unused var

* Small fix
2016-04-26 23:28:01 +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
Bjorn Neergaard
265b8d2d20 Fix an air alarm runtime
Don't store hard refs to an area which can cause race condtions
Instead, get our area only when we need it

The following runtime has occured 4426 time(s).
runtime error: Cannot read null.atmosalm
proc name: update icon (/obj/machinery/airalarm/update_icon)
  source file: airalarm.dm,535
  usr: null
  src: the alarm (/obj/machinery/airalarm)
2016-02-10 07:01:24 -06:00
phil235
fdec37b76f Merge branch 'master' of https://github.com/tgstation/-tg-station into VisionUpdateRefactor
Conflicts:
	code/_onclick/hud/alien.dm
	code/_onclick/hud/alien_larva.dm
	code/_onclick/hud/hud.dm
	code/_onclick/hud/human.dm
	code/_onclick/hud/monkey.dm
	code/_onclick/hud/other_mobs.dm
	code/_onclick/hud/robot.dm
	code/game/machinery/Sleeper.dm
	code/modules/mob/living/carbon/alien/larva/death.dm
	code/modules/mob/living/carbon/brain/death.dm
	code/modules/mob/living/carbon/human/death.dm
	code/modules/mob/living/carbon/human/life.dm
	code/modules/mob/living/carbon/human/species.dm
	code/modules/mob/living/carbon/life.dm
	code/modules/mob/living/carbon/monkey/death.dm
	code/modules/mob/living/death.dm
	code/modules/mob/living/life.dm
	code/modules/mob/living/silicon/ai/death.dm
	code/modules/mob/living/silicon/ai/life.dm
	code/modules/mob/living/silicon/ai/login.dm
	code/modules/mob/living/silicon/pai/death.dm
	code/modules/mob/living/silicon/robot/death.dm
	code/modules/mob/living/silicon/robot/robot.dm
	code/modules/mob/mob_defines.dm
2016-02-06 15:42:13 +01:00
Bjorn Neergaard
b9c79680b9 Rename get_ui_data -> ui_data, remove useless shuffle from wires 2016-02-05 17:09:40 -06: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
Bjorn Neergaard
5e2e295760 Fix wires swapping 2016-01-27 02:11:40 -06:00
Kyle Spier-Swenson
2db4f0f079 Update wires.dm 2016-01-26 18:48:10 -08:00
Bjorn Neergaard
d0f57701d9 Remove old define 2016-01-26 14:07:17 -06:00
Bjorn Neergaard
5e16230433 Fix a number of wire issues.
Fix wires being shuffled twice (they should only be randomized once). We
now shuffle and cache instead of shuffling the cache.

Fix syndicate bomb messages (bomb, not loc should show messages).

Explicitly copy lists when we create wires as to avoid any chance of
modifying the global color list. No bugs here but there is a posibility
if admins varedit wires.

Fix training bombs generating duplicate wires by adding a real
shuffle proc that clears the wire list first (Fixes #14915).
2016-01-25 21:30:30 -06:00
Bjorn Neergaard
eab359ea18 Remove dark/british colors from wires
Fixes #14901
2016-01-25 17:23:51 -06:00
Bjorn Neergaard
961eeea661 Rewrite SSUs, tweak newly added UIs 2016-01-25 12:03:07 -06:00
Bjorn Neergaard
725e970cfd Fix air alarm panic siphon 2016-01-25 12:03:04 -06:00
Bjorn Neergaard
c78e1ec2ac Fix a lot of wire interactions 2016-01-25 12:03:03 -06:00
Bjorn Neergaard
014e83fec6 Fix tgui machine interactions status checks 2016-01-25 12:03:02 -06:00
Bjorn Neergaard
2f46b224ae Fix air alarm hacking, raise SStimer display 2016-01-25 12:03:00 -06:00
Bjorn Neergaard
f3697fc7d6 Repath air alarms 2016-01-25 12:02:58 -06:00
Bjorn Neergaard
f0f5187f5c Fix autolathe hacking 2016-01-23 18:56:38 -06:00
Bjorn Neergaard
e3b073a54a Fix autolathe/airlock lights and remove spawn() 2016-01-23 18:56:36 -06:00
Bjorn Neergaard
2998624bc3 Fix tanks not showing they are connected to a mask
Fix wire pulse sound
2016-01-23 18:56:34 -06:00
Bjorn Neergaard
ca24badfb6 Fix wire feedback sound
Apparently wires used to play a default windows chime when cut, adding audible feedback
It was the windows 'bong' sound, and I'd rather not try to replicate it, so instead
we play the wirecutter sound very softly
2016-01-23 18:56:33 -06:00
Bjorn Neergaard
d712615db8 Fix tgui showing NaN, fix vending machines having no wires 2016-01-22 21:42:35 -06:00
Bjorn Neergaard
20e647a598 Prefer += to .Add()
For @RemieRichards
2016-01-22 20:12:47 -06:00
Bjorn Neergaard
9274f9a027 Fix conflicts 2016-01-22 19:29:18 -06:00
Bjorn Neergaard
1599742f7e Re-structure tgui's ui_act 2016-01-22 19:25:36 -06:00
Bjorn Neergaard
b2629a56e2 Make wires use defines, put a wire var on /atom, fix tgui ui_host runtimes 2016-01-22 19:25:33 -06:00
Bjorn Neergaard
99e5764719 Refactor pizza_bomb, tweak pizza_bomb sprites
Thanks to @WJohn for the pizza bomb core sprites, and updated pizza box sprites

Removes the pizza_bomb and replaces it with pizzabox/bomb. Adds a special bomb core
for pizza bombs (a pizza bomb core can be used on pizza boxes and regular bombs, but
regular bomb cores cannotbe used for pizza bombs), and tweaks wire code a little bit.
2016-01-22 19:22:11 -06:00
Bjorn Neergaard
909e7dddd7 Fix some small bugs in wire refactor; add all the colors! 2016-01-22 19:22:10 -06:00
Bjorn Neergaard
87b0857b93 Refactor wire datums
Finish wire port and refactor wire datums to use string keys; widen color
range to support more wires and more colors.
2016-01-22 19:22:09 -06:00
AnturK
cda2f26d56 tgui wires initial 2016-01-22 19:13:23 -06:00
tkdrg
14f90d8f1e Merge pull request #14748 from xxalpha/airlocktiming
Changed APC wire pulsing and airlock autoclose() to use timers.
2016-01-22 21:36:56 -03:00
xxalpha
de44d7ec43 Changed APC wire pulsing and airlock autoclose() to use timers.
a

round
2016-01-20 21:26:44 +00:00
Bjorn Neergaard
0a7236d955 Allow relabeling any canister; port MULEbot to tgui 2016-01-18 14:21:56 -06:00
AnturK
e36853d7c9 Convert bots to simple animals - Updated 7.0 2015-11-26 22:06:07 +01:00
phil235
79d25ef2d9 Fixes remotely detonating planted c4 with signaler.
Move CanUseTopic() procs to the correct files.
2015-11-11 15:57:05 +01:00
c0
df7386a4ec Assemblies update 2015-09-04 11:22:37 +03:00
xxalpha
19947d4fa0 Added qdel(wires) to a bunch of objects Destroy proc.
Return ..()
2015-08-27 11:10:58 +01:00
Cheridan
720ffcc862 Merge pull request #11073 from RemieRichards/WireModernisation
RnD Machines + Pizza bombs now use Wire datums
2015-08-12 22:23:18 -05:00
Miauw
ad1da7c157 Removes tape recorder wires to fix a server-crashing bug. 2015-08-10 14:00:05 +02:00
Remie Richards
4870122858 Rnd machines and Pizza boxes now use real wire datums, instead of the ancient method of list+var, Because of this they now also respond to Multitool-Pulsing.
Adds GetColour(index) helper to wire datums.
2015-08-07 03:35:10 +01:00