mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
AIRLOCK update:
- fixed shock code (code by barhander) - made them spark even if you're wearing insulated gloves. does no damage to you tho. - fixed them sparking if no power is available MAP updates: - Slightly expanded mining dock's construction site. added an area for it and an APC. named it - Completed the turfwork for the engineering construction site, gave it an area, an APC and connected it to the scrubber and vent pipeworks. I've been moslty doing 15 minute projects the past week due to schoolwork. this one wasn't such a project, but i felt i owed to put more teme into it, as it was my map update which exposed the coding error for airlocks. (altho the error was not really my fault, it was still my update which exposed it.) git-svn-id: http://tgstation13.googlecode.com/svn/trunk@916 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -595,6 +595,10 @@ proc/process_ghost_teleport_locs()
|
||||
name = "Engine Monitoring"
|
||||
icon_state = "engine_monitoring"
|
||||
|
||||
/area/engine/engine_CE_office
|
||||
name = "Engine New Office"
|
||||
icon_state = "engine_CE"
|
||||
|
||||
/area/engine/combustion
|
||||
name = "Engine Combustion Chamber"
|
||||
icon_state = "engine"
|
||||
@@ -744,6 +748,10 @@ proc/process_ghost_teleport_locs()
|
||||
name = "Mining Dock"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/quartermaster/miningstorage
|
||||
name = "Mining Storage"
|
||||
icon_state = "green"
|
||||
|
||||
/area/quartermaster/mechbay
|
||||
name = "Mech Bay"
|
||||
icon_state = "yellow"
|
||||
|
||||
@@ -349,8 +349,18 @@ About the new airlock wires panel:
|
||||
|
||||
//borrowed from the grille's get_connection
|
||||
/obj/machinery/door/airlock/proc/get_connection()
|
||||
if(stat & NOPOWER) return 0
|
||||
return 1
|
||||
var/netnumber = 0
|
||||
if(stat & NOPOWER) return 0
|
||||
var/turf/TU = src.loc
|
||||
if (!TU) return 0
|
||||
var/area/A = TU.loc
|
||||
if (!A) return 0
|
||||
for(var/area/RA in A.related)
|
||||
for(var/obj/machinery/power/apc/APC in RA)
|
||||
var/obj/machinery/power/terminal/T = APC.terminal
|
||||
netnumber = T.netnum
|
||||
return netnumber
|
||||
return 0
|
||||
|
||||
// shock user with probability prb (if all connections & power are working)
|
||||
// returns 1 if shocked, 0 otherwise
|
||||
@@ -372,12 +382,18 @@ About the new airlock wires panel:
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/door/airlock/proc/airlockelectrocute(mob/user, netnum)
|
||||
/obj/machinery/door/airlock/proc/airlockelectrocute(mob/user, prb, netnum)
|
||||
//You're probably getting shocked deal w/ it
|
||||
|
||||
if (prob(min(100,max(0,100-prb))))
|
||||
return 0
|
||||
|
||||
if(!netnum) // unconnected cable is unpowered
|
||||
return 0
|
||||
|
||||
if(!((src.arePowerSystemsOn() && !(stat & NOPOWER))))
|
||||
return
|
||||
|
||||
var/prot = 1
|
||||
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
@@ -390,6 +406,10 @@ About the new airlock wires panel:
|
||||
else if (istype(user, /mob/living/silicon))
|
||||
return 0
|
||||
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
|
||||
if(prot == 0) // elec insulted gloves protect completely
|
||||
return 0
|
||||
|
||||
@@ -398,10 +418,6 @@ About the new airlock wires panel:
|
||||
if(powernets && powernets.len >= netnum)
|
||||
PN = powernets[netnum]
|
||||
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
|
||||
var/shock_damage = 0
|
||||
if(PN.avail > 750000) //someone juiced up the grid enough, people going to die!
|
||||
shock_damage = min(rand(70,145),rand(70,145))*prot
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user