diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm index 5082b75f20d..865bc92083b 100644 --- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm +++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm @@ -11703,7 +11703,7 @@ }) "auD" = ( /obj/machinery/light_construct/small, -/obj/item/toolbox_tiles_sensor, +/obj/item/toolbox_tiles/sensor, /turf/simulated/floor/plating, /area/maintenance/fpmaint2{ name = "Port Maintenance" diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm index 5116abf32e6..bc99aa07b0e 100644 --- a/code/modules/crafting/recipes.dm +++ b/code/modules/crafting/recipes.dm @@ -117,8 +117,8 @@ /datum/crafting_recipe/floorbot name = "Floorbot" result = /mob/living/simple_animal/bot/floorbot - reqs = list(/obj/item/storage/toolbox/mechanical = 1, - /obj/item/stack/tile/plasteel = 1, + reqs = list(/obj/item/storage/toolbox = 1, + /obj/item/stack/tile/plasteel = 10, /obj/item/assembly/prox_sensor = 1, /obj/item/robot_parts/r_arm = 1) time = 40 diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 2737781bd08..e13aa995c25 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -210,20 +210,15 @@ var/robot_arm = /obj/item/robot_parts/l_arm throw_range = 5 w_class = WEIGHT_CLASS_NORMAL var/created_name = "Floorbot" + var/toolbox = /obj/item/storage/toolbox/mechanical + var/toolbox_color = "" //Blank for blue, r for red, y for yellow, etc. -/obj/item/toolbox_tiles_sensor +/obj/item/toolbox_tiles/sensor desc = "It's a toolbox with tiles sticking out the top and a sensor attached" name = "tiles, toolbox and sensor arrangement" - icon = 'icons/obj/aibots.dmi' icon_state = "toolbox_tiles_sensor" - force = 3 - throwforce = 10 - throw_speed = 2 - throw_range = 5 - w_class = WEIGHT_CLASS_NORMAL - var/created_name = "Floorbot" -/obj/item/storage/toolbox/mechanical/attackby(obj/item/stack/tile/plasteel/T, mob/user, params) +/obj/item/storage/toolbox/attackby(obj/item/stack/tile/plasteel/T, mob/user, params) if(!istype(T, /obj/item/stack/tile/plasteel)) ..() return @@ -234,6 +229,17 @@ var/robot_arm = /obj/item/robot_parts/l_arm if(user.s_active) user.s_active.close(user) var/obj/item/toolbox_tiles/B = new /obj/item/toolbox_tiles + B.toolbox = type + switch(B.toolbox) + if(/obj/item/storage/toolbox/emergency) + B.toolbox_color = "r" + if(/obj/item/storage/toolbox/electrical) + B.toolbox_color = "y" + if(/obj/item/storage/toolbox/green) + B.toolbox_color = "g" + if(/obj/item/storage/toolbox/syndicate) + B.toolbox_color = "s" + B.icon_state = "[B.toolbox_color]toolbox_tiles" user.put_in_hands(B) to_chat(user, "You add the tiles into the empty toolbox. They protrude from the top.") user.unEquip(src, 1) @@ -246,8 +252,10 @@ var/robot_arm = /obj/item/robot_parts/l_arm ..() if(isprox(W)) qdel(W) - var/obj/item/toolbox_tiles_sensor/B = new /obj/item/toolbox_tiles_sensor() + var/obj/item/toolbox_tiles/sensor/B = new /obj/item/toolbox_tiles/sensor() B.created_name = created_name + B.toolbox_color = src.toolbox_color + B.icon_state = "[B.toolbox_color]toolbox_tiles_sensor" user.put_in_hands(B) to_chat(user, "You add the sensor to the toolbox and tiles.") user.unEquip(src, 1) @@ -263,12 +271,11 @@ var/robot_arm = /obj/item/robot_parts/l_arm created_name = t log_game("[key_name(user)] has renamed a robot to [t]") -/obj/item/toolbox_tiles_sensor/attackby(obj/item/W, mob/user, params) +/obj/item/toolbox_tiles/sensor/attackby(obj/item/W, mob/user, params) ..() if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm)) qdel(W) - var/turf/T = get_turf(user.loc) - var/mob/living/simple_animal/bot/floorbot/A = new /mob/living/simple_animal/bot/floorbot(T) + var/mob/living/simple_animal/bot/floorbot/A = new(drop_location(), toolbox_color) A.name = created_name A.robot_arm = W.type to_chat(user, "You add the robot arm to the odd looking toolbox assembly. Boop beep!") @@ -287,10 +294,9 @@ var/robot_arm = /obj/item/robot_parts/l_arm //Medbot Assembly /obj/item/storage/firstaid/attackby(obj/item/I, mob/user, params) if(!istype(I, /obj/item/robot_parts/l_arm) && !istype(I, /obj/item/robot_parts/r_arm)) - return ..() + return ..() else robot_arm = I.type - //Making a medibot! if(contents.len) @@ -298,7 +304,7 @@ var/robot_arm = /obj/item/robot_parts/l_arm return var/obj/item/firstaid_arm_assembly/A = new /obj/item/firstaid_arm_assembly(loc, med_bot_skin) - + A.req_one_access = req_one_access A.syndicate_aligned = syndicate_aligned A.treatment_oxy = treatment_oxy @@ -492,7 +498,7 @@ var/robot_arm = /obj/item/robot_parts/l_arm //General Griefsky - else if((istype(I, /obj/item/wrench)) && (build_step == 3)) + else if((istype(I, /obj/item/wrench)) && (build_step == 3)) var/obj/item/griefsky_assembly/A = new /obj/item/griefsky_assembly user.put_in_hands(A) to_chat(user, "You adjust the arm slots for extra weapons!.") @@ -516,12 +522,12 @@ var/robot_arm = /obj/item/robot_parts/l_arm build_step++ to_chat(user, "You add an energy sword to [src]!.") qdel(I) - + else if((istype(I, /obj/item/melee/energy/sword)) && (build_step == 3)) if(!user.unEquip(I)) return to_chat(user, "You complete General Griefsky!.") - var/mob/living/simple_animal/bot/secbot/griefsky/S = new /mob/living/simple_animal/bot/secbot/griefsky + var/mob/living/simple_animal/bot/secbot/griefsky/S = new /mob/living/simple_animal/bot/secbot/griefsky S.forceMove(get_turf(src)) qdel(I) qdel(src) @@ -537,7 +543,7 @@ var/robot_arm = /obj/item/robot_parts/l_arm if(!user.unEquip(I)) return to_chat(user, "You complete Genewul Giftskee!.") - var/mob/living/simple_animal/bot/secbot/griefsky/toy/S = new /mob/living/simple_animal/bot/secbot/griefsky/toy + var/mob/living/simple_animal/bot/secbot/griefsky/toy/S = new /mob/living/simple_animal/bot/secbot/griefsky/toy S.forceMove(get_turf(src)) qdel(I) qdel(src) diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index c22d37eed19..8f0a834136e 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -5,7 +5,7 @@ icon = 'icons/obj/aibots.dmi' icon_state = "floorbot0" density = 0 - anchored = 0 + anchored = FALSE health = 25 maxHealth = 25 @@ -32,6 +32,7 @@ var/max_targets = 50 var/turf/target var/oldloc = null + var/toolbox_color = "" #define HULL_BREACH 1 #define BRIDGE_MODE 2 @@ -40,12 +41,16 @@ #define REPLACE_TILE 5 #define TILE_EMAG 6 -/mob/living/simple_animal/bot/floorbot/New() +/mob/living/simple_animal/bot/floorbot/New(mapload, new_toolbox_color) ..() + toolbox_color = new_toolbox_color update_icon() var/datum/job/engineer/J = new/datum/job/engineer access_card.access += J.get_access() prev_access = access_card.access + if(toolbox_color == "s") + health = 50 + maxHealth = 50 /mob/living/simple_animal/bot/floorbot/bot_reset() ..() @@ -53,7 +58,7 @@ oldloc = null ignore_list = list() nagged = 0 - anchored = 0 + anchored = FALSE update_icon() /mob/living/simple_animal/bot/floorbot/set_custom_texts() @@ -235,7 +240,7 @@ repair(target) else if(emagged == 2 && istype(target,/turf/simulated/floor)) var/turf/simulated/floor/F = target - anchored = 1 + anchored = TRUE mode = BOT_REPAIRING if(prob(90)) F.break_tile_to_plating() @@ -244,7 +249,7 @@ audible_message("[src] makes an excited booping sound.") spawn(50) amount ++ - anchored = 0 + anchored = FALSE mode = BOT_IDLE target = null path = list() @@ -272,11 +277,11 @@ if(HULL_BREACH) //The most common job, patching breaches in the station's hull. if(is_hull_breach(scan_target)) //Ensure that the targeted space turf is actually part of the station, and not random space. result = scan_target - anchored = 1 //Prevent the floorbot being blown off-course while trying to reach a hull breach. + anchored = TRUE //Prevent the floorbot being blown off-course while trying to reach a hull breach. if(BRIDGE_MODE) //Only space turfs in our chosen direction are considered. if(get_dir(src, scan_target) == targetdirection) result = scan_target - anchored = 1 + anchored = TRUE if(REPLACE_TILE) F = scan_target if(istype(F, /turf/simulated/floor/plating)) //The floor must not already have a tile. @@ -306,9 +311,10 @@ mode = BOT_IDLE target = null return - anchored = 1 + anchored = TRUE icon_state = "floorbot-c" if(istype(target_turf, /turf/space/)) //If we are fixing an area not part of pure space, it is + icon_state = "[toolbox_color]floorbot-c" visible_message("[targetdirection ? "[src] begins installing a bridge plating." : "[src] begins to repair the hole."] ") mode = BOT_REPAIRING spawn(50) @@ -320,11 +326,12 @@ mode = BOT_IDLE amount -= 1 update_icon() - anchored = 0 + anchored = FALSE target = null else var/turf/simulated/floor/F = target_turf mode = BOT_REPAIRING + icon_state = "[toolbox_color]floorbot-c" visible_message("[src] begins repairing the floor.") spawn(50) if(mode == BOT_REPAIRING) @@ -334,7 +341,7 @@ mode = BOT_IDLE amount -= 1 update_icon() - anchored = 0 + anchored = FALSE target = null /mob/living/simple_animal/bot/floorbot/proc/eattile(obj/item/stack/tile/plasteel/T) @@ -380,9 +387,9 @@ /mob/living/simple_animal/bot/floorbot/update_icon() if(amount > 0) - icon_state = "floorbot[on]" + icon_state = "[toolbox_color]floorbot[on]" else - icon_state = "floorbot[on]e" + icon_state = "[toolbox_color]floorbot[on]e" /mob/living/simple_animal/bot/floorbot/explode() on = 0 diff --git a/icons/obj/aibots.dmi b/icons/obj/aibots.dmi index 273fbf77133..b040de343a4 100644 Binary files a/icons/obj/aibots.dmi and b/icons/obj/aibots.dmi differ