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
This commit is contained in:
rastaf.zero@gmail.com
2011-01-27 16:40:36 +00:00
parent 1b82a7690e
commit 427313e0ad
18 changed files with 320 additions and 462 deletions
+8 -19
View File
@@ -1,16 +1,3 @@
//returns the netnum of a stub cable at this grille loc, or 0 if none
/obj/grille/proc/get_connection()
var/turf/T = src.loc
if(!istype(T, /turf/simulated/floor))
return
for(var/obj/cable/C in T)
if(C.d1 == 0)
return C.netnum
return 0
/obj/grille/ex_act(severity)
switch(severity)
@@ -152,9 +139,11 @@
if(!prob(prb))
return 0
var/net = get_connection() // find the powernet of the connected cable
if(!net) // cable is unpowered
return 0
return src.electrocute(user, prb, net)
var/turf/T = get_turf(src)
if (electrocute_mob(user, T.get_cable_node(), src))
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
s.set_up(5, 1, src)
s.start()
return 1
else
return 0
+3 -4
View File
@@ -16,10 +16,9 @@
if (!istype(loc, /turf/simulated/floor))
usr << "\red APC cannot be placed on this spot."
return
for(var/area/RA in A.related)
for(var/obj/machinery/power/apc/FINDME in RA)
usr << "\red This area already has APC."
return //only one APC per area
if (A.get_apc())
usr << "\red This area already has APC."
return //only one APC per area
if (A.requires_power == 0)
usr << "\red APC cannot be placed in this area."
return