mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-25 09:31:30 +00:00
-Made the glass research airlocks fireproof.
-Replaced the regular glass airlocks in the mixing room with research glass airlocks. You won't need a firesuit to make bombs now. -Added some extra shutters for research's lockdown. -Moved the research lockdown button to the RD's office. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5242 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -217,6 +217,14 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
|
||||
doortype = 21
|
||||
glass = 1
|
||||
|
||||
|
||||
/obj/machinery/door/airlock/update_heat_protection(var/turf/simulated/source)
|
||||
if(istype(source))
|
||||
if(src.density)
|
||||
source.thermal_conductivity = DOOR_HEAT_TRANSFER_COEFFICIENT
|
||||
else
|
||||
source.thermal_conductivity = initial(source.thermal_conductivity)
|
||||
|
||||
/obj/machinery/door/airlock/glass_mining
|
||||
name = "Maintenance Hatch"
|
||||
icon = 'icons/obj/doors/Doorminingglass.dmi'
|
||||
|
||||
@@ -18,277 +18,273 @@
|
||||
var/glass = 0
|
||||
var/normalspeed = 1
|
||||
|
||||
proc/bumpopen(mob/user as mob)
|
||||
proc/update_nearby_tiles(need_rebuild)
|
||||
proc/requiresID() return 1
|
||||
proc/animate(animation)
|
||||
proc/open()
|
||||
proc/close()
|
||||
/obj/machinery/door/New()
|
||||
..()
|
||||
if(density)
|
||||
layer = 3.1 //Above most items if closed
|
||||
explosion_resistance = initial(explosion_resistance)
|
||||
update_heat_protection(get_turf(src))
|
||||
else
|
||||
layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6
|
||||
explosion_resistance = 0
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
return
|
||||
|
||||
New()
|
||||
..()
|
||||
if(density)
|
||||
layer = 3.1 //Above most items if closed
|
||||
explosion_resistance = initial(explosion_resistance)
|
||||
if(opacity)
|
||||
var/turf/T = get_turf(src)
|
||||
T.thermal_conductivity = DOOR_HEAT_TRANSFER_COEFFICIENT
|
||||
else
|
||||
layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6
|
||||
explosion_resistance = 0
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
/obj/machinery/door/Del()
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
return
|
||||
|
||||
//process()
|
||||
//return
|
||||
|
||||
/obj/machinery/door/Bumped(atom/AM)
|
||||
if(p_open || operating) return
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent shock spam.
|
||||
M.last_bumped = world.time
|
||||
if(!M.restrained())
|
||||
bumpopen(M)
|
||||
return
|
||||
|
||||
|
||||
Del()
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
return
|
||||
|
||||
//process()
|
||||
//return
|
||||
|
||||
Bumped(atom/AM)
|
||||
if(p_open || operating) return
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent shock spam.
|
||||
M.last_bumped = world.time
|
||||
if(!M.restrained())
|
||||
bumpopen(M)
|
||||
return
|
||||
|
||||
if(istype(AM, /obj/machinery/bot))
|
||||
var/obj/machinery/bot/bot = AM
|
||||
if(src.check_access(bot.botcard))
|
||||
if(density)
|
||||
open()
|
||||
return
|
||||
|
||||
if(istype(AM, /obj/mecha))
|
||||
var/obj/mecha/mecha = AM
|
||||
if(istype(AM, /obj/machinery/bot))
|
||||
var/obj/machinery/bot/bot = AM
|
||||
if(src.check_access(bot.botcard))
|
||||
if(density)
|
||||
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
|
||||
open()
|
||||
else
|
||||
flick("door_deny", src)
|
||||
return
|
||||
open()
|
||||
return
|
||||
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return 0
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
|
||||
bumpopen(mob/user as mob)
|
||||
if(operating) return
|
||||
src.add_fingerprint(user)
|
||||
if(!src.requiresID())
|
||||
user = null
|
||||
|
||||
if(istype(AM, /obj/mecha))
|
||||
var/obj/mecha/mecha = AM
|
||||
if(density)
|
||||
if(allowed(user)) open()
|
||||
else flick("door_deny", src)
|
||||
return
|
||||
|
||||
meteorhit(obj/M as obj)
|
||||
src.open()
|
||||
return
|
||||
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
return src.attackby(user, user)
|
||||
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/device/detective_scanner))
|
||||
return
|
||||
if(src.operating || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
|
||||
src.add_fingerprint(user)
|
||||
if(!src.requiresID())
|
||||
user = null
|
||||
if(src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade)))
|
||||
flick("door_spark", src)
|
||||
sleep(6)
|
||||
open()
|
||||
operating = -1
|
||||
return 1
|
||||
if(src.allowed(user))
|
||||
if(src.density)
|
||||
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
|
||||
open()
|
||||
else
|
||||
close()
|
||||
return
|
||||
if(src.density)
|
||||
flick("door_deny", src)
|
||||
return
|
||||
|
||||
|
||||
blob_act()
|
||||
if(prob(40))
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
emp_act(severity)
|
||||
if(prob(20/severity) && (istype(src,/obj/machinery/door/airlock) || istype(src,/obj/machinery/door/window)) )
|
||||
open()
|
||||
if(prob(40/severity))
|
||||
if(secondsElectrified == 0)
|
||||
secondsElectrified = -1
|
||||
spawn(300)
|
||||
secondsElectrified = 0
|
||||
..()
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
if(2.0)
|
||||
if(prob(25))
|
||||
del(src)
|
||||
if(3.0)
|
||||
if(prob(80))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
return
|
||||
|
||||
|
||||
update_icon()
|
||||
if(density)
|
||||
icon_state = "door1"
|
||||
else
|
||||
icon_state = "door0"
|
||||
return
|
||||
|
||||
|
||||
animate(animation)
|
||||
switch(animation)
|
||||
if("opening")
|
||||
if(p_open)
|
||||
flick("o_doorc0", src)
|
||||
else
|
||||
flick("doorc0", src)
|
||||
if("closing")
|
||||
if(p_open)
|
||||
flick("o_doorc1", src)
|
||||
else
|
||||
flick("doorc1", src)
|
||||
if("deny")
|
||||
flick("door_deny", src)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
open()
|
||||
if(!density) return 1
|
||||
if(operating > 0) return
|
||||
if(!ticker) return 0
|
||||
if(!operating) operating = 1
|
||||
|
||||
animate("opening")
|
||||
icon_state = "door0"
|
||||
src.SetOpacity(0)
|
||||
sleep(10)
|
||||
src.layer = 2.7
|
||||
src.density = 0
|
||||
explosion_resistance = 0
|
||||
update_icon()
|
||||
SetOpacity(0)
|
||||
update_nearby_tiles()
|
||||
|
||||
if(operating) operating = 0
|
||||
|
||||
if(autoclose && normalspeed)
|
||||
spawn(150)
|
||||
autoclose()
|
||||
if(autoclose && !normalspeed)
|
||||
spawn(5)
|
||||
autoclose()
|
||||
|
||||
return 1
|
||||
/obj/machinery/door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return 0
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
|
||||
close()
|
||||
if(density) return 1
|
||||
if(operating) return
|
||||
operating = 1
|
||||
/obj/machinery/door/proc/bumpopen(mob/user as mob)
|
||||
if(operating) return
|
||||
src.add_fingerprint(user)
|
||||
if(!src.requiresID())
|
||||
user = null
|
||||
|
||||
animate("closing")
|
||||
src.density = 1
|
||||
explosion_resistance = initial(explosion_resistance)
|
||||
src.layer = 3.1
|
||||
sleep(10)
|
||||
update_icon()
|
||||
if(visible && !glass)
|
||||
SetOpacity(1) //caaaaarn!
|
||||
operating = 0
|
||||
update_nearby_tiles()
|
||||
if(density)
|
||||
if(allowed(user)) open()
|
||||
else flick("door_deny", src)
|
||||
return
|
||||
|
||||
/obj/machinery/door/meteorhit(obj/M as obj)
|
||||
src.open()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/door/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/door/attack_hand(mob/user as mob)
|
||||
return src.attackby(user, user)
|
||||
|
||||
|
||||
/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/device/detective_scanner))
|
||||
return
|
||||
if(src.operating || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
|
||||
src.add_fingerprint(user)
|
||||
if(!src.requiresID())
|
||||
user = null
|
||||
if(src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade)))
|
||||
flick("door_spark", src)
|
||||
sleep(6)
|
||||
open()
|
||||
operating = -1
|
||||
return 1
|
||||
if(src.allowed(user))
|
||||
if(src.density)
|
||||
open()
|
||||
else
|
||||
close()
|
||||
return
|
||||
if(src.density)
|
||||
flick("door_deny", src)
|
||||
return
|
||||
|
||||
|
||||
update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
/obj/machinery/door/blob_act()
|
||||
if(prob(40))
|
||||
del(src)
|
||||
return
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/north = get_step(source,NORTH)
|
||||
var/turf/simulated/south = get_step(source,SOUTH)
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
/obj/machinery/door/emp_act(severity)
|
||||
if(prob(20/severity) && (istype(src,/obj/machinery/door/airlock) || istype(src,/obj/machinery/door/window)) )
|
||||
open()
|
||||
if(prob(40/severity))
|
||||
if(secondsElectrified == 0)
|
||||
secondsElectrified = -1
|
||||
spawn(300)
|
||||
secondsElectrified = 0
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/door/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
if(2.0)
|
||||
if(prob(25))
|
||||
del(src)
|
||||
if(3.0)
|
||||
if(prob(80))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/update_icon()
|
||||
if(density)
|
||||
icon_state = "door1"
|
||||
else
|
||||
icon_state = "door0"
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/proc/animate(animation)
|
||||
switch(animation)
|
||||
if("opening")
|
||||
if(p_open)
|
||||
flick("o_doorc0", src)
|
||||
else
|
||||
flick("doorc0", src)
|
||||
if("closing")
|
||||
if(p_open)
|
||||
flick("o_doorc1", src)
|
||||
else
|
||||
flick("doorc1", src)
|
||||
if("deny")
|
||||
flick("door_deny", src)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/proc/open()
|
||||
if(!density) return 1
|
||||
if(operating > 0) return
|
||||
if(!ticker) return 0
|
||||
if(!operating) operating = 1
|
||||
|
||||
animate("opening")
|
||||
icon_state = "door0"
|
||||
src.SetOpacity(0)
|
||||
sleep(10)
|
||||
src.layer = 2.7
|
||||
src.density = 0
|
||||
explosion_resistance = 0
|
||||
update_icon()
|
||||
SetOpacity(0)
|
||||
update_nearby_tiles()
|
||||
|
||||
if(operating) operating = 0
|
||||
|
||||
if(autoclose && normalspeed)
|
||||
spawn(150)
|
||||
autoclose()
|
||||
if(autoclose && !normalspeed)
|
||||
spawn(5)
|
||||
autoclose()
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/door/proc/close()
|
||||
if(density) return 1
|
||||
if(operating) return
|
||||
operating = 1
|
||||
|
||||
animate("closing")
|
||||
src.density = 1
|
||||
explosion_resistance = initial(explosion_resistance)
|
||||
src.layer = 3.1
|
||||
sleep(10)
|
||||
update_icon()
|
||||
if(visible && !glass)
|
||||
SetOpacity(1) //caaaaarn!
|
||||
operating = 0
|
||||
update_nearby_tiles()
|
||||
return
|
||||
|
||||
/obj/machinery/door/proc/requiresID()
|
||||
return 0
|
||||
|
||||
/obj/machinery/door/proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/north = get_step(source,NORTH)
|
||||
var/turf/simulated/south = get_step(source,SOUTH)
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
update_heat_protection(loc)
|
||||
|
||||
if(need_rebuild)
|
||||
if(istype(source)) //Rebuild/update nearby group geometry
|
||||
if(source.parent)
|
||||
air_master.groups_to_rebuild += source.parent
|
||||
else
|
||||
air_master.tiles_to_update += source
|
||||
if(istype(north))
|
||||
if(north.parent)
|
||||
air_master.groups_to_rebuild += north.parent
|
||||
else
|
||||
air_master.tiles_to_update += north
|
||||
if(istype(south))
|
||||
if(south.parent)
|
||||
air_master.groups_to_rebuild += south.parent
|
||||
else
|
||||
air_master.tiles_to_update += south
|
||||
if(istype(east))
|
||||
if(east.parent)
|
||||
air_master.groups_to_rebuild += east.parent
|
||||
else
|
||||
air_master.tiles_to_update += east
|
||||
if(istype(west))
|
||||
if(west.parent)
|
||||
air_master.groups_to_rebuild += west.parent
|
||||
else
|
||||
air_master.tiles_to_update += west
|
||||
else
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/proc/update_heat_protection(var/turf/simulated/source)
|
||||
if(istype(source))
|
||||
if(src.density && src.opacity)
|
||||
source.thermal_conductivity = DOOR_HEAT_TRANSFER_COEFFICIENT
|
||||
else
|
||||
source.thermal_conductivity = initial(source.thermal_conductivity)
|
||||
|
||||
if(need_rebuild)
|
||||
if(istype(source)) //Rebuild/update nearby group geometry
|
||||
if(source.parent)
|
||||
air_master.groups_to_rebuild += source.parent
|
||||
else
|
||||
air_master.tiles_to_update += source
|
||||
if(istype(north))
|
||||
if(north.parent)
|
||||
air_master.groups_to_rebuild += north.parent
|
||||
else
|
||||
air_master.tiles_to_update += north
|
||||
if(istype(south))
|
||||
if(south.parent)
|
||||
air_master.groups_to_rebuild += south.parent
|
||||
else
|
||||
air_master.tiles_to_update += south
|
||||
if(istype(east))
|
||||
if(east.parent)
|
||||
air_master.groups_to_rebuild += east.parent
|
||||
else
|
||||
air_master.tiles_to_update += east
|
||||
if(istype(west))
|
||||
if(west.parent)
|
||||
air_master.groups_to_rebuild += west.parent
|
||||
else
|
||||
air_master.tiles_to_update += west
|
||||
else
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/door/proc/autoclose()
|
||||
var/obj/machinery/door/airlock/A = src
|
||||
if(!A.density && !A.operating && !A.locked && !A.welded && A.autoclose)
|
||||
@@ -296,33 +292,4 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/morgue
|
||||
icon = 'icons/obj/doors/doormorgue.dmi'
|
||||
|
||||
/*
|
||||
/obj/machinery/door/airlock/proc/ion_act()
|
||||
if(src.z == 1 && src.density)
|
||||
if(length(req_access) > 0 && !(12 in req_access))
|
||||
if(prob(4))
|
||||
world << "\red Airlock emagged in [src.loc.loc]"
|
||||
src.operating = -1
|
||||
flick("door_spark", src)
|
||||
sleep(6)
|
||||
open()
|
||||
else
|
||||
if(prob(8))
|
||||
world << "\red non vital Airlock emagged in [src.loc.loc]"
|
||||
src.operating = -1
|
||||
flick("door_spark", src)
|
||||
sleep(6)
|
||||
open()
|
||||
return
|
||||
|
||||
/obj/machinery/door/firedoor/proc/ion_act()
|
||||
if(src.z == 1)
|
||||
if(prob(15))
|
||||
if(density)
|
||||
open()
|
||||
else
|
||||
close()
|
||||
return
|
||||
*/
|
||||
icon = 'icons/obj/doors/doormorgue.dmi'
|
||||
Reference in New Issue
Block a user