Commit Graph

84 Commits

Author SHA1 Message Date
PKPenguin321
86aeb63205 three months in the making 2016-08-23 18:17:55 -07:00
duncathan
a2a554c48a Merge branch 'master' of https://github.com/tgstation/-tg-station into turfs
Conflicts:
	code/game/objects/explosion.dm
	code/game/objects/items/stacks/sheets/mineral.dm
	code/game/objects/structures/girders.dm
	code/game/objects/structures/grille.dm
	code/game/turfs/turf.dm
	code/modules/events/spacevine.dm
	code/modules/events/wormholes.dm
	code/modules/mining/mine_items.dm
	code/modules/mob/living/silicon/robot/robot.dm
2016-04-03 18:22:20 -06:00
Isratosh
11e20a42ca Adding an admin jump href to explosion logs 2016-03-30 04:19:08 -06:00
duncathan
e86cf0f280 praise the good lord, for the game finally compiles 2016-03-29 19:04:37 -06:00
MrStonedOne
09fb8c2b10 Explosions and singulo use spiral range (and other changes) 2016-03-15 03:39:41 -07:00
MrStonedOne
2887dc7ce0 Removes lag.
This setup allows subsystems to pause themselves until next mc fire if they are about to go over a tick, and resume on the next mc tick
It also makes it so we prioritize running subsystems we skipped because there wasn't enough time in the current tick to run them based on their avg tick usage. (as well as subsystems paused mid way thru)

Adds a macro for adding this to non-mc procs. just drop it in the loop. There is a define version as well for if checks if you want to know if you just slept to avoid lag.

This is all inside #if DM_VERSION defines, so once i test that 509 still works to compile/test this should be good to merge
2016-03-15 03:39:39 -07:00
Firecage
332bde0f4f Does the rest of the if()'s/ else's 2016-01-17 19:03:12 +02:00
MrStonedOne
6632a4c547 fixes explosions 2016-01-03 17:42:04 -08:00
MrStonedOne
b50e8d2a63 removes a bunch of unneeded spawns
spawns have a high overhead.

I only went for easy targets, almost every spawn could be removed with a few subsystems in place to handle delays or cooldowns
2016-01-02 18:23:02 -08:00
AnturK
6d63d5e234 Fixes doppler arrays 2015-12-09 20:06:14 +01:00
MrStonedOne
a5f0f3f594 changes spawn() throw_at to throw_at_fast set waitfor = 0
Set waitfor = 0 has massively less overhead then spawn() but still does basically the same thing.

It causes the first sleep in the stack from that point on to make the set waitfor = 0 proc return . then continue on as if it was spawn()'ed, but it doesn't have to copy over the local vars of the proc so a lot less overhead

