diff --git a/code/datums/components/crafting/robot.dm b/code/datums/components/crafting/robot.dm index d290c39aa0f..8a6a014d5a4 100644 --- a/code/datums/components/crafting/robot.dm +++ b/code/datums/components/crafting/robot.dm @@ -47,7 +47,7 @@ result = /mob/living/basic/bot/repairbot reqs = list( /obj/item/storage/toolbox = 1, - /obj/item/stack/tile/iron = 10, + /obj/item/stack/conveyor = 1, /obj/item/assembly/prox_sensor = 1, /obj/item/bodypart/arm/right/robot = 1, ) diff --git a/code/modules/mob/living/basic/bots/_bots.dm b/code/modules/mob/living/basic/bots/_bots.dm index 7a34912f406..c120eab8425 100644 --- a/code/modules/mob/living/basic/bots/_bots.dm +++ b/code/modules/mob/living/basic/bots/_bots.dm @@ -319,6 +319,7 @@ GLOBAL_LIST_INIT(command_strings, list( to_chat(src, span_boldnotice(get_emagged_message())) if(user) log_combat(user, src, "emagged") + emag_effects(user) return TRUE /mob/living/basic/bot/examine(mob/user) @@ -623,6 +624,7 @@ GLOBAL_LIST_INIT(command_strings, list( return if(!(bot_access_flags & BOT_COVER_EMAGGED)) bot_access_flags |= (BOT_COVER_LOCKED|BOT_COVER_EMAGGED|BOT_COVER_HACKED) + emag_effects(the_user) to_chat(the_user, span_warning("You overload [src]'s [hackables].")) message_admins("Safety lock of [ADMIN_LOOKUPFLW(src)] was disabled by [ADMIN_LOOKUPFLW(the_user)] in [ADMIN_VERBOSEJMP(the_user)]") the_user.log_message("disabled safety lock of [the_user]", LOG_GAME) @@ -814,6 +816,9 @@ GLOBAL_LIST_INIT(command_strings, list( if(attack_flags & ATTACKER_DAMAGING_ATTACK) do_sparks(number = 5, cardinal_only = TRUE, source = src) +/mob/living/basic/bot/proc/emag_effects(user) + return + /mob/living/basic/bot/spawn_gibs(drop_bitflags = NONE) new /obj/effect/gibspawner/robot(drop_location(), src) diff --git a/code/modules/mob/living/basic/bots/cleanbot/cleanbot.dm b/code/modules/mob/living/basic/bots/cleanbot/cleanbot.dm index 1e2bfdb732b..68cd6a231e3 100644 --- a/code/modules/mob/living/basic/bots/cleanbot/cleanbot.dm +++ b/code/modules/mob/living/basic/bots/cleanbot/cleanbot.dm @@ -199,15 +199,11 @@ if(var_name == NAMEOF(src, base_icon)) update_appearance(UPDATE_ICON) -/mob/living/basic/bot/cleanbot/emag_act(mob/user, obj/item/card/emag/emag_card) - . = ..() - if(!(bot_access_flags & BOT_COVER_EMAGGED)) - return +/mob/living/basic/bot/cleanbot/emag_effects(mob/user) if(weapon) weapon.force = initial(weapon.force) balloon_alert(user, "safeties disabled") audible_message(span_danger("[src] buzzes oddly!")) - return TRUE /mob/living/basic/bot/cleanbot/explode() var/atom/drop_loc = drop_location() diff --git a/code/modules/mob/living/basic/bots/medbot/medbot.dm b/code/modules/mob/living/basic/bots/medbot/medbot.dm index aeb03354db0..b4afba169b8 100644 --- a/code/modules/mob/living/basic/bots/medbot/medbot.dm +++ b/code/modules/mob/living/basic/bots/medbot/medbot.dm @@ -244,10 +244,7 @@ update_appearance() -/mob/living/basic/bot/medbot/emag_act(mob/user, obj/item/card/emag/emag_card) - . = ..() - if(!(bot_access_flags & BOT_COVER_EMAGGED)) - return +/mob/living/basic/bot/medbot/emag_effects(mob/user) medical_mode_flags &= ~MEDBOT_DECLARE_CRIT balloon_alert(user, "reagent synthesis circuits shorted") audible_message(span_danger("[src] buzzes oddly!")) diff --git a/code/modules/mob/living/basic/bots/repairbot/repairbot.dm b/code/modules/mob/living/basic/bots/repairbot/repairbot.dm index 56ba7ef4ebe..17b257d8c98 100644 --- a/code/modules/mob/living/basic/bots/repairbot/repairbot.dm +++ b/code/modules/mob/living/basic/bots/repairbot/repairbot.dm @@ -74,7 +74,7 @@ ///our color var/toolbox_color = "#445eb3" ///toolbox type we drop on death - var/toolbox = /obj/item/storage/toolbox + var/toolbox = /obj/item/storage/toolbox/mechanical /mob/living/basic/bot/repairbot/Initialize(mapload) . = ..() @@ -120,6 +120,7 @@ return var/atom/movable/to_move = potential_stack.split_stack(user, min(our_sheet.max_amount - our_sheet.amount, potential_stack.amount)) to_move.forceMove(src) + balloon_alert(src, "inserted") return /mob/living/basic/bot/repairbot/Entered(atom/movable/arrived, atom/old_loc, list/atom/old_locs) @@ -241,7 +242,7 @@ return ..() /mob/living/basic/bot/repairbot/process(seconds_per_tick) //generate 1 iron rod every 2 seconds - if(!isnull(our_rods) && our_rods.amount >= our_rods.max_amount) + if(isnull(our_rods) || our_rods.amount < our_rods.max_amount) var/obj/item/stack/rods/new_rods = new() new_rods.forceMove(src) @@ -332,11 +333,13 @@ return TRUE -/mob/living/basic/bot/repairbot/emag_act(mob/user, obj/item/card/emag/emag_card) - . = ..() - if(!(bot_access_flags & BOT_COVER_EMAGGED) || !isnull(deconstruction_device)) - return - deconstruction_device = new(src) +/mob/living/basic/bot/repairbot/emag_effects(mob/user) + if(isnull(deconstruction_device)) + deconstruction_device = new(src) + +/mob/living/basic/bot/repairbot/explode() + drop_part(toolbox, drop_location()) + return ..() /obj/item/weldingtool/repairbot max_fuel = INFINITY diff --git a/code/modules/mob/living/basic/bots/repairbot/repairbot_abilities.dm b/code/modules/mob/living/basic/bots/repairbot/repairbot_abilities.dm index ff6354744ea..4de81f0015b 100644 --- a/code/modules/mob/living/basic/bots/repairbot/repairbot_abilities.dm +++ b/code/modules/mob/living/basic/bots/repairbot/repairbot_abilities.dm @@ -5,7 +5,7 @@ desc = "Use iron rods to build a girder!" button_icon = 'icons/obj/structures.dmi' button_icon_state = "girder" - cooldown_time = 3 SECONDS + cooldown_time = 5 SECONDS click_to_activate = TRUE /datum/action/cooldown/mob_cooldown/bot/build_girder/IsAvailable(feedback) diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 6a606209144..143c79534d3 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -197,8 +197,10 @@ icon_state = "repairbot_base" throwforce = 10 created_name = "Repairbot" + ///the toolbox our repairbot is made of var/toolbox = /obj/item/storage/toolbox/mechanical - var/toolbox_color = "" //Blank for blue, r for red, y for yellow, etc. + ///the color of our toolbox + var/toolbox_color = "" /obj/item/bot_assembly/repairbot/Initialize(mapload) . = ..() @@ -245,7 +247,9 @@ repair.toolbox = toolbox repair.set_color(toolbox_color) to_chat(user, span_notice("You add [item] to [src]. Boop beep!")) - qdel(item) + var/obj/item/stack/crafting_stack = item + var/atom/used_belt = crafting_stack.split_stack(user, 1) + qdel(used_belt) qdel(src)