diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 9db21f13..6ae1a2c0 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -208,6 +208,7 @@ throwforce = 10 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/bot_assembly/floorbot/Initialize() . = ..() @@ -219,24 +220,42 @@ if(ASSEMBLY_FIRST_STEP) desc = initial(desc) name = initial(name) - icon_state = initial(icon_state) + icon_state = "[toolbox_color]toolbox_tiles" if(ASSEMBLY_SECOND_STEP) desc = "It's a toolbox with tiles sticking out the top and a sensor attached." name = "incomplete floorbot assembly" - icon_state = "toolbox_tiles_sensor" + icon_state = "[toolbox_color]toolbox_tiles_sensor" + +/obj/item/storage/toolbox/attackby(obj/item/stack/tile/plasteel/T, mob/user, params) + var/list/allowed_toolbox = list(/obj/item/storage/toolbox/emergency, //which toolboxes can be made into floorbots + /obj/item/storage/toolbox/electrical, + /obj/item/storage/toolbox/mechanical, + /obj/item/storage/toolbox/artistic, + /obj/item/storage/toolbox/syndicate) -/obj/item/storage/toolbox/mechanical/attackby(obj/item/stack/tile/plasteel/T, mob/user, params) if(!istype(T, /obj/item/stack/tile/plasteel)) ..() return + if(!is_type_in_list(src, allowed_toolbox)) + return if(contents.len >= 1) to_chat(user, "They won't fit in, as there is already stuff inside!") return if(T.use(10)) var/obj/item/bot_assembly/floorbot/B = new 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/artistic) + B.toolbox_color = "g" + if(/obj/item/storage/toolbox/syndicate) + B.toolbox_color = "s" user.put_in_hands(B) + B.update_icon() to_chat(user, "You add the tiles into the empty [src.name]. They protrude from the top.") qdel(src) else @@ -259,7 +278,7 @@ if(istype(W, /obj/item/bodypart/l_arm/robot) || istype(W, /obj/item/bodypart/r_arm/robot)) if(!can_finish_build(W, user)) return - var/mob/living/simple_animal/bot/floorbot/A = new(drop_location()) + var/mob/living/simple_animal/bot/floorbot/A = new(drop_location(), toolbox_color) A.name = created_name A.robot_arm = W.type A.toolbox = toolbox diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 4709680a..baa864c0 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -32,6 +32,7 @@ var/turf/target var/oldloc = null var/toolbox = /obj/item/storage/toolbox/mechanical + var/toolbox_color = "" #define HULL_BREACH 1 #define LINE_SPACE_MODE 2 @@ -41,12 +42,16 @@ #define REPLACE_TILE 6 #define TILE_EMAG 7 -/mob/living/simple_animal/bot/floorbot/Initialize() +/mob/living/simple_animal/bot/floorbot/Initialize(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 = 100 + maxHealth = 100 /mob/living/simple_animal/bot/floorbot/turn_on() . = ..() @@ -312,7 +317,7 @@ return if(isspaceturf(target_turf)) //If we are fixing an area not part of pure space, it is anchored = TRUE - icon_state = "floorbot-c" + icon_state = "[toolbox_color]floorbot-c" visible_message("[targetdirection ? "[src] begins installing a bridge plating." : "[src] begins to repair the hole."] ") mode = BOT_REPAIRING sleep(50) @@ -327,7 +332,7 @@ if(F.type != initial(tiletype.turf_type) && (F.broken || F.burnt || isplatingturf(F)) || F.type == (initial(tiletype.turf_type) && (F.broken || F.burnt))) anchored = TRUE - icon_state = "floorbot-c" + icon_state = "[toolbox_color]floorbot-c" mode = BOT_REPAIRING visible_message("[src] begins repairing the floor.") sleep(50) @@ -338,7 +343,7 @@ if(replacetiles && F.type != initial(tiletype.turf_type) && specialtiles && !isplatingturf(F)) anchored = TRUE - icon_state = "floorbot-c" + icon_state = "[toolbox_color]floorbot-c" mode = BOT_REPAIRING visible_message("[src] begins replacing the floor tiles.") sleep(50) @@ -355,7 +360,7 @@ target = null /mob/living/simple_animal/bot/floorbot/update_icon() - icon_state = "floorbot[on]" + icon_state = "[toolbox_color]floorbot-c" /mob/living/simple_animal/bot/floorbot/explode() diff --git a/icons/mob/aibots.dmi b/icons/mob/aibots.dmi index 3dd431a2..bc3e3a85 100644 Binary files a/icons/mob/aibots.dmi and b/icons/mob/aibots.dmi differ