http://pastebin.com/kx538RqS
2015-12-04 04:37:16 -08:00
GunHog
20120417d3 Hardsuit upgrades!
- Hardsuits now respond to EMP and Radiation, warning the user.
- The Prototype Hardsuit now has a bomb detector.
2015-10-28 11:33:47 -05:00
phil235
d3ee910211 Makes effect system code more OOP.
obj/effect/effect is now renamed obj/effect/particle_effect for better usability.
datum/effect/system and /datum/effect/effect/system are now both /datum/effect_system.
Fixes a bug where wall mounted igniters (and other spark producing objects) didn't produce sparks sometimes.
Moved explosion_particles.dm into the effect_system folder, because it has effect_systems code.
2015-10-21 23:28:29 +02:00
Nerd Lord
12a7ebb776 STOP BOMBING THE FUCKING BLOB, ASSHOLE
Also gives blob types and mobs better descriptions because WOW these were bad.
2015-08-30 19:54:55 -04:00
phil235
0951213f85 Use Krausus' fix for Paradise station to replace my laggy spawn(0) fix. 2015-08-17 02:11:27 +02:00
phil235
278a3369c5 Fixes reactionary explosion not acting correctly.
Fixes indestructible turfs not blocking explosions.
Replacing cheap_pythag by cheap_hypothenuse
2015-08-06 16:53:11 +02:00
phil235
9463dd7e70 Merge pull request #10613 from Ikarrus/rwindow-heat
Reinforced windows and windoors are a bit more resistant to fires and blasts
2015-07-16 18:42:45 +02:00
Firecage
4688c2c969 Fixes proc arguments 2015-07-15 23:52:35 +02:00
Ikarrus
2bc5fd2db9 Reinforced windows and windoors are a bit more resistant to fires and blasts
- Regular windows/windoors: 1073k
- Reinforced windows/windoors: 1873k
- Reinforced windows/windoors will count as walls for blast range calculation (The lowest possible value)
2015-07-13 23:31:34 -06:00
phil235
7adeaf0beb Explosions no longer throw anchored items. 2015-06-14 00:46:54 +02:00
Remie Richards
d72cb4bdf1 Merge branch 'master' of https://github.com/tgstation/-tg-station into ReactionaryExplosions
Conflicts:
	code/game/machinery/doors/poddoor.dm
	code/game/turfs/simulated/floor/plating.dm
	code/game/turfs/unsimulated/walls.dm
	code/modules/admin/admin_verbs.dm
2015-06-11 16:23:45 +01:00
Firecage
f79e0fc1aa Updates more paths, for example obj/stuff to /obj/stuff 2015-05-31 17:48:33 +02:00
Remie Richards
0b91b14f70 Fixes debug verb Check Bomb Impact 2015-05-16 19:56:46 +01:00
MrStonedOne
c6c7237265 Merges power subsystem into machine subsystem.
This is to avoid issues from when they fire out of sync, since powernets assume machine's subsystem will fire directly after power's does.
2015-05-09 23:48:18 -07:00
Remie Richards
3b98e4448d Ports /vg/ DeityLink's new explosion effect, Blast doors are more resistant to explosions, Explosions can now take walls and doors into account (Cheaper than recursive explosions), Engine floors are more resistant to explosions. 2015-05-09 01:02:06 +01:00
Remie Richards
4caefd878e fixes an issue that could cause sub system cycles to work in decimals. 2015-05-03 04:54:57 +01:00
Remie Richards
2234a9b25e powernet datums now manually clear references, subsystem/proc/postpone() now takes an optional "cycles" argument, for postponing more than 1 cycle, Explosions are less laggy! 2015-05-03 04:39:48 +01:00
MrStonedOne
bd6d51a0b5 Massive MC and subsystem rewrite
MC:
	No longer tracks a subsystem's cpu usage. This was basically worthless and took up space on the stat panel
	Can calculate wait down to a tenth of a decisecond to make it fps/world.ticklag agnostic
	Now allows subsystems to have a dynamic wait, that is based on a ratio of how long that subsystem has been taking to process(cost). (This system allows for upper and lower bounds, and an changeable cost delta for each subsystem)
	MC can now be told to init a zlevel

All Subsystems:
	Stats panel now allows child subsystems to pass it a message to add to its stats entry. All subsystems have been moved over to this system - This should cut down on subsystems having to copy and paste the stats proc in order to add to it
	All subsystems now properlly handle being given a zlevel in their init proc

