Skip to content

Commit

Permalink
Code Readability - Computers (#18147)
Browse files Browse the repository at this point in the history
* computers

* Remove src.

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

* remove src.

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

* change var name 'screen' to 'authenticated'

Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>
  • Loading branch information
KalevTait and Sirryan2002 authored Jul 1, 2022
1 parent d1da076 commit f664644
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 55 deletions.
28 changes: 14 additions & 14 deletions code/game/machinery/computer/HolodeckControl.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
icon_screen = "holocontrol"
var/area/linkedholodeck = null
var/area/target = null
var/active = 0
var/active = FALSE
var/list/holographic_items = list()
var/damaged = 0
var/last_change = 0
Expand Down Expand Up @@ -165,7 +165,7 @@
/obj/machinery/computer/HolodeckControl/emag_act(user as mob)
if(!emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
emagged = TRUE
to_chat(user, "<span class='notice'>You vastly increase projector power and override the safety and security protocols.</span>")
to_chat(user, "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator.")
log_game("[key_name(usr)] emagged the Holodeck Control Computer")
Expand Down Expand Up @@ -210,7 +210,7 @@
target = locate(/area/holodeck/source_plating)
if(target)
loadProgram(target)
active = 0
active = FALSE
for(var/mob/M in range(10,src))
M.show_message("The holodeck overloads!")

Expand Down Expand Up @@ -260,13 +260,13 @@
T.temperature = 5000
T.hotspot_expose(50000,50000,1)*/

active = 1
active = TRUE
else
for(var/item in holographic_items)
derez(item)
var/area/targetsource = locate(/area/holodeck/source_plating)
targetsource.copy_contents_to(linkedholodeck , 1)
active = 0
active = FALSE


/obj/machinery/computer/HolodeckControl/proc/loadProgram(area/A)
Expand All @@ -280,7 +280,7 @@
return

last_change = world.time
active = 1
active = TRUE

for(var/item in holographic_items)
derez(item)
Expand Down Expand Up @@ -321,7 +321,7 @@

var/area/targetsource = locate(/area/holodeck/source_plating)
targetsource.copy_contents_to(linkedholodeck , 1)
active = 0
active = FALSE

// Holographic Items!
/turf/simulated/floor/holofloor/
Expand Down Expand Up @@ -413,10 +413,10 @@
icon = 'icons/obj/structures.dmi'
icon_state = "rwindow"
desc = "A window."
density = 1
density = TRUE
layer = 3.2//Just above doors
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1.0
anchored = TRUE
flags = ON_BORDER

/obj/structure/rack/holorack
Expand Down Expand Up @@ -457,7 +457,7 @@
w_class = WEIGHT_CLASS_SMALL
armour_penetration = 50
block_chance = 50
var/active = 0
var/active = FALSE

/obj/item/holo/esword/green/New()
..()
Expand Down Expand Up @@ -519,8 +519,8 @@
desc = "Boom, Shakalaka!"
icon = 'icons/obj/basketball.dmi'
icon_state = "hoop"
anchored = 1
density = 1
anchored = TRUE
density = TRUE
pass_flags = LETPASSTHROW

/obj/structure/holohoop/attackby(obj/item/W as obj, mob/user as mob, params)
Expand Down Expand Up @@ -556,11 +556,11 @@
desc = "This device is used to declare ready. If all devices in an area are ready, the event will begin!"
icon = 'icons/obj/monitors.dmi'
icon_state = "auth_off"
var/ready = 0
var/ready = FALSE
var/area/currentarea = null
var/eventstarted = 0

anchored = 1.0
anchored = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 2
active_power_usage = 6
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/computer/Operating.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/obj/machinery/computer/operating
name = "operating computer"
density = 1
anchored = 1.0
density = TRUE
anchored = TRUE
icon_keyboard = "med_key"
icon_screen = "crew"
circuit = /obj/item/circuitboard/operating
Expand Down
8 changes: 4 additions & 4 deletions code/game/machinery/computer/ai_core.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/obj/structure/AIcore
density = 1
anchored = 0
density = TRUE
anchored = FALSE
name = "AI core"
icon = 'icons/mob/AI.dmi'
icon_state = "0"
Expand Down Expand Up @@ -311,8 +311,8 @@ That prevents a few funky behaviors.
return
//Transferring a carded AI to a core.
if(interaction == AI_TRANS_FROM_CARD)
AI.control_disabled = 0
AI.aiRadio.disabledAi = 0
AI.control_disabled = FALSE
AI.aiRadio.disabledAi = FALSE
AI.forceMove(loc)//To replace the terminal.
to_chat(AI, "You have been uploaded to a stationary terminal. Remote device connection restored.")
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.</span>")
Expand Down
6 changes: 3 additions & 3 deletions code/game/machinery/computer/aifixer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
circuit = /obj/item/circuitboard/aifixer
req_access = list(ACCESS_CAPTAIN, ACCESS_ROBOTICS, ACCESS_HEADS)
var/mob/living/silicon/ai/occupant = null
var/active = 0
var/active = FALSE

light_color = LIGHT_COLOR_PURPLE

Expand Down Expand Up @@ -117,8 +117,8 @@
return
AI.forceMove(src)
occupant = AI
AI.control_disabled = 1
AI.aiRadio.disabledAi = 1
AI.control_disabled = TRUE
AI.aiRadio.disabledAi = TRUE
to_chat(AI, "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here.")
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
update_icon()
Expand Down
24 changes: 12 additions & 12 deletions code/game/machinery/computer/arcade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@

if(emagged)
Reset()
emagged = 0
emagged = FALSE

add_fingerprint(usr)
updateUsrDialog()
Expand All @@ -186,7 +186,7 @@
message_admins("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.")
log_game("[key_name(usr)] has outbombed Cuban Pete and been awarded a bomb.")
Reset()
emagged = 0
emagged = FALSE
else
SSblackbox.record_feedback("tally", "arcade_status", 1, "win_normal")
var/score = player_hp + player_mp + 5
Expand Down Expand Up @@ -252,7 +252,7 @@
gameover = 0
blocked = 0

emagged = 1
emagged = TRUE

enemy_name = "Cuban Pete"
name = "Outbomb Cuban Pete"
Expand Down Expand Up @@ -282,7 +282,7 @@
desc = "Learn how our ancestors got to Orion, and have fun in the process!"
icon_state = "arcade"
circuit = /obj/item/circuitboard/arcade/orion_trail
var/busy = 0 //prevent clickspam that allowed people to ~speedrun~ the game.
var/busy = FALSE //prevent clickspam that allowed people to ~speedrun~ the game.
var/engine = 0
var/hull = 0
var/electronics = 0
Expand Down Expand Up @@ -381,7 +381,7 @@
if(emagged)
to_chat(user, "<span class='userdanger'><font size=3>You're never going to make it to Orion...</span></font>")
user.death()
emagged = 0 //removes the emagged status after you lose
emagged = FALSE //removes the emagged status after you lose
playing = 0 //also a new game
name = "The Orion Trail"
desc = "Learn how our ancestors got to Orion, and have fun in the process!"
Expand Down Expand Up @@ -424,7 +424,7 @@

if(busy)
return
busy = 1
busy = TRUE

if(href_list["continue"]) //Continue your travels
if(turns >= ORION_TRAIL_WINTURN)
Expand Down Expand Up @@ -560,7 +560,7 @@
var/mob/living/L = usr
L.Stun(20 SECONDS) //you can't run :^)
var/S = new /obj/singularity/onetile(usr.loc)
emagged = 0 //immediately removes emagged status so people can't kill themselves by sprinting up and interacting
emagged = FALSE //immediately removes emagged status so people can't kill themselves by sprinting up and interacting
sleep(50)
atom_say("[S] winks out, just as suddenly as it appeared.")
qdel(S)
Expand Down Expand Up @@ -676,7 +676,7 @@

add_fingerprint(usr)
updateUsrDialog()
busy = 0
busy = FALSE
return


Expand Down Expand Up @@ -956,7 +956,7 @@
else
var/score = alive + round(food/2) + round(fuel/5) + engine + hull + electronics - lings_aboard
prizevend(score)
emagged = 0
emagged = FALSE
name = "The Orion Trail"
desc = "Learn how our ancestors got to Orion, and have fun in the process!"

Expand All @@ -967,7 +967,7 @@
desc = "Learn how our ancestors got to Orion, and try not to die in the process!"
add_hiddenprint(user)
newgame()
emagged = 1
emagged = TRUE

/mob/living/simple_animal/hostile/syndicate/ranged/orion
name = "spaceport security"
Expand All @@ -982,7 +982,7 @@
icon = 'icons/obj/toy.dmi'
icon_state = "ship"
w_class = WEIGHT_CLASS_SMALL
var/active = 0 //if the ship is on
var/active = FALSE //if the ship is on

/obj/item/orion_ship/examine(mob/user)
. = ..()
Expand All @@ -1000,7 +1000,7 @@
log_game("[key_name(usr)] primed an explosive Orion ship for detonation.")

to_chat(user, "<span class='warning'>You flip the switch on the underside of [src].</span>")
active = 1
active = TRUE
visible_message("<span class='notice'>[src] softly beeps and whirs to life!</span>")
playsound(loc, 'sound/machines/defib_saftyon.ogg', 25, TRUE)
atom_say("This is ship ID #[rand(1,1000)] to Orion Port Authority. We're coming in for landing, over.")
Expand Down
16 changes: 8 additions & 8 deletions code/game/machinery/computer/atmos_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
name = "gas sensor"
req_one_access_txt = "24;10"

anchored = 1
anchored = TRUE
var/state = 0
var/bolts = 1
var/bolts = TRUE

var/id_tag
frequency = ATMOS_VENTSCRUB
Mtoollink = 1
Mtoollink = TRUE
settagwhitelist = list("id_tag")

var/on = 1
var/on = TRUE
var/output = 3
//Flags:
// 1 for pressure
Expand Down Expand Up @@ -145,7 +145,7 @@
frequency = ATMOS_VENTSCRUB
var/show_sensors=1
var/list/sensors = list()
Mtoollink = 1
Mtoollink = TRUE

var/list/sensor_information = list()

Expand Down Expand Up @@ -604,15 +604,15 @@
if(!radio_connection)
return 0

var/injecting = 0
var/injecting = FALSE
for(var/id_tag in sensor_information)
var/list/data = sensor_information[id_tag]
if(data["temperature"])
if(data["temperature"] >= cutoff_temperature)
injecting = 0
injecting = FALSE
break
if(data["temperature"] <= on_temperature)
injecting = 1
injecting = TRUE

var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
icon_screen = "telescreen"
icon_keyboard = null
light_range_on = 0
density = 0
density = FALSE
circuit = /obj/item/circuitboard/camera/telescreen

/obj/machinery/computer/security/telescreen/entertainment
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/card.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
/obj/machinery/computer/card/Initialize()
..()
Radio = new /obj/item/radio(src)
Radio.listening = 0
Radio.listening = FALSE
Radio.config(list("Command" = 0))
Radio.follow_target = src

Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/computer/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@

if("RestoreBackup")
to_chat(usr, "Backup routing data restored!")
src.emagged = 0
emagged = FALSE
setMenuState(usr, COMM_SCREEN_MAIN)

if("RestartNanoMob")
Expand All @@ -294,7 +294,7 @@

/obj/machinery/computer/communications/emag_act(user as mob)
if(!emagged)
src.emagged = 1
emagged = TRUE
to_chat(user, "<span class='notice'>You scramble the communication routing circuits!</span>")
SStgui.update_uis(src)

Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/computer/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name = "computer"
icon = 'icons/obj/computer.dmi'
icon_state = "computer"
density = 1
anchored = 1.0
density = TRUE
anchored = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 300
active_power_usage = 300
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/law.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
icon_keyboard = "med_key"
circuit = /obj/item/circuitboard/aiupload
var/mob/living/silicon/ai/current = null
var/opened = 0
var/opened = FALSE

light_color = LIGHT_COLOR_WHITE
light_range_on = 2
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@
icon_state = "laptop"
icon_keyboard = "laptop_key"
icon_screen = "medlaptop"
density = 0
density = FALSE

#undef MED_DATA_R_LIST
#undef MED_DATA_MAINT
Expand Down
Loading

0 comments on commit f664644

Please sign in to comment.