Code Readability - Computers (#18147)

* 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>
This commit is contained in:
KalevTait
2022-07-01 17:02:55 -05:00
committed by GitHub
co-authored by Sirryan2002
parent d1da076958
commit f6646447f3
13 changed files with 55 additions and 55 deletions
+14 -14
View File
@@ -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
@@ -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")
@@ -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!")
@@ -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)
@@ -280,7 +280,7 @@
return
last_change = world.time
active = 1
active = TRUE
for(var/item in holographic_items)
derez(item)
@@ -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/
@@ -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
@@ -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()
..()
@@ -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)
@@ -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
+2 -2
View File
@@ -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
+4 -4
View File
@@ -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"
@@ -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>")
+3 -3
View File
@@ -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
@@ -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()
+12 -12
View File
@@ -166,7 +166,7 @@
if(emagged)
Reset()
emagged = 0
emagged = FALSE
add_fingerprint(usr)
updateUsrDialog()
@@ -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
@@ -252,7 +252,7 @@
gameover = 0
blocked = 0
emagged = 1
emagged = TRUE
enemy_name = "Cuban Pete"
name = "Outbomb Cuban Pete"
@@ -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
@@ -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!"
@@ -424,7 +424,7 @@
if(busy)
return
busy = 1
busy = TRUE
if(href_list["continue"]) //Continue your travels
if(turns >= ORION_TRAIL_WINTURN)
@@ -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)
@@ -676,7 +676,7 @@
add_fingerprint(usr)
updateUsrDialog()
busy = 0
busy = FALSE
return
@@ -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!"
@@ -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"
@@ -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)
. = ..()
@@ -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.")
@@ -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
@@ -145,7 +145,7 @@
frequency = ATMOS_VENTSCRUB
var/show_sensors=1
var/list/sensors = list()
Mtoollink = 1
Mtoollink = TRUE
var/list/sensor_information = list()
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
@@ -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")
@@ -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)
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+4 -4
View File
@@ -10,7 +10,7 @@
var/status = 0
var/timeleft = 60
var/stop = 0.0
var/screen = 0 // 0 - No Access Denied, 1 - Access allowed
var/authenticated = FALSE // FALSE - No Access Denied, TRUE - Access allowed
var/obj/item/card/id/prisoner/inserted_id
light_color = LIGHT_COLOR_DARKRED
@@ -32,9 +32,9 @@
user.set_machine(src)
var/dat
dat += "<B>Prisoner Implant Manager System</B><BR>"
if(screen == 0)
if(!authenticated)
dat += "<HR><A href='?src=[UID()];lock=1'>Unlock Console</A>"
else if(screen == 1)
else
if(istype(inserted_id))
var/p = inserted_id:points
var/g = inserted_id:goal
@@ -126,7 +126,7 @@
else if(href_list["lock"])
if(src.allowed(usr))
screen = !screen
authenticated = !authenticated
else
to_chat(usr, "<span class='warning'>Unauthorized access.</span>")