Subsystem changes:
	Air:
		Added air to the dynamic wait subsystem. upper bound: 50, lower bound: 5, cost delta: 3 times process cost
		Air now fires 4 times faster when it can do so without lagging things up
		Pipenet has been merged into air
		Atmos machinery now processes with process_atmos(), ticked by air, not machinery.
		Hotspots (the fire object) are now object pooled
	Pipenet:
		Deleted, added to air
	Machinery:
		Moved all atmos calcualtions in all objects's process() to process_atmos().
	Lighting:
		Added Lighting to the dynamic wait subsystem. upper bound: 20, lower bound: 5, cost delta: 3 times process cost
	Ticker:
		Fixed ticker not updating the lobby panel when game start delayed
		Fixed the game start timer updating rapidly from queued fires when game start delay is removed
	Garbage/qdel:
		qdel will now limit its process time to 2ds a fire.
		qdel can now be given hints as a return to Destroy() as to what should be done with the object.
		the options are:
			queue: (default) this is the normal behavior.
			letmelive: old default to non-null/zero. does nothing with the object
			iwillgc: functionally the same as above, mainly to let people working with objects know that the object will not be queued for GC checking
			harddel: this will queue the object to be deleted without storing a soft reference, mainly to save locate() processing time.
			harddel_now: this will del() the object. To allow for a clean removal of every del() not in qdel
		All objects have been updated to the new system, harddel and iwillgc was not added to any new objects.
		Fixed some objects not GCing because they didn't properlly clear references in Destory()
		Fixed some objects getting qdel'ed preventing other objects from getting GCed because they did not null their reference to that object.
2015-04-29 02:00:25 -07:00
AnturK
88f2eda81e - Headcrabs
- Changelog & Name

- Description
- Removes debug message
- Fixes cavity surgery removal

Oops

- Headslug sprites courtesy of ZyloWalsh
- Squash
2015-03-24 12:53:13 +01:00
Remie Richards
1e8324c3c5 Exposes all embedding related multipliers as variables and definitions. Only items of throw_speed 4 or more can embed now, Explosions force their object to be thrown at 4, this throw_speed threshold is ON TOP of needing to be a can_embed() object. 2015-02-26 17:04:00 +00:00
Remie Richards
1d9ababed7 Moved item throwing code to after the explosion effect on turfs, meaning shards and such can get thrown. 2015-02-19 18:24:11 +00:00
Remie Richards
154a94105d Minor cleanup + Committing the surgery 2015-02-13 13:08:45 +00:00
Remie Richards
34ced43f45 Explosions throw items, items can embed in limbs, embedded items cause damage, embedded items can fall out, surgery for embedded item removal, ninja throwing stars! 2015-02-13 12:59:02 +00:00
carnie
a029a49392 SubSystem rewrite
Misc:

+Fixes unreported issue with initializing lighting on a specific zlevel

+Fixes two similar issues with moveElement and moveRange. Where fromIndex or toIndex could be adjusted incorrectly in certain conditions. Potentially causing bad-sorts, or out of bound errors.

+Rewrites listclearnulls(list/L) to no longer iterate through L.len elements for every null in the list (plus 1). i.e. went from L.len*(number_of_nulls+1) list-element reads (best-case), to L.len list-element reads (worst-case)

+New proc/getElementByVar(list/L, varname, value) which finds the first datum in a list, with a variable named varname, which equals value. You can also feed it atoms instead of lists due to the way the in operator functions.

+Fixes an unreported issue with Yota's list2text rewrite. Under certain conditions, the first element would not be converted into a string. Causing type-mismatch runtimes.

+New global map_ready variable. This is not fully implemented yet, but will be used to avoid duplicate calls to initialize() for map objects.

+All turfs now maintain references to all lights currently illuminating them. This will mean higher memory use unfortunately, due to the huge number of turfs. However, it will speed up updateAffectingLights significantly. I've used list husbandry to reduce baseline memory usage, so it shouldn't be any worse than some past atmos modifications memory-wise.

-Removed 'quadratic lighting', can add this back at some point. Sorry.

+modified the way lum() works slightly, to allow turfs to have overridden delta-lumen. i.e. space cannot be illuminated more than its default ambiance. This allowed removal of some iffy special-snowflake lighting areas implemented by somebody else.

+Lighting images in the dmi can now use arbitrary naming schemes. It is reliant on order now. This allows the dmi to be replaced by simply dropping in a new dmi.

-Removed all subtypes of /area/shuttle. Shuttles now create duplicate 'rooms' of /area/shuttle. (More on this later). This will conflict with most maps. Guide on how to fix to follow.

