//Science modules for MODsuits ///Reagent Scanner - Lets the user scan reagents. /obj/item/mod/module/reagent_scanner name = "MOD reagent scanner module" desc = "A module based off research-oriented Nanotrasen HUDs, this is capable of scanning the contents of \ containers and projecting the information in an easy-to-read format on the wearer's display. \ It cannot detect flavors, so that's up to you." icon_state = "scanner" module_type = MODULE_TOGGLE complexity = 1 active_power_cost = DEFAULT_CHARGE_DRAIN * 0.2 incompatible_modules = list(/obj/item/mod/module/reagent_scanner) cooldown_time = 0.5 SECONDS /obj/item/mod/module/reagent_scanner/on_activation() . = ..() if(!.) return mod.helmet.scan_reagents = TRUE /obj/item/mod/module/reagent_scanner/on_deactivation(display_message = TRUE, deleting = FALSE) . = ..() if(!.) return mod.helmet.scan_reagents = FALSE /obj/item/mod/module/reagent_scanner/advanced name = "MOD advanced reagent scanner module" complexity = 0 removable = FALSE var/explosion_detection_dist = 21 /obj/item/mod/module/reagent_scanner/advanced/on_activation() . = ..() if(!.) return GLOB.doppler_arrays += src /obj/item/mod/module/reagent_scanner/advanced/on_deactivation(display_message = TRUE, deleting = FALSE) . = ..() if(!.) return GLOB.doppler_arrays -= src /obj/item/mod/module/reagent_scanner/advanced/proc/sense_explosion(x0, y0, z0, devastation_range, heavy_impact_range, light_impact_range, took, orig_dev_range, orig_heavy_range, orig_light_range) var/turf/T = get_turf(src) var/dx = abs(x0 - T.x) var/dy = abs(y0 - T.y) var/distance if(T.z != z0) return if(dx > dy) distance = dx else distance = dy if(distance > explosion_detection_dist) return to_chat(mod.wearer, "Explosion detected! Epicenter: [devastation_range], Outer: [heavy_impact_range], Shock: [light_impact_range]") ///Teleporter - Lets the user teleport to a nearby location. /obj/item/mod/module/anomaly_locked/teleporter name = "MOD teleporter module" desc = "A module that uses a bluespace core to let the user transport their particles elsewhere." icon_state = "teleporter" module_type = MODULE_ACTIVE complexity = 3 use_power_cost = DEFAULT_CHARGE_DRAIN * 5 cooldown_time = 5 SECONDS accepted_anomalies = list(/obj/item/assembly/signaler/anomaly/bluespace) /// Time it takes to teleport var/teleport_time = 1.25 SECONDS //This is a bluespace core this should be fast, like you can get a phazon with this man, we don't have anomaly refining either /obj/item/mod/module/anomaly_locked/teleporter/on_select_use(atom/target) . = ..() if(!.) return var/turf/target_turf = get_turf(target) if(!istype(target_turf) || target_turf.density || !(target_turf in view(9, mod.wearer))) //No. No camera bug shenanigins. return var/matrix/pre_matrix = matrix() pre_matrix.Scale(4, 0.25) var/matrix/post_matrix = matrix() post_matrix.Scale(0.25, 4) animate(mod.wearer, teleport_time, color = COLOR_CYAN, transform = pre_matrix.Multiply(mod.wearer.transform), easing = SINE_EASING|EASE_OUT) if(!do_after(mod.wearer, teleport_time, target = mod.wearer)) animate(mod.wearer, teleport_time * 0.1, color = null, transform = post_matrix.Multiply(mod.wearer.transform), easing = SINE_EASING|EASE_IN) return animate(mod.wearer, teleport_time * 0.1, color = null, transform = post_matrix.Multiply(mod.wearer.transform), easing = SINE_EASING|EASE_IN) if(!do_teleport(mod.wearer, target_turf, sound_in = 'sound/effects/phasein.ogg')) return drain_power(use_power_cost) /obj/item/mod/module/anomaly_locked/teleporter/prebuilt prebuilt = TRUE