[MIRROR] Modernizing doors (#11728)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-09-23 14:24:13 -07:00
committed by GitHub
parent 845f030283
commit 2738c2c020
38 changed files with 1118 additions and 1192 deletions

View File

@@ -488,6 +488,27 @@
///from base power_change() when power is restored
#define COMSIG_MACHINERY_POWER_RESTORED "machinery_power_restored"
// /obj/machinery/door signals
//from /obj/machinery/door/can_open():
#define COMSIG_DOOR_CAN_OPEN "attempt_door_open"
/// Return to stop the door opening
#define DOOR_DENY_OPEN (1<<0)
//from /obj/machinery/door/can_close():
#define COMSIG_DOOR_CAN_CLOSE "attempt_door_close"
/// Return to stop the door closing
#define DOOR_DENY_CLOSE (1<<0)
//from /obj/machinery/door/open(): (forced)
#define COMSIG_DOOR_OPEN "door_open"
//from /obj/machinery/door/close(): (forced)
#define COMSIG_DOOR_CLOSE "door_close"
///from /obj/machinery/door/airlock/set_bolt():
#define COMSIG_AIRLOCK_SET_BOLT "airlock_set_bolt"
///from /obj/machinery/door/bumpopen(), to the mob who bumped: (door)
#define COMSIG_MOB_BUMPED_DOOR_OPEN "mob_bumped_door_open"
/// Return to stop the door opening on bump.
#define DOOR_STOP_BUMP (1<<0)
// /obj/item signals
///from base of obj/item/attack(): (/mob/living/target, /mob/living/user)

View File

@@ -641,12 +641,6 @@
temps[direction] = rstats
return temps
/proc/MinutesToTicks(var/minutes)
return SecondsToTicks(60 * minutes)
/proc/SecondsToTicks(var/seconds)
return seconds * 10
///Flash the window of a player
/proc/window_flash(client/flashed_client, ignorepref = FALSE)
if(ismob(flashed_client))

View File

@@ -627,8 +627,73 @@
if(isAI(usr))
var/mob/living/silicon/ai/ai_user = usr
ai_user.view_images()
else
return attempt_vr(src,"Click_vr",list(location,control,params))
if("shadekin status")
var/turf/T = get_turf(usr)
if(T)
var/darkness = round(1 - T.get_lumcount(),0.1)
to_chat(usr,span_notice(span_bold("Darkness:") + " [darkness]"))
var/mob/living/H = usr
if(ismob(H))
var/datum/component/shadekin/SK = H.get_shadekin_component()
if(SK)
to_chat(usr,span_notice(span_bold("Energy:") + " [SK.shadekin_get_energy()]"))
if("glamour")
var/mob/living/carbon/human/H = usr
if(istype(H))
to_chat(usr,span_notice(span_bold("Energy:") + " [H.species.lleill_energy]/[H.species.lleill_energy_max]"))
if("danger level")
var/mob/living/carbon/human/H = usr
var/datum/component/xenochimera/xc = H.get_xenochimera_component()
if(xc)
if(xc.feral > 50)
to_chat(usr, span_warning("You are currently <b>completely feral.</b>"))
else if(xc.feral > 10)
to_chat(usr, span_warning("You are currently <b>crazed and confused.</b>"))
else if(xc.feral > 0)
to_chat(usr, span_warning("You are currently <b>acting on instinct.</b>"))
else
to_chat(usr, span_notice("You are currently <b>calm and collected.</b>"))
if(xc.feral > 0)
var/feral_passing = TRUE
if(H.traumatic_shock > min(60, H.nutrition/10))
to_chat(usr, span_warning("Your pain prevents you from regaining focus."))
feral_passing = FALSE
if(xc.feral + H.nutrition < 150)
to_chat(usr, span_warning("Your hunger prevents you from regaining focus."))
feral_passing = FALSE
if(H.get_jittery() >= 100)
to_chat(usr, span_warning("Your jitterness prevents you from regaining focus."))
feral_passing = FALSE
if(feral_passing)
var/turf/T = get_turf(H)
if(T.get_lumcount() <= 0.1)
to_chat(usr, span_notice("You are slowly calming down in darkness' safety..."))
else if(isbelly(H.loc)) // Safety message for if inside a belly.
to_chat(usr, span_notice("You are slowly calming down within the darkness of something's belly, listening to their body as it moves around you. ...safe..."))
else
to_chat(usr, span_notice("You are slowly calming down... But safety of darkness is much preferred."))
else
if(H.nutrition < 150)
to_chat(usr, span_warning("Your hunger is slowly making you unstable."))
if("Reconstructing Form") // Allow Viewing Reconstruction Timer + Hatching for 'chimera
var/mob/living/carbon/human/H = usr
var/datum/component/xenochimera/xc = H.get_xenochimera_component()
if(xc) // If you're somehow able to click this while not a chimera, this should prevent weird runtimes. Will need changing if regeneration is ever opened to non-chimera using the same alert.
if(xc.revive_ready == REVIVING_NOW)
to_chat(usr, span_notice("We are currently reviving, and will be done in [round((xc.revive_finished - world.time) / 10)] seconds, or [round(((xc.revive_finished - world.time) * 0.1) / 60)] minutes."))
else if(xc.revive_ready == REVIVING_DONE)
to_chat(usr, span_warning("You should have a notification + alert for this! Bug report that this is still here!"))
if("Ready to Hatch") // Allow Viewing Reconstruction Timer + Hatching for 'chimera
var/mob/living/carbon/human/H = usr
var/datum/component/xenochimera/xc = H.get_xenochimera_component()
if(xc) // If you're somehow able to click this while not a chimera, this should prevent weird runtimes. Will need changing if regeneration is ever opened to non-chimera using the same alert.
if(xc.revive_ready == REVIVING_DONE) // Sanity check.
H.hatch() // Hatch.
return 1
/atom/movable/screen/inventory/Click()

View File

@@ -1,71 +0,0 @@
/atom/movable/screen/proc/Click_vr(location, control, params)
if(!usr) return 1
switch(name)
if("shadekin status")
var/turf/T = get_turf(usr)
if(T)
var/darkness = round(1 - T.get_lumcount(),0.1)
to_chat(usr,span_notice(span_bold("Darkness:") + " [darkness]"))
var/mob/living/H = usr
if(ismob(H))
var/datum/component/shadekin/SK = H.get_shadekin_component()
if(SK)
to_chat(usr,span_notice(span_bold("Energy:") + " [SK.shadekin_get_energy()]"))
if("glamour")
var/mob/living/carbon/human/H = usr
if(istype(H))
to_chat(usr,span_notice(span_bold("Energy:") + " [H.species.lleill_energy]/[H.species.lleill_energy_max]"))
if("danger level")
var/mob/living/carbon/human/H = usr
var/datum/component/xenochimera/xc = H.get_xenochimera_component()
if(xc)
if(xc.feral > 50)
to_chat(usr, span_warning("You are currently <b>completely feral.</b>"))
else if(xc.feral > 10)
to_chat(usr, span_warning("You are currently <b>crazed and confused.</b>"))
else if(xc.feral > 0)
to_chat(usr, span_warning("You are currently <b>acting on instinct.</b>"))
else
to_chat(usr, span_notice("You are currently <b>calm and collected.</b>"))
if(xc.feral > 0)
var/feral_passing = TRUE
if(H.traumatic_shock > min(60, H.nutrition/10))
to_chat(usr, span_warning("Your pain prevents you from regaining focus."))
feral_passing = FALSE
if(xc.feral + H.nutrition < 150)
to_chat(usr, span_warning("Your hunger prevents you from regaining focus."))
feral_passing = FALSE
if(H.get_jittery() >= 100)
to_chat(usr, span_warning("Your jitterness prevents you from regaining focus."))
feral_passing = FALSE
if(feral_passing)
var/turf/T = get_turf(H)
if(T.get_lumcount() <= 0.1)
to_chat(usr, span_notice("You are slowly calming down in darkness' safety..."))
else if(isbelly(H.loc)) // Safety message for if inside a belly.
to_chat(usr, span_notice("You are slowly calming down within the darkness of something's belly, listening to their body as it moves around you. ...safe..."))
else
to_chat(usr, span_notice("You are slowly calming down... But safety of darkness is much preferred."))
else
if(H.nutrition < 150)
to_chat(usr, span_warning("Your hunger is slowly making you unstable."))
if("Reconstructing Form") // Allow Viewing Reconstruction Timer + Hatching for 'chimera
var/mob/living/carbon/human/H = usr
var/datum/component/xenochimera/xc = H.get_xenochimera_component()
if(xc) // If you're somehow able to click this while not a chimera, this should prevent weird runtimes. Will need changing if regeneration is ever opened to non-chimera using the same alert.
if(xc.revive_ready == REVIVING_NOW)
to_chat(usr, span_notice("We are currently reviving, and will be done in [round((xc.revive_finished - world.time) / 10)] seconds, or [round(((xc.revive_finished - world.time) * 0.1) / 60)] minutes."))
else if(xc.revive_ready == REVIVING_DONE)
to_chat(usr, span_warning("You should have a notification + alert for this! Bug report that this is still here!"))
if("Ready to Hatch") // Allow Viewing Reconstruction Timer + Hatching for 'chimera
var/mob/living/carbon/human/H = usr
var/datum/component/xenochimera/xc = H.get_xenochimera_component()
if(xc) // If you're somehow able to click this while not a chimera, this should prevent weird runtimes. Will need changing if regeneration is ever opened to non-chimera using the same alert.
if(xc.revive_ready == REVIVING_DONE) // Sanity check.
H.hatch() // Hatch.
else
return 0
return 1

View File

@@ -65,7 +65,8 @@ avoid code duplication. This includes items that may sometimes act as a standard
if(can_operate(src, user) && I.do_surgery(src,user))
return TRUE
if(attempt_vr(src,"vore_attackby",args)) return //VOREStation Add - The vore, of course.
if(vore_attackby(I, user)) // The vore, of course.
return
return I.attack(src, user, user.zone_sel.selecting, attack_modifier)

View File

@@ -88,7 +88,7 @@ SUBSYSTEM_DEF(events)
if(E.isRunning)
message += "and is still running."
else
if(E.endedAt - E.startedAt > MinutesToTicks(5)) // Only mention end time if the entire duration was more than 5 minutes
if(E.endedAt - E.startedAt > 5 MINUTES) // Only mention end time if the entire duration was more than 5 minutes
message += "and ended at [worldtime2stationtime(E.endedAt)]."
else
message += "and ran to completion."

View File

@@ -124,7 +124,8 @@ GLOBAL_LIST_INIT(bluespace_item_types, list(
var/mob/living/L = teleatom
if(L.buckled)
C = L.buckled
if(attempt_vr(src,"try_televore",args)) return
if(try_televore())
return
if(force_teleport)
teleatom.forceMove(destturf)
playSpecials(destturf,effectout,soundout)

View File

@@ -10,7 +10,7 @@
return
/datum/teleport/instant/science/noeffect/setEffects(datum/effect/effect/system/aeffectin,datum/effect/effect/system/aeffectout)
return 1
return TRUE
/datum/teleport/proc/try_televore()
//Destination is in a belly

View File

@@ -723,9 +723,6 @@
/atom/movable/proc/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)
return
/atom/movable/proc/Bump_vr(var/atom/A, yes)
return
/atom/movable/vv_get_dropdown()
. = ..()
VV_DROPDOWN_OPTION("", "---------")

View File

@@ -156,13 +156,21 @@ GLOBAL_VAR_INIT(meteor_wave_delay, 625) //minimum wait between waves in tenths o
SpinAnimation()
/obj/effect/meteor/Bump(atom/A)
if(attempt_vr(src,"Bump_vr",list(A))) return //VOREStation Edit - allows meteors to be deflected by baseball bats
if(A)
if(A.handle_meteor_impact(src)) // Used for special behaviour when getting hit specifically by a meteor, like a shield.
ram_turf(get_turf(A))
get_hit()
else
die(FALSE)
if(!A)
return
if(istype(A, /mob/living/carbon))
var/mob/living/carbon/batter = A
var/obj/item/I = batter.get_active_hand()
if(!batter.stat && istype(I, /obj/item/material/twohanded/baseballbat))
batter.do_attack_animation(src)
batter.visible_message("[batter] deflects [src] with [I]]! Home run!", "You deflect [src] with [I]! Home run!")
walk_away(src, batter, 100, 1)
return
if(A.handle_meteor_impact(src)) // Used for special behaviour when getting hit specifically by a meteor, like a shield.
ram_turf(get_turf(A))
get_hit()
return
die(FALSE)
/obj/effect/meteor/CanPass(atom/movable/mover, turf/target)
return istype(mover, /obj/effect/meteor) ? TRUE : ..()

View File

@@ -1,10 +0,0 @@
/obj/effect/meteor/Bump_vr(atom/A)//BATTER UP
if(istype(A, /mob/living/carbon))
var/mob/living/carbon/batter = A
var/obj/item/I = batter.get_active_hand()
if(!batter.stat && istype(I, /obj/item/material/twohanded/baseballbat))
batter.do_attack_animation(src)
batter.visible_message("[batter] deflects [src] with [I]]! Home run!", "You deflect [src] with [I]! Home run!")
walk_away(src, batter, 100, 1)
return TRUE
return

View File

@@ -374,7 +374,7 @@
occupantData["nearsighted"] = (H.disabilities & NEARSIGHTED)
occupantData["brokenspine"] = (H.disabilities & SPINE)
occupantData["husked"] = (HUSK in H.mutations)
occupantData = attempt_vr(src, "get_occupant_data_vr", list(occupantData, H))
occupantData = get_vored_occupant_data(occupantData, H)
data["occupant"] = occupantData
return data

View File

@@ -7,7 +7,7 @@
icon_state = "scanner_terminal_off"
density = TRUE
/obj/machinery/bodyscanner/proc/get_occupant_data_vr(list/incoming, mob/living/carbon/human/H)
/obj/machinery/bodyscanner/proc/get_vored_occupant_data(list/incoming, mob/living/carbon/human/H)
var/humanprey = 0
var/livingprey = 0
var/objectprey = 0

View File

@@ -384,7 +384,7 @@
despawn_occupant(M)
// VOREStation
hook_vr("despawn", list(to_despawn, src))
persist_despawned_mob(to_despawn, src)
if(isliving(to_despawn))
var/mob/living/L = to_despawn
for(var/obj/belly/B as anything in L.vore_organs)

File diff suppressed because it is too large Load Diff

View File

@@ -151,6 +151,10 @@
icon_state_closing = "pdoorc1"
icon_state = "pdoor1"
maxhealth = 600
heat_proof = 1 //just so repairing them doesn't try to fireproof something that never takes fire damage
/obj/machinery/door/blast/angled/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return // blast doors are immune to fire completely.
/obj/machinery/door/blast/angled/open
icon_state = "pdoor0"

View File

@@ -0,0 +1,550 @@
/obj/machinery/door/airlock/command
name = "Command Airlock"
icon = 'icons/obj/doors/Doorcom.dmi'
req_one_access = list(ACCESS_HEADS)
assembly_type = /obj/structure/door_assembly/door_assembly_com
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/cmd3o.ogg'
department_close_powered = 'sound/machines/door/cmd3c.ogg'
security_level = 3
/obj/machinery/door/airlock/security
name = "Security Airlock"
icon = 'icons/obj/doors/Doorsec.dmi'
req_one_access = list(ACCESS_SECURITY)
assembly_type = /obj/structure/door_assembly/door_assembly_sec
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/sec1o.ogg'
department_close_powered = 'sound/machines/door/sec1c.ogg'
security_level = 2
/obj/machinery/door/airlock/engineering
name = "Engineering Airlock"
icon = 'icons/obj/doors/Dooreng.dmi'
req_one_access = list(ACCESS_ENGINE)
assembly_type = /obj/structure/door_assembly/door_assembly_eng
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/eng1o.ogg'
department_close_powered = 'sound/machines/door/eng1c.ogg'
security_level = 1.5
/obj/machinery/door/airlock/engineeringatmos
name = "Atmospherics Airlock"
icon = 'icons/obj/doors/Doorengatmos.dmi'
req_one_access = list(ACCESS_ATMOSPHERICS)
assembly_type = /obj/structure/door_assembly/door_assembly_eat
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/eng1o.ogg'
department_close_powered = 'sound/machines/door/eng1c.ogg'
security_level = 1.5
/obj/machinery/door/airlock/medical
name = "Medical Airlock"
icon = 'icons/obj/doors/doormed.dmi'
req_one_access = list(ACCESS_MEDICAL)
assembly_type = /obj/structure/door_assembly/door_assembly_med
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/med1o.ogg'
department_close_powered = 'sound/machines/door/med1c.ogg'
security_level = 1.5
/obj/machinery/door/airlock/maintenance
name = "Maintenance Access"
icon = 'icons/obj/doors/Doormaint.dmi'
//req_one_access = list(ACCESS_MAINT_TUNNELS) //Maintenance is open access
assembly_type = /obj/structure/door_assembly/door_assembly_mai
open_sound_powered = 'sound/machines/door/door2o.ogg'
close_sound_powered = 'sound/machines/door/door2c.ogg'
/obj/machinery/door/airlock/maintenance/cargo
icon = 'icons/obj/doors/Doormaint_cargo.dmi'
req_one_access = list(ACCESS_CARGO)
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/door2o.ogg'
department_close_powered = 'sound/machines/door/door2c.ogg'
/obj/machinery/door/airlock/maintenance/command
icon = 'icons/obj/doors/Doormaint_command.dmi'
req_one_access = list(ACCESS_HEADS)
/obj/machinery/door/airlock/maintenance/common
icon = 'icons/obj/doors/Doormaint_common.dmi'
open_sound_powered = 'sound/machines/door/hall3o.ogg'
close_sound_powered = 'sound/machines/door/hall3c.ogg'
/obj/machinery/door/airlock/maintenance/engi
icon = 'icons/obj/doors/Doormaint_engi.dmi'
req_one_access = list(ACCESS_ENGINE)
/obj/machinery/door/airlock/maintenance/int
icon = 'icons/obj/doors/Doormaint_int.dmi'
/obj/machinery/door/airlock/maintenance/medical
icon = 'icons/obj/doors/Doormaint_med.dmi'
req_one_access = list(ACCESS_MEDICAL)
/obj/machinery/door/airlock/maintenance/rnd
icon = 'icons/obj/doors/Doormaint_rnd.dmi'
req_one_access = list(ACCESS_RESEARCH)
/obj/machinery/door/airlock/maintenance/sec
icon = 'icons/obj/doors/Doormaint_sec.dmi'
req_one_access = list(ACCESS_SECURITY)
/obj/machinery/door/airlock/external
name = "External Airlock"
icon = 'icons/obj/doors/Doorext.dmi'
assembly_type = /obj/structure/door_assembly/door_assembly_ext
open_sound_powered = 'sound/machines/door/space1o.ogg'
close_sound_powered = 'sound/machines/door/space1c.ogg'
/obj/machinery/door/airlock/external/bolted
icon_state = "door_locked" // So it looks visibly bolted in map editor
locked = TRUE
// For convenience in making docking ports: one that is pre-bolted with frequency set!
/obj/machinery/door/airlock/external/bolted/cycling
frequency = AIRLOCK_FREQ
/obj/machinery/door/airlock/glass_external
name = "External Airlock"
icon = 'icons/obj/doors/Doorextglass.dmi'
assembly_type = /obj/structure/door_assembly/door_assembly_ext
opacity = 0
glass = 1
req_one_access = list(ACCESS_EXTERNAL_AIRLOCKS)
open_sound_powered = 'sound/machines/door/space1o.ogg'
close_sound_powered = 'sound/machines/door/space1c.ogg'
/obj/machinery/door/airlock/glass
name = "Glass Airlock"
icon = 'icons/obj/doors/Doorglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
legacy_open_powered = 'sound/machines/door/windowdoor.ogg'
maxhealth = 300
explosion_resistance = 5
opacity = 0
glass = 1
/obj/machinery/door/airlock/centcom
name = "Centcom Airlock"
icon = 'icons/obj/doors/Doorele.dmi'
req_one_access = list(ACCESS_CENT_GENERAL)
opacity = 1
open_sound_powered = 'sound/machines/door/cmd3o.ogg'
close_sound_powered = 'sound/machines/door/cmd3c.ogg'
security_level = 100
/obj/machinery/door/airlock/glass_centcom
name = "Airlock"
icon = 'icons/obj/doors/Dooreleglass.dmi'
opacity = 0
glass = 1
open_sound_powered = 'sound/machines/door/cmd3o.ogg'
close_sound_powered = 'sound/machines/door/cmd3c.ogg'
security_level = 100
/obj/machinery/door/airlock/vault
name = "Vault"
icon = 'icons/obj/doors/vault.dmi'
explosion_resistance = 20
opacity = 1
secured_wires = 1
assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity //Until somebody makes better sprites.
req_one_access = list(ACCESS_HEADS_VAULT)
open_sound_powered = 'sound/machines/door/vault1o.ogg'
close_sound_powered = 'sound/machines/door/vault1c.ogg'
security_level = 5
heat_proof = 1
/obj/machinery/door/airlock/vault/bolted
icon_state = "door_locked"
locked = TRUE
/obj/machinery/door/airlock/freezer
name = "Freezer Airlock"
icon = 'icons/obj/doors/Doorfreezer.dmi'
opacity = 1
assembly_type = /obj/structure/door_assembly/door_assembly_fre
/obj/machinery/door/airlock/hatch
name = "Airtight Hatch"
icon = 'icons/obj/doors/Doorhatchele.dmi'
explosion_resistance = 20
opacity = 1
assembly_type = /obj/structure/door_assembly/door_assembly_hatch
req_one_access = list(ACCESS_MAINT_TUNNELS)
open_sound_powered = 'sound/machines/door/hatchopen.ogg'
close_sound_powered = 'sound/machines/door/hatchclose.ogg'
open_sound_unpowered = 'sound/machines/door/hatchforced.ogg'
heat_proof = 1
/obj/machinery/door/airlock/maintenance_hatch
name = "Maintenance Hatch"
icon = 'icons/obj/doors/Doorhatchmaint2.dmi'
explosion_resistance = 20
opacity = 1
assembly_type = /obj/structure/door_assembly/door_assembly_mhatch
req_one_access = list(ACCESS_MAINT_TUNNELS)
open_sound_powered = 'sound/machines/door/hatchopen.ogg'
close_sound_powered = 'sound/machines/door/hatchclose.ogg'
open_sound_unpowered = 'sound/machines/door/hatchforced.ogg'
/obj/machinery/door/airlock/glass_command
name = "Command Airlock"
icon = 'icons/obj/doors/Doorcomglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_com
glass = 1
req_one_access = list(ACCESS_HEADS)
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/cmd1o.ogg'
department_close_powered = 'sound/machines/door/cmd1c.ogg'
security_level = 3
/obj/machinery/door/airlock/glass_engineering
name = "Engineering Airlock"
icon = 'icons/obj/doors/Doorengglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_eng
glass = 1
req_one_access = list(ACCESS_ENGINE)
department_open_powered = 'sound/machines/door/eng1o.ogg'
department_close_powered = 'sound/machines/door/eng1c.ogg'
security_level = 1.5
/obj/machinery/door/airlock/glass_engineeringatmos
name = "Atmospherics Airlock"
icon = 'icons/obj/doors/Doorengatmoglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_eat
glass = 1
req_one_access = list(ACCESS_ATMOSPHERICS)
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/eng1o.ogg'
department_close_powered = 'sound/machines/door/eng1c.ogg'
security_level = 1.5
/obj/machinery/door/airlock/glass_security
name = "Security Airlock"
icon = 'icons/obj/doors/Doorsecglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_sec
glass = 1
req_one_access = list(ACCESS_SECURITY)
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/sec1o.ogg'
department_close_powered = 'sound/machines/door/sec1c.ogg'
security_level = 2
/obj/machinery/door/airlock/glass_medical
name = "Medical Airlock"
icon = 'icons/obj/doors/doormedglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_med
glass = 1
req_one_access = list(ACCESS_MEDICAL)
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/med1o.ogg'
department_close_powered = 'sound/machines/door/med1c.ogg'
security_level = 1.5
/obj/machinery/door/airlock/mining
name = "Mining Airlock"
icon = 'icons/obj/doors/Doormining.dmi'
assembly_type = /obj/structure/door_assembly/door_assembly_min
req_one_access = list(ACCESS_MINING)
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/cgo1o.ogg'
department_close_powered = 'sound/machines/door/cgo1c.ogg'
/obj/machinery/door/airlock/atmos
name = "Atmospherics Airlock"
icon = 'icons/obj/doors/Dooratmo.dmi'
assembly_type = /obj/structure/door_assembly/door_assembly_atmo
req_one_access = list(ACCESS_ATMOSPHERICS)
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/eng1o.ogg'
department_close_powered = 'sound/machines/door/eng1c.ogg'
security_level = 1.5
/obj/machinery/door/airlock/research
name = "Research Airlock"
icon = 'icons/obj/doors/doorresearch.dmi'
assembly_type = /obj/structure/door_assembly/door_assembly_research
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/sci1o.ogg'
department_close_powered = 'sound/machines/door/sci1c.ogg'
security_level = 2
/obj/machinery/door/airlock/glass_research
name = "Research Airlock"
icon = 'icons/obj/doors/doorresearchglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_research
glass = 1
req_one_access = list(ACCESS_RESEARCH)
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/sci1o.ogg'
department_close_powered = 'sound/machines/door/sci1c.ogg'
security_level = 2
/obj/machinery/door/airlock/glass_mining
name = "Mining Airlock"
icon = 'icons/obj/doors/Doorminingglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_min
glass = 1
req_one_access = list(ACCESS_MINING)
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/cgo1o.ogg'
department_close_powered = 'sound/machines/door/cgo1c.ogg'
/obj/machinery/door/airlock/glass_atmos
name = "Atmospherics Airlock"
icon = 'icons/obj/doors/Dooratmoglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_atmo
glass = 1
req_one_access = list(ACCESS_ATMOSPHERICS)
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/eng1o.ogg'
department_close_powered = 'sound/machines/door/eng1c.ogg'
security_level = 1.5
/obj/machinery/door/airlock/gold
name = "Gold Airlock"
icon = 'icons/obj/doors/Doorgold.dmi'
mineral = MAT_GOLD
/obj/machinery/door/airlock/silver
name = "Silver Airlock"
icon = 'icons/obj/doors/Doorsilver.dmi'
mineral = MAT_SILVER
/obj/machinery/door/airlock/diamond
name = "Diamond Airlock"
icon = 'icons/obj/doors/Doordiamond.dmi'
mineral = MAT_DIAMOND
/obj/machinery/door/airlock/uranium
name = "Uranium Airlock"
desc = "And they said I was crazy."
icon = 'icons/obj/doors/Dooruranium.dmi'
mineral = MAT_URANIUM
var/last_event = 0
var/rad_power = 7.5
/obj/machinery/door/airlock/uranium/process()
if(world.time > last_event+20)
if(prob(50))
SSradiation.radiate(src, rad_power)
last_event = world.time
..()
/obj/machinery/door/airlock/uranium_appearance
icon = 'icons/obj/doors/Dooruranium.dmi'
/obj/machinery/door/airlock/phoron
name = "Phoron Airlock"
desc = "No way this can end badly."
icon = 'icons/obj/doors/Doorphoron.dmi'
mineral = MAT_PHORON
/obj/machinery/door/airlock/phoron/attackby(obj/C, mob/user)
if(C)
ignite(is_hot(C))
. = ..()
/obj/machinery/door/airlock/phoron/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
PhoronBurn(exposed_temperature)
/obj/machinery/door/airlock/phoron/proc/ignite(exposed_temperature)
if(exposed_temperature > 300)
PhoronBurn(exposed_temperature)
/obj/machinery/door/airlock/phoron/proc/PhoronBurn(temperature)
for(var/turf/simulated/floor/target_tile in range(2,loc))
target_tile.assume_gas(GAS_PHORON, 35, 400+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400)
for(var/turf/simulated/wall/W in range(3,src))
W.burn((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
for(var/obj/machinery/door/airlock/phoron/D in range(3,src))
D.ignite(temperature/4)
new/obj/structure/door_assembly(get_turf(src))
qdel(src)
/obj/machinery/door/airlock/sandstone
name = "Sandstone Airlock"
icon = 'icons/obj/doors/Doorsand.dmi'
mineral = MAT_SANDSTONE
/obj/machinery/door/airlock/science
name = "Research Airlock"
icon = 'icons/obj/doors/doorsci.dmi'
assembly_type = /obj/structure/door_assembly/door_assembly_science
req_one_access = list(ACCESS_RESEARCH)
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/sci1o.ogg'
department_close_powered = 'sound/machines/door/sci1c.ogg'
security_level = 1.5
/obj/machinery/door/airlock/glass_science
name = "Glass Airlocks"
icon = 'icons/obj/doors/doorsciglass.dmi'
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_science
glass = 1
req_one_access = list(ACCESS_RESEARCH)
open_sound_powered = 'sound/machines/door/hall1o.ogg'
close_sound_powered = 'sound/machines/door/hall1c.ogg'
department_open_powered = 'sound/machines/door/sci1o.ogg'
department_close_powered = 'sound/machines/door/sci1c.ogg'
security_level = 1.5
/obj/machinery/door/airlock/highsecurity
name = "Secure Airlock"
icon = 'icons/obj/doors/hightechsecurity.dmi'
explosion_resistance = 20
secured_wires = 1
assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity
req_one_access = list(ACCESS_HEADS_VAULT)
open_sound_powered = 'sound/machines/door/secure1o.ogg'
close_sound_powered = 'sound/machines/door/secure1c.ogg'
security_level = 4
/obj/machinery/door/airlock/voidcraft
name = "voidcraft hatch"
desc = "It's an extra resilient airlock intended for spacefaring vessels."
icon = 'icons/obj/doors/shuttledoors.dmi'
explosion_resistance = 20
opacity = 0
glass = 1
assembly_type = /obj/structure/door_assembly/door_assembly_voidcraft
open_sound_powered = 'sound/machines/door/shuttle1o.ogg'
close_sound_powered = 'sound/machines/door/shuttle1c.ogg'
// Airlock opens from top-bottom instead of left-right.
/obj/machinery/door/airlock/voidcraft/vertical
icon = 'icons/obj/doors/shuttledoors_vertical.dmi'
assembly_type = /obj/structure/door_assembly/door_assembly_voidcraft/vertical
open_sound_powered = 'sound/machines/door/shuttle1o.ogg'
close_sound_powered = 'sound/machines/door/shuttle1c.ogg'
/datum/category_item/catalogue/anomalous/precursor_a/alien_airlock
name = "Precursor Alpha Object - Doors"
desc = "This object appears to be used in order to restrict or allow access to \
rooms based on its physical state. In other words, a door. \
Despite being designed and created by unknown ancient alien hands, this door has \
a large number of similarities to the conventional airlock, such as being driven by \
electricity, opening and closing by physically moving, and being air tight. \
It also operates by responding to signals through internal electrical conduits. \
These characteristics make it possible for one with experience with a multitool \
to manipulate the door.\
<br><br>\
The symbol on the door does not match any living species' patterns, giving further \
implications that this door is very old, and yet it remains operational after \
thousands of years. It is unknown if that is due to superb construction, or \
unseen autonomous maintenance having been performed."
value = CATALOGUER_REWARD_EASY
/obj/machinery/door/airlock/alien
name = "alien airlock"
desc = "You're fairly sure this is a door."
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_airlock)
icon = 'icons/obj/doors/Dooralien.dmi'
explosion_resistance = 20
secured_wires = TRUE
hackProof = TRUE
assembly_type = /obj/structure/door_assembly/door_assembly_alien
req_one_access = list(ACCESS_ALIEN)
security_level = 100
/obj/machinery/door/airlock/alien/locked
icon_state = "door_locked"
locked = TRUE
/obj/machinery/door/airlock/alien/public // Entry to UFO.
req_one_access = list()
normalspeed = FALSE // So it closes faster and hopefully keeps the warm air inside.
hackProof = TRUE //No borgs
/obj/machinery/door/airlock/glass_external/public
req_one_access = list()
/obj/machinery/door/airlock/alien/blue
name = "hybrid airlock"
desc = "You're fairly sure this is a door."
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_airlock)
icon = 'icons/obj/doors/Dooralien_blue.dmi'
explosion_resistance = 20
secured_wires = TRUE
hackProof = TRUE
assembly_type = /obj/structure/door_assembly/door_assembly_alien
req_one_access = list()
/obj/machinery/door/airlock/alien/blue/locked
icon_state = "door_locked"
locked = TRUE
/obj/machinery/door/airlock/alien/blue/public // Entry to UFO.
req_one_access = list()
normalspeed = FALSE // So it closes faster and hopefully keeps the warm air inside.
hackProof = TRUE //VOREStation Edit - No borgos
/obj/machinery/door/airlock/glass_security/polarized
name = "Electrochromic Security Airlock"
icon_tinted = 'icons/obj/doors/Doorsectinted_vr.dmi'
/obj/machinery/door/airlock/glass_medical/polarized
name = "Electrochromic Medical Airlock"
icon_tinted = 'icons/obj/doors/doormedtinted_vr.dmi'
/obj/machinery/door/airlock/glass_command/polarized
name = "Electrochormic Command Airlock"
icon_tinted = 'icons/obj/doors/Doorcomtinted_vr.dmi'

View File

@@ -1,34 +0,0 @@
/obj/machinery/door/airlock/glass_external/public
req_one_access = list()
/obj/machinery/door/airlock/alien/blue
name = "hybrid airlock"
desc = "You're fairly sure this is a door."
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_airlock)
icon = 'icons/obj/doors/Dooralien_blue.dmi'
explosion_resistance = 20
secured_wires = TRUE
hackProof = TRUE
assembly_type = /obj/structure/door_assembly/door_assembly_alien
req_one_access = list()
/obj/machinery/door/airlock/alien/blue/locked
icon_state = "door_locked"
locked = TRUE
/obj/machinery/door/airlock/alien/blue/public // Entry to UFO.
req_one_access = list()
normalspeed = FALSE // So it closes faster and hopefully keeps the warm air inside.
hackProof = TRUE //VOREStation Edit - No borgos
/obj/machinery/door/airlock/glass_security/polarized
name = "Electrochromic Security Airlock"
icon_tinted = 'icons/obj/doors/Doorsectinted_vr.dmi'
/obj/machinery/door/airlock/glass_medical/polarized
name = "Electrochromic Medical Airlock"
icon_tinted = 'icons/obj/doors/doormedtinted_vr.dmi'
/obj/machinery/door/airlock/glass_command/polarized
name = "Electrochormic Command Airlock"
icon_tinted = 'icons/obj/doors/Doorcomtinted_vr.dmi'

View File

@@ -319,6 +319,10 @@
icon_state_closing = "pdoorc1"
icon_state = "pdoor1"
maxhealth = 600
heat_proof = 1 //just so repairing them doesn't try to fireproof something that never takes fire damage
/obj/machinery/door/blast/regular/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return // blast doors are immune to fire completely.
/obj/machinery/door/blast/regular/open
icon_state = "pdoor0"

View File

@@ -18,7 +18,7 @@
var/autoclose = 0
var/glass = 0
var/normalspeed = 1
var/heat_proof = 0 // For glass airlocks/opacity firedoors
var/heat_proof = FALSE // For glass airlocks/opacity firedoors
var/air_properties_vary_with_direction = 0
var/maxhealth = 300
var/health
@@ -39,6 +39,11 @@
// turf animation
var/atom/movable/overlay/c_animation = null
var/reinforcing = 0
var/tintable = 0
var/icon_tinted
var/id_tint
/obj/machinery/door/attack_generic(var/mob/user, var/damage)
if(isanimal(user))
var/mob/living/simple_mob/S = user
@@ -100,18 +105,23 @@
/obj/machinery/door/proc/can_open()
if(!density || operating || !SSticker)
return 0
return 1
return FALSE
if(SEND_SIGNAL(src, COMSIG_DOOR_CAN_OPEN) & DOOR_DENY_OPEN)
return FALSE
return TRUE
/obj/machinery/door/proc/can_close()
if(density || operating || !SSticker)
return 0
return 1
return FALSE
if(SEND_SIGNAL(src, COMSIG_DOOR_CAN_CLOSE) & DOOR_DENY_CLOSE)
return FALSE
return TRUE
/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)
@@ -123,15 +133,18 @@
return //VOREStation Edit: unable to open doors
else
bumpopen(M)
return
if(istype(AM, /obj/item/uav))
if(check_access(null))
open()
else
do_animate("deny")
return
if(isbot(AM))
var/mob/living/bot/bot = AM
if(src.check_access(bot.botcard))
if(check_access(bot.botcard))
if(density)
open()
return
@@ -139,18 +152,20 @@
if(istype(AM, /obj/mecha))
var/obj/mecha/mecha = AM
if(density)
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
if(mecha.occupant && (allowed(mecha.occupant) || check_access_list(mecha.operation_req_access)))
open()
else
do_animate("deny")
return
if(istype(AM, /obj/structure/bed/chair/wheelchair))
var/obj/structure/bed/chair/wheelchair/wheel = AM
if(density)
if(wheel.pulling && (src.allowed(wheel.pulling)))
if(wheel.pulling && (allowed(wheel.pulling)))
open()
else
do_animate("deny")
return
/obj/machinery/door/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS))
@@ -162,15 +177,21 @@
return !block_air_zones // Block merging unless block_air_zones = 0
return !density // Block airflow unless density = FALSE
/obj/machinery/door/proc/bumpopen(mob/user as mob)
if(!user) return
if(operating) return
/obj/machinery/door/proc/bumpopen(mob/user)
if(!user)
return
if(operating)
return
if(user.last_airflow > world.time - vsc.airflow_delay) //Fakkit
return
src.add_fingerprint(user)
if(SEND_SIGNAL(user, COMSIG_MOB_BUMPED_DOOR_OPEN, src) & DOOR_STOP_BUMP)
return
add_fingerprint(user)
if(density)
if(allowed(user)) open()
else do_animate("deny")
if(allowed(user))
open()
else
do_animate("deny")
return
/obj/machinery/door/bullet_act(var/obj/item/projectile/Proj)
@@ -182,13 +203,13 @@
if (damage > 90)
destroy_hits--
if (destroy_hits <= 0)
visible_message(span_danger("\The [src.name] disintegrates!"))
visible_message(span_danger("\The [name] disintegrates!"))
switch (Proj.damage_type)
if(BRUTE)
new /obj/item/stack/material/steel(src.loc, 2)
new /obj/item/stack/rods(src.loc, 3)
new /obj/item/stack/material/steel(loc, 2)
new /obj/item/stack/rods(loc, 3)
if(BURN)
new /obj/effect/decal/cleanable/ash(src.loc) // Turn it to ashes!
new /obj/effect/decal/cleanable/ash(loc) // Turn it to ashes!
qdel(src)
if(damage)
@@ -199,7 +220,7 @@
/obj/machinery/door/hitby(atom/movable/source, var/speed=5)
..()
visible_message(span_danger("[src.name] was hit by [source]."))
visible_message(span_danger("[name] was hit by [source]."))
var/tforce = 0
if(ismob(source))
tforce = 15 * (speed/THROWFORCE_SPEED_DIVISOR)
@@ -213,24 +234,83 @@
playsound(src, hitsound, 100, 1)
take_damage(tforce)
/obj/machinery/door/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/door/attack_ai(mob/user)
return attack_hand(user)
/obj/machinery/door/attack_hand(mob/user as mob)
return src.attackby(user, user)
/obj/machinery/door/attack_hand(mob/user)
. = ..()
if(.)
return
return try_to_activate_door(user)
/obj/machinery/door/attack_tk(mob/user as mob)
/obj/machinery/door/attack_tk(mob/user)
if(requiresID() && !allowed(null))
return
..()
/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob)
src.add_fingerprint(user)
/obj/machinery/door/attackby(obj/item/I, mob/user)
add_fingerprint(user)
if(istype(I))
if(attackby_vr(I, user)) //VOREStation begin: Fireproofing
return //VOREStation begin: Fireproofing
if(health < maxhealth && I.has_tool_quality(TOOL_WELDER))
if(istype(I, /obj/item/stack/material) && I.get_material_name() == MAT_PLASTEEL)
if(heat_proof)
to_chat(user, span_warning("\The [src] is already reinforced."))
return
if((stat & BROKEN) || (health < maxhealth))
to_chat(user, span_notice("It looks like \the [src] broken. Repair it before reinforcing it."))
return
if(!density)
to_chat(user, span_warning("\The [src] must be closed before you can reinforce it."))
return
var/amount_needed = 2
var/obj/item/stack/stack = I
var/amount_given = amount_needed - reinforcing
var/mats_given = stack.get_amount()
var/singular_name = stack.singular_name
if(reinforcing && amount_given <= 0)
to_chat(user, span_warning("You must weld or remove \the plasteel from \the [src] before you can add anything else."))
else
if(mats_given >= amount_given)
if(stack.use(amount_given))
reinforcing += amount_given
else
if(stack.use(mats_given))
reinforcing += mats_given
amount_given = mats_given
if(amount_given)
to_chat(user, span_notice("You fit [amount_given] [singular_name]\s on \the [src]."))
return
if(reinforcing && I.has_tool_quality(TOOL_CROWBAR))
var/obj/item/stack/material/plasteel/reinforcing_sheet = new /obj/item/stack/material/plasteel(get_turf(src), reinforcing)
reinforcing = 0
to_chat(user, span_notice("You remove \the [reinforcing_sheet]."))
playsound(src, I.usesound, 100, 1)
return
if(I.has_tool_quality(TOOL_WELDER))
if(reinforcing)
if(!density)
to_chat(user, span_warning("\The [src] must be closed before you can reinforce it."))
return
if(reinforcing < 2)
to_chat(user, span_warning("You will need more plasteel to reinforce \the [src]."))
return
var/obj/item/weldingtool/welder = I.get_welder()
if(welder.remove_fuel(0,user))
to_chat(user, span_notice("You start welding the plasteel into place."))
playsound(src, welder.usesound, 50, 1)
if(do_after(user, 1 SECOND * welder.toolspeed, target = src) && welder && welder.isOn())
to_chat(user, span_notice("You finish reinforcing \the [src]."))
heat_proof = TRUE
update_icon()
reinforcing = 0
return
if(health < maxhealth)
if(!density)
to_chat(user, span_warning("\The [src] must be closed before you can repair it."))
return
@@ -245,42 +325,47 @@
health = maxhealth
update_icon()
return
//psa to whoever coded this, there are plenty of objects that need to call attack() on doors without bludgeoning them.
if(src.density && istype(I, /obj/item) && user.a_intent == I_HURT && !istype(I, /obj/item/card))
var/obj/item/W = I
user.setClickCooldown(user.get_attack_speed(W))
if(W.damtype == BRUTE || W.damtype == BURN)
user.do_attack_animation(src)
if(W.force < min_force)
user.visible_message(span_danger("\The [user] hits \the [src] with \the [W] with no visible effect."))
else
user.visible_message(span_danger("\The [user] forcefully strikes \the [src] with \the [W]!"))
playsound(src, hitsound, 100, 1)
take_damage(W.force)
return
if(src.operating > 0 || isrobot(user))
return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
if(src.operating)
// Handle signals
if(..())
return
if(src.allowed(user) && operable())
if(src.density)
//psa to whoever coded this, there are plenty of objects that need to call attack() on doors without bludgeoning them.
if(density && istype(I, /obj/item) && user.a_intent == I_HURT && !istype(I, /obj/item/card))
var/obj/item/W = I
user.setClickCooldown(user.get_attack_speed(W))
if(W.damtype == BRUTE || W.damtype == BURN)
user.do_attack_animation(src)
if(W.force < min_force)
user.visible_message(span_danger("\The [user] hits \the [src] with \the [W] with no visible effect."))
else
user.visible_message(span_danger("\The [user] forcefully strikes \the [src] with \the [W]!"))
playsound(src, hitsound, 100, 1)
take_damage(W.force)
return
return try_to_activate_door(user)
/obj/machinery/door/proc/try_to_activate_door(mob/user)
add_fingerprint(user)
if(operating || isrobot(user))
return FALSE //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
if(allowed(user) && operable())
if(density)
open()
else
close()
return
if(src.density)
return TRUE
if(density)
do_animate("deny")
return
return FALSE
/obj/machinery/door/emag_act(var/remaining_charges)
if(density && operable())
do_animate("spark")
addtimer(CALLBACK(src, PROC_REF(trigger_emag)), 0.6 SECONDS)
return 1
return TRUE
/obj/machinery/door/proc/trigger_emag()
PRIVATE_PROC(TRUE)
@@ -289,15 +374,15 @@
operating = -1
/obj/machinery/door/take_damage(var/damage)
var/initialhealth = src.health
src.health = max(0, src.health - damage)
if(src.health <= 0 && initialhealth > 0)
src.set_broken()
else if(src.health < src.maxhealth / 4 && initialhealth >= src.maxhealth / 4)
var/initialhealth = health
health = max(0, health - damage)
if(health <= 0 && initialhealth > 0)
set_broken()
else if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
visible_message("\The [src] looks like it's about to break!" )
else if(src.health < src.maxhealth / 2 && initialhealth >= src.maxhealth / 2)
else if(health < maxhealth / 2 && initialhealth >= maxhealth / 2)
visible_message("\The [src] looks seriously damaged!" )
else if(src.health < src.maxhealth * 3/4 && initialhealth >= src.maxhealth * 3/4)
else if(health < maxhealth * 3/4 && initialhealth >= maxhealth * 3/4)
visible_message("\The [src] shows signs of damage!" )
update_icon()
return
@@ -305,13 +390,13 @@
/obj/machinery/door/examine(mob/user)
. = ..()
if(src.health <= 0)
if(health <= 0)
. += "It is broken!"
else if(src.health < src.maxhealth / 4)
else if(health < maxhealth / 4)
. += "It looks like it's about to break!"
else if(src.health < src.maxhealth / 2)
else if(health < maxhealth / 2)
. += "It looks seriously damaged!"
else if(src.health < src.maxhealth * 3/4)
else if(health < maxhealth * 3/4)
. += "It shows signs of damage!"
@@ -319,7 +404,7 @@
stat |= BROKEN
for (var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("[src.name] breaks!" )
O.show_message("[name] breaks!" )
update_icon()
return
@@ -390,6 +475,8 @@
return
operating = 1
SEND_SIGNAL(src, COMSIG_DOOR_OPEN, forced)
do_animate("opening")
icon_state = "door0"
set_opacity(0)
@@ -398,14 +485,14 @@
/obj/machinery/door/proc/open_internalsetdensity(var/forced = 0)
PRIVATE_PROC(TRUE) //do not touch this or BYOND will devour you
SHOULD_NOT_OVERRIDE(TRUE)
src.density = FALSE
density = FALSE
update_nearby_tiles()
addtimer(CALLBACK(src, PROC_REF(open_internalfinish),forced), anim_length_before_finalize)
/obj/machinery/door/proc/open_internalfinish(var/forced = 0)
PRIVATE_PROC(TRUE) //do not touch this or BYOND will devour you
SHOULD_NOT_OVERRIDE(TRUE)
src.layer = open_layer
layer = open_layer
explosion_resistance = 0
update_icon()
set_opacity(0)
@@ -419,8 +506,8 @@
if(autoclose)
autoclose_in(next_close_wait())
return TRUE
return 1
/obj/machinery/door/proc/next_close_wait()
var/lowest_temp = T20C
var/highest_temp = T0C
@@ -445,6 +532,8 @@
return
operating = 1
SEND_SIGNAL(src, COMSIG_DOOR_CLOSE, forced)
close_door_at = 0
do_animate("closing")
addtimer(CALLBACK(src, PROC_REF(close_internalsetdensity),forced), anim_length_before_density)
@@ -452,9 +541,9 @@
/obj/machinery/door/proc/close_internalsetdensity(var/forced = 0)
PRIVATE_PROC(TRUE) //do not touch this or BYOND will devour you
SHOULD_NOT_OVERRIDE(TRUE)
src.density = TRUE
density = TRUE
explosion_resistance = initial(explosion_resistance)
src.layer = closed_layer
layer = closed_layer
update_nearby_tiles()
addtimer(CALLBACK(src, PROC_REF(close_internalfinish),forced), anim_length_before_finalize)
@@ -476,29 +565,29 @@
addtimer(CALLBACK(las, TYPE_PROC_REF(/obj/effect/step_trigger/claymore_laser,Trigger), src), 1)
*/
return 1
return TRUE
/obj/machinery/door/proc/requiresID()
return 1
return TRUE
/obj/machinery/door/allowed(mob/M)
if(!requiresID())
return ..(null) //don't care who they are or what they have, act as if they're NOTHING
return ..(M)
. = ..()
/obj/machinery/door/update_nearby_tiles(need_rebuild)
if(!SSair)
return 0
return FALSE
for(var/turf/simulated/turf in locs)
update_heat_protection(turf)
SSair.mark_for_update(turf)
return 1
return TRUE
/obj/machinery/door/proc/update_heat_protection(var/turf/simulated/source)
if(istype(source))
if(src.density && (src.opacity || src.heat_proof))
if(density && (opacity || heat_proof))
source.thermal_conductivity = DOOR_HEAT_TRANSFER_COEFFICIENT
else
source.thermal_conductivity = initial(source.thermal_conductivity)

View File

@@ -1,22 +1,3 @@
/turf/simulated/floor/proc/adjacent_fire_act_vr(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume)
for(var/obj/machinery/door/D in src) //makes doors next to fire affected by fire
D.fire_act(adj_air, adj_temp, adj_volume)
/obj/machinery/door
var/reinforcing = 0 //vorestation addition
var/tintable = 0
var/icon_tinted
var/id_tint
/obj/machinery/door/firedoor
heat_proof = 1
/obj/machinery/door/airlock/vault
heat_proof = 1
/obj/machinery/door/airlock/hatch
heat_proof = 1
/obj/machinery/door/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
for(var/obj/machinery/door/blast/B in loc.contents)
if(B.density)
@@ -40,87 +21,6 @@
return ..()
// Returns true only if one of the actions unique to reinforcing is done, otherwise false and continuing normal attackby
/obj/machinery/door/proc/attackby_vr(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/stack/material) && I.get_material_name() == MAT_PLASTEEL)
if(heat_proof)
to_chat(user, span_warning("\The [src] is already reinforced."))
return TRUE
if((stat & BROKEN) || (health < maxhealth))
to_chat(user, span_notice("It looks like \the [src] broken. Repair it before reinforcing it."))
return TRUE
if(!density)
to_chat(user, span_warning("\The [src] must be closed before you can reinforce it."))
return TRUE
var/amount_needed = 2
var/obj/item/stack/stack = I
var/amount_given = amount_needed - reinforcing
var/mats_given = stack.get_amount()
var/singular_name = stack.singular_name
if(reinforcing && amount_given <= 0)
to_chat(user, span_warning("You must weld or remove \the plasteel from \the [src] before you can add anything else."))
else
if(mats_given >= amount_given)
if(stack.use(amount_given))
reinforcing += amount_given
else
if(stack.use(mats_given))
reinforcing += mats_given
amount_given = mats_given
if(amount_given)
to_chat(user, span_notice("You fit [amount_given] [singular_name]\s on \the [src]."))
return TRUE
if(reinforcing && I.has_tool_quality(TOOL_WELDER))
if(!density)
to_chat(user, span_warning("\The [src] must be closed before you can reinforce it."))
return TRUE
if(reinforcing < 2)
to_chat(user, span_warning("You will need more plasteel to reinforce \the [src]."))
return TRUE
var/obj/item/weldingtool/welder = I.get_welder()
if(welder.remove_fuel(0,user))
to_chat(user, span_notice("You start welding the plasteel into place."))
playsound(src, welder.usesound, 50, 1)
if(do_after(user, 1 SECOND * welder.toolspeed, target = src) && welder && welder.isOn())
to_chat(user, span_notice("You finish reinforcing \the [src]."))
heat_proof = 1
update_icon()
reinforcing = 0
return TRUE
if(reinforcing && I.has_tool_quality(TOOL_CROWBAR))
var/obj/item/stack/material/plasteel/reinforcing_sheet = new /obj/item/stack/material/plasteel(src.loc, reinforcing)
reinforcing = 0
to_chat(user, span_notice("You remove \the [reinforcing_sheet]."))
playsound(src, I.usesound, 100, 1)
return TRUE
return FALSE
/obj/machinery/door/blast/regular/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return // blast doors are immune to fire completely.
/obj/machinery/door/blast/regular
heat_proof = 1 //just so repairing them doesn't try to fireproof something that never takes fire damage
/obj/machinery/door/blast/angled/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return // blast doors are immune to fire completely.
/obj/machinery/door/blast/angled
heat_proof = 1 //just so repairing them doesn't try to fireproof something that never takes fire damage
/obj/machinery/door/blast/puzzle/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return // blast doors are immune to fire completely.
/obj/machinery/door/blast/puzzle
heat_proof = 1 //just so repairing them doesn't try to fireproof something that never takes fire damage
/obj/machinery/door/proc/toggle()
if(glass)
icon = icon_tinted

