diff --git a/baystation12.dme b/baystation12.dme index f367650640a..9d12f06fd98 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -792,7 +792,7 @@ #include "code\modules\DetectiveWork\detective_work.dm" #include "code\modules\DetectiveWork\evidence.dm" #include "code\modules\DetectiveWork\footprints_and_rag.dm" -#include "code\modules\DetectiveWork\scanner.dm" +#include "code\modules\detectivework\scanner.dm" #include "code\modules\events\alien_infestation.dm" #include "code\modules\events\blob.dm" #include "code\modules\events\brand_intelligence.dm" @@ -983,6 +983,7 @@ #include "code\modules\mob\living\silicon\pai\recruit.dm" #include "code\modules\mob\living\silicon\pai\say.dm" #include "code\modules\mob\living\silicon\pai\software.dm" +#include "code\modules\mob\living\silicon\robot\component.dm" #include "code\modules\mob\living\silicon\robot\death.dm" #include "code\modules\mob\living\silicon\robot\emote.dm" #include "code\modules\mob\living\silicon\robot\examine.dm" @@ -992,6 +993,7 @@ #include "code\modules\mob\living\silicon\robot\life.dm" #include "code\modules\mob\living\silicon\robot\login.dm" #include "code\modules\mob\living\silicon\robot\robot.dm" +#include "code\modules\mob\living\silicon\robot\robot_damage.dm" #include "code\modules\mob\living\silicon\robot\robot_items.dm" #include "code\modules\mob\living\silicon\robot\robot_modules.dm" #include "code\modules\mob\living\silicon\robot\robot_movement.dm" diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index b45ea8b0ae3..1d10956582e 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -16,10 +16,6 @@ // The wrapped device(e.g. radio), only set if external_type isn't null /datum/robot_component/var/obj/item/wrapped = null - -/datum/robot_component/proc/is_functioning() - return brute_damage + electronics_damage < 30 - /datum/robot_component/New(mob/living/silicon/robot/R) src.owner = R @@ -46,8 +42,8 @@ if(brute_damage + electronics_damage > max_damage) destroy() /datum/robot_component/proc/heal_damage(brute, electronics) - if(!is_functioning()) - // If it's not functioning, it's beyond repairing without taking it out. + if(installed != 1) + // If it's not installed, can't repair it. return 0 brute_damage = max(0, brute_damage - brute) @@ -146,4 +142,4 @@ name = "diagnosis unit" /obj/item/robot_parts/robot_component/radio - name = "radio" \ No newline at end of file + name = "radio" diff --git a/code/modules/mob/living/silicon/robot/robot_damage.dm b/code/modules/mob/living/silicon/robot/robot_damage.dm index cc949fa7689..97ee049fe97 100644 --- a/code/modules/mob/living/silicon/robot/robot_damage.dm +++ b/code/modules/mob/living/silicon/robot/robot_damage.dm @@ -2,14 +2,14 @@ var/amount = 0 for(var/V in components) var/datum/robot_component/C = components[V] - amount += C.brute_damage + if(C.installed == 1) amount += C.brute_damage return amount /mob/living/silicon/robot/getFireLoss() var/amount = 0 for(var/V in components) var/datum/robot_component/C = components[V] - amount += C.electronics_damage + if(C.installed == 1) amount += C.electronics_damage return amount @@ -29,7 +29,7 @@ var/list/datum/robot_component/parts = list() for(var/V in components) var/datum/robot_component/C = components[V] - if((brute && C.brute_damage) || (burn && C.electronics_damage)) + if(C.installed == 1) if((brute && C.brute_damage) || (burn && C.electronics_damage)) parts += C return parts @@ -53,16 +53,13 @@ /mob/living/silicon/robot/heal_overall_damage(var/brute, var/burn) var/list/datum/robot_component/parts = get_damaged_components(brute,burn) - log_debug("Healing [brute] brute and [burn] burn with [parts.len] parts") while(parts.len && (brute>0 || burn>0) ) var/datum/robot_component/picked = pick(parts) var/brute_was = picked.brute_damage var/burn_was = picked.electronics_damage - log_debug("Healing [picked.name]") picked.heal_damage(brute,burn) - log_debug("[brute] brute and [burn] burn left to heal") brute -= (brute_was-picked.brute_damage) burn -= (burn_was-picked.electronics_damage) @@ -83,4 +80,4 @@ brute -= (picked.brute_damage - brute_was) burn -= (picked.electronics_damage - burn_was) - parts -= picked \ No newline at end of file + parts -= picked