Commit Graph

101 Commits

Author SHA1 Message Date
Jack Edge
69c227612f Moves the is_frozen var to a secondary flag
One less var on ALL OBJECTS.
2017-03-07 21:27:44 +00:00
Cyberboss
4ed57234b7 Ports some low level New()s to Initialize (#24211)
* Revert "Revert "Ports some low level New()s to Initialize""

* Fixes #24202

* Fixes #24197

* If ever it were to exist, it belongs here
2017-03-06 19:19:14 +01:00
Cyberboss
1e7603178a Revert "Ports some low level New()s to Initialize" 2017-02-17 20:53:28 -05:00
Cyberboss
aa82645401 Ports some low level New()s to Initialize 2017-02-15 09:24:52 -05:00
Cyberboss
b86e224571 Makes qdeleted and qdestroying macros (#23666)
* Makes qdeleted and qdestroying macros

* Makes QDELETED and QDESTROYING uppercase

* Swap qdel checks istype's for != null's

* Fix it

* How was this missed?
2017-02-06 00:59:27 +13:00
Kyle Spier-Swenson
280dbe20c3 [Ready] SSthrowing + callbacks! (#22476)
* SSthrowing + callbacks!
Throwing is now a subsystem.
It's low priority, but is a ticker subsystem so is ran before most other subsystems.
To allow for shit to run after the throw finishes, throwing now supports a callback.
A callback datum system was created, conversion of addtimer is planned for another PR.
Throwing now has a limit of 2048 turfs (was 600)
Throwing now ticks every world.tick, and properly converts the speed arg from 1ds to what ever tick_lag is.
Throwing now properly accounts for missed ticks.
Throwing no longer uses sleep.
Throwing should no longer lag since it's not filling the sleep queue up

* Smoother tentacles

* Some improvements

* Missed a spot.

* Makes shit quicker.
Inlines the thrownthing.tick() proc.
Raises missed ticks value
Lowers max dist value
Inlines the two sister overrides for /atom/movable/Moved() because that just seemed like a waste

* >PRs open that use procs i'm removing.

* STOP THE PRESSES!

* throw_at now runs the first throw tick() immediately
This will help some with throwing while running.

* Item throwing now imparts the momentum of the user throwing.

(ie, running in the direction you are throwing makes you throw faster, running away from the direction you are throwing makes you throw the item slower)

* Moves throwing momentum from carbon/throw_item to movable/throw_at.
There are other things that cause a mob to "throw" an item, I figured we keep this universal since thrower is already an arg.

* Explosions throw shit faster.
This was stupid, "Hey, lets set the item's throw_speed to 4 so embedding works, but lets make it throw at the base 2 throw speed for no reason."

* Fixes explosion embedding.
This also acts as a nice example of how to override a callback in an override of throw_at properly.
2017-01-02 20:08:03 +11:00
XDTM
42792b1404 RENAME REWRITE SAME THING 2016-12-13 01:17:02 +01:00
XDTM
bc7379c7ed sorry oranges 2016-12-13 01:06:11 +01:00
ExcessiveUseOfCobblestone
7ab477a06a Small Renaming Oversights (#22068)
* small oversights h-h-honk

* honk

* does the joan

* keeping tabs

* fixes else ..()
2016-12-11 19:51:53 +13:00
ExcessiveUseOfCobblestone
dccde22917 Customization in its prime! (#22011)
* Customization in its prime!

* GO AWAY
2016-12-09 13:20:45 +13:00
MrStonedOne
76e1c6916f VV refactor 2016-11-30 12:49:21 -08:00
kevinz000
87dbd65811 [READY]] FLIGHTPACKS (AKA cooler, better, and technological wings with a unique gimmick!) (#20860)
* vroom

* wew

* a

* b

* morestuff

* .

* a

* .

* .

* basicsprites+extend/retract

* ...

* .

* thanks travis

* woops

* thankstravisv2

* redundence

* ishouldstopmakingsomanygoddamncommits+empdamage

* stuff

* ..

* ion_trails

* fixes_conflict_1

* fix

* compilesnow

* .

* fuck

* WIP: Multi Step Assembly

* thismightfixitthismightnot

* shoe-attachment

* noselfremoval

* wooops

* tweaksandcrashing

* runtimes

* runtimesfuntimes+crash update 1

* thisprobablywontcompile

* stillwip

* githubPLEASEWORK

* fixes conflicts 3/3

* REFACTORSUNTESTED

* fixingconflicts2

* fixingconflicts3/3

* updates

* stuffs

* ...

* stillWIP

* stufffs

* .

* ..

* runtimesfuntimes2

* stuffs2

* conflictfix

* ...

* fuck

* fix

* bah merge conflicts

* knockback_testing1

* conflictfixing...

* mergeconflicts

* plop

* socloseyetsofar

* tweaksandfixes

* conflicts

* fix

* fixes

* fix

* woops

* woops2

* hotfix

* ...

* flufftextandfixes

* test

* ..

* fix1/2

* stuff

* finallysomeoneteachesmehowtofixthisshit

* FIX

* why

* .

* bitflagsshitflags1

* bitflags-shitflags2

* bitflags-shitflags2

* bitflags_shitflags_4

* autofloating

* minerbuffgetthepun?

* notouchingfloors

* ...

* .

* f l o a t

* kek

* kek

* fixes

* fixes2

* sprites
2016-11-25 13:26:43 +13:00
phil235
51d1319ed1 Make transit tube code less shit. 2016-11-02 22:55:36 +01:00
MrStonedOne
78c9ce1bfc Cleans up some init procs from world start.
`/turf`, `/turf/open`, `/turf/open/space`, `/obj` should now no longer have an `init[]` proc in byond.

This mostly abuses the fact that `for (var/thing in null)` works exactly the same as `for (var/thing in emptylist)`

`atmos_adjacent_turfs` is lazy init'ed and set back to null when empty. `GetAtmosAdjacentTurfs()` will always return a list for code that doesn't want to care.

`atmos_overlay_types`, and `proximity_checkers` lazy init and reset back to null when empty.

`armor` is now init'ed in `/obj`'s `New()` if it's blank. This could also be set to some lazy init system if somebody is feeling masochistic enough.

`/obj`s that both don't call parent in `New()` and don't set their own armor will have a null armor list. This might cause bugs so this change may get removed if that becomes an issue.

Minor slightly unrelated change that made doing this change easier, `add_overlay()` now *technically* works properly if given a list
2016-10-28 13:31:08 -07:00
Joan Lung
a88eb76aec Remove an unused proc #20825 2016-10-10 11:47: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
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
phil235
7c6c99683d more mistakes fixed 2016-09-27 23:22:03 +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
kevinz000
177045c980 [Ready]Electrical Chemistry (Tesla grenades) (#20448)
Teslium is now easier to make, and as with most electronics, no longer mixes with water.

tesla_act and tesla_zap both now have arguments to specify whether they explode machinery. By default only the tesla engine will explode machinery. This means that Tesla Revolvers will no longer cause a large area to implode if there is no one nearby the target of it to shock. This also means that tesla-grill bolts will no longer blow things up.
2016-09-15 12:59:23 +12:00
oranges
6fbcc6e26b Fix a bunch of incorrect throw_at proc definitions that caused a runtime 2016-09-12 22:09:52 +00:00
Iamgoofball
634662d6b4 Adds Freon to the game (#20188)
* Adds Freon to the game

* MAP CHANGE MEMES

* hahahahafuck

* YOU SAW NNOTHING

* fuqq

* sd

* Fixes

* Fixes2

* fixes

* BALANCE

* mob icecubing ALSO FUCK YOUR STATUS EFFECT CODE @Xhuis

* i play pokemon go every day

* Reworks icecubing

* sjyuhdjzsadjhm x jymhuxzc

* Final Pass

* kmJCBQADVNWVBOJRFJN

* changes

* nnjhdxsjhjh
2016-08-31 08:58:55 +12:00
Incoming5643
f70ba63d3e You can smuggle smuggler's satchels to a future shift (#19838)
* Hidden Smuggler Satchels hidden beneath the station now persist between rounds, though there's no assurances of WHEN they'll appear next and only one will ever appear in the round.

NOTE THAT THIS PULL INTRODUCES A CRITICAL BUG, DO NOT MERGE *JUST* THIS PR, AWAIT THE FOLLOWUP

* Finishes up satchel persistence.

Satchels require at least 20 saved bags before any will start spawning.

the var persistence_replacement can be set to a path to replace a very high risk item with a lower risk look alike. This is currently done with the nuke disk, the wizards spellbook, and the uplink implant

* DESIGNATED.
REMIE.
PULL.
2016-08-20 16:27:02 +12:00
Fox-McCloud
146d14a26e Refactor Uplink Refunding 2016-07-24 09:21:37 -04:00
coiax
6449b65d30 Adds fireplaces, eswords are hot, cardboard is flammable (#19118)
Makes needed improvements to proposed fireplaces

- Fireplaces now use world.timer
- Fireplaces no longer prompt input() for inserting logs, it just
takes as many logs as possible
- Paper and paper bins can be thrown on the fire, thirty paper is worth
one log of burn time.
- One log gives 15 seconds of burn time, the fireplace can hold up to 5
minutes of fuel.
- Ignitable items now use a /obj level proc to generate their messages,
currently using this are cigarettes, candles, fireplaces
- The fireplace can be put out with an extinguisher
- Cardboard cutouts are now flammable
- The fireplace is only "warm and cozy" when lit
- Paperbins qdel their stored papers when destroyed (probably did that
already, but no harm in making sure)
- Also removed some returns hanging around

* Added new proc for lighting stuff

- Adds ignition_effect(atom/A, mob/user) to obj/item, which is called
when you're attempting to light things with that object. By default it
does nothing and prevents ignition, but if the object is hot, it returns
a message. May do other things for different stuff.

- Eswords now ignite flammable gasses in their area.

* Fireplace is no longer on fire when not on fire
2016-07-06 10:16:47 +12:00
Kyle Spier-Swenson
0d6bbbb412 stop the pills (#18703)
* RedPills Processing

Now you have to use START_PROCESSING(SSname, thing) (and STOP_PROCESSING)

* Fixes a minor bug.
2016-06-20 12:07:44 +02:00
unknown
a0c866967f Splits languages into languages_spoken and languages_understood. 2016-06-16 18:50:32 -04: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
Remie Richards
95d2f9a848 Ports the functionality of the /vg/ holomap to the Station Blueprints, you can now see a layout of cables/pipes/atmos/power machinery as it was at roundstart to assist in repairs 2016-04-08 01:02:41 +01:00
Menshin
9afe050025 Replaced last occurences of gc_destroyed by qdeleted(). 2016-03-05 01:58:56 +01:00
MrStonedOne
60d068e6fa Merge remote-tracking branch 'upstream/master' into patch-130
Conflicts:
	code/__HELPERS/unsorted.dm
	code/game/objects/objs.dm
	code/modules/reagents/reagent_dispenser.dm
2016-02-07 17:41:42 -08: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
AnturK
1cbb8137d9 Moves initialize from /atom/movable to /atom
Bit cleaner powernet/pipes initialization in templates
2016-01-30 14:34:34 +01:00
Kyle Spier-Swenson
7cda37e5b6 speeds up tesla_act and thus, tesla_zap 2016-01-25 20:02:23 -08:00
Bjorn Neergaard
0a7236d955 Allow relabeling any canister; port MULEbot to tgui 2016-01-18 14:21:56 -06:00
Menshin
828c1ddf2c * Generalized AStar check for objects preventing passability
* Fixed AStar not detecting plastic flaps as impassable for mobs that can't pass them (fixes #14616)
2016-01-16 15:27:31 +01:00
Cheridan
1e516a68c7 Merge pull request #14347 from Iamgoofball/patch-143
Tesla Nerf (shh dont tell aran)
2016-01-06 12:22:05 -06:00
Bjorn Neergaard
dc69cbaefb Allow UIs to be attached to datums; various fixes 2016-01-04 10:46:31 -06:00
Iamgoofball
e1828f363e nerfs machine bounce range 2016-01-03 10:25:10 -08:00
AndrewJacksonThe2nd
f0f18ec6ef TESLA 4.0: less laggy hopefully 2015-12-24 00:25:00 -08:00
AndrewJacksonThe2nd
56be042744 fixes 2015-12-19 17:35:30 -08:00
AndrewJacksonThe2nd
1ab5e80458 Tesla map removal to fix merge 2015-12-19 12:32:50 -08:00
KorPhaeron
d8a37204e7 Makes burn_state use defines 2015-12-13 05:36:55 -06:00
KorPhaeron
50e4e77250 Fixes UI stuff 2015-12-09 21:37:18 -06:00
Shadowlight213
3c35ac809e Hopefully finally fixes the nanoui issue. 2015-12-06 23:24:01 -08:00
Shadowlight213
74c27189b9 Renames IsAGhost to IsAdminGhost.
Reworks checks to not need stat to be 0
Fixes the majority of the Nanoui bugs.
2015-12-06 20:21:43 -08:00
Nerd Lord
3a96d9bd8c No delay on examining objects with a nanoui interface as a ghost 2015-12-02 22:53:33 -05:00
Bjorn Neergaard
6ec257c360 Hotfix for SStimer lag
SStimer can now check dupes
Also fix ghosts not being inquisitive with objects...
2015-12-02 21:23:45 -05:00
Bjorn Neergaard
6f098e8298 Allow ghosts to use any NanoUI interface. 2015-11-30 23:34:59 -05:00