View File

@@ -22,6 +22,7 @@
//These are frequenly used with windows, so make sure zones can pass.
//Generally if a firedoor is at a place where there should be a zone boundery then there will be a regular door underneath it.
block_air_zones = 0
heat_proof = 1
var/blocked = 0
var/prying = 0

View File

@@ -552,7 +552,7 @@
var/list/players = list()
for(var/mob/living/carbon/human/player in GLOB.player_list)
if(!player.mind || player_is_antag(player.mind, only_offstation_roles = 1) || player.client.inactivity > MinutesToTicks(10))
if(!player.mind || player_is_antag(player.mind, only_offstation_roles = 1) || player.client.inactivity > 10 MINUTES)
continue
players += player.real_name

View File

@@ -12,6 +12,7 @@
explosion_resistance = 100
maxhealth = 9999999 //No.
heat_proof = 1 //just so repairing them doesn't try to fireproof something that never takes fire damage
var/list/locks = list()
var/lockID = null
@@ -94,3 +95,6 @@
/obj/machinery/door/blast/puzzle/attack_alien(var/mob/user)
if(check_locks())
force_toggle(1, user)
/obj/machinery/door/blast/puzzle/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return // blast doors are immune to fire completely.

View File

@@ -45,4 +45,5 @@
if(W.dir == dir_to || W.is_fulltile()) //Same direction or diagonal (full tile)
W.fire_act(adj_air, adj_temp, adj_volume)
attempt_vr(src,"adjacent_fire_act_vr",list(adj_turf,adj_air,adj_temp,adj_volume))
for(var/obj/machinery/door/D in src) //makes doors next to fire affected by fire
D.fire_act(adj_air, adj_temp, adj_volume)

