Skip to content

Commit

Permalink
Code Readability - Doors (#18149)
Browse files Browse the repository at this point in the history
* doors

* return TRUE

Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>

* return TRUE

Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>

* return TRUE

Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>

Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>
  • Loading branch information
KalevTait and Sirryan2002 authored Jul 2, 2022
1 parent 89ba9c0 commit 8dc53fc
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 71 deletions.
16 changes: 8 additions & 8 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
name = "airlock"
icon = 'icons/obj/doors/airlocks/station/public.dmi'
icon_state = "closed"
anchored = 1
anchored = TRUE
max_integrity = 300
integrity_failure = 70
damage_deflection = AIRLOCK_DAMAGE_DEFLECTION_N
Expand All @@ -74,11 +74,11 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
var/lights = TRUE // bolt lights show by default
var/datum/wires/airlock/wires
var/aiDisabledIdScanner = FALSE
var/aiHacking = 0
var/aiHacking = FALSE
var/obj/machinery/door/airlock/closeOther
var/closeOtherId
var/lockdownbyai = 0
var/justzap = 0
var/justzap = FALSE
var/obj/item/airlock_electronics/electronics
var/shockCooldown = FALSE //Prevents multiple shocks from happening
var/obj/item/note //Any papers pinned to the airlock
Expand Down Expand Up @@ -191,9 +191,9 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
if(isElectrified())
if(!justzap)
if(shock(user, 100))
justzap = 1
justzap = TRUE
spawn (10)
justzap = 0
justzap = FALSE
return
else
return
Expand Down Expand Up @@ -617,7 +617,7 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
return
else if(!canAIHack(user))
to_chat(user, "Connection lost! Unable to hack airlock.")
aiHacking=0
aiHacking = FALSE
return
to_chat(user, "Fault confirmed: airlock control wire disabled or cut.")
sleep(20)
Expand Down Expand Up @@ -1215,7 +1215,7 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
if(operating && !forced)
return 0

locked = 1
locked = TRUE
playsound(src, boltDown, 30, 0, 3)
update_icon()
return 1
Expand All @@ -1228,7 +1228,7 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
if(operating || !arePowerSystemsOn() || wires.is_cut(WIRE_DOOR_BOLTS))
return

locked = 0
locked = FALSE
playsound(src,boltUp, 30, 0, 3)
update_icon()
return 1
Expand Down
8 changes: 4 additions & 4 deletions code/game/machinery/doors/airlock_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
icon_state = "airlock_sensor_off"
layer = ABOVE_WINDOW_LAYER
name = "airlock sensor"
anchored = 1
anchored = TRUE
resistance_flags = FIRE_PROOF
power_channel = ENVIRON

Expand All @@ -151,7 +151,7 @@
frequency = 1379
var/command = "cycle"

var/on = 1
var/on = TRUE
var/alert = 0
var/previousPressure

Expand Down Expand Up @@ -219,12 +219,12 @@
icon_state = "access_button_standby"
name = "access button"
layer = ABOVE_WINDOW_LAYER
anchored = 1
anchored = TRUE
power_channel = ENVIRON
var/master_tag
frequency = AIRLOCK_FREQ
var/command = "cycle"
var/on = 1
var/on = TRUE

/obj/machinery/access_button/update_icon()
if(on)
Expand Down
56 changes: 28 additions & 28 deletions code/game/machinery/doors/airlock_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,53 +64,53 @@
*/

/obj/machinery/door/airlock/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/command/glass
opacity = 0
opacity = FALSE
glass = TRUE
normal_integrity = 400

/obj/machinery/door/airlock/engineering/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/security/glass
opacity = 0
opacity = FALSE
glass = TRUE
normal_integrity = 400

/obj/machinery/door/airlock/medical/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/virology/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/research/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/mining/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/atmos/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/science/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/maintenance/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/maintenance/external/glass
opacity = 0
opacity = FALSE
glass = TRUE
normal_integrity = 200

Expand All @@ -126,7 +126,7 @@
paintable = FALSE

/obj/machinery/door/airlock/gold/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/silver
Expand All @@ -136,7 +136,7 @@
paintable = FALSE

/obj/machinery/door/airlock/silver/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/diamond
Expand All @@ -149,7 +149,7 @@

/obj/machinery/door/airlock/diamond/glass
normal_integrity = 950
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/uranium
Expand All @@ -172,7 +172,7 @@


/obj/machinery/door/airlock/uranium/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/plasma
Expand Down Expand Up @@ -216,7 +216,7 @@
return 0

/obj/machinery/door/airlock/plasma/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/bananium
Expand All @@ -229,7 +229,7 @@
paintable = FALSE

/obj/machinery/door/airlock/bananium/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/tranquillite
Expand All @@ -250,7 +250,7 @@
paintable = FALSE

/obj/machinery/door/airlock/sandstone/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/wood
Expand All @@ -260,7 +260,7 @@
paintable = FALSE

/obj/machinery/door/airlock/wood/glass
opacity = 0
opacity = FALSE
glass = TRUE

/obj/machinery/door/airlock/titanium
Expand All @@ -273,7 +273,7 @@

/obj/machinery/door/airlock/titanium/glass
normal_integrity = 350
opacity = 0
opacity = FALSE
glass = TRUE

//////////////////////////////////
Expand All @@ -287,7 +287,7 @@
assemblytype = /obj/structure/door_assembly/door_assembly_public

/obj/machinery/door/airlock/public/glass
opacity = 0
opacity = FALSE
glass = TRUE

//////////////////////////////////
Expand All @@ -305,7 +305,7 @@
doorClose = 'sound/machines/airlock_ext_close.ogg'

/obj/machinery/door/airlock/external/glass
opacity = 0
opacity = FALSE
glass = TRUE

//////////////////////////////////
Expand All @@ -316,15 +316,15 @@
/obj/machinery/door/airlock/centcom
icon = 'icons/obj/doors/airlocks/centcom/centcom.dmi'
overlays_file = 'icons/obj/doors/airlocks/centcom/overlays.dmi'
opacity = 1
opacity = TRUE
explosion_block = 2
assemblytype = /obj/structure/door_assembly/door_assembly_centcom
normal_integrity = 1000
security_level = 6

/obj/machinery/door/airlock/centcom/glass
glass = TRUE
opacity = 0
opacity = FALSE

/obj/machinery/door/airlock/centcom/glass/Initialize()
. = ..()
Expand Down Expand Up @@ -582,7 +582,7 @@

/obj/machinery/door/airlock/cult/glass
glass = TRUE
opacity = 0
opacity = FALSE

/obj/machinery/door/airlock/cult/glass/Initialize()
. = ..()
Expand All @@ -608,7 +608,7 @@

/obj/machinery/door/airlock/cult/unruned/glass
glass = TRUE
opacity = 0
opacity = FALSE

/obj/machinery/door/airlock/cult/unruned/glass/Initialize()
. = ..()
Expand Down Expand Up @@ -644,5 +644,5 @@
return

/obj/machinery/door/airlock/multi_tile/glass
opacity = 0
opacity = FALSE
glass = TRUE
10 changes: 5 additions & 5 deletions code/game/machinery/doors/alarmlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "glass alarm airlock"
icon = 'icons/obj/doors/airlocks/station2/glass.dmi'
overlays_file = 'icons/obj/doors/airlocks/station2/overlays.dmi'
opacity = 0
glass = 1
autoclose = 0
opacity = FALSE
glass = TRUE
autoclose = FALSE
var/datum/radio_frequency/air_connection
var/air_frequency = ATMOS_FIRE_FREQ

Expand Down Expand Up @@ -34,8 +34,8 @@
if(alarm_area == our_area.name)
switch(alert)
if("severe")
autoclose = 1
autoclose = TRUE
close()
if("minor", "clear")
autoclose = 0
autoclose = FALSE
open()
20 changes: 10 additions & 10 deletions code/game/machinery/doors/brigdoors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
icon_state = "frame"
desc = "A remote control for a door."
req_access = list(ACCESS_BRIG)
anchored = 1 // can't pick it up
density = 0 // can walk through it.
anchored = TRUE // can't pick it up
density = FALSE // can walk through it.
layer = WALL_OBJ_LAYER
var/id = null // id of door it controls.
var/releasetime = 0 // when world.timeofday reaches it - release the prisoner
var/timing = 0 // boolean, true/1 timer is on, false/0 means it's not timing
var/timing = FALSE // boolean, true/1 timer is on, false/0 means it's not timing
var/picture_state // icon_state of alert picture, if not displaying text/numbers
var/list/obj/machinery/targets = list()
var/timetoset = 0 // Used to set releasetime upon starting the timer
Expand Down Expand Up @@ -119,7 +119,7 @@

GLOB.celltimers_list += src
Radio = new /obj/item/radio(src)
Radio.listening = 0
Radio.listening = FALSE
Radio.config(list("Security" = 0))
Radio.follow_target = src
return INITIALIZE_HINT_LATELOAD
Expand Down Expand Up @@ -163,7 +163,7 @@
Radio.autosay("Timer has expired. Releasing prisoner.", name, "Security", list(z))
occupant = CELL_NONE
timer_end() // open doors, reset timer, clear status screen
timing = 0
timing = FALSE
. = PROCESS_KILL
update_icon()
else
Expand Down Expand Up @@ -211,9 +211,9 @@

for(var/obj/machinery/treadmill_monitor/T in targets)
T.total_joules = 0
T.on = 1
T.on = TRUE

return 1
return TRUE


// Opens and unlocks doors, power check
Expand Down Expand Up @@ -244,15 +244,15 @@
continue
if(C.opened)
continue
C.locked = 0
C.locked = FALSE
C.icon_state = C.icon_closed

for(var/obj/machinery/treadmill_monitor/T in targets)
if(!T.stat)
T.redeem()
T.on = 0
T.on = FALSE

return 1
return TRUE


// Check for releasetime timeleft
Expand Down
Loading

0 comments on commit 8dc53fc

Please sign in to comment.