mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
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:
co-authored by
TiviPlus <TiviPlus>
Couls
TiviPlus
parent
f600605607
commit
ec09510459
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user