View File

@@ -54,7 +54,7 @@
src.hidden = hidden
// Currently only non-0 durations can be altered (normal alarms VS EMP blasts)
if(AS.duration)
duration = SecondsToTicks(duration)
duration = duration SECONDS
AS.duration = duration
AS.severity = severity
src.hidden = min(src.hidden, hidden)

View File

@@ -266,7 +266,7 @@ var/list/preferences_datums = list()
else if(href_list["reload"])
load_preferences(TRUE)
load_character()
attempt_vr(client.prefs_vr,"load_vore","")
client.prefs_vr.load_vore()
sanitize_preferences()
else if(href_list["load"])
if(!IsGuestKey(usr.key))
@@ -360,7 +360,7 @@ var/list/preferences_datums = list()
load_preferences(TRUE)
load_character(slotnum)
attempt_vr(user.client?.prefs_vr,"load_vore","")
user.client?.prefs_vr.load_vore()
sanitize_preferences()
save_preferences()
ShowChoices(user)
@@ -405,7 +405,7 @@ var/list/preferences_datums = list()
save_preferences()
load_preferences(TRUE)
load_character()
attempt_vr(user.client?.prefs_vr,"load_vore","")
user.client?.prefs_vr.load_vore()
ShowChoices(user)
/datum/preferences/proc/vanity_copy_to(var/mob/living/carbon/human/character, var/copy_name, var/copy_flavour = TRUE, var/copy_ooc_notes = FALSE, var/convert_to_prosthetics = FALSE, var/apply_bloodtype = TRUE)

View File

@@ -148,7 +148,7 @@
if("reload")
load_preferences(TRUE)
load_character()
attempt_vr(client.prefs_vr,"load_vore","") //VOREStation Edit
client.prefs_vr.load_vore()
sanitize_preferences()
. = TRUE
if("resetslot")

View File

@@ -27,7 +27,7 @@
/datum/event/ionstorm/start()
for (var/mob/living/carbon/human/player in GLOB.player_list)
if( !player.mind || player_is_antag(player.mind, only_offstation_roles = 1) || player.client.inactivity > MinutesToTicks(10))
if( !player.mind || player_is_antag(player.mind, only_offstation_roles = 1) || player.client.inactivity > 10 MINUTES)
continue
players += player.real_name

View File

@@ -854,8 +854,6 @@
else
resist_restraints()
if(attempt_vr(src,"vore_process_resist",args)) return TRUE
/mob/living/proc/resist_buckle()
if(buckled)
if(istype(buckled, /obj/vehicle))

View File

@@ -137,7 +137,7 @@
var/list/players = list()
for(var/mob/living/carbon/human/player in GLOB.player_list)
if(!player.mind || player_is_antag(player.mind, only_offstation_roles = 1) || player.client.inactivity > MinutesToTicks(10))
if(!player.mind || player_is_antag(player.mind, only_offstation_roles = 1) || player.client.inactivity > 10 MINUTES)
continue
players += player.real_name

View File

@@ -5,9 +5,10 @@
icon = 'icons/mob/pai_hud.dmi'
var/base_state
/atom/movable/screen/pai/Click_vr(location, control, params)
if(!usr) return 1
if(!ispAI(usr)) return 1
/atom/movable/pai/Click(location, control, params)
. = ..()
if(!ispAI(usr))
return
var/mob/living/silicon/pai/p = usr
switch(name)
if("fold/unfold")

View File

@@ -319,7 +319,7 @@
/mob/living/silicon/proc/receive_alarm(var/datum/alarm_handler/alarm_handler, var/datum/alarm/alarm, was_raised)
if(!next_alarm_notice)
next_alarm_notice = world.time + SecondsToTicks(10)
next_alarm_notice = world.time + (10 SECONDS)
if(alarm.hidden)
return
if(alarm.origin && !(get_z(alarm.origin) in using_map.get_map_levels(get_z(src), TRUE, om_range = DEFAULT_OVERMAP_RANGE)))

View File

@@ -183,7 +183,6 @@
// Body writing
else if(istype(I, /obj/item/pen))
// Avoids having an override on this proc because attempt_vr won't call the override
if(!ishuman(src))
return FALSE
var/mob/living/carbon/human/us = src
@@ -213,20 +212,6 @@
return FALSE
//
// Our custom resist catches for /mob/living
//
/mob/living/proc/vore_process_resist()
//Are we resisting from inside a belly?
// if(isbelly(loc))
// var/obj/belly/B = loc
// B.relay_resist(src)
// return TRUE //resist() on living does this TRUE thing.
// Note: This is no longer required, as the refactors to resisting allow bellies to just define container_resist
//Other overridden resists go here
return FALSE
//
// Verb for saving vore preferences to save file
//
@@ -364,14 +349,14 @@
return
load_character(slotnum)
attempt_vr(user.client?.prefs_vr,"load_vore","")
user.client?.prefs_vr.load_vore()
sanitize_preferences()
return remember_default
/datum/preferences/proc/return_to_character_slot(mob/user, var/remembered_default)
load_character(remembered_default)
attempt_vr(user.client?.prefs_vr,"load_vore","")
user.client?.prefs_vr.load_vore()
sanitize_preferences()
//

View File

@@ -1,2 +0,0 @@
// Hook for when a mob de-spawns!
/hook/despawn

View File

@@ -72,7 +72,7 @@
/**
* Called when mob despawns early (via cryopod)!
*/
/hook/despawn/proc/persist_despawned_mob(var/mob/occupant, var/obj/machinery/cryopod/pod)
/proc/persist_despawned_mob(var/mob/occupant, var/obj/machinery/cryopod/pod)
ASSERT(istype(pod))
ASSERT(ispath(pod.spawnpoint_type, /datum/spawnpoint))
persist_interround_data(occupant, pod.spawnpoint_type)

View File

@@ -1,64 +0,0 @@
/*
This file is for jamming single-line procs into Polaris procs.
It will prevent runtimes and allow their code to run if VOREStation's fails.
It will also log when we mess up our code rather than making it vague.
Call it at the top of a stock proc with...
if(attempt_vr(object,proc to call,args)) return
...if you are replacing an entire proc.
The proc you're attemping should return nonzero values on success.
*/
/proc/attempt_vr(callon, procname, list/arguments=null)
try
if(!callon || !procname)
log_world("## ERROR attempt_vr: Invalid obj/proc: [callon]/[procname]")
return 0
var/result = call(callon,procname)(arglist(arguments))
return result
catch(var/exception/e)
log_world("## ERROR attempt_vr runtimed when calling [procname] on [callon].")
log_world("## ERROR attempt_vr catch: [e] on [e.file]:[e.line]")
log_runtime(e)
return 0
/*
This is the _vr version of calling hooks.
It's meant to have different messages, and also the try/catch block.
For when you want hooks and want to know when you ruin everything,
vs when Polaris ruins everything.
Call it at the top of a stock proc with...
if(hook_vr(proc,args)) return
...if you are replacing an entire proc.
The hooks you're calling should return nonzero values on success.
*/
/proc/hook_vr(hook, list/arguments=null)
try
var/hook_path = text2path("/hook/[hook]")
if(!hook_path)
log_world("## ERROR hook_vr: Invalid hook '/hook/[hook]' called.")
return 0
var/hook_instance = new hook_path
var/status = 1
for(var/P in typesof("[hook_path]/proc"))
if(!call(hook_instance, P)(arglist(arguments)))
log_world("## ERROR hook_vr: Hook '[P]' failed or runtimed.")
status = 0
return status
catch(var/exception/e)
log_world("## ERROR hook_vr itself failed or runtimed. Exception below.")
log_world("## ERROR hook_vr catch: [e] on [e.file]:[e.line]")
log_runtime(e)

View File

@@ -370,7 +370,6 @@
#include "code\_onclick\hud\robot_vr.dm"
#include "code\_onclick\hud\screen_objects.dm"
#include "code\_onclick\hud\screen_objects_ch.dm"
#include "code\_onclick\hud\screen_objects_vr.dm"
#include "code\_onclick\hud\skybox.dm"
#include "code\_onclick\hud\soulcatcher_guest.dm"
#include "code\_onclick\hud\spell_screen_objects.dm"
@@ -1031,7 +1030,6 @@
#include "code\game\gamemodes\malfunction\newmalf_ability_trees\tree_networking.dm"
#include "code\game\gamemodes\meteor\meteor.dm"
#include "code\game\gamemodes\meteor\meteors.dm"
#include "code\game\gamemodes\meteor\meteors_vr.dm"
#include "code\game\gamemodes\mixed\conflux.dm"
#include "code\game\gamemodes\mixed\infestation.dm"
#include "code\game\gamemodes\mixed\intrigue.dm"
@@ -1290,7 +1288,7 @@
#include "code\game\machinery\doors\airlock_ch.dm"
#include "code\game\machinery\doors\airlock_control.dm"
#include "code\game\machinery\doors\airlock_electronics.dm"
#include "code\game\machinery\doors\airlock_vr.dm"
#include "code\game\machinery\doors\airlock_subtypes.dm"
#include "code\game\machinery\doors\alarmlock.dm"
#include "code\game\machinery\doors\blast_door.dm"
#include "code\game\machinery\doors\blast_door_yw.dm"
@@ -4811,10 +4809,8 @@
#include "code\modules\ventcrawl\ventcrawl_multiz.dm"
#include "code\modules\ventcrawl\ventcrawl_verb.dm"
#include "code\modules\vore\chat_healthbars.dm"
#include "code\modules\vore\hook-defs_vr.dm"
#include "code\modules\vore\mob_tf.dm"
#include "code\modules\vore\mouseray.dm"
#include "code\modules\vore\trycatch_vr.dm"
#include "code\modules\vore\appearance\preferences_vr.dm"
#include "code\modules\vore\appearance\sprite_accessories_yw.dm"
#include "code\modules\vore\appearance\update_icons_vr.dm"