Bools and returns super-pr (#53221) (#565)

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>

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: Couls <coul422@gmail.com>
This commit is contained in:
SkyratBot
2020-08-30 05:12:59 +02:00
committed by GitHub
co-authored by TiviPlus <TiviPlus> Couls TiviPlus
parent f600605607
commit ec09510459
355 changed files with 1549 additions and 1591 deletions
+2 -2
View File
@@ -36,7 +36,7 @@
if(tool)
if(IC || tool.w_class > WEIGHT_CLASS_NORMAL || HAS_TRAIT(tool, TRAIT_NODROP) || istype(tool, /obj/item/organ))
to_chat(user, "<span class='warning'>You can't seem to fit [tool] in [target]'s [target_zone]!</span>")
return 0
return FALSE
else
display_results(user, target, "<span class='notice'>You stuff [tool] into [target]'s [target_zone].</span>",
"<span class='notice'>[user] stuffs [tool] into [target]'s [target_zone]!</span>",
@@ -54,4 +54,4 @@
return ..()
else
to_chat(user, "<span class='warning'>You don't find anything in [target]'s [target_zone].</span>")
return 0
return FALSE
+1 -1
View File
@@ -153,4 +153,4 @@
display_results(user, target, "<span class='warning'>You can't extract anything from [target]'s [parse_zone(target_zone)]!</span>",
"<span class='notice'>[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!</span>",
"<span class='notice'>[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!</span>")
return 0
return FALSE
@@ -149,7 +149,7 @@
if((organ_flags & ORGAN_FAILING))
if(!silent)
to_chat(owner, "<span class='warning'>Your thrusters set seems to be broken!</span>")
return 0
return FALSE
if(allow_thrust(0.01))
on = TRUE
ion_trail.start()
@@ -35,13 +35,13 @@
if(organ_flags & ORGAN_EDIBLE)
AddComponent(/datum/component/edible, food_reagents, null, RAW | MEAT | GROSS, null, 10, null, null, null, CALLBACK(src, .proc/OnEatFrom))
/obj/item/organ/proc/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
/obj/item/organ/proc/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
if(!iscarbon(M) || owner == M)
return
var/obj/item/organ/replaced = M.getorganslot(slot)
if(replaced)
replaced.Remove(M, special = 1)
replaced.Remove(M, special = TRUE)
if(drop_if_replaced)
replaced.forceMove(get_turf(M))
else
@@ -8,10 +8,11 @@
/datum/surgery/prosthetic_replacement/can_start(mob/user, mob/living/carbon/target)
if(!iscarbon(target))
return 0
return FALSE
var/mob/living/carbon/C = target
if(!C.get_bodypart(user.zone_selected)) //can only start if limb is missing
return 1
return TRUE
return FALSE
+14 -14
View File
@@ -32,42 +32,42 @@
switch(location)
if(BODY_ZONE_HEAD)
if(covered_locations & HEAD)
return 0
return FALSE
if(BODY_ZONE_PRECISE_EYES)
if(covered_locations & HEAD || face_covered & HIDEEYES || eyesmouth_covered & GLASSESCOVERSEYES)
return 0
return FALSE
if(BODY_ZONE_PRECISE_MOUTH)
if(covered_locations & HEAD || face_covered & HIDEFACE || eyesmouth_covered & MASKCOVERSMOUTH || eyesmouth_covered & HEADCOVERSMOUTH)
return 0
return FALSE
if(BODY_ZONE_CHEST)
if(covered_locations & CHEST)
return 0
return FALSE
if(BODY_ZONE_PRECISE_GROIN)
if(covered_locations & GROIN)
return 0
return FALSE
if(BODY_ZONE_L_ARM)
if(covered_locations & ARM_LEFT)
return 0
return FALSE
if(BODY_ZONE_R_ARM)
if(covered_locations & ARM_RIGHT)
return 0
return FALSE
if(BODY_ZONE_L_LEG)
if(covered_locations & LEG_LEFT)
return 0
return FALSE
if(BODY_ZONE_R_LEG)
if(covered_locations & LEG_RIGHT)
return 0
return FALSE
if(BODY_ZONE_PRECISE_L_HAND)
if(covered_locations & HAND_LEFT)
return 0
return FALSE
if(BODY_ZONE_PRECISE_R_HAND)
if(covered_locations & HAND_RIGHT)
return 0
return FALSE
if(BODY_ZONE_PRECISE_L_FOOT)
if(covered_locations & FOOT_LEFT)
return 0
return FALSE
if(BODY_ZONE_PRECISE_R_FOOT)
if(covered_locations & FOOT_RIGHT)
return 0
return FALSE
return 1
return TRUE