diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 05cb1cb48a4..93d94664d08 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -176,6 +176,48 @@ return 1 return 0 +/obj/item/mecha_parts/mecha_equipment/tool/mining_scanner + name = "exosuit mining scanner" + desc = "Equipment for engineering and combat exosuits. It will automatically check surrounding rock for useful minerals." + icon_state = "mecha_analyzer" + origin_tech = "materials=3;engineering=2" + equip_cooldown = 30 + var/scanning = 0 + +/obj/item/mecha_parts/mecha_equipment/tool/mining_scanner/New() + SSobj.processing |= src + +/obj/item/mecha_parts/mecha_equipment/tool/mining_scanner/process() + if(!loc) + SSobj.processing.Remove(src) + qdel(src) + if(scanning) + return + if(istype(loc,/obj/mecha/working)) + var/obj/mecha/working/mecha = loc + if(!mecha.occupant) + return + var/mob/occupant = mecha.occupant + + scanning = 1 + var/turf/t = get_turf(src) + var/list/L = list() + var/turf/simulated/mineral/M + for(M in range(7, t)) + if(M.scan_state) + L += M + if(L.len) + if(occupant.client) + for(M in L) + var/turf/T = get_turf(M) + var/image/I = image('icons/turf/mining.dmi', loc = T, icon_state = M.scan_state, layer = 18) + occupant.client.images += I + spawn(30) + if(occupant.client) + occupant.client.images -= I + spawn(equip_cooldown) + scanning = 0 + /obj/item/mecha_parts/mecha_equipment/tool/extinguisher name = "exosuit extinguisher" desc = "Equipment for engineering exosuits. A rapid-firing high capacity fire extinguisher." diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm index 73eab21ea2e..9a7f96b1c29 100644 --- a/code/modules/research/designs/mechfabricator_designs.dm +++ b/code/modules/research/designs/mechfabricator_designs.dm @@ -504,6 +504,15 @@ construction_time = 100 category = list("Exosuit Equipment") +/datum/design/mech_mining_scanner + name = "Exosuit Engineering Equipement (Mining Scanner)" + id = "mech_mscanner" + build_type = MECHFAB + build_path = /obj/item/mecha_parts/mecha_equipment/tool/mining_scanner + materials = list("$metal"=5000,"$glass"=2500) + construction_time = 50 + category = list("Exosuit Equipment") + /datum/design/mech_extinguisher name = "Exosuit Engineering Equipement (Extinguisher)" id = "mech_extinguisher" diff --git a/icons/mecha/mecha_equipment.dmi b/icons/mecha/mecha_equipment.dmi index 96687396a37..930d0685de4 100644 Binary files a/icons/mecha/mecha_equipment.dmi and b/icons/mecha/mecha_equipment.dmi differ