+All verbs/tools relating to world.tick_lag were refactored to use world.fps. However old config text for setting tick_lag will still work (it converts the value to fps for you)

+MC stats improved using smoothing. They now have their own tab so they dont get in the way when you're playing as an admin.

-removed the push_mob_back stuff due to conflicting changes. Sorry Giacom.

_OK, NOW THE ACTUAL INTERESTING STUFF_

Following systems moved over to subsystem datums:
air_master
garbage_manager
lighting_controller
process_mobs (aka Life())
nanomanager
power
sun
pipenets
AFK kick loops
shuttle_controller (aka emergency shuttle/pods), supply_shuttle and other shuttles
voting
bots
radio
diseases
events
jobs
objects
ticker

Subsystems hooks and variables should be commented fairly in-depth. If anything isn't particularly clear, please make an issue.

Many system-specific global variables have been refactored into

All tickers which previously used world.timeofday now use world.time

some subsystems can iterate before round start. this resolves the issue with votes not working pregame
2014-12-31 13:25:41 +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
6c6257daf6 No more fire inside walls
No more fire inside walls
2014-12-03 17:17:24 +03:00
Intigracy
31835f1987 Removes the unused explosion_recursive.dm and everything related to it, including the configuration option. 2014-11-27 14:28:20 -08:00
Razharas
b071a0167e Made explosions work in a slightly different way
Yep
2014-11-18 16:22:41 +03: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
Alek2ander
9fa38637ad Logs everywhere
Explosion game log now has epicenter coords
Powersink placement and explosion notifications
C4 notifications and logs
Logging singulo munchies and death
All SMES interactions now logged, because any of them can mess stuff up
Telesci logs what was teleported
2014-01-19 21:16:30 +04:00
ChuckTheSheep
b3635a2935 small fixes 2014-01-04 20:03:22 -05:00
ChuckTheSheep
e71f98bbb8 Explosion Optimizations
Implements a trange that internally checks only turfs and thus less
intensive.
2014-01-04 19:29:17 -05:00
Aranclanos
4a4658bc93 Merge pull request #1808 from RobRichards1997/17/11/2013-Turret_Runtime_Fix
Fixes Turret/Atom Moveable Explosion Runtime [BUGFIX]
2013-11-24 22:55:24 -08:00
Giacomand
62051364ef Changed the heavy impact multiplier to 20. 2013-11-19 21:35:36 +00:00
Giacomand
c012a7aee3 Changed playsound() to use less code. Playsound now loops through the player list, which means you do not have to check inside closets/objects/other mobs to play sounds.
Made all sounds use 3D sounds! This includes sounds which have less volume the further away you are from it.
The piano now uses 3D sounds.
Changed how the far explosion sound is calculated.
2013-11-18 14:38:49 +00:00
Robson Richards
5685c9ed6e Removes old method instead of commenting it out 2013-11-17 12:14:21 +00:00
Robson Richards
ea3b035e5b Fixes the issue in explosion.dm 2013-11-17 12:03:05 +00:00
Giacomand
261314d23d * Rewrote the explosion sound to be more optimized and to be more dynamic.
Explosions that are close to you play the usual sound.
Explosions which are far away will play explosionfar.ogg but with volume differences depending on the distance.
Max cap bombs will play explosionfar.ogg for half of the station (140 tiles).
Explosion sounds will have panning, so stereo users will be able to tell the direction that the sound came from.
Small bombs will play much less than max cap bombs, and be quieter.
2013-11-16 19:27:10 +00:00
Giacomand
9ad2d5b5c2 The doppler array will now state the theoretical size of the explosion, which is the size of the explosion if there were no bomb cap. 2013-10-27 12:45:02 +00:00
Ergovisavi
470341ecfd Made explosion arguements more readable for the ones with flame_range added to them
flame_range explosions no longer call fire_act() on mobs in the range, but instead spawn a hotspot on them.
2013-10-11 20:07:53 -07:00