Commit Graph

111 Commits

Author SHA1 Message Date
Kelenius
a1348faa8c Cables are now stacks 2014-08-25 18:54:35 +04:00
mwerezak
f2b234fe81 Fixes APCs drawing more power than they can to use to charge 2014-08-21 01:18:26 -04:00
mwerezak
10f95933dd Fixes power draw not being processed if no power was available
Should address some of the issues raised in Pull Request #6080
2014-08-20 21:54:27 -04:00
mwerezak
1cfc3b8d5f Fixes APCs eating up all the power even when fully charged 2014-08-19 01:14:18 -04:00
mwerezak
4b070a2de6 Fixes #5935
Also improves apc/process() (doesnt add and then remove charge from
cells when it doesn't have to).
2014-08-10 03:44:56 -04:00
Zuhayr
f795712a95 Merge branch 'dev-freeze' of https://github.com/Baystation12/Baystation12 into dev 2014-07-16 19:30:41 +09:30
Mark Aherne
7e7e6cd8ac Continued work in progress on a major revision of the NanoUI templating system. 2014-07-11 10:48:42 +01:00
Walter0o
0ff5d021de fixes #5449
missing variable updating lead to APCs stuck in green status during powersinks.
2014-07-10 18:21:00 +02:00
Chinsky
6d432d8e9d Merge pull request #5219 from Zuhayr/autolathe
Autolathe rewrite.
2014-06-12 20:28:44 +04:00
mwerezak
a8816823a5 Replaces get_turf_loc() with get_turf()
The former does exactly the same thing as get_turf(), except it runtimes
if one of the atoms has a null loc.
2014-06-10 13:43:11 -04:00
Zuhayr
9e7fe6d700 Rewrote autolathe, changed all m_amt and g_amt to a list called 'matter'. Updated RCD vars in view of this. 2014-06-11 01:14:38 +09:30
Zuhayr
590f980ea9 Allowed magnetic grippers to remove APC cells. 2014-05-12 14:51:55 +09:30
iamgoofball
238451dbc9 die monkey emergency DIE 2014-04-06 12:05:41 -07:00
Mike
353941db7c APCs that are undersupplied now call cell.give()
APCs that are undersupplied now call cell.give() instead of manipulating
cell.charge directly, for better encapsulation.
2014-04-02 23:46:54 -04:00
Ccomp5950
6af132b834 APC bugfix after someone messed with mah areas!
This was probably bound to happen either way the previous version was based upon a faulty understanding of how the areas worked this is much more robust and only messes with the master areas
and master areas needing power updates call power updates for the each of it's child areas.  Also added where messing with SMESes called for an update on all areas power consumption, probably
not required but doing so either way.

We also rebuild the active_areas list every 5 minutes, if you get a engineer that wants to build a new area off of the station with APC's set rebuild_all_areas in the master controller and it will
update instantly, otherwise wait 5 minutes.  The only downside to this 5 minutes is you might get free energy until that area becomes active.
2014-04-01 03:06:58 -05:00
Ccomp5950
d6a9448535 Bugfix for new APC code, gridchecks won't just turn off equipment.
Was a problem with me switching the order of the checks.
2014-03-24 17:42:27 -05:00
Ccomp5950
98fba3b6b0 Merge branch 'master' of github.com:Baystation12/Baystation12 into dev
Conflicts:
	code/modules/mining/machine_processing.dm
	code/modules/mob/living/carbon/human/life.dm
	code/modules/mob/living/silicon/ai/ai.dm
	code/modules/virus2/helpers.dm
2014-03-18 19:44:19 -05:00
DJSnapshot
044766ef11 quick fix for APCs related to IPC charging. 2014-03-10 15:52:01 -07:00
Chinsky
13b9747504 Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into dev 2014-03-10 18:48:12 +04:00
Ccomp5950
541c3ece76 Bugfix: All APC's will have maxcharge of 5,000
and not be at the whim of lag / how quickly it generates it's cell.
2014-03-08 05:45:22 -06:00
Ccomp5950
fb04a88774 Removed my debug lines. 2014-03-08 03:55:22 -06:00
Ccomp5950
bb9a66cc3a Effeciency Project: APC / Machinery power usage.
We no longer run auto_use_power() on every machine every tick.
We now have a global list of areas, and areas that have an APC in them (all_areas and active_areas) no more looping through world bullshit.
A bunch of snowflakey as fuck machines won't use_power() in their process, you get two options, active and idle, use them!
This means a lot of machines won't double dip on power as well so power usage for the station has dropped about 20%

Because everything is snowflakey as fuck we're going to have some machines that don't force an update on their power usage.  Fuck them.
We should catch them with the root obj/machine/proc's forcing updates.
2014-03-08 03:42:44 -06:00
Ccomp5950
e0e1bd9cfb APC Area update initial commit. 2014-03-07 23:42:28 -06:00
Ccomp5950
74a8fa152c APC overlay bugfix.
Before: If you turned off the breaker and fiddled with on/off states and turned on the breaker it wouldn't update the overlay because the check_updates wasn't doing an if(operating) check and would think it didn't need to update the overlays once you turned on the breaker.

After: Check_update() is doing a check for the breaker being on or off and taking that into account with the update_overlay flags and will update the overlays properly.

Thanks Razharas from /tg/ #coderbus for bringing this to my attention.
2014-03-04 20:57:40 -06:00
Ccomp5950
63a0f1185e Merge branch 'master' of github.com:Baystation12/Baystation12 into dev-freeze
Conflicts:
	code/ATMOSPHERICS/pipes.dm
	code/game/dna/genes/powers.dm
	code/game/objects/items/devices/PDA/PDA.dm
2014-02-20 19:16:23 -06:00
Ccomp5950
9c5f96cc58 Code effeciency project: apc update_icons
Before:  It updated the icons quite a bit at the start of the game.

After:  It updates more often and quicker, but now it isn't as expensive
2014-02-16 10:59:19 -06:00
Ravensdale
677e8a29c8 Tweak APC self-naming so they read better when examined or interacted
with. Thanks Sky for the suggestion and Mloc for the why.
2014-02-08 06:04:33 -08:00
Ravensdale
9d1e160a60 Self-naming APC's! Now even mapped in APC's will rename themselves
depending on what zone they're in. Makes more mapping sanity.
2014-02-07 21:48:37 -08:00
Zuhayr
f3d0efea87 IPC feeding from APCs, IPC lack of reagent processing. 2014-01-29 15:37:08 +10:30
Mark Aherne (Faerdan)
87c246ff06 APC NanoUI
* Created new APC UI
* Tweaked Chem Master UI width.
2014-01-12 23:11:49 +00:00
Miniature
3d6f8ee4b2 Added leaving prints on APCs when using item on them
(fix issue #4109)
2013-12-25 22:11:13 +10:30
Michael Johnson
65d62026b0 Fixes #2355 2013-12-03 13:53:52 -05:00
Chinsky
fd928d4b5f Cleaned the fuck out of smoke. 2013-11-05 02:57:23 +04:00
Mloc-Argent
a1f55a50b1 Massive click code rework by SuperSayu, ported from TG.
Full details at https://github.com/tgstation/-tg-station/pull/1206
Fixes #3648

Hopefully done right this time.

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
2013-10-08 20:27:39 +01:00
Zuhayr
7e0d26dab1 Commented out APC switching from Malf AI. 2013-08-25 02:35:05 -07:00
cib
aa6bfc33c7 Airlock and APC changes.
- Added a debugger device that can figure out when an object has been hacked/emagged
- Hacked APCs no longer display blue screen
- You can now disassemble emagged airlocks, they will yield a fried airlock electronic.
2013-05-23 16:43:29 +02:00
rockdtben@gmail.com
169c96db1b Too remove potential excessive garbage collection per tick. We will be reusing lists for overlays instead of deleting and creating them.
the .Cut() proc on a list will empty a list by default. This also will set the len to 0.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5465 316c924e-a436-60f5-8080-3fe189b3f50e
2013-01-04 15:11:06 +00:00
giacomand@gmail.com
ab4789fec6 -Added a queue update icon system for APCs to use during process(). This will limit how often they can update their icon and will help when the power is being unstable.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5431 316c924e-a436-60f5-8080-3fe189b3f50e
2012-12-31 04:35:07 +00:00
giacomand@gmail.com
7af60a7fb5 -Changed the powernet nodes list to be a dictionary list (associative list, hashtable, etc..)
-Added a solars_list. The sun will use this list instead of the machines list. I made a proc which decided on whether to use this list or the powernet nodes list depending on what is smallest. I replaced some loops to use this proc.
-The sun will reference this list for debugging purposes. The sun will also remove solar equipment in the list which are not connected to a powernet.
-Cut down on some duplicated code.
-Fixed an issue with solar panels not updating their direction correctly.
-Changed the proc updateicon()'s name to update_icon()

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5418 316c924e-a436-60f5-8080-3fe189b3f50e
2012-12-29 07:24:42 +00:00
giacomand@gmail.com
e9fd2037d2 -Committed lpeters's patch which Fixes Issue 1189. http://nanotrasen.com/phpBB3/viewtopic.php?f=16&t=11549
-Made the shower not require power.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5391 316c924e-a436-60f5-8080-3fe189b3f50e
2012-12-24 01:38:36 +00:00
giacomand@gmail.com
cdc4332769 -Should fix machines not depowering correctly. Let me know if you find a machine which should be powered off but isn't.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5388 316c924e-a436-60f5-8080-3fe189b3f50e
2012-12-24 00:12:12 +00:00
giacomand@gmail.com
6d05ae60de Balance change: Malf AIs can't shunt from APC to APC and must first return to their core. They can also start a takeover from their APC now. This is a test run with it and if people don't like it I'll remove it.
General work to advance diseases.
-Changed the possible cures to a list which is ordered from easiest to cure to -hardest to cure.
-Some tweak valuables to symptoms.

-Air alarms will update their window when you cut/pulse wires.
-Re-added analysers to mechanical (blue) toolboxes.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5125 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-19 18:30:05 +00:00
giacomand@gmail.com
b00c0c2a9f -New sprites APC sprites by TankNut!
-New wraith sprites by TankNut!
-Decreased flare duration, again(!)
-Made a based interact proc and changed the updateDialog to call that instead of attack_hand. This caused issues with the APC and getting the power cell out of it. I then changed all machines that had their own defined proc (that was everywhere)


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5001 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-03 14:45:29 +00:00
giacomand@gmail.com
6a2d78bc94 -Killed the updateDialog lag. I added a check to see if there were any mobs to update, if not it will stop checking until a user uses the machine again. I had to replace all the machine = src and machine = null with procs to help make it manageable. I believe this is one of the culprits causing the server to lag as the round goes on, as more players will interact with machines.
-Atmos delay is now based on active players, to help fight lag for massive player rounds.

-Changed some for(blah in world) loops to use the correct lists.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4958 316c924e-a436-60f5-8080-3fe189b3f50e
2012-10-25 19:15:51 +00:00
elly1989@rocketmail.com
c81c70bd86 Replaced var/netnum for cables and powered machines with a direct reference to their powernet. The bug which was causing cutting and merging powernets to fail was due to my attempts to fix the powernets slowly becoming filled with null entries. Removing those null entries messed up the indexes and essentially jumbled up the powernets. :( sorry
Fixed the failsafe misreporting how long the MC has been dead.

Lighting initialization no longer 'interrupts' the master_controller setup().

Added updated powernet debugging tools. They're in my WIP folder. They are sexy c: It draws the powernet onto the map so you can see what's going on during debugging.

Added tachyon-doppler arrays. They're gonna be something for scientists to measure their bombs with rather than praying for the figures. Nothing spectacular.

Commented out switches, they aren't used and I've been fixing/testing powernets all day. Sorry. If you need them back  just PM me and I'll fix them.

Known issues: the merging procs behave silly at intersections. I really tried to fix it but I think I'll make more progress just working on some powernet improvements.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4623 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-05 16:14:24 +00:00
elly1989@rocketmail.com
6e274cd395 New lighting, it's essentially just the old DAL system with a queue.
Comments for lighting:
	Like sd_DAL (what we used to use), it changes the shading overlays of areas by splitting each type of area into sub-areas
	by using the var/tag variable and moving turfs into the contents list of the correct sub-area.

	Unlike sd_DAL however it uses a queueing system. Everytime we  call a change to opacity or luminosity
	(through SetOpacity() or SetLuminosity()) we are  simply updating variables and scheduling certain lights/turfs for an
	update. Actual updates are handled periodically by the lighting_controller. This carries additional overheads, however it
	means that each thing is changed only once per lighting_controller.processing_interval ticks. Allowing for greater control
	over how much priority we'd like lighting updates to have. It also makes it possible for us to simply delay updates by
	setting lighting_controller.processing = 0 at say, the start of a large explosion, waiting for it to finish, and then
	turning it back on with lighting_controller.processing = 1.

	Unlike our old system there is a hardcoded maximum luminosity. This is to discourage coders using large luminosity values
	for dynamic lighting, as the cost of lighting grows rapidly at large luminosity levels (especially when changing opacity
	at runtime)

	Also, in order for the queueing system to work, each light remembers the effect it casts on each turf. This is going to
	have larger memory requirements than our previous system but hopefully it's worth the hassle for the greater control we
	gain. Besides, there are far far worse uses of needless lists in the game, it'd be worth pruning some of them to offset
	costs.

	Known Issues/TODO:
		admin-spawned turfs will have broken lumcounts. Not willing to fix it at this moment
		mob luminosity will be lower than expected when one of multiple light sources is dropped after exceeding the maximum luminosity
		Shuttles still do not have support for dynamic lighting (I hope to fix this at some point)
		No directional lighting support. Fairly easy to add this and the code is ready.
		When opening airlocks etc, lighting does not always update to account for the change in opacity.

Explosions now cause lighting to cease processing temporarily.

Moved controller datums to the code/controllers directory. I plan on standardising them.
"Master","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply Shuttle","Emergency Shuttle","Configuration","pAI" controller datums can be accessed via the debug controller verb (used to be the debug master controller verb)
Supply shuttle now uses a controller datum. Shuttles tend to arrive up to 30 seconds late, this is not a bug.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4537 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-25 16:06:57 +00:00
giacomand@gmail.com
683662f3b6 -Ported/continued AI Freelook. AIs can now look around like a ghost with the exception that they cannot see what cameras cannot see. Meaning if you're in maintenance, and there's no cameras near you, the AI will not know what you are doing. This also means there's no X-Ray vision cameras anymore. I've added documentation to freelook.dm which explains how the system works, if anyone is interested in adding anything. More information here: http://nanotrasen.com/phpBB3/viewtopic.php?f=7&t=9675
-I've added some cameras to rooms that should have cameras but were previously depending on other camera's using their X-Ray vision in order to see into a room.

-AIs have a multitool in their contents that they can use to interact with the telecommunication machines.

-Added "Follow" for observers. Works the same as AI tracking without checking if they can track.

-Added a range to how far Cyborgs can interact with machines. This is to stop Cyborgs from interacting with machines through cameras, which could be used to easily disable the AI.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4531 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-25 05:34:33 +00:00
elly1989@rocketmail.com
4073ac9b00 Replaced all 'file.extension' references with 'relativepath/file.extension' using a script by thvortex of ss13-daedalus.
All credits to the author for this handy little script.
I Committed the modified python script to tool directory. Although it needs to be in the root folder of your repo to work.

To notice the improved compile times, in dreammaker go to Build > Preferences > and untick "automatically set file_dir for subfolders"

If this commit inteferes with any large projects just revert it, do your thing, then rerun the script. Easy-peasy.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4488 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-18 16:33:40 +00:00
baloh.matevz
7b572e4ca7 - Fixes issue 760 The AI's machine variable did not get reset properly upon failure. The machine variable's interact() proc is normally called once per tick. In the case of an APC it printed the fail message, but did not reset the variable to null, meaning the same machine's interact() proc would get called the next tick, giving the same error.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4463 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-17 05:48:16 +00:00
elly1989@rocketmail.com
b047f9565a Tidied up sd_DAL a bit to remove the last of the light-spilling and outside lighting since we have never used it.
Removed some unused variables from APCs (and cleaned up the map so they could be removed)

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4282 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-02 14:25:06 +00:00