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
@@ -89,17 +89,16 @@
//Checks for and Rejects bad region coordinates
//Returns 1/0
/datum/map_generator/proc/checkRegion(turf/Start, turf/End)
. = 1
if(!Start || !End)
return 0 //Just bail
return FALSE //Just bail
if(Start.x > world.maxx || End.x > world.maxx)
. = 0
return FALSE
if(Start.y > world.maxy || End.y > world.maxy)
. = 0
return FALSE
if(Start.z > world.maxz || End.z > world.maxz)
. = 0
return FALSE
return TRUE
//Requests the mapGeneratorModule(s) to (re)generate
@@ -153,10 +152,10 @@
return
var/endInput = input(usr,"End turf of Map (X;Y;Z)", "Map Gen Settings", "[world.maxx];[world.maxy];[mob ? mob.z : 1]") as text|null
if (isnull(endInput))
return
//maxx maxy and current z so that if you fuck up, you only fuck up one entire z level instead of the entire universe
if(!startInput || !endInput)
to_chat(src, "Missing Input")