Commit Graph

99 Commits

Author SHA1 Message Date
Kyle Spier-Swenson
bf39570688 Lagchecks removing from storage, reverts bluespace ore satchel limit (#24310) 2017-02-24 16:22:57 +13:00
Leo
9c6803ae19 Ports Paradise error handler, with in game runtime viewer! (#24036)
* Ports paradise error handler, with in game runtime viewer!

* Changes to the old runtime error and removes inerror reference

* Oops

* Adds a wrapper for world.log so it displays both in the runtime diary and in DD window
2017-02-14 11:39:31 +11:00
Joan Lung
613ed47ac0 Merge pull request #23172 from Cyberboss/patch-15
Makes a thing use a define
2017-01-24 10:26:35 -05:00
Kyle Spier-Swenson
12570805bd Closes the Pool. (#23150)
* Delete pool.dm

* Removes usage of PoolOrNew

* Wrap up
2017-01-22 16:00:23 -05:00
Cyberboss
3775cf691f Makes a thing use a define 2017-01-20 10:32:41 -05:00
Cyberboss
a89a5e2ad1 Fixes explosion flashes 2017-01-11 13:33:13 -05:00
Cyberboss
79a164ff67 Fix explosion dodging. Tweaks door resistance (#22360)
* Attempted fix for explosion dodging

* Refactor turf/ex_act to return the new tuf

* Fixed a dumb

* Fixes more dumbs

* @optimumtact's suggestion

* If it blows up an rwall, it should blow up a door

* Gives firedoors some explosion_block

* Remove debugging

* Remove more debugging

* Fixed a missing ex_act return

* Let's limit this to mobs

Because that's all we care about

* We need to keep this check

Otherwise the proc may crashe and turfs could end up constantly exploding, gibbing anyone who walks through them

* Buffs diamond, centcomm, and external airlocks

* Bigger block for heavy firedoors

* Revert "We need to keep this check"

This reverts commit 47029c9ba02b0332610ec0bac2c908ce1181a01c.

* Revert "Remove more debugging"

This reverts commit b598fb795b79806fc9b4d38919a1f9fb17d29299.

* Revert "Remove debugging"

This reverts commit 68a6bd1c6e8e218dd5dce248c79bf184b4622e2d.

* Revert "Fixed a missing ex_act return"

This reverts commit c3dbe3b99b9035bac8be2930110f9b6db8acec37.

* Revert "Fixes more dumbs"

This reverts commit dc5767f2f2cdcd410afbd46c9fcecfdf7701f028.

* Revert "Fixed a dumb"

This reverts commit c447cfdd8c92a4af61bf776ea11500f9aa52fc99.

* Revert "Refactor turf/ex_act to return the new tuf"

This reverts commit 38ddfca1800dbc67a59e617bd52924f78a17666e.

* The new old fashioned way

* Compile before you push you slitherbrain

* Fixes and solidarity

* Only one circumference please

* Fixed
2017-01-09 18:04:22 +01: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
Cheridan
87b1755a8c Merge pull request #21847 from ChangelingRain/debrisbutton
Fixes the auto follow debris button
2016-11-30 16:59:10 -06:00
Mervill
b5578df27d corrects some defs without leading slash (#21843) 2016-11-30 20:05:14 +13:00
Joan Lung
b3a809d21a Fixes the auto follow debris button 2016-11-29 11:48:16 -05:00
KorPhaeron
4ccc67ed27 Bombs are uncapped on mining 2016-11-08 16:42:53 -06:00
Joan Lung
bdcb16113a Adds a few turf istype helpers (#20754)
* a very calming act
when the world is too much, too fast

* i'm tired
but i have to be efficient, infinite

* lick your lips at the sight of me
a fantasy made reality
2016-10-01 19:25:46 +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
nullbear
2a58dd54a9 Adds explosion helper proc w/ diminishing returns (#20319)
* Adds new explosion proc

Adds a new proc for calling explosions, which uses 'power' instead of a
set of ranges.

Power (1 - 100) is based on minimum explosions size (0, 0, 1) to maximum
explosion size (5, 10, 20)

Formula keeps explosions within a 'sane' range. So while it is possible
to bypass maxcap using this, it will require a LOT of work.

I've done some balance testing, and a halfcap (2,5,10) can be made using
a double bluespace beaker of water and potassium. A (3,7,14) can be made
using black powder, and the largest bluespace grenade explosion can be
made using nitroglycerine, at (6, 12, 24) which is only slightly larger
than maxcap.

You can check out https://www.desmos.com/calculator/pgfz0gqqxf to see
how the explosive power affects range. T is 'units of explosion' and P
is a multiplier. Multipliers for explosive reagents are: water/potass =
1/10, black powder/meth = 1/6, nitroglycerin = 1/2.

* Clarity Changes

Renames dynamic explosion proc for clarity.

Makes dyn_x explosions scaleable with DYN_EX_SCALE variable.

Adds debug dyn_x verbs, and a dyn_x drop_bomb proc to fun admin verbs.

* Adjusts formula

better efficiency and readability.

Adds debug proc for changing explosion scale.

Adds a comment containing common power/explosion sizes.

* oops
2016-09-11 20:46:26 +12:00
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