diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 982326c1b69..6473eba1461 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -40,23 +40,24 @@ occupant_message("You realise in horror what you have done as [chassis] starts warping around you!") chassis.occupant.dust() SM.Bumped(chassis) - else - if(!O.anchored) - if(cargo_holder.cargo.len < cargo_holder.cargo_capacity) - chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.") - O.anchored = TRUE - if(do_after_cooldown(target)) - cargo_holder.cargo += O - O.loc = chassis - O.anchored = FALSE - occupant_message("[target] successfully loaded.") - log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]") - else - O.anchored = initial(O.anchored) + return + + if(!O.anchored) + if(cargo_holder.cargo.len < cargo_holder.cargo_capacity) + chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.") + O.anchored = TRUE + if(do_after_cooldown(target)) + cargo_holder.cargo += O + O.loc = chassis + O.anchored = FALSE + occupant_message("[target] successfully loaded.") + log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]") else - occupant_message("Not enough room in cargo compartment!") + O.anchored = initial(O.anchored) else - occupant_message("[target] is firmly secured!") + occupant_message("Not enough room in cargo compartment!") + else + occupant_message("[target] is firmly secured!") else if(istype(target,/mob/living)) var/mob/living/M = target