Commit Graph

19 Commits

Author SHA1 Message Date
petethegoat@gmail.com
9840c44b4e New chem dispenser interface, by Tobba.
Some sanity checking in power.dm, by Tobba.

Updated changelog, by PETE YEAAAH.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2532 316c924e-a436-60f5-8080-3fe189b3f50e
2011-11-19 21:18:11 +00:00
mport2004@gmail.com
17ed3899c4 Fixed the map/code issues that the body bags caused.
/obj/effects is now /obj/effect.
/obj/station_objects is now /obj/structure.
Did a bit of minor blob work. 
The Bay 12 body bags were replaced with closets because having two sets of code that do almost the same thing is silly.
Changed back a few of the last jobproc edits as the remove from list before assign was a check to see if the mob was fucked up and if it was remove it so we did not check it again as it would still be fucked up.
The medbay/tox monkeys names are random once more.  More random name monkeys will help with changeling and clean up the observe/mob menus.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2324 316c924e-a436-60f5-8080-3fe189b3f50e
2011-10-03 10:28:57 +00:00
baloh.matevz
e8c6b08419 - Object tree grouped a bit more.
Two new categories were made: station_objects and effects. station_objects, which I'm sure someone will want renamed to 'structures' contains the objects which don't need process() or power code.

Effects contains objects which are either landmarks, triggers, spawners or decal.

Screenshot:
http://www.kamletos.si/new%20object%20tree.PNG

I didn't notice any bugs, but with a revision editing 276 files of byond code, you never know.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2323 316c924e-a436-60f5-8080-3fe189b3f50e
2011-10-03 06:54:28 +00:00
mport2004@gmail.com
c612827472 Singularity absorption explosion range lowered and is now dependent on singularity size.
BoH is no longer an instakill on a singularity, the chance the singularity will die from bombs now 25% from 10%.
Finished removing Metabslow from the game because delaying Interface rebuilds is a bad idea.
Sadly THE SUN is gone due to lighting lag issues, the current mob max luminosity is set to 7.
Damage and stun from doors shocking people has been lowered.
process() is now an obj level proc as it was already used by several procs and they can now jump onto the ticker if needed. 


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2199 316c924e-a436-60f5-8080-3fe189b3f50e
2011-09-14 07:24:19 +00:00
rockdtben
06d5c4f7cd fixed a runtime error
auto_use_power only shows up in the master_controller

following code:
***************
		for(var/obj/machinery/machine in machines)
			if(machine)
				machine.process()
				if(machine && machine.use_power)
					machine.auto_use_power()
***************

on the second line it checks if machine exists. If it doesn't exit it would go to the next machine.
So it is not null at this point.
then it calls machine.process()...
on the fourth line it cehcks again if the machine exists.
Then it calls machine.auto_use_power()

So at this point the machine has been checked twice for existence.

Now moving into aut_use_power() proc

*********************
/obj/machinery/proc/auto_use_power()
	if(!powered(power_channel))
		return 0
	if(src.use_power == 1)
		use_power(idle_power_usage,power_channel)
	else if(src.use_power >= 2)
		use_power(active_power_usage,power_channel)
	return 1
*********************
This calls powered() on the second line.

now stepping into powered() proc


**************************
/obj/machinery/proc/powered(var/chan = EQUIP)
	var/area/A = src.loc.loc		// make sure it's in an area
	if(!A || !isarea(A))
		return 0					// if not, then not powered

	return A.master.powered(chan)	// return power status of the area
**************************
the second line "var/area/A = src.loc.loc" line 26 in power.dm is what caused the problem.

It is asking for the location.

src.loc appears to be null. The reason why this call keeps happening and doesn't stop is because the object itself exists but its location does not.


So my final analysis is that src.loc == null and calling loc on src.loc gives us a runtime error since src.loc.loc == null.loc and null cannot call loc.




runtime error: Cannot read null.loc
proc name: powered (/obj/machinery/proc/powered)
  source file: power.dm,26
  usr: null
  src: Emitter (/obj/machinery/emitter)
  call stack:
Emitter (/obj/machinery/emitter): powered(1)
Emitter (/obj/machinery/emitter): auto use power()
/datum/controller/game_control... (/datum/controller/game_controller): process()
/datum/controller/game_control... (/datum/controller/game_controller): process()

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1932 316c924e-a436-60f5-8080-3fe189b3f50e
2011-07-26 15:26:06 +00:00
rockdtben
29e89b008b A good catch by Derp__
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1921 316c924e-a436-60f5-8080-3fe189b3f50e
2011-07-25 01:57:45 +00:00
rockdtben
b1415003b4 git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1920 316c924e-a436-60f5-8080-3fe189b3f50e 2011-07-25 01:34:07 +00:00
rockdtben
532046cd35 git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1917 316c924e-a436-60f5-8080-3fe189b3f50e 2011-07-25 00:40:31 +00:00
rockdtben
04536d308f Quick Fix
This fix will make my code more efficients haha

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1914 316c924e-a436-60f5-8080-3fe189b3f50e
2011-07-24 00:06:23 +00:00
rockdtben
d339d37531 Created a method for powernets called /datum/powernet/proc/merge_powernets(var/datum/powernet/P)
This method takes an input of a powernet and merges it with the powernet that called merge_powernets

This is the first step in my updated cable logic. The code should look cleaner as a result.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1913 316c924e-a436-60f5-8080-3fe189b3f50e
2011-07-24 00:00:16 +00:00
rockdtben
482d0f2d95 Sped up the /proc/powernet_nextlink() proc.
Profile results (total time)
Proc Name                                                                         Self CPU    Total CPU    Real Time        Calls
-----------------------------------------------------------------------------    ---------    ---------    ---------    ---------
Before Revision
/proc/powernet_nextlink                                                              0.068       14.892       14.895         2936
/proc/powernet_nextlink                                                              0.000        0.005        0.005         2936
Before Revision
/proc/powernet_nextlink                                                              0.077       18.886       18.887         3162
/proc/powernet_nextlink                                                              0.000        0.006        0.006         3162
After Revision
/proc/powernet_nextlink                                                              0.046       15.185       15.186         3022
/proc/powernet_nextlink                                                              0.000        0.005        0.005         3022

This decreases the overhead on larger powernet_nextlink() calls and also decreases the cpu usage for the client by ~30%
For larger powernet_nextlink() calls the cpu usage serverside is decreased by a factor of ~30% also.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1691 316c924e-a436-60f5-8080-3fe189b3f50e
2011-06-14 14:13:27 +00:00
baloh.matevz
4fdb79cd44 Increased efficiency of electrocution code when wearing insulated gloves which greatly reduced lag when touching an object which should electrocute you with insulated gloves. Spamming clicks on electrified doors no longer causes huge server lag.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1225 316c924e-a436-60f5-8080-3fe189b3f50e
2011-03-21 01:44:33 +00:00
rastaf.zero@gmail.com
c9591221f4 INSULATED UPDATE
electrocution:
  while breaking a light: chance quartered, damage quartered
  vendomats and autolathe: damage reduced by 30%
  hacking an apc: chance reduced
  In general electrocution was nerfed a bit. Now you shouldn't be instacrited by grille/airlock unless someone wired engine directly to the power grid.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1024 316c924e-a436-60f5-8080-3fe189b3f50e
2011-02-12 01:07:03 +00:00
rastaf.zero@gmail.com
427313e0ad Shocking overhaul. Fixed bugs are:
- shocking by autolathe, vendomats and airlocks works if powernet has power OR if APC has charged battery;
- autolathe able to shock without cable underneath;
- improvements from Barhandar and Errorage are included;
- making stungloves may electrocute you;
- handmade stungloves partially loses insulating;

Eliminated 4-seconds lag caused by all apcs changing state to "fully charged" after first few minutes of game.
Fixed message "The airlock's motors resist your efforts to pry it open."
Latest innovations in nanotechnologies! Matchbox now fits in pocket!
Fixed burn_skin(), so containment field now hurt people properly.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@919 316c924e-a436-60f5-8080-3fe189b3f50e
2011-01-27 16:40:36 +00:00
rastaf.zero@gmail.com
6273622dd3 Shieldgens:
-code cleanup and some improvements by Barhandar;
-more code cleanup;
-fixed availiable power colculation;
And some insignificant changes.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@730 316c924e-a436-60f5-8080-3fe189b3f50e
2010-12-28 22:21:44 +00:00
rastaf.zero@gmail.com
80fcaa3cb0 Engine:
-fixed cyborgs/AI problems with emitters;
-collector controller now without delay display state of singularity, beware red circle;
APC repairing:
-emagged APCs can be easily fixed;
-blowed up and malfhacked APCs can be fixed with lot of work;
--Note: malf timer will NOT slowdown due to gameplay reasons;
-APC now actually use power for charging its cells;
Power cells:
-explosions strength now depends on charge;
-in general explosions were nerfed;
-power cells can lose quality in several circumstances;
Food processor
-now messages appears in right moments;
-code rewritten, adding recipes now easy;
-recipes still same;
-new recipe: non-player monkey -> bucket of blood;



git-svn-id: http://tgstation13.googlecode.com/svn/trunk@709 316c924e-a436-60f5-8080-3fe189b3f50e
2010-12-27 15:08:56 +00:00
rastaf.zero@gmail.com
90b9654061 Massive singularity fix:
-engine won't get unlimited floor tiles from reinforced floor and thus won't grow constantly;
-collectors can receive energy from several sings;
-various graphic glitches fixed;
-released singularity can now be catched. In theory.
-singularity cannot be killed by small/far explosion;
-containment field cannot be exploded at all;
-fields and singularity now are immune to blob;
-messages improved;
-machinery fingerprints handling fixed;
-engines 3*3 sings must work now;
-emitters (and some other machines) now really uses power;
-collector arrays and controllers now requires engine access;
-powerful singularity now deal more radiation damage, but you can hide behind walls;
-improved generator's sprites
Miscellaneous: 
-cell chargers now actually consumes power;
-fixed examine verb for tanks;
-fixed airlocks won't opens automatically in rare cases;
-beer now don't instakill plants;
-vents and scrubbers now requires and uses power;
-more user-friendly canisters interface;
Optimizations:
-brig doors now causes lesser cpu load;
-small optimizations and code cleanup for some atmos machinery;



git-svn-id: http://tgstation13.googlecode.com/svn/trunk@691 316c924e-a436-60f5-8080-3fe189b3f50e
2010-12-23 03:31:13 +00:00
rastaf.zero@gmail.com
f2c2a3b8c1 APC building and disassembling (/obj/item/weapon/module/power_control needs to be placed on map or spawned by admin or removed from existing APC, other components are easily accessible)
APC emagged/broken and wires_exposed icons was swapped, fixed.
APC hacking now can properly shock you
Added station blueprints!
* now possible to rename areas
* now possible to create new bays
* space now haven't free power supply
Blueprints aren't placed on map yet.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@670 316c924e-a436-60f5-8080-3fe189b3f50e
2010-12-19 12:09:37 +00:00
only.lurking
662c08272a git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2 316c924e-a436-60f5-8080-3fe189b3f50e 2010-08-23 14:29:20 +00:00