Bools and returns super-pr (#53221)

Replaces like 70-80% of 0 and such, as a side effect cleaned up a bunch of returns
Edit: Most left out ones are in mecha which should be done in mecha refactor already
Oh my look how clean it is

Co-authored-by: TiviPlus <TiviPlus>
Co-authored-by: Couls <coul422@gmail.com>
This commit is contained in:
TiviPlus
2020-08-28 23:26:37 +02:00
committed by GitHub
parent cb49d3301b
commit ca366c3ea1
355 changed files with 1549 additions and 1591 deletions
@@ -7,17 +7,17 @@
if(!enabled)
if(ui)
ui.close()
return 0
return
if(!use_power())
if(ui)
ui.close()
return 0
return
// Robots don't really need to see the screen, their wireless connection works as long as computer is on.
if(!screen_on && !issilicon(user))
if(ui)
ui.close()
return 0
return
// If we have an active program switch to it now.
if(active_program)
@@ -74,9 +74,9 @@
data["programs"] = list()
var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD]
for(var/datum/computer_file/program/P in hard_drive.stored_files)
var/running = 0
var/running = FALSE
if(P in idle_threads)
running = 1
running = TRUE
data["programs"] += list(list("name" = P.filename, "desc" = P.filedesc, "running" = running))