diff --git a/code/game/gamemodes/clock_cult/clock_helpers/proselytizer_helpers.dm b/code/game/gamemodes/clock_cult/clock_helpers/proselytizer_helpers.dm index 60ea26facb4..de54f1882de 100644 --- a/code/game/gamemodes/clock_cult/clock_helpers/proselytizer_helpers.dm +++ b/code/game/gamemodes/clock_cult/clock_helpers/proselytizer_helpers.dm @@ -187,7 +187,7 @@ var/healing_for_cycle = min(amount_to_heal, repair_amount) var/alloy_required = healing_for_cycle if(!proselytizer.can_use_alloy(RATVAR_ALLOY_CHECK)) - healing_for_cycle = min(healing_for_cycle, proselytizer.stored_alloy) + healing_for_cycle = min(healing_for_cycle, proselytizer.get_power_alloy()) if(!healing_for_cycle || (!proselytizer.can_use_alloy(RATVAR_ALLOY_CHECK) && !proselytizer.can_use_alloy(healing_for_cycle))) user << "You need at least [alloy_required] liquified alloy to start repairing [src], and at least [amount_to_heal] to fully repair it!" return @@ -201,7 +201,7 @@ break healing_for_cycle = min(amount_to_heal, repair_amount) if(!proselytizer.can_use_alloy(RATVAR_ALLOY_CHECK)) - healing_for_cycle = min(healing_for_cycle, proselytizer.stored_alloy) + healing_for_cycle = min(healing_for_cycle, proselytizer.get_power_alloy()) if(!healing_for_cycle || (!proselytizer.can_use_alloy(RATVAR_ALLOY_CHECK) && !proselytizer.can_use_alloy(healing_for_cycle)) || \ !do_after(user, healing_for_cycle * proselytizer.speed_multiplier, target = src) || \ !proselytizer || (!proselytizer.can_use_alloy(RATVAR_ALLOY_CHECK) && !proselytizer.can_use_alloy(healing_for_cycle))) @@ -211,7 +211,7 @@ break healing_for_cycle = min(amount_to_heal, repair_amount) if(!proselytizer.can_use_alloy(RATVAR_ALLOY_CHECK)) - healing_for_cycle = min(healing_for_cycle, proselytizer.stored_alloy) + healing_for_cycle = min(healing_for_cycle, proselytizer.get_power_alloy()) if(!healing_for_cycle || (!proselytizer.can_use_alloy(RATVAR_ALLOY_CHECK) && !proselytizer.can_use_alloy(healing_for_cycle))) break obj_integrity = Clamp(obj_integrity + healing_for_cycle, 0, max_integrity) diff --git a/code/game/gamemodes/clock_cult/clock_items/clockwork_proselytizer.dm b/code/game/gamemodes/clock_cult/clock_items/clockwork_proselytizer.dm index 0838770e60f..bcc61463f77 100644 --- a/code/game/gamemodes/clock_cult/clock_items/clockwork_proselytizer.dm +++ b/code/game/gamemodes/clock_cult/clock_items/clockwork_proselytizer.dm @@ -48,6 +48,18 @@ ..() if(is_servant_of_ratvar(user) || isobserver(user)) user << "It will use cell charge at a rate of [CLOCKCULT_ALLOY_TO_POWER_MULTIPLIER] charge to 1 alloy if it has insufficient alloy." + user << "[get_power_alloy()] is usable in this manner." + +/obj/item/clockwork/clockwork_proselytizer/cyborg/get_power_alloy() //returns alloy plus the alloy we have from power, where we need such + var/mob/living/silicon/robot/R = loc + var/alloy_power = 0 + var/current_charge = 0 + if(istype(R) && R.cell) + current_charge = R.cell.charge + while(current_charge > CLOCKCULT_ALLOY_TO_POWER_MULTIPLIER) + current_charge -= CLOCKCULT_ALLOY_TO_POWER_MULTIPLIER + alloy_power++ + return ..() + alloy_power /obj/item/clockwork/clockwork_proselytizer/cyborg/can_use_alloy(amount) if(amount != RATVAR_ALLOY_CHECK) @@ -115,6 +127,9 @@ return ..() proselytize(target, user) +/obj/item/clockwork/clockwork_proselytizer/proc/get_power_alloy() + return stored_alloy + /obj/item/clockwork/clockwork_proselytizer/proc/modify_stored_alloy(amount) stored_alloy = Clamp(stored_alloy + amount, 0, max_alloy) return TRUE