#define PAINT_MODE -2 #define EATING_MODE -1 #define ATMOS_MODE 0 #define DISPOSALS_MODE 1 #define TRANSIT_MODE 2 /obj/item/weapon/pipe_dispenser name = "Rapid Piping Device (RPD)" desc = "A device used to rapidly pipe things." icon = 'icons/obj/tools_vr.dmi' icon_state = "rpd" item_state = "rpd" item_icons = list( slot_l_hand_str = 'icons/mob/items/lefthand_vr.dmi', slot_r_hand_str = 'icons/mob/items/righthand_vr.dmi', ) flags = NOBLUDGEON force = 10 throwforce = 10 throw_speed = 1 throw_range = 5 w_class = ITEMSIZE_NORMAL matter = list(MAT_STEEL = 50000, MAT_GLASS = 25000) var/datum/effect/effect/system/spark_spread/spark_system var/mode = ATMOS_MODE var/p_dir = NORTH // Next pipe will be built with this dir var/p_flipped = FALSE // If the next pipe should be built flipped var/paint_color = "grey" // Pipe color index for next pipe painted/built. var/screen = ATMOS_MODE // Starts on the atmos tab. var/piping_layer = PIPING_LAYER_DEFAULT var/wrench_mode = FALSE var/obj/item/weapon/tool/wrench/tool var/datum/pipe_recipe/recipe = null // pipe recipie selected for display/construction var/static/datum/pipe_recipe/first_atmos var/static/datum/pipe_recipe/first_disposal var/static/datum/asset/iconsheet/pipes/icon_assets var/static/list/pipe_layers = list( "Regular" = PIPING_LAYER_REGULAR, "Supply" = PIPING_LAYER_SUPPLY, "Scrubber" = PIPING_LAYER_SCRUBBER, "Fuel" = PIPING_LAYER_FUEL, "Aux" = PIPING_LAYER_AUX ) /obj/item/weapon/pipe_dispenser/Initialize() . = ..() src.spark_system = new /datum/effect/effect/system/spark_spread spark_system.set_up(5, 0, src) spark_system.attach(src) tool = new /obj/item/weapon/tool/wrench/cyborg(src) // RPDs have wrenches inside of them, so that they can wrench down spawned pipes without being used as superior wrenches themselves. /obj/item/weapon/pipe_dispenser/proc/SetupPipes() if(!first_atmos) first_atmos = atmos_pipe_recipes[atmos_pipe_recipes[1]][1] recipe = first_atmos if(!first_disposal) first_disposal = disposal_pipe_recipes[disposal_pipe_recipes[1]][1] recipe = first_disposal if(recipe == null) recipe = atmos_pipe_recipes[atmos_pipe_recipes[1]][1] /obj/item/weapon/pipe_dispenser/Destroy() qdel_null(spark_system) qdel_null(tool) return ..() /obj/item/weapon/pipe_dispenser/suicide_act(mob/user) var/datum/gender/TU = gender_datums[user.get_visible_gender()] user.visible_message("[user] points the end of the RPD down [TU.his] throat and presses a button! It looks like [TU.hes] trying to commit suicide...") playsound(src, 'sound/machines/click.ogg', 50, 1) playsound(src, 'sound/items/deconstruct.ogg', 50, 1) return(BRUTELOSS) /obj/item/weapon/pipe_dispenser/attack_self(mob/user) src.interact(user) // TODO - Wouldn't it be nice to have nanoui? /obj/item/weapon/pipe_dispenser/interact(mob/user) SetupPipes() if(!icon_assets) icon_assets = get_asset_datum(/datum/asset/iconsheet/pipes) icon_assets.send(user) var/list/lines = list() if(mode >= ATMOS_MODE) lines += "