diff --git a/code/ZAS/Phoron.dm b/code/ZAS/Phoron.dm index 0f39ab4b568..b7ab1999f03 100644 --- a/code/ZAS/Phoron.dm +++ b/code/ZAS/Phoron.dm @@ -40,15 +40,11 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi') obj/var/contaminated = 0 -obj/var/phoronproof = 0 - /obj/item/proc/can_contaminate() //Clothing and backpacks can be contaminated. if(flags & PHORONGUARD) return 0 - else if(phoronproof == 1) - return 0 else if(istype(src,/obj/item/weapon/storage/backpack)) return 0 //Cannot be washed :( else if(istype(src,/obj/item/clothing)) @@ -148,7 +144,7 @@ obj/var/phoronproof = 0 //Checks if the head is adequately sealed. //This is just odd. TODO: Make this respect the body_parts_covered stuff like thermal gear does. if(head) if(vsc.plc.PHORONGUARD_ONLY) - if(head.flags & PHORONGUARD || head.phoronproof) + if(head.flags & PHORONGUARD) return 1 else if(head.body_parts_covered & EYES) return 1 @@ -160,7 +156,7 @@ obj/var/phoronproof = 0 for(var/obj/item/protection in list(wear_suit, gloves, shoes)) //This is why it's odd. If I'm in a full suit, but my shoes and gloves aren't phoron proof, damage. if(!protection) continue - if(vsc.plc.PHORONGUARD_ONLY && !(protection.flags & PHORONGUARD) && !protection.phoronproof) + if(vsc.plc.PHORONGUARD_ONLY && !(protection.flags & PHORONGUARD)) return 0 coverage |= protection.body_parts_covered diff --git a/code/game/objects/items/devices/communicator/UI.dm b/code/game/objects/items/devices/communicator/UI.dm index fca4cf4866d..d414232a80f 100644 --- a/code/game/objects/items/devices/communicator/UI.dm +++ b/code/game/objects/items/devices/communicator/UI.dm @@ -14,7 +14,6 @@ var/im_list_ui[0] //List of messages. var/weather[0] - var/injection = null var/modules_ui[0] //Home screen info. //First we add other 'local' communicators. @@ -77,15 +76,19 @@ "Weather" = planet.weather_holder.current_weather.name, "Temperature" = planet.weather_holder.temperature - T0C, "High" = planet.weather_holder.current_weather.temp_high - T0C, - "Low" = planet.weather_holder.current_weather.temp_low - T0C) + "Low" = planet.weather_holder.current_weather.temp_low - T0C, + "Forecast" = english_list(planet.weather_holder.forecast, and_text = "→", comma_text = "→", final_comma_text = "→") // Unicode RIGHTWARDS ARROW. + ) weather[++weather.len] = W - injection = "
Test
" + // Update manifest + data_core.get_manifest_list() //Modules for homescreen. for(var/list/R in modules) modules_ui[++modules_ui.len] = R + data["user"] = "\ref[user]" // For receiving input() via topic, because input(usr,...) wasn't working on cartridges data["owner"] = owner ? owner : "Unset" data["occupation"] = occupation ? occupation : "Swipe ID to set." data["connectionStatus"] = get_connection_to_tcomms() @@ -109,16 +112,29 @@ data["weather"] = weather data["aircontents"] = src.analyze_air() data["flashlight"] = fon - data["injection"] = injection + data["manifest"] = PDA_Manifest + data["feeds"] = compile_news() + data["latest_news"] = get_recent_news() + if(cartridge) // If there's a cartridge, we need to grab the information from it + data["cart_devices"] = cartridge.get_device_status() + data["cart_templates"] = cartridge.ui_templates + for(var/list/L in cartridge.get_data()) + data[L["field"]] = L["value"] + // cartridge.get_data() returns a list of tuples: + // The field element is the tag used to access the information by the template + // The value element is the actual data, and can take any form necessary for the template // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "communicator.tmpl", "Communicator", 475, 700, state = key_state) + data["currentTab"] = 1 // Reset the current tab, because we're going to home page + ui = new(user, src, ui_key, "communicator_header.tmpl", "Communicator", 475, 700, state = key_state) // add templates for screens in common with communicator. ui.add_template("atmosphericScan", "atmospheric_scan.tmpl") + ui.add_template("crewManifest", "crew_manifest.tmpl") + ui.add_template("Body", "communicator.tmpl") // Main body // when the ui is first opened this is the data it will use ui.set_initial_data(data) // open the new ui window @@ -166,7 +182,7 @@ if(href_list["dial"]) if(!get_connection_to_tcomms()) - usr << "Error: Cannot connect to Exonet node." + to_chat(usr, "Error: Cannot connect to Exonet node.") return var/their_address = href_list["dial"] exonet.send_message(their_address, "voice") @@ -179,7 +195,7 @@ if(href_list["message"]) if(!get_connection_to_tcomms()) - usr << "Error: Cannot connect to Exonet node." + to_chat(usr, "Error: Cannot connect to Exonet node.") return var/their_address = href_list["message"] var/text = sanitizeSafe(input(usr,"Enter your message.","Text Message")) @@ -244,9 +260,21 @@ note = "" notehtml = note + if(href_list["switch_template"]) + var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(usr, src, "main") + if(ui) + ui.add_template("Body", href_list["switch_template"]) + if(href_list["Light"]) fon = !fon set_light(fon * flum) - nanomanager.update_uis(src) + if(href_list["toggle_device"]) + var/obj/O = cartridge.internal_devices[text2num(href_list["toggle_device"])] + cartridge.active_devices ^= list(O) // Exclusive or, will toggle its presence + + if(href_list["cartridge_topic"] && cartridge) // Has to have a cartridge to perform these functions + cartridge.Topic(href, href_list) + + GLOB.nanomanager.update_uis(src) add_fingerprint(usr) diff --git a/code/game/objects/items/devices/defib.dm b/code/game/objects/items/devices/defib.dm index af9d697d63c..1ddfa04bf01 100644 --- a/code/game/objects/items/devices/defib.dm +++ b/code/game/objects/items/devices/defib.dm @@ -32,8 +32,8 @@ /obj/item/device/defib_kit/Destroy() . = ..() - qdel_null(paddles) - qdel_null(bcell) + QDEL_NULL(paddles) + QDEL_NULL(bcell) /obj/item/device/defib_kit/loaded //starts with a cell bcell = /obj/item/weapon/cell/apc @@ -94,7 +94,7 @@ to_chat(user, "You install a cell in \the [src].") update_icon() - else if(isscrewdriver(W)) + else if(W.is_screwdriver()) if(bcell) bcell.update_icon() bcell.forceMove(get_turf(src.loc)) diff --git a/code/game/objects/items/devices/gps.dm b/code/game/objects/items/devices/gps.dm index 78f385a8aa5..c62cb541cec 100644 --- a/code/game/objects/items/devices/gps.dm +++ b/code/game/objects/items/devices/gps.dm @@ -68,6 +68,55 @@ var/list/GPS_list = list() /obj/item/device/gps/attack_self(mob/user) display(user) + // Compiles all the data not available directly from the GPS + // Like the positions and directions to all other GPS units +/obj/item/device/gps/proc/display_list() + var/list/dat = list() + + var/turf/curr = get_turf(src) + var/area/my_area = get_area(src) + + dat["my_area_name"] = my_area.name + dat["curr_x"] = curr.x + dat["curr_y"] = curr.y + dat["curr_z"] = curr.z + dat["curr_z_name"] = using_map.get_zlevel_name(curr.z) + dat["gps_list"] = list() + dat["z_level_detection"] = using_map.get_map_levels(curr.z, long_range) + + for(var/obj/item/device/gps/G in GPS_list - src) + if(!G.tracking || G.emped || G.hide_signal) + continue + + var/turf/T = get_turf(G) + if(local_mode && curr.z != T.z) + continue + if(!(T.z in dat["z_level_detection"])) + continue + + var/gps_data[0] + gps_data["ref"] = G + gps_data["gps_tag"] = G.gps_tag + + var/area/A = get_area(G) + gps_data["area_name"] = A.name + if(istype(A, /area/submap)) + gps_data["area_name"] = "Unknown Area" // Avoid spoilers. + + gps_data["z_name"] = using_map.get_zlevel_name(T.z) + gps_data["direction"] = get_adir(curr, T) + gps_data["degrees"] = round(Get_Angle(curr,T)) + gps_data["distX"] = T.x - curr.x + gps_data["distY"] = T.y - curr.y + gps_data["distance"] = get_dist(curr, T) + gps_data["local"] = (curr.z == T.z) + gps_data["x"] = T.x + gps_data["y"] = T.y + + dat["gps_list"][++dat["gps_list"].len] = gps_data + + return dat + /obj/item/device/gps/proc/display(mob/user) if(!tracking) to_chat(user, "The device is off. Alt-click it to turn it on.") @@ -77,48 +126,20 @@ var/list/GPS_list = list() return var/list/dat = list() + var/list/gps_data = display_list() - var/turf/curr = get_turf(src) - var/area/my_area = get_area(src) - dat += "Current location: [my_area.name] ([curr.x], [curr.y], [using_map.get_zlevel_name(curr.z)])" + dat += "Current location: [gps_data["my_area_name"]] ([gps_data["curr_x"]], [gps_data["curr_y"]], [gps_data["curr_z_name"]])" dat += "[hide_signal ? "Tagged" : "Broadcasting"] as '[gps_tag]'. \[Change Tag\] \ \[Toggle Scan Range\] \ [can_hide_signal ? "\[Toggle Signal Visibility\]":""]" - var/list/signals = list() - - for(var/gps in GPS_list) - var/obj/item/device/gps/G = gps - if(G.emped || !G.tracking || G.hide_signal || G == src) // Their GPS isn't on or functional. - continue - var/turf/T = get_turf(G) - var/z_level_detection = using_map.get_map_levels(curr.z, long_range) - - if(local_mode && T.z != curr.z) // Only care about the current z-level. - continue - else if(!(T.z in z_level_detection)) // Too far away. - continue - - var/area/their_area = get_area(G) - var/area_name = their_area.name - if(istype(their_area, /area/submap)) - area_name = "Unknown Area" // Avoid spoilers. - var/Z_name = using_map.get_zlevel_name(T.z) - var/direction = get_adir(curr, T) - var/distX = T.x - curr.x - var/distY = T.y - curr.y - var/distance = get_dist(curr, T) - var/local = curr.z == T.z ? TRUE : FALSE - - if(istype(gps, /obj/item/device/gps/internal/poi)) - signals += " [G.gps_tag]: [area_name] - [local ? "[direction] Dist: [round(distance, 10)]m" : "in \the [Z_name]"]" - else - signals += " [G.gps_tag]: [area_name], ([T.x], [T.y]) - [local ? "[direction] Dist: [distX ? "[abs(round(distX, 1))]m [(distX > 0) ? "E" : "W"], " : ""][distY ? "[abs(round(distY, 1))]m [(distY > 0) ? "N" : "S"]" : ""]" : "in \the [Z_name]"]" - - if(signals.len) + if(gps_data["gps_list"].len) dat += "Detected signals;" - for(var/line in signals) - dat += line + for(var/gps in gps_data["gps_list"]) + if(istype(gps_data["ref"], /obj/item/device/gps/internal/poi)) + dat += " [gps["gps_tag"]]: [gps["area_name"]] - [gps["local"] ? "[gps["direction"]] Dist: [round(gps["distance"], 10)]m" : "in \the [gps["z_name"]]"]" + else + dat += " [gps["gps_tag"]]: [gps["area_name"]], ([gps["x"]], [gps["y"]]) - [gps["local"] ? "[gps["direction"]] Dist: [gps["distX"] ? "[abs(round(gps["distX"], 1))]m [(gps["distX"] > 0) ? "E" : "W"], " : ""][gps["distY"] ? "[abs(round(gps["distY"], 1))]m [(gps["distY"] > 0) ? "N" : "S"]" : ""]" : "in \the [gps["z_name"]]"]" else dat += "No other signals detected." @@ -221,45 +242,17 @@ var/list/GPS_list = list() return var/list/dat = list() + var/list/gps_data = display_list() - var/turf/curr = get_turf(src) - var/area/my_area = get_area(src) - dat += "Current location: [my_area.name] ([curr.x], [curr.y], [using_map.get_zlevel_name(curr.z)])" + dat += "Current location: [gps_data["my_area_name"]] ([gps_data["curr_x"]], [gps_data["curr_y"]], [gps_data["curr_z_name"]])" dat += "[hide_signal ? "Tagged" : "Broadcasting"] as '[gps_tag]'. \[Change Tag\] \ \[Toggle Scan Range\] \ [can_hide_signal ? "\[Toggle Signal Visibility\]":""]" - var/list/signals = list() - - for(var/gps in GPS_list) - var/obj/item/device/gps/G = gps - if(G.emped || !G.tracking || G.hide_signal || G == src) // Their GPS isn't on or functional. - continue - var/turf/T = get_turf(G) - var/z_level_detection = using_map.get_map_levels(curr.z, long_range) - - if(local_mode && T.z != curr.z) // Only care about the current z-level. - continue - else if(!(T.z in z_level_detection)) // Too far away. - continue - - var/area/their_area = get_area(G) - var/area_name = their_area.name - if(istype(their_area, /area/submap)) - area_name = "Unknown Area" // Avoid spoilers. - var/Z_name = using_map.get_zlevel_name(T.z) - var/coord = "[T.x], [T.y], [Z_name]" - var/degrees = round(Get_Angle(curr, T)) - var/direction = get_adir(curr, T) - var/distance = get_dist(curr, T) - var/local = curr.z == T.z ? TRUE : FALSE - - signals += " [G.gps_tag]: [area_name] ([coord]) [local ? "Dist: [distance]m Dir: [degrees]° ([direction])":""]" - - if(signals.len) + if(gps_data["gps_list"].len) dat += "Detected signals;" - for(var/line in signals) - dat += line + for(var/gps in gps_data["gps_list"]) + dat += " [gps["gps_tag"]]: [gps["area_name"]] ([gps["x"]], [gps["y"]], [gps["z_name"]]) [gps["local"] ? "Dist: [gps["distance"]]m Dir: [gps["degrees"]]° ([gps["direction"]])" :""]" else dat += "No other signals detected." diff --git a/code/game/objects/items/devices/hacktool.dm b/code/game/objects/items/devices/hacktool.dm index f03f2486edc..971e14e6c00 100644 --- a/code/game/objects/items/devices/hacktool.dm +++ b/code/game/objects/items/devices/hacktool.dm @@ -24,7 +24,7 @@ return ..() /obj/item/device/multitool/hacktool/attackby(var/obj/item/W, var/mob/user) - if(isscrewdriver(W)) + if(W.is_screwdriver()) in_hack_mode = !in_hack_mode playsound(src.loc, W.usesound, 50, 1) else @@ -62,7 +62,7 @@ if(hack_result && in_hack_mode) user << "Your hacking attempt was succesful!" - user.playsound_local(get_turf(src), 'sound/piano/A#6.ogg', 50) + user.playsound_local(get_turf(src), 'sound/instruments/piano/An6.ogg', 50) else user << "Your hacking attempt failed!" return 0 diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 69905f0cb8a..343a58ce1a2 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -54,7 +54,7 @@ else to_chat(user, "[src] already has a diode.") - else if(istype(W, /obj/item/weapon/screwdriver)) + else if(W.is_screwdriver()) if(diode) to_chat(user, "You remove the [diode.name] from the [src].") diode.loc = get_turf(src.loc) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index fc3c03518ba..9c9f1aba598 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -91,12 +91,12 @@ to_chat(user, "You re-scramble \the [src]'s voice synthesizer.") return 1 -/obj/item/device/megaphone/super/verb/turn_volume_dial(mob/living/user) +/obj/item/device/megaphone/super/verb/turn_volume_dial() set name = "Change Volume" set desc = "Allows you to change the megaphone's volume." set category = "Object" - adjust_volume(user) + adjust_volume(usr) /obj/item/device/megaphone/super/proc/adjust_volume(var/mob/living/user) var/new_volume = input(user, "Set Volume") as null|anything in volume_options @@ -104,12 +104,12 @@ if(new_volume && Adjacent(user)) broadcast_size = new_volume -/obj/item/device/megaphone/super/verb/change_font(mob/living/user) +/obj/item/device/megaphone/super/verb/change_font() set name = "Change... Pronunciation?" set desc = "Allows you to change the megaphone's font." set category = "Object" - adjust_font(user) + adjust_font(usr) /obj/item/device/megaphone/super/proc/adjust_font(var/mob/living/user) var/new_font = input(user, "Set Volume") as null|anything in font_options @@ -117,12 +117,12 @@ if(new_font && Adjacent(user)) broadcast_font = new_font -/obj/item/device/megaphone/super/verb/change_color(mob/living/user) +/obj/item/device/megaphone/super/verb/change_color() set name = "Change... Tune?" set desc = "Allows you to change the megaphone's color." set category = "Object" - adjust_color(user) + adjust_color(usr) /obj/item/device/megaphone/super/proc/adjust_color(var/mob/living/user) var/new_color = input(user, "Set Volume") as null|anything in color_options diff --git a/code/game/objects/items/paintkit.dm b/code/game/objects/items/paintkit.dm index 11128a88282..8bc829d74b4 100644 --- a/code/game/objects/items/paintkit.dm +++ b/code/game/objects/items/paintkit.dm @@ -149,6 +149,52 @@ return return ..() +/obj/item/device/kit/suit/rig + name = "rig modification kit" + desc = "A kit for modifying a rigsuit." + uses = 1 + +/obj/item/device/kit/suit/rig/customize(var/obj/item/I, var/mob/user) + var/obj/item/weapon/rig/RIG = I + RIG.suit_state = new_icon + RIG.suit_type = "customized [initial(RIG.suit_type)]" + RIG.name = "[new_name]" + RIG.desc = new_desc + RIG.icon = new_icon_file + RIG.icon_state = new_icon + RIG.icon_override = new_icon_override_file + for(var/obj/item/piece in list(RIG.gloves,RIG.helmet,RIG.boots,RIG.chest)) + if(!istype(piece)) + continue + piece.name = "[RIG.suit_type] [initial(piece.name)]" + piece.desc = "It seems to be part of a [RIG.name]." + piece.icon_state = "[RIG.suit_state]" + if(istype(piece, /obj/item/clothing/shoes)) + icon = 'icons/mob/custom_items_rig_boots.dmi' + icon_override = 'icons/mob/custom_items_rig_boots.dmi' + if(istype(piece, /obj/item/clothing/suit)) + icon = 'icons/mob/custom_items_rig_suit.dmi' + icon_override = 'icons/mob/custom_items_rig_suit.dmi' + if(istype(piece, /obj/item/clothing/head)) + icon = 'icons/mob/custom_items_rig_helmet.dmi' + icon_override = 'icons/mob/custom_items_rig_helmet.dmi' + if(istype(piece, /obj/item/clothing/gloves)) + icon = 'icons/mob/custom_items_rig_gloves.dmi' + icon_override = 'icons/mob/custom_items_rig_gloves.dmi' + if(RIG.helmet && istype(RIG.helmet, /obj/item/clothing/head/helmet) && new_light_overlay) + var/obj/item/clothing/head/helmet/H = RIG.helmet + H.light_overlay = new_light_overlay + use(1,user) + +/obj/item/device/kit/suit/rig/can_customize(var/obj/item/I) + return istype(I, /obj/item/weapon/rig) + +/obj/item/weapon/rig/attackby(var/obj/item/O, var/mob/user) + if(istype(O,/obj/item/device/kit/suit)) + var/obj/item/device/kit/suit/rig/kit = O + kit.customize(src, user) + return + return ..() /obj/item/device/kit/paint name = "mecha customisation kit" diff --git a/code/game/objects/items/poi_items.dm b/code/game/objects/items/poi_items.dm index 394212e4c48..af1b6c9c7aa 100644 --- a/code/game/objects/items/poi_items.dm +++ b/code/game/objects/items/poi_items.dm @@ -54,7 +54,7 @@ name = "SCP" /obj/structure/largecrate/animal/crashedshuttle/initialize() - starts_with = pick(/mob/living/simple_animal/hostile/statue, /obj/item/cursed_marble, /obj/item/weapon/deadringer) + starts_with = list(pick(/mob/living/simple_animal/hostile/statue, /obj/item/cursed_marble, /obj/item/weapon/deadringer)) // Starts_with has to be a list name = pick("Spicy Crust Pizzeria", "Soap and Care Products", "Sally's Computer Parts", "Steve's Chocolate Pastries", "Smith & Christian's Plastics","Standard Containers & Packaging Co.", "Sanitary Chemical Purgation (LTD)") name += " delivery crate" return ..() diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 42bdd5c2955..480af44631b 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -887,6 +887,7 @@ icon_state = "nymphplushie" w_class = ITEMSIZE_TINY var/last_message = 0 + var/pokephrase = "Uww!" /obj/item/toy/plushie/attack_self(mob/user as mob) if(world.time - last_message <= 1 SECOND) @@ -899,6 +900,7 @@ user.visible_message("\The [user] attempts to strangle [src]!","You attempt to strangle [src]!") else user.visible_message("\The [user] pokes [src].","You poke [src].") + visible_message("[src] says, \"[pokephrase]\"") last_message = world.time /obj/item/toy/plushie/verb/rename_plushie() @@ -926,121 +928,199 @@ name = "diona nymph plush" desc = "A plushie of an adorable diona nymph! While its level of self-awareness is still being debated, its level of cuteness is not." icon_state = "nymphplushie" + pokephrase = "Chirp!" /obj/item/toy/plushie/mouse name = "mouse plush" desc = "A plushie of a delightful mouse! What was once considered a vile rodent is now your very best friend." icon_state = "mouseplushie" + pokephrase = "Squeak!" /obj/item/toy/plushie/kitten name = "kitten plush" desc = "A plushie of a cute kitten! Watch as it purrs its way right into your heart." icon_state = "kittenplushie" + pokephrase = "Mrow!" /obj/item/toy/plushie/lizard name = "lizard plush" desc = "A plushie of a scaly lizard! Very controversial, after being accused as \"racist\" by some Unathi." icon_state = "lizardplushie" + pokephrase = "Hiss!" /obj/item/toy/plushie/spider name = "spider plush" desc = "A plushie of a fuzzy spider! It has eight legs - all the better to hug you with." icon_state = "spiderplushie" + pokephrase = "Sksksk!" /obj/item/toy/plushie/farwa name = "farwa plush" desc = "A farwa plush doll. It's soft and comforting!" icon_state = "farwaplushie" + pokephrase = "Squaw!" /obj/item/toy/plushie/corgi name = "corgi plushie" icon_state = "corgi" + pokephrase = "Woof!" /obj/item/toy/plushie/girly_corgi name = "corgi plushie" icon_state = "girlycorgi" + pokephrase = "Arf!" /obj/item/toy/plushie/robo_corgi name = "borgi plushie" icon_state = "robotcorgi" + pokephrase = "Bark." /obj/item/toy/plushie/octopus name = "octopus plushie" icon_state = "loveable" + pokephrase = "Squish!" /obj/item/toy/plushie/face_hugger name = "facehugger plushie" icon_state = "huggable" + pokephrase = "Hug!" //foxes are basically the best /obj/item/toy/plushie/red_fox name = "red fox plushie" icon_state = "redfox" + pokephrase = "Gecker!" /obj/item/toy/plushie/black_fox name = "black fox plushie" icon_state = "blackfox" + pokephrase = "Ack!" /obj/item/toy/plushie/marble_fox name = "marble fox plushie" icon_state = "marblefox" + pokephrase = "Awoo!" /obj/item/toy/plushie/blue_fox name = "blue fox plushie" icon_state = "bluefox" + pokephrase = "Yoww!" /obj/item/toy/plushie/orange_fox name = "orange fox plushie" icon_state = "orangefox" + pokephrase = "Yagh!" /obj/item/toy/plushie/coffee_fox name = "coffee fox plushie" icon_state = "coffeefox" + pokephrase = "Gerr!" /obj/item/toy/plushie/pink_fox name = "pink fox plushie" icon_state = "pinkfox" + pokephrase = "Yack!" /obj/item/toy/plushie/purple_fox name = "purple fox plushie" icon_state = "purplefox" + pokephrase = "Whine!" /obj/item/toy/plushie/crimson_fox name = "crimson fox plushie" icon_state = "crimsonfox" + pokephrase = "Auuu!" /obj/item/toy/plushie/deer name = "deer plushie" icon_state = "deer" + pokephrase = "Bleat!" /obj/item/toy/plushie/black_cat name = "black cat plushie" icon_state = "blackcat" + pokephrase = "Mlem!" /obj/item/toy/plushie/grey_cat name = "grey cat plushie" icon_state = "greycat" + pokephrase = "Mraw!" /obj/item/toy/plushie/white_cat name = "white cat plushie" icon_state = "whitecat" + pokephrase = "Mew!" /obj/item/toy/plushie/orange_cat name = "orange cat plushie" icon_state = "orangecat" + pokephrase = "Meow!" /obj/item/toy/plushie/siamese_cat name = "siamese cat plushie" icon_state = "siamesecat" + pokephrase = "Mrew?" /obj/item/toy/plushie/tabby_cat name = "tabby cat plushie" icon_state = "tabbycat" + pokephrase = "Purr!" /obj/item/toy/plushie/tuxedo_cat name = "tuxedo cat plushie" icon_state = "tuxedocat" + pokephrase = "Mrowww!!" + +// nah, squids are better than foxes :> + +/obj/item/toy/plushie/squid/green + name = "green squid plushie" + desc = "A small, cute and loveable squid friend. This one is green." + icon = 'icons/obj/toy.dmi' + icon_state = "greensquid" + slot_flags = SLOT_HEAD + pokephrase = "Squrr!" + +/obj/item/toy/plushie/squid/mint + name = "mint squid plushie" + desc = "A small, cute and loveable squid friend. This one is mint coloured." + icon = 'icons/obj/toy.dmi' + icon_state = "mintsquid" + slot_flags = SLOT_HEAD + pokephrase = "Blurble!" + +/obj/item/toy/plushie/squid/blue + name = "blue squid plushie" + desc = "A small, cute and loveable squid friend. This one is blue." + icon = 'icons/obj/toy.dmi' + icon_state = "bluesquid" + slot_flags = SLOT_HEAD + pokephrase = "Blob!" + +/obj/item/toy/plushie/squid/orange + name = "orange squid plushie" + desc = "A small, cute and loveable squid friend. This one is orange." + icon = 'icons/obj/toy.dmi' + icon_state = "orangesquid" + slot_flags = SLOT_HEAD + pokephrase = "Squash!" + +/obj/item/toy/plushie/squid/yellow + name = "yellow squid plushie" + desc = "A small, cute and loveable squid friend. This one is yellow." + icon = 'icons/obj/toy.dmi' + icon_state = "yellowsquid" + slot_flags = SLOT_HEAD + pokephrase = "Glorble!" + +/obj/item/toy/plushie/squid/pink + name = "pink squid plushie" + desc = "A small, cute and loveable squid friend. This one is pink." + icon = 'icons/obj/toy.dmi' + icon_state = "pinksquid" + slot_flags = SLOT_HEAD + pokephrase = "Wobble!" /obj/item/toy/plushie/therapy/red name = "red therapy doll" @@ -1278,4 +1358,4 @@ icon_state = "tinyxmastree" w_class = ITEMSIZE_TINY force = 1 - throwforce = 1 + throwforce = 1 \ No newline at end of file diff --git a/code/game/objects/items/weapons/circuitboards/computer/computer.dm b/code/game/objects/items/weapons/circuitboards/computer/computer.dm index 71d6e2d8670..c15d73036ac 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/computer.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/computer.dm @@ -153,11 +153,6 @@ name = T_BOARD("disease splicer") build_path = /obj/machinery/computer/diseasesplicer -/obj/item/weapon/circuitboard/ordercomp - name = T_BOARD("supply ordering console") - build_path = /obj/machinery/computer/ordercomp - origin_tech = list(TECH_DATA = 2) - /obj/item/weapon/circuitboard/mining_shuttle name = T_BOARD("mining shuttle console") build_path = /obj/machinery/computer/shuttle_control/mining diff --git a/code/game/objects/items/weapons/circuitboards/computer/research.dm b/code/game/objects/items/weapons/circuitboards/computer/research.dm index fa9ed167971..791cd51cdca 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/research.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/research.dm @@ -7,15 +7,15 @@ build_path = /obj/machinery/computer/rdconsole/core /obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob) - if(istype(I,/obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) playsound(src, I.usesound, 50, 1) user.visible_message("\The [user] adjusts the jumper on \the [src]'s access protocol pins.", "You adjust the jumper on the access protocol pins.") if(build_path == /obj/machinery/computer/rdconsole/core) name = T_BOARD("RD Console - Robotics") build_path = /obj/machinery/computer/rdconsole/robotics - user << "Access protocols set to robotics." + to_chat(user, "Access protocols set to robotics.") else name = T_BOARD("RD Console") build_path = /obj/machinery/computer/rdconsole/core - user << "Access protocols set to default." + to_chat(user, "Access protocols set to default.") return \ No newline at end of file diff --git a/code/game/objects/items/weapons/circuitboards/computer/supply.dm b/code/game/objects/items/weapons/circuitboards/computer/supply.dm index 5924e19ac02..324f1c1a06b 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/supply.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/supply.dm @@ -3,11 +3,16 @@ #endif /obj/item/weapon/circuitboard/supplycomp - name = T_BOARD("supply control console") + name = T_BOARD("supply ordering console") build_path = /obj/machinery/computer/supplycomp - origin_tech = list(TECH_DATA = 3) + origin_tech = list(TECH_DATA = 2) var/contraband_enabled = 0 +/obj/item/weapon/circuitboard/supplycomp/control + name = T_BOARD("supply ordering console") + build_path = /obj/machinery/computer/supplycomp/control + origin_tech = list(TECH_DATA = 3) + /obj/item/weapon/circuitboard/supplycomp/construct(var/obj/machinery/computer/supplycomp/SC) if (..(SC)) SC.can_order_contraband = contraband_enabled diff --git a/code/game/objects/items/weapons/circuitboards/machinery/research.dm b/code/game/objects/items/weapons/circuitboards/machinery/research.dm index 31e0d9c063a..3fc0aa26ab9 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/research.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/research.dm @@ -12,17 +12,17 @@ obj/item/weapon/circuitboard/rdserver /obj/item/weapon/stock_parts/scanning_module = 1) obj/item/weapon/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob) - if(istype(I,/obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) playsound(src, I.usesound, 50, 1) user.visible_message("\The [user] adjusts the jumper on \the [src]'s access protocol pins.", "You adjust the jumper on the access protocol pins.") if(build_path == /obj/machinery/r_n_d/server/core) name = T_BOARD("RD Console - Robotics") build_path = /obj/machinery/r_n_d/server/robotics - user << "Access protocols set to robotics." + to_chat(user, "Access protocols set to robotics.") else name = T_BOARD("RD Console") build_path = /obj/machinery/r_n_d/server/core - user << "Access protocols set to default." + to_chat(user, "Access protocols set to default.") return /obj/item/weapon/circuitboard/destructive_analyzer diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 7276f0e1ffa..808fc8e0217 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -25,11 +25,11 @@ return ..() /obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user) - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) open_panel = !open_panel user << "You [open_panel ? "open" : "close"] the wire panel." playsound(src, I.usesound, 50, 1) - else if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler )) + else if(I.is_wirecutter() || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler )) wires.Interact(user) else ..() diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index 624e0fd22fb..af3a049be2d 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -27,9 +27,9 @@ /obj/item/weapon/flamethrower/Destroy() - qdel_null(weldtool) - qdel_null(igniter) - qdel_null(ptank) + QDEL_NULL(weldtool) + QDEL_NULL(igniter) + QDEL_NULL(ptank) . = ..() /obj/item/weapon/flamethrower/process() @@ -70,7 +70,7 @@ /obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob) if(user.stat || user.restrained() || user.lying) return - if(iswrench(W) && !status)//Taking this apart + if(W.is_wrench() && !status)//Taking this apart var/turf/T = get_turf(src) if(weldtool) weldtool.loc = T @@ -85,7 +85,7 @@ qdel(src) return - if(isscrewdriver(W) && igniter && !lit) + if(W.is_screwdriver() && igniter && !lit) status = !status user << "[igniter] is now [status ? "secured" : "unsecured"]!" update_icon() diff --git a/code/game/objects/items/weapons/grenades/projectile.dm b/code/game/objects/items/weapons/grenades/projectile.dm new file mode 100644 index 00000000000..05153df4fe9 --- /dev/null +++ b/code/game/objects/items/weapons/grenades/projectile.dm @@ -0,0 +1,75 @@ +/obj/item/weapon/grenade/shooter + name = "projectile grenade" // I have no idea what else to call this, but the base type should never be used + icon_state = "frggrenade" + item_state = "grenade" + + var/list/projectile_types = list(/obj/item/projectile/bullet/pistol/rubber) // What sorts of projectiles might we make? + + //The radius of the circle used to launch projectiles. Lower values mean less projectiles are used but if set too low gaps may appear in the spread pattern + var/spread_range = 7 + + loadable = FALSE + +/obj/item/weapon/grenade/shooter/detonate() + ..() + + var/turf/O = get_turf(src) + if(!O) + return + + src.launch_many_projectiles(O, spread_range, projectile_types) + + qdel(src) + + + +/obj/item/weapon/grenade/shooter/rubber + name = "rubber pellet grenade" + desc = "An anti-riot grenade that fires a cloud of rubber projectiles upon detonation." + projectile_types = list(/obj/item/projectile/bullet/pistol/rubber) + +// Exists mostly so I don't have to copy+paste the sprite vars to a billion things +/obj/item/weapon/grenade/shooter/energy + icon_state = "flashbang" + item_state = "flashbang" + spread_range = 3 // Because dear god + +/obj/item/weapon/grenade/shooter/energy/laser + name = "laser grenade" + desc = "A horrifically dangerous rave in a can." + projectile_types = list(/obj/item/projectile/beam/midlaser) + +/obj/item/weapon/grenade/shooter/energy/flash + name = "flash grenade" + desc = "A grenade that creates a large number of flashes upon detonation." + projectile_types = list(/obj/item/projectile/energy/flash) + +/obj/item/weapon/grenade/shooter/energy/tesla + name = "tesla grenade" + projectile_types = list(/obj/item/projectile/beam/chain_lightning/lesser) + + +// This is just fragmentate, but less specific. Don't know how to make either of them less awful, at the moment +/obj/proc/launch_many_projectiles(var/turf/T=get_turf(src), var/spreading_range = 5, var/list/projectiletypes=list(/obj/item/projectile/bullet/pistol/rubber)) + set waitfor = 0 + var/list/target_turfs = getcircle(T, spreading_range) + + for(var/turf/O in target_turfs) + sleep(0) + var/shot_type = pick(projectiletypes) + + var/obj/item/projectile/P = new shot_type(T) + P.shot_from = src.name + + P.launch(O) + + //Make sure to hit any mobs in the source turf + for(var/mob/living/M in T) + //lying on a frag grenade while the grenade is on the ground causes you to absorb most of the shrapnel. + //you will most likely be dead, but others nearby will be spared the fragments that hit you instead. + if(M.lying && isturf(src.loc)) + P.attack_mob(M, 0, 5) + else if(!M.lying && src.loc != get_turf(src)) //if it's not on the turf, it must be in the mob! + P.attack_mob(M, 0, 25) //you're holding a grenade, dude! + else + P.attack_mob(M, 0, 100) //otherwise, allow a decent amount of fragments to pass \ No newline at end of file diff --git a/code/game/objects/items/weapons/grenades/supermatter.dm b/code/game/objects/items/weapons/grenades/supermatter.dm new file mode 100644 index 00000000000..1bf35d1e1c4 --- /dev/null +++ b/code/game/objects/items/weapons/grenades/supermatter.dm @@ -0,0 +1,36 @@ +/obj/item/weapon/grenade/supermatter + name = "supermatter grenade" + icon_state = "banana" + item_state = "emergency_engi" + origin_tech = list(TECH_BLUESPACE = 5, TECH_MAGNET = 4, TECH_ENGINEERING = 5) + arm_sound = 'sound/effects/3.wav' + var/implode_at + +/obj/item/weapon/grenade/supermatter/Destroy() + if(implode_at) + processing_objects -= src + . = ..() + +/obj/item/weapon/grenade/supermatter/detonate() + ..() + processing_objects += src + implode_at = world.time + 10 SECONDS + update_icon() + playsound(src, 'sound/weapons/wave.ogg', 100) + +/obj/item/weapon/grenade/supermatter/update_icon() + overlays.Cut() + if(implode_at) + overlays += image(icon = 'icons/rust.dmi', icon_state = "emfield_s1") + +/obj/item/weapon/grenade/supermatter/process() + if(!isturf(loc)) + if(ismob(loc)) + var/mob/M = loc + M.drop_from_inventory(src) + forceMove(get_turf(src)) + playsound(src, 'sound/effects/supermatter.ogg', 100) + supermatter_pull(src, world.view, STAGE_THREE) + if(world.time > implode_at) + explosion(loc, 1, 3, 5, 4) + qdel(src) \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index df41b96011b..beb6aec6a5e 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -106,7 +106,7 @@ /obj/item/weapon/storage/box/holobadge/hos, /obj/item/clothing/accessory/badge/holo/hos, /obj/item/weapon/reagent_containers/spray/pepper, - /obj/item/weapon/crowbar/red, + /obj/item/weapon/tool/crowbar/red, /obj/item/weapon/storage/box/flashbangs, /obj/item/weapon/storage/belt/security, /obj/item/device/flash, diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security_vr.dm b/code/game/objects/structures/crates_lockers/closets/secure/security_vr.dm index 8a066cc754c..9dadb6dc899 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security_vr.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security_vr.dm @@ -45,7 +45,7 @@ /obj/item/weapon/storage/box/holobadge/hos, /obj/item/clothing/accessory/badge/holo/hos, /obj/item/weapon/reagent_containers/spray/pepper, - /obj/item/weapon/crowbar/red, + /obj/item/weapon/tool/crowbar/red, /obj/item/weapon/storage/box/flashbangs, /obj/item/device/flash, /obj/item/weapon/melee/baton/loaded, @@ -133,7 +133,7 @@ /obj/item/weapon/storage/box/holobadge/hos, /obj/item/clothing/accessory/badge/holo/hos, /obj/item/weapon/reagent_containers/spray/pepper, - /obj/item/weapon/crowbar/red, + /obj/item/weapon/tool/crowbar/red, /obj/item/weapon/storage/box/flashbangs, /obj/item/weapon/storage/belt/security, /obj/item/device/flash, diff --git a/code/game/objects/structures/crates_lockers/closets/syndicate.dm b/code/game/objects/structures/crates_lockers/closets/syndicate.dm index 12c30a4484c..20c60aa1615 100644 --- a/code/game/objects/structures/crates_lockers/closets/syndicate.dm +++ b/code/game/objects/structures/crates_lockers/closets/syndicate.dm @@ -14,7 +14,7 @@ /obj/item/clothing/under/syndicate, /obj/item/clothing/head/helmet/space/void/merc, /obj/item/clothing/suit/space/void/merc, - /obj/item/weapon/crowbar/red, + /obj/item/weapon/tool/crowbar/red, /obj/item/weapon/cell/high, /obj/item/weapon/card/id/syndicate, /obj/item/device/multitool, @@ -24,7 +24,7 @@ /obj/structure/closet/syndicate/suit desc = "It's a storage unit for voidsuits." - + starts_with = list( /obj/item/weapon/tank/jetpack/oxygen, /obj/item/clothing/shoes/magboots, diff --git a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm index a4ed511f4b7..1336890b13b 100644 --- a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm @@ -113,15 +113,15 @@ if(prob(70)) starts_with += /obj/item/device/flashlight if(prob(70)) - starts_with += /obj/item/weapon/screwdriver + starts_with += /obj/item/weapon/tool/screwdriver if(prob(70)) - starts_with += /obj/item/weapon/wrench + starts_with += /obj/item/weapon/tool/wrench if(prob(70)) starts_with += /obj/item/weapon/weldingtool if(prob(70)) - starts_with += /obj/item/weapon/crowbar + starts_with += /obj/item/weapon/tool/crowbar if(prob(70)) - starts_with += /obj/item/weapon/wirecutters + starts_with += /obj/item/weapon/tool/wirecutters if(prob(70)) starts_with += /obj/item/device/t_scanner if(prob(20)) @@ -203,7 +203,7 @@ icon_closed = "hydrant" icon_opened = "hydrant_open" plane = TURF_PLANE - layer = ABOVE_TURF_LAYER + layer = ABOVE_TURF_LAYER anchored = 1 density = 0 wall_mounted = 1 diff --git a/code/game/objects/structures/crates_lockers/closets/walllocker.dm b/code/game/objects/structures/crates_lockers/closets/walllocker.dm index 39204e34917..78572d38cd3 100644 --- a/code/game/objects/structures/crates_lockers/closets/walllocker.dm +++ b/code/game/objects/structures/crates_lockers/closets/walllocker.dm @@ -16,7 +16,7 @@ /obj/structure/closet/walllocker/emerglocker name = "emergency locker" desc = "A wall mounted locker with emergency supplies." - var/list/spawnitems = list(/obj/item/weapon/tank/emergency/oxygen,/obj/item/clothing/mask/breath,/obj/item/weapon/crowbar/red) + var/list/spawnitems = list(/obj/item/weapon/tank/emergency/oxygen,/obj/item/clothing/mask/breath,/obj/item/weapon/tool/crowbar/red) var/amount = 2 // spawns each items X times. icon_state = "emerg" diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 4de0d055890..ddad2e6e057 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -94,7 +94,7 @@ user.drop_item() W.forceMove(src) return - else if(istype(W, /obj/item/weapon/wirecutters)) + else if(W.is_wirecutter()) if(rigged) user << "You cut away the wiring." playsound(src.loc, W.usesound, 100, 1) @@ -191,7 +191,7 @@ src.toggle(user) /obj/structure/closet/crate/secure/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(is_type_in_list(W, list(/obj/item/weapon/packageWrap, /obj/item/stack/cable_coil, /obj/item/device/radio/electropack, /obj/item/weapon/wirecutters))) + if(is_type_in_list(W, list(/obj/item/weapon/packageWrap, /obj/item/stack/cable_coil, /obj/item/device/radio/electropack, /obj/item/weapon/tool/wirecutters))) return ..() if(istype(W, /obj/item/weapon/melee/energy/blade)) emag_act(INFINITY, user) diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm index c06e550988c..a2adc48ca7f 100644 --- a/code/game/objects/structures/crates_lockers/largecrate.dm +++ b/code/game/objects/structures/crates_lockers/largecrate.dm @@ -15,17 +15,23 @@ if(I.density || I.anchored || I == src || !I.simulated) continue I.forceMove(src) + update_icon() /obj/structure/largecrate/attack_hand(mob/user as mob) - user << "You need a crowbar to pry this open!" + to_chat(user, "You need a crowbar to pry this open!") return /obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/crowbar)) + var/turf/T = get_turf(src) + if(!T) + to_chat(user, "You can't open this here!") + if(W.is_crowbar()) new /obj/item/stack/material/wood(src) - var/turf/T = get_turf(src) + for(var/atom/movable/AM in contents) - if(AM.simulated) AM.forceMove(T) + if(AM.simulated) + AM.forceMove(T) + user.visible_message("[user] pries \the [src] open.", \ "You pry open \the [src].", \ "You hear splitting wood.") @@ -42,7 +48,7 @@ icon_state = "mulecrate" /obj/structure/largecrate/hoverpod/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/crowbar)) + if(W.is_crowbar()) var/obj/item/mecha_parts/mecha_equipment/ME var/obj/mecha/working/hoverpod/H = new (loc) @@ -52,6 +58,29 @@ ME.attach(H) ..() +/obj/structure/largecrate/vehicle + name = "vehicle crate" + desc = "It comes in a box for the consumer's sake. ..How is this lighter?" + icon_state = "vehiclecrate" + +/obj/structure/largecrate/vehicle/initialize() + ..() + spawn(1) + for(var/obj/O in contents) + O.update_icon() + +/obj/structure/largecrate/vehicle/bike + name = "spacebike crate" + starts_with = list(/obj/structure/vehiclecage/spacebike) + +/obj/structure/largecrate/vehicle/quadbike + name = "\improper ATV crate" + starts_with = list(/obj/structure/vehiclecage/quadbike) + +/obj/structure/largecrate/vehicle/quadtrailer + name = "\improper ATV trailer crate" + starts_with = list(/obj/structure/vehiclecage/quadtrailer) + /obj/structure/largecrate/animal icon_state = "mulecrate" diff --git a/code/game/objects/structures/crates_lockers/largecrate_vr.dm b/code/game/objects/structures/crates_lockers/largecrate_vr.dm index d6622e25911..7226e19208b 100644 --- a/code/game/objects/structures/crates_lockers/largecrate_vr.dm +++ b/code/game/objects/structures/crates_lockers/largecrate_vr.dm @@ -3,7 +3,7 @@ desc = "You hear chirping and cawing inside the crate. It sounds like there are a lot of birds in there..." /obj/structure/largecrate/birds/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/crowbar)) + if(W.is_crowbar()) new /obj/item/stack/material/wood(src) new /mob/living/simple_animal/bird(src) new /mob/living/simple_animal/bird/kea(src) diff --git a/code/game/objects/structures/crates_lockers/vehiclecage.dm b/code/game/objects/structures/crates_lockers/vehiclecage.dm new file mode 100644 index 00000000000..9915ca6a7b6 --- /dev/null +++ b/code/game/objects/structures/crates_lockers/vehiclecage.dm @@ -0,0 +1,106 @@ +/obj/structure/vehiclecage + name = "vehicle cage" + desc = "A large metal lattice that seems to exist solely to annoy consumers." + icon = 'icons/obj/storage.dmi' + icon_state = "vehicle_cage" + density = 1 + var/obj/vehicle/my_vehicle + var/my_vehicle_type + var/paint_color = "#666666" + +/obj/structure/vehiclecage/examine(mob/user) + ..() + if(my_vehicle) + to_chat(user, "It seems to contain \the [my_vehicle].") + +/obj/structure/vehiclecage/initialize() + . = ..() + if(my_vehicle_type) + my_vehicle = new my_vehicle_type(src) + for(var/obj/I in get_turf(src)) + if(I.density || I.anchored || I == src || !I.simulated || !istype(I, my_vehicle_type)) + continue + load_vehicle(I) + update_icon() + +/obj/structure/vehiclecage/attack_hand(mob/user as mob) + to_chat(user, "You need a wrench to take this apart!") + return + +/obj/structure/vehiclecage/attackby(obj/item/weapon/W as obj, mob/user as mob) + var/turf/T = get_turf(src) + if(!T) + to_chat(user, "You can't open this here!") + if(W.is_wrench() && do_after(user, 60 * W.toolspeed, src)) + playsound(loc, W.usesound, 50, 1) + disassemble(W, user) + user.visible_message("[user] begins loosening \the [src]'s bolts.") + if(W.is_wirecutter() && do_after(user, 70 * W.toolspeed, src)) + playsound(loc, W.usesound, 50, 1) + disassemble(W, user) + user.visible_message("[user] begins cutting \the [src]'s bolts.") + else + return attack_hand(user) + +/obj/structure/vehiclecage/update_icon() + ..() + overlays.Cut() + underlays.Cut() + + var/image/framepaint = new(icon = 'icons/obj/storage.dmi', icon_state = "[initial(icon_state)]_a", layer = MOB_LAYER + 1.1) + framepaint.plane = MOB_PLANE + framepaint.color = paint_color + overlays += framepaint + + for(var/obj/vehicle/V in src.contents) + var/image/showcase = new(V) + showcase.layer = src.layer - 0.1 + underlays += showcase + +/obj/structure/vehiclecage/MouseDrop_T(var/atom/movable/C, mob/user as mob) + if(user && (user.buckled || user.stat || user.restrained() || !Adjacent(user) || !user.Adjacent(C))) + return + + var/obj/vehicle/V + if(istype(C, /obj/vehicle)) + V = C + if(!V) + return + + if(!my_vehicle) + load_vehicle(V, user) + +/obj/structure/vehiclecage/proc/load_vehicle(var/obj/vehicle/V, mob/user as mob) + if(user) + user.visible_message("[user] loads \the [V] into \the [src].", \ + "You load \the [V] into \the [src].", \ + "You hear creaking metal.") + + V.forceMove(src) + + paint_color = V.paint_color + + update_icon() + +/obj/structure/vehiclecage/proc/disassemble(obj/item/weapon/W as obj, mob/user as mob) + var/turf/T = get_turf(src) + new /obj/item/stack/material/steel(src.loc, 5) + + for(var/atom/movable/AM in contents) + if(AM.simulated) + AM.forceMove(T) + + my_vehicle = null + user.visible_message("[user] release \the [src].", \ + "You finally release \the [src].", \ + "You hear creaking metal.") + qdel(src) + +/obj/structure/vehiclecage/spacebike + my_vehicle_type = /obj/vehicle/bike/random + +/obj/structure/vehiclecage/quadbike + my_vehicle_type = /obj/vehicle/train/engine/quadbike/random + +/obj/structure/vehiclecage/quadtrailer + my_vehicle_type = /obj/vehicle/train/trolley/trailer/random diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 9969ee70990..3facfacb2ff 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -144,7 +144,7 @@ reinforce_girder() /obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench) && state == 0) + if(W.is_wrench() && state == 0) if(anchored && !reinf_material) playsound(src, W.usesound, 100, 1) to_chat(user, "Now disassembling the girder...") @@ -170,7 +170,7 @@ to_chat(user, "You drill through the girder!") dismantle() - else if(istype(W, /obj/item/weapon/screwdriver)) + else if(W.is_screwdriver()) if(state == 2) playsound(src, W.usesound, 100, 1) to_chat(user, "Now unsecuring support struts...") @@ -183,7 +183,7 @@ reinforcing = !reinforcing to_chat(user, "\The [src] can now be [reinforcing? "reinforced" : "constructed"]!") - else if(istype(W, /obj/item/weapon/wirecutters) && state == 1) + else if(W.is_wirecutter() && state == 1) playsound(src, W.usesound, 100, 1) to_chat(user, "Now removing support struts...") if(do_after(user,40 * W.toolspeed)) @@ -193,7 +193,7 @@ reinf_material = null reset_girder() - else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored) + else if(W.is_crowbar() && state == 0 && anchored) playsound(src, W.usesound, 100, 1) to_chat(user, "Now dislodging the girder...") if(do_after(user, 40 * W.toolspeed)) @@ -317,19 +317,26 @@ return /obj/structure/girder/cult + name = "column" icon= 'icons/obj/cult.dmi' icon_state= "cultgirder" health = 250 cover = 70 - girder_material = DEFAULT_WALL_MATERIAL + girder_material = "cult" applies_material_colour = 0 +/obj/structure/girder/cult/update_icon() + if(anchored) + icon_state = "cultgirder" + else + icon_state = "displaced" + /obj/structure/girder/cult/dismantle() new /obj/effect/decal/remains/human(get_turf(src)) qdel(src) /obj/structure/girder/cult/attackby(obj/item/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) playsound(src, W.usesound, 100, 1) to_chat(user, "Now disassembling the girder...") if(do_after(user,40 * W.toolspeed)) diff --git a/code/game/objects/structures/gravemarker.dm b/code/game/objects/structures/gravemarker.dm index e20591b9399..7ef0d49a517 100644 --- a/code/game/objects/structures/gravemarker.dm +++ b/code/game/objects/structures/gravemarker.dm @@ -56,7 +56,7 @@ return 1 /obj/structure/gravemarker/attackby(obj/item/weapon/W, mob/user as mob) - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) var/carving_1 = sanitizeSafe(input(user, "Who is \the [src.name] for?", "Gravestone Naming", null) as text, MAX_NAME_LEN) if(carving_1) user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].") @@ -72,7 +72,7 @@ epitaph += carving_2 update_icon() return - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) user.visible_message("[user] starts taking down \the [src.name].", "You start taking down \the [src.name].") if(do_after(user, material.hardness * W.toolspeed)) user.visible_message("[user] takes down \the [src.name].", "You take down \the [src.name].") diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 284dc7ad300..5828699165d 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -93,13 +93,15 @@ src.health -= damage*0.2 spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted -/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswirecutter(W)) +/obj/structure/grille/attackby(obj/item/W as obj, mob/user as mob) + if(!istype(W)) + return + if(W.is_wirecutter()) if(!shock(user, 100)) playsound(src, W.usesound, 100, 1) new /obj/item/stack/rods(get_turf(src), destroyed ? 1 : 2) qdel(src) - else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored)) + else if((W.is_screwdriver()) && (istype(loc, /turf/simulated) || anchored)) if(!shock(user, 90)) playsound(src, W.usesound, 100, 1) anchored = !anchored @@ -107,7 +109,7 @@ "You have [anchored ? "fastened the grille to" : "unfastened the grille from"] the floor.") return -//window placing begin //TODO CONVERT PROPERLY TO MATERIAL DATUM + //window placing begin //TODO CONVERT PROPERLY TO MATERIAL DATUM else if(istype(W,/obj/item/stack/material)) var/obj/item/stack/material/ST = W if(!ST.material.created_window) diff --git a/code/game/objects/structures/holoplant.dm b/code/game/objects/structures/holoplant.dm index 1f6473ebdc0..1f762c027af 100644 --- a/code/game/objects/structures/holoplant.dm +++ b/code/game/objects/structures/holoplant.dm @@ -52,7 +52,7 @@ /obj/machinery/holoplant/proc/deactivate() overlays -= plant - qdel_null(plant) + QDEL_NULL(plant) set_light(0) use_power = 0 diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index 32b1dec7883..51e824c6b0b 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -50,7 +50,7 @@ health -= proj_damage ..() if(health <= 0) - deflate(1) + puncture() return /obj/structure/inflatable/ex_act(severity) @@ -59,15 +59,15 @@ qdel(src) return if(2.0) - deflate(1) + puncture() return if(3.0) if(prob(50)) - deflate(1) + puncture() return /obj/structure/inflatable/blob_act() - deflate(1) + puncture() /obj/structure/inflatable/attack_hand(mob/user as mob) add_fingerprint(user) @@ -78,7 +78,7 @@ if (can_puncture(W)) visible_message("[user] pierces [src] with [W]!") - deflate(1) + puncture() if(W.damtype == BRUTE || W.damtype == BURN) hit(W.force) ..() @@ -89,7 +89,7 @@ if(sound_effect) playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1) if(health <= 0) - deflate(1) + puncture() /obj/structure/inflatable/CtrlClick() hand_deflate() @@ -102,20 +102,21 @@ R.add_fingerprint(user) qdel(src) -/obj/structure/inflatable/proc/deflate(var/violent=0) +/obj/structure/inflatable/proc/deflate() playsound(loc, 'sound/machines/hiss.ogg', 75, 1) - if(violent) - visible_message("[src] rapidly deflates!") - var/obj/item/inflatable/torn/R = new /obj/item/inflatable/torn(loc) + //user << "You slowly deflate the inflatable wall." + visible_message("[src] slowly deflates.") + spawn(50) + var/obj/item/inflatable/R = new /obj/item/inflatable(loc) src.transfer_fingerprints_to(R) qdel(src) - else - //user << "You slowly deflate the inflatable wall." - visible_message("[src] slowly deflates.") - spawn(50) - var/obj/item/inflatable/R = new /obj/item/inflatable(loc) - src.transfer_fingerprints_to(R) - qdel(src) + +/obj/structure/inflatable/proc/puncture() + playsound(loc, 'sound/machines/hiss.ogg', 75, 1) + visible_message("[src] rapidly deflates!") + var/obj/item/inflatable/torn/R = new /obj/item/inflatable/torn(loc) + src.transfer_fingerprints_to(R) + qdel(src) /obj/structure/inflatable/verb/hand_deflate() set name = "Deflate" @@ -133,7 +134,7 @@ user.do_attack_animation(src) if(health <= 0) user.visible_message("[user] [attack_verb] open the [src]!") - spawn(1) deflate(1) + spawn(1) puncture() else user.visible_message("[user] [attack_verb] at [src]!") return 1 @@ -221,19 +222,20 @@ else icon_state = "door_closed" -/obj/structure/inflatable/door/deflate(var/violent=0) +/obj/structure/inflatable/door/deflate() playsound(loc, 'sound/machines/hiss.ogg', 75, 1) - if(violent) - visible_message("[src] rapidly deflates!") - var/obj/item/inflatable/door/torn/R = new /obj/item/inflatable/door/torn(loc) + visible_message("[src] slowly deflates.") + spawn(50) + var/obj/item/inflatable/door/R = new /obj/item/inflatable/door(loc) src.transfer_fingerprints_to(R) qdel(src) - else - visible_message("[src] slowly deflates.") - spawn(50) - var/obj/item/inflatable/door/R = new /obj/item/inflatable/door(loc) - src.transfer_fingerprints_to(R) - qdel(src) + +/obj/structure/inflatable/door/puncture() + playsound(loc, 'sound/machines/hiss.ogg', 75, 1) + visible_message("[src] rapidly deflates!") + var/obj/item/inflatable/door/torn/R = new /obj/item/inflatable/door/torn(loc) + src.transfer_fingerprints_to(R) + qdel(src) /obj/item/inflatable/torn name = "torn inflatable wall" diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 4a2c5cf0b64..f367b1945c5 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -49,24 +49,24 @@ ..() /obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob) - if(istype(I, /obj/item/weapon/wrench)) + if(I.is_wrench()) if(!glass) playsound(src.loc, I.usesound, 50, 1) if(do_after(user, 20 * I.toolspeed)) - user << "You unfasten the frame." + to_chat(user, "You unfasten the frame.") new /obj/item/frame/mirror( src.loc ) qdel(src) return - if(istype(I, /obj/item/weapon/crowbar)) + if(I.is_wrench()) if(shattered && glass) - user << "The broken glass falls out." + to_chat(user, "The broken glass falls out.") icon_state = "mirror_frame" glass = !glass new /obj/item/weapon/material/shard( src.loc ) return if(!shattered && glass) playsound(src.loc, I.usesound, 50, 1) - user << "You remove the glass." + to_chat(user, "You remove the glass.") glass = !glass icon_state = "mirror_frame" new /obj/item/stack/material/glass( src.loc, 2 ) @@ -76,15 +76,15 @@ if(!glass) var/obj/item/stack/material/glass/G = I if (G.get_amount() < 2) - user << "You need two sheets of glass to add them to the frame." + to_chat(user, "You need two sheets of glass to add them to the frame.") return - user << "You start to add the glass to the frame." + to_chat(user, "You start to add the glass to the frame.") if(do_after(user, 20)) if (G.use(2)) shattered = 0 glass = 1 icon_state = "mirror" - user << "You add the glass to the frame." + to_chat(user, "You add the glass to the frame.") return if(shattered && glass) diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index 0425209144a..474814a06e0 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -41,7 +41,7 @@ user << "You pin the paper to the noticeboard." else user << "You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached." - if(istype(O, /obj/item/weapon/wrench)) + if(O.is_wrench()) user << "You start to unwrench the noticeboard." playsound(src.loc, O.usesound, 50, 1) if(do_after(user, 15 * O.toolspeed)) diff --git a/code/modules/nano/modules/human_appearance.dm b/code/modules/nano/modules/human_appearance.dm index df96ad582ef..290cea9fe6a 100644 --- a/code/modules/nano/modules/human_appearance.dm +++ b/code/modules/nano/modules/human_appearance.dm @@ -145,7 +145,7 @@ data["change_hair_color"] = can_change(APPEARANCE_HAIR_COLOR) data["change_facial_hair_color"] = can_change(APPEARANCE_FACIAL_HAIR_COLOR) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "appearance_changer.tmpl", "[src]", 800, 450, state = state) ui.set_initial_data(data) diff --git a/code/modules/nano/modules/law_manager.dm b/code/modules/nano/modules/law_manager.dm index 50a20570f37..a3dd196be55 100644 --- a/code/modules/nano/modules/law_manager.dm +++ b/code/modules/nano/modules/law_manager.dm @@ -176,7 +176,7 @@ data["channels"] = channels data["law_sets"] = package_multiple_laws(data["isAdmin"] ? admin_laws : player_laws) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "law_manager.tmpl", sanitize("[src] - [owner]"), 800, is_malf(user) ? 600 : 400, state = state) ui.set_initial_data(data) diff --git a/code/modules/nano/modules/power_monitor.dm b/code/modules/nano/modules/power_monitor.dm index c5669a4801e..b255e232340 100644 --- a/code/modules/nano/modules/power_monitor.dm +++ b/code/modules/nano/modules/power_monitor.dm @@ -28,7 +28,7 @@ data["focus"] = focus.return_reading_data() data["map_levels"] = using_map.get_map_levels(T.z) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "power_monitor.tmpl", "Power Monitoring Console", 800, 500, state = state) // adding a template with the key "mapContent" enables the map ui functionality diff --git a/code/modules/nano/modules/rcon.dm b/code/modules/nano/modules/rcon.dm index 4d567213f71..4ad2444d100 100644 --- a/code/modules/nano/modules/rcon.dm +++ b/code/modules/nano/modules/rcon.dm @@ -38,7 +38,7 @@ data["hide_smes_details"] = hide_SMES_details data["hide_breakers"] = hide_breakers - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "rcon.tmpl", "RCON Console", 600, 400, state = state) ui.set_initial_data(data) diff --git a/code/modules/nano/nanomanager.dm b/code/modules/nano/nanomanager.dm index 2150f0598b6..6c46955ae7d 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/nanomanager.dm @@ -1,3 +1,5 @@ +GLOBAL_DATUM_INIT(nanomanager, /datum/nanomanager, new) // NanoManager, the manager for Nano UIs. + // This is the window/UI manager for Nano UI // There should only ever be one (global) instance of nanomanger /datum/nanomanager diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index c3c709852d0..048a91271bb 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -273,7 +273,7 @@ if(status & ORGAN_BROKEN && brute) jostle_bone(brute) - if(organ_can_feel_pain() && prob(40) && !isbelly(owner.loc)) //VOREStation Edit + if(organ_can_feel_pain() && prob(40) && !isbelly(owner.loc) && !istype(owner.loc, /obj/item/device/dogborg/sleeper)) //VOREStation Edit owner.emote("scream") //getting hit on broken hand hurts if(used_weapon) add_autopsy_data("[used_weapon]", brute + burn) @@ -1349,12 +1349,16 @@ Note that amputating the affected organ does in fact remove the infection from t return english_list(flavor_text) // Returns a list of the clothing (not glasses) that are covering this part -/obj/item/organ/external/proc/get_covering_clothing() +/obj/item/organ/external/proc/get_covering_clothing(var/target_covering) // target_covering checks for mouth/eye coverage var/list/covering_clothing = list() + + if(!target_covering) + target_covering = src.body_part + if(owner) - var/list/protective_gear = list(owner.head, owner.wear_mask, owner.wear_suit, owner.w_uniform, owner.gloves, owner.shoes) + var/list/protective_gear = list(owner.head, owner.wear_mask, owner.wear_suit, owner.w_uniform, owner.gloves, owner.shoes, owner.glasses) for(var/obj/item/clothing/gear in protective_gear) - if(gear.body_parts_covered & src.body_part) + if(gear.body_parts_covered & target_covering) covering_clothing |= gear if(LAZYLEN(gear.accessories)) for(var/obj/item/clothing/accessory/bling in gear.accessories) diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index 71adba5b115..371c64e0ab5 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -110,7 +110,7 @@ var/global/list/limb_icon_cache = list() res.add_overlay(facial_s) //Head hair - if(owner.h_style && !(owner.head && (owner.head.flags_inv & BLOCKHEADHAIR))) + if(owner.h_style) var/style = owner.h_style var/datum/sprite_accessory/hair/hair_style = hair_styles_list[style] if(owner.head && (owner.head.flags_inv & BLOCKHEADHAIR)) @@ -179,13 +179,12 @@ var/global/list/limb_icon_cache = list() if(model) icon_cache_key += "_model_[model]" apply_colouration(mob_icon) - // VOREStation edit to enable markings on synths if(owner && owner.synth_markings) for(var/M in markings) var/datum/sprite_accessory/marking/mark_style = markings[M]["datum"] var/icon/mark_s = new/icon("icon" = mark_style.icon, "icon_state" = "[mark_style.icon_state]-[organ_tag]") mark_s.Blend(markings[M]["color"], mark_style.color_blend_mode) // VOREStation edit - overlays |= mark_s //So when it's not on your body, it has icons + add_overlay(mark_s) //So when it's not on your body, it has icons mob_icon.Blend(mark_s, ICON_OVERLAY) //So when it's on your body, it has icons icon_cache_key += "[M][markings[M]["color"]]" diff --git a/code/modules/organs/subtypes/nano.dm b/code/modules/organs/subtypes/nano.dm index 9c60bf9d08a..39398f5909a 100644 --- a/code/modules/organs/subtypes/nano.dm +++ b/code/modules/organs/subtypes/nano.dm @@ -131,9 +131,47 @@ icon_state = "posi" parent_organ = BP_TORSO + brain_type = /obj/item/device/mmi/digital/posibrain/nano + +/obj/item/organ/internal/mmi_holder/posibrain/nano/robotize() + . = ..() + icon_state = "posi1" + +/obj/item/organ/internal/mmi_holder/posibrain/nano/mechassist() + . = ..() + icon_state = "posi1" + /obj/item/organ/internal/mmi_holder/posibrain/nano/update_from_mmi() - ..() + . = ..() icon = initial(icon) icon_state = "posi1" + stored_mmi.icon_state = "posi1" stored_mmi.brainmob.languages = owner.languages + +// The 'out on the ground' object, not the organ holder +/obj/item/device/mmi/digital/posibrain/nano + name = "protean posibrain" + desc = "A more advanced version of the standard posibrain, typically found in protean bodies." + icon = 'icons/mob/species/protean/protean.dmi' + icon_state = "posi" + +/obj/item/device/mmi/digital/posibrain/nano/initialize() + . = ..() + icon_state = "posi" + +/obj/item/device/mmi/digital/posibrain/nano/request_player() + icon_state = initial(icon_state) + return //We don't do this stuff + +/obj/item/device/mmi/digital/posibrain/nano/reset_search() + icon_state = initial(icon_state) + return //Don't do this either because of the above + +/obj/item/device/mmi/digital/posibrain/nano/transfer_personality() + . = ..() + icon_state = "posi1" + +/obj/item/device/mmi/digital/posibrain/nano/transfer_identity() + . = ..() + icon_state = "posi1" diff --git a/code/modules/overmap/ships/computers/engine_control.dm b/code/modules/overmap/ships/computers/engine_control.dm index d700e38a81a..265e5603998 100644 --- a/code/modules/overmap/ships/computers/engine_control.dm +++ b/code/modules/overmap/ships/computers/engine_control.dm @@ -52,7 +52,7 @@ data["engines_info"] = enginfo - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "engines_control.tmpl", "[linked.name] Engines Control", 380, 530) ui.set_initial_data(data) diff --git a/code/modules/projectiles/ammunition/magazines.dm b/code/modules/projectiles/ammunition/magazines.dm index 5ea1c0a2d69..6f88fed227a 100644 --- a/code/modules/projectiles/ammunition/magazines.dm +++ b/code/modules/projectiles/ammunition/magazines.dm @@ -51,7 +51,7 @@ /obj/item/ammo_magazine/s38/rubber name = "speedloader (.38 rubber)" icon_state = "T38" - ammo_type = /obj/item/ammo_casing/a38r + ammo_type = /obj/item/ammo_casing/a38/rubber /obj/item/ammo_magazine/s38/emp name = "speedloader (.38 haywire)" @@ -74,19 +74,19 @@ /obj/item/ammo_magazine/m45/rubber name = "magazine (.45 rubber)" - ammo_type = /obj/item/ammo_casing/a45r + ammo_type = /obj/item/ammo_casing/a45/rubber /obj/item/ammo_magazine/m45/practice name = "magazine (.45 practice)" - ammo_type = /obj/item/ammo_casing/a45p + ammo_type = /obj/item/ammo_casing/a45/practice /obj/item/ammo_magazine/m45/flash name = "magazine (.45 flash)" - ammo_type = /obj/item/ammo_casing/a45f + ammo_type = /obj/item/ammo_casing/a45/flash /obj/item/ammo_magazine/m45/ap name = "magazine (.45 AP)" - ammo_type = /obj/item/ammo_casing/a45ap + ammo_type = /obj/item/ammo_casing/a45/ap /obj/item/ammo_magazine/box/emp/b45 name = "ammunition box (.45 haywire)" @@ -116,7 +116,7 @@ /obj/item/ammo_magazine/m45tommy/ap name = "tommygun magazine (.45 AP)" - ammo_type = /obj/item/ammo_casing/a45ap + ammo_type = /obj/item/ammo_casing/a45/ap /obj/item/ammo_magazine/m45tommy/empty initial_ammo = 0 @@ -133,7 +133,7 @@ /obj/item/ammo_magazine/m45tommydrum/ap name = "tommygun drum magazine (.45 AP)" - ammo_type = /obj/item/ammo_casing/a45ap + ammo_type = /obj/item/ammo_casing/a45/ap /obj/item/ammo_magazine/m45tommydrum/empty initial_ammo = 0 @@ -150,15 +150,15 @@ /obj/item/ammo_magazine/clip/c45/rubber name = "ammo clip (.45 rubber)" - ammo_type = /obj/item/ammo_casing/a45r + ammo_type = /obj/item/ammo_casing/a45/rubber /obj/item/ammo_magazine/clip/c45/practice name = "ammo clip (.45 practice)" - ammo_type = /obj/item/ammo_casing/a45p + ammo_type = /obj/item/ammo_casing/a45/practice /obj/item/ammo_magazine/clip/c45/flash name = "ammo clip (.45 flash)" - ammo_type = /obj/item/ammo_casing/a45f + ammo_type = /obj/item/ammo_casing/a45/flash /obj/item/ammo_magazine/s45 name = "speedloader (.45)" @@ -174,19 +174,19 @@ /obj/item/ammo_magazine/s45/rubber name = "speedloader (.45 rubber)" - ammo_type = /obj/item/ammo_casing/a45r + ammo_type = /obj/item/ammo_casing/a45/rubber /obj/item/ammo_magazine/s45/practice name = "speedloader (.45 practice)" - ammo_type = /obj/item/ammo_casing/a45p + ammo_type = /obj/item/ammo_casing/a45/practice /obj/item/ammo_magazine/s45/flash name = "speedloader (.45 flash)" - ammo_type = /obj/item/ammo_casing/a45f + ammo_type = /obj/item/ammo_casing/a45/flash /obj/item/ammo_magazine/s45/ap name = "speedloader (.45 AP)" - ammo_type = /obj/item/ammo_casing/a45ap + ammo_type = /obj/item/ammo_casing/a45/ap ///////// 9mm ///////// @@ -215,15 +215,15 @@ /obj/item/ammo_magazine/m9mm/flash name = "magazine (9mm flash)" - ammo_type = /obj/item/ammo_casing/a9mmf + ammo_type = /obj/item/ammo_casing/a9mm/flash /obj/item/ammo_magazine/m9mm/rubber name = "magazine (9mm rubber)" - ammo_type = /obj/item/ammo_casing/a9mmr + ammo_type = /obj/item/ammo_casing/a9mm/rubber /obj/item/ammo_magazine/m9mm/practice name = "magazine (9mm practice)" - ammo_type = /obj/item/ammo_casing/a9mmp + ammo_type = /obj/item/ammo_casing/a9mm/practice // Compact /obj/item/ammo_magazine/m9mm/compact @@ -242,15 +242,15 @@ /obj/item/ammo_magazine/m9mm/compact/flash name = "compact magazine (9mm flash)" - ammo_type = /obj/item/ammo_casing/a9mmf + ammo_type = /obj/item/ammo_casing/a9mm/flash /obj/item/ammo_magazine/m9mm/compact/rubber name = "compact magazine (9mm rubber)" - ammo_type = /obj/item/ammo_casing/a9mmr + ammo_type = /obj/item/ammo_casing/a9mm/rubber /obj/item/ammo_magazine/m9mm/compact/practice name = "compact magazine (9mm practice)" - ammo_type = /obj/item/ammo_casing/a9mmp + ammo_type = /obj/item/ammo_casing/a9mm/practice // SMG /obj/item/ammo_magazine/m9mmt @@ -268,15 +268,15 @@ /obj/item/ammo_magazine/m9mmt/rubber name = "top mounted magazine (9mm rubber)" - ammo_type = /obj/item/ammo_casing/a9mmr + ammo_type = /obj/item/ammo_casing/a9mm/rubber /obj/item/ammo_magazine/m9mmt/flash name = "top mounted magazine (9mm flash)" - ammo_type = /obj/item/ammo_casing/a9mmf + ammo_type = /obj/item/ammo_casing/a9mm/flash /obj/item/ammo_magazine/m9mmt/practice name = "top mounted magazine (9mm practice)" - ammo_type = /obj/item/ammo_casing/a9mmp + ammo_type = /obj/item/ammo_casing/a9mm/practice /obj/item/ammo_magazine/m9mmp90 name = "large capacity top mounted magazine (9mm armor-piercing)" @@ -303,15 +303,15 @@ /obj/item/ammo_magazine/clip/c9mm/rubber name = "ammo clip (.45 rubber)" - ammo_type = /obj/item/ammo_casing/a9mmr + ammo_type = /obj/item/ammo_casing/a9mm/rubber /obj/item/ammo_magazine/clip/c9mm/practice name = "ammo clip (.45 practice)" - ammo_type = /obj/item/ammo_casing/a9mmp + ammo_type = /obj/item/ammo_casing/a9mm/practice /obj/item/ammo_magazine/clip/c9mm/flash name = "ammo clip (.45 flash)" - ammo_type = /obj/item/ammo_casing/a9mmf + ammo_type = /obj/item/ammo_casing/a9mm/flash /obj/item/ammo_magazine/box/c9mm // Made by RnD for Prototype SMG and should probably be removed because why does it require DIAMONDS to make bullets? name = "ammunition Box (9mm)" @@ -406,7 +406,7 @@ /obj/item/ammo_magazine/m545/practice name = "magazine (5.45mm practice)" - ammo_type = /obj/item/ammo_casing/a545p + ammo_type = /obj/item/ammo_casing/a545/practice /obj/item/ammo_magazine/m545/practice/ext name = "extended magazine (5.45mm practice)" @@ -439,7 +439,7 @@ /obj/item/ammo_magazine/m545/small/practice name = "magazine (5.45mm practice)" - ammo_type = /obj/item/ammo_casing/a545p + ammo_type = /obj/item/ammo_casing/a545/practice /obj/item/ammo_magazine/m545/small/ap name = "magazine (5.45mm armor-piercing)" @@ -534,7 +534,7 @@ /obj/item/ammo_magazine/s44/rubber name = "speedloader (.44 rubber)" icon_state = "R44" - ammo_type = /obj/item/ammo_casing/a44r + ammo_type = /obj/item/ammo_casing/a44/rubber ///////// 7.62mm ///////// @@ -604,7 +604,7 @@ /obj/item/ammo_magazine/clip/c762/practice name = "rifle clip (7.62mm practice)" - ammo_type = /obj/item/ammo_casing/a762p + ammo_type = /obj/item/ammo_casing/a762/practice /obj/item/ammo_magazine/clip/c762/hunter name = "rifle clip (7.62mm hunting)" diff --git a/code/modules/projectiles/ammunition/rounds.dm b/code/modules/projectiles/ammunition/rounds.dm index 028d1cac1e1..406dbcae88b 100644 --- a/code/modules/projectiles/ammunition/rounds.dm +++ b/code/modules/projectiles/ammunition/rounds.dm @@ -27,6 +27,7 @@ desc = "A .357 bullet casing." caliber = ".357" projectile_type = /obj/item/projectile/bullet/pistol/strong + matter = list(DEFAULT_WALL_MATERIAL = 210) /* * .38 @@ -36,10 +37,10 @@ desc = "A .38 bullet casing." caliber = ".38" projectile_type = /obj/item/projectile/bullet/pistol + matter = list(DEFAULT_WALL_MATERIAL = 60) -/obj/item/ammo_casing/a38r +/obj/item/ammo_casing/a38/rubber desc = "A .38 rubber bullet casing." - caliber = ".38" icon_state = "r-casing" projectile_type = /obj/item/projectile/bullet/pistol/rubber @@ -58,12 +59,13 @@ desc = "A .44 bullet casing." caliber = ".44" projectile_type = /obj/item/projectile/bullet/pistol/strong + matter = list(DEFAULT_WALL_MATERIAL = 210) -/obj/item/ammo_casing/a44r +/obj/item/ammo_casing/a44/rubber icon_state = "r-casing" desc = "A .44 rubber bullet casing." - caliber = ".44" projectile_type = /obj/item/projectile/bullet/pistol/rubber/strong + matter = list(DEFAULT_WALL_MATERIAL = 60) /* * .75 (aka Gyrojet Rockets, aka admin abuse) @@ -73,6 +75,7 @@ desc = "A .75 gyrojet rocket sheathe." caliber = ".75" projectile_type = /obj/item/projectile/bullet/gyro + matter = list(DEFAULT_WALL_MATERIAL = 4000) /* * 9mm @@ -82,26 +85,25 @@ desc = "A 9mm bullet casing." caliber = "9mm" projectile_type = /obj/item/projectile/bullet/pistol + matter = list(DEFAULT_WALL_MATERIAL = 60) /obj/item/ammo_casing/a9mm/ap desc = "A 9mm armor-piercing bullet casing." projectile_type = /obj/item/projectile/bullet/pistol/ap + matter = list(DEFAULT_WALL_MATERIAL = 80) -/obj/item/ammo_casing/a9mmf +/obj/item/ammo_casing/a9mm/flash desc = "A 9mm flash shell casing." - caliber = "9mm" icon_state = "r-casing" projectile_type = /obj/item/projectile/energy/flash -/obj/item/ammo_casing/a9mmr +/obj/item/ammo_casing/a9mm/rubber desc = "A 9mm rubber bullet casing." - caliber = "9mm" icon_state = "r-casing" projectile_type = /obj/item/projectile/bullet/pistol/rubber -/obj/item/ammo_casing/a9mmp +/obj/item/ammo_casing/a9mm/practice desc = "A 9mm practice bullet casing." - caliber = "9mm" icon_state = "r-casing" projectile_type = /obj/item/projectile/bullet/pistol/practice @@ -113,30 +115,30 @@ desc = "A .45 bullet casing." caliber = ".45" projectile_type = /obj/item/projectile/bullet/pistol/medium + matter = list(DEFAULT_WALL_MATERIAL = 75) -/obj/item/ammo_casing/a45ap +/obj/item/ammo_casing/a45/ap desc = "A .45 Armor-Piercing bullet casing." - caliber = ".45" icon_state = "r-casing" projectile_type = /obj/item/projectile/bullet/pistol/medium/ap -/obj/item/ammo_casing/a45p +/obj/item/ammo_casing/a45/practice desc = "A .45 practice bullet casing." - caliber = ".45" icon_state = "r-casing" projectile_type = /obj/item/projectile/bullet/pistol/practice + matter = list(DEFAULT_WALL_MATERIAL = 60) -/obj/item/ammo_casing/a45r +/obj/item/ammo_casing/a45/rubber desc = "A .45 rubber bullet casing." - caliber = ".45" icon_state = "r-casing" projectile_type = /obj/item/projectile/bullet/pistol/rubber + matter = list(DEFAULT_WALL_MATERIAL = 60) -/obj/item/ammo_casing/a45f +/obj/item/ammo_casing/a45/flash desc = "A .45 flash shell casing." - caliber = ".45" icon_state = "r-casing" projectile_type = /obj/item/projectile/energy/flash + matter = list(DEFAULT_WALL_MATERIAL = 60) /obj/item/ammo_casing/a45/emp name = ".45 haywire round" @@ -149,7 +151,6 @@ desc = "A .45 hollow-point bullet casing." projectile_type = /obj/item/projectile/bullet/pistol/medium/hollow - /* * 10mm */ @@ -158,6 +159,7 @@ desc = "A 10mm bullet casing." caliber = "10mm" projectile_type = /obj/item/projectile/bullet/pistol/medium + matter = list(DEFAULT_WALL_MATERIAL = 75) /obj/item/ammo_casing/a10mm/emp name = "10mm haywire round" @@ -183,7 +185,6 @@ desc = "A 12 gauge shell." icon_state = "gshell" projectile_type = /obj/item/projectile/bullet/pellet/shotgun - matter = list(DEFAULT_WALL_MATERIAL = 360) /obj/item/ammo_casing/a12g/blank name = "shotgun shell" @@ -197,7 +198,7 @@ desc = "A practice shell." icon_state = "pshell" projectile_type = /obj/item/projectile/bullet/shotgun/practice - matter = list("metal" = 90) + matter = list(DEFAULT_WALL_MATERIAL = 90) /obj/item/ammo_casing/a12g/beanbag name = "beanbag shell" @@ -244,16 +245,18 @@ caliber = "7.62mm" icon_state = "rifle-casing" projectile_type = /obj/item/projectile/bullet/rifle/a762 + matter = list(DEFAULT_WALL_MATERIAL = 200) /obj/item/ammo_casing/a762/ap desc = "A 7.62mm armor-piercing bullet casing." projectile_type = /obj/item/projectile/bullet/rifle/a762/ap + matter = list(DEFAULT_WALL_MATERIAL = 300) -/obj/item/ammo_casing/a762p +/obj/item/ammo_casing/a762/practice desc = "A 7.62mm practice bullet casing." - caliber = "7.62mm" icon_state = "rifle-casing" // Need to make an icon for these projectile_type = /obj/item/projectile/bullet/rifle/practice + matter = list(DEFAULT_WALL_MATERIAL = 90) /obj/item/ammo_casing/a762/blank desc = "A blank 7.62mm bullet casing." @@ -288,16 +291,18 @@ caliber = "5.45mm" icon_state = "rifle-casing" projectile_type = /obj/item/projectile/bullet/rifle/a545 + matter = list(DEFAULT_WALL_MATERIAL = 180) /obj/item/ammo_casing/a545/ap desc = "A 5.45mm armor-piercing bullet casing." projectile_type = /obj/item/projectile/bullet/rifle/a545/ap + matter = list(DEFAULT_WALL_MATERIAL = 270) -/obj/item/ammo_casing/a545p +/obj/item/ammo_casing/a545/practice desc = "A 5.45mm practice bullet casing." - caliber = "5.45mm" icon_state = "rifle-casing" // Need to make an icon for these projectile_type = /obj/item/projectile/bullet/rifle/practice + matter = list(DEFAULT_WALL_MATERIAL = 90) /obj/item/ammo_casing/a545/blank desc = "A blank 5.45mm bullet casing." @@ -322,6 +327,7 @@ icon_state = "rocketshell" projectile_type = /obj/item/missile caliber = "rocket" + matter = list(DEFAULT_WALL_MATERIAL = 10000) /obj/item/ammo_casing/cap name = "cap" @@ -330,6 +336,7 @@ icon_state = "r-casing" color = "#FF0000" projectile_type = /obj/item/projectile/bullet/pistol/cap + matter = list(DEFAULT_WALL_MATERIAL = 85) /obj/item/ammo_casing/spent // For simple hostile mobs only, so they don't cough up usable bullets when firing. This is for literally nothing else. icon_state = "s-casing-spent" diff --git a/code/modules/projectiles/ammunition/smartmag.dm b/code/modules/projectiles/ammunition/smartmag.dm new file mode 100644 index 00000000000..4b42f18251b --- /dev/null +++ b/code/modules/projectiles/ammunition/smartmag.dm @@ -0,0 +1,226 @@ +///////// Smart Mags ///////// + +/obj/item/ammo_magazine/smart + name = "smart magazine" + icon_state = "smartmag-empty" + desc = "A Hephaistos Industries brand Smart Magazine. It uses advanced matter manipulation technology to create bullets from energy. Simply present your loaded gun or magazine to the Smart Magazine." + multiple_sprites = 1 + max_ammo = 5 + mag_type = MAGAZINE + + caliber = null //Set later + ammo_type = null //Set later + initial_ammo = 0 //Ensure no problems with no ammo_type or caliber set + + can_remove_ammo = FALSE // Interferes with batteries + + var/production_time = 6 SECONDS // Delay in between bullets forming + var/last_production_time = 0 // Used in determining if we should make a new bullet + var/production_cost = null // Set when an ammo type is scanned in + var/production_modifier = 2 // Multiplier on the ammo_casing's matter cost + var/production_delay = 75 // If we're in a gun, how long since it last shot do we need to wait before making bullets? + + var/obj/item/weapon/gun/holding_gun = null // What gun are we in, if any? + + var/obj/item/weapon/cell/device/attached_cell = null // What cell are we using, if any? + + var/emagged = 0 // If you emag the smart mag, you can get the bullets out by clicking it + +/obj/item/ammo_magazine/smart/New() + processing_objects |= src + ..() + +/obj/item/ammo_magazine/smart/Destroy() + processing_objects -= src + ..() + +/obj/item/ammo_magazine/smart/process() + if(!holding_gun) // Yes, this is awful, sorry. Don't know a better way to figure out if we've been moved into or out of a gun. + if(istype(src.loc, /obj/item/weapon/gun)) + holding_gun = src.loc + + if(caliber && ammo_type && attached_cell) + if(stored_ammo.len == max_ammo) + last_production_time = world.time // Otherwise the max_ammo var is basically always off by 1 + return + if(holding_gun && world.time < holding_gun.last_shot + production_delay) // Same as recharging energy weapons. + return + if(world.time > last_production_time + production_time) + last_production_time = world.time + produce() + +/obj/item/ammo_magazine/smart/examine(mob/user) + ..() + + if(attached_cell) + to_chat(user, "\The [src] is loaded with a [attached_cell.name]. It is [round(attached_cell.percent())]% charged.") + else + to_chat(user, "\The [src] does not appear to have a power source installed.") + +/obj/item/ammo_magazine/smart/update_icon() + if(attached_cell) + icon_state = "smartmag-filled" + else + icon_state = "smartmag-empty" + +// Emagging lets you remove bullets from your bullet-making magazine +/obj/item/ammo_magazine/smart/emag_act(var/remaining_charges, var/mob/user) + if(!emagged) + to_chat(user, "You overload \the [src]'s security measures causing widespread destabilisation. It is likely you could empty \the [src] now.") + emagged = TRUE + can_remove_ammo = TRUE + return TRUE + return FALSE + +/obj/item/ammo_magazine/smart/attackby(var/obj/item/I as obj, mob/user) + if(istype(I, /obj/item/weapon/cell/device)) + if(attached_cell) + to_chat(user, "\The [src] already has a [attached_cell.name] attached.") + return + else + to_chat(user, "You begin inserting \the [I] into \the [src].") + if(do_after(user, 25)) + user.drop_item() + I.forceMove(src) + attached_cell = I + user.visible_message("[user] installs a cell in \the [src].", "You install \the [I] into \the [src].") + update_icon() + return + + else if(I.is_screwdriver()) + if(attached_cell) + to_chat(user, "You begin removing \the [attached_cell] from \the [src].") + if(do_after(user, 10)) // Faster than doing it by hand + attached_cell.update_icon() + attached_cell.forceMove(get_turf(src.loc)) + attached_cell = null + user.visible_message("[user] removes a cell from \the [src].", "You remove \the [attached_cell] from \the [src].") + update_icon() + return + + else if(istype(I, /obj/item/ammo_magazine) || istype(I, /obj/item/ammo_casing)) + scan_ammo(I, user) + + ..() + +/obj/item/ammo_magazine/smart/afterattack(atom/target, mob/user, proximity_flag, click_parameters) + if(src.loc == user) + scan_ammo(target, user) + ..() + +// You can remove the power cell from the magazine by hand, but it's way slower than using a screwdriver +/obj/item/ammo_magazine/smart/attack_hand(mob/user) + if(user.get_inactive_hand() == src) + if(attached_cell) + to_chat(user, "You struggle to remove \the [attached_cell] from \the [src].") + if(do_after(user, 40)) + attached_cell.update_icon() + user.put_in_hands(attached_cell) + attached_cell = null + user.visible_message("[user] removes a cell from \the [src].", "You remove \the [attached_cell] from \the [src].") + update_icon() + return + ..() + +// Classic emp_act, just drains the battery +/obj/item/ammo_magazine/smart/emp_act(severity) + ..() + if(attached_cell) + attached_cell.emp_act(severity) + +// Finds the cell for the magazine, used by rechargers +/obj/item/ammo_magazine/smart/get_cell() + return attached_cell + +// Removes energy from the attached cell when creating new bullets +/obj/item/ammo_magazine/smart/proc/chargereduction() + return attached_cell && attached_cell.checked_use(production_cost) + +// Sets how much energy is drained to make each bullet +/obj/item/ammo_magazine/smart/proc/set_production_cost(var/obj/item/ammo_casing/A) + var/list/matters = ammo_repository.get_materials_from_object(A) + var/tempcost + for(var/key in matters) + var/value = matters[key] + tempcost += value * production_modifier + production_cost = tempcost + +// Scans a magazine or ammo casing and tells the smart mag to start making those, if it can +/obj/item/ammo_magazine/smart/proc/scan_ammo(atom/target, mob/user) + + var/new_caliber = caliber // Tracks what our new caliber will be + var/new_ammo_type = ammo_type // Tracks what our new ammo_type will be + + if(istype(target, /obj/item/ammo_magazine)) + var/obj/item/ammo_magazine/M = target + if(!new_caliber) + new_caliber = M.caliber // If caliber isn't set, set it now + + if(new_caliber && new_caliber != M.caliber) // If we still don't have a caliber, or if our caliber doesn't match the thing we're scanning, give up + return + else + new_ammo_type = M.ammo_type + + if(istype(target, /obj/item/ammo_casing)) + var/obj/item/ammo_casing/C = target + + if(!new_caliber) + new_caliber = C.caliber // If caliber isn't set, set it now + + if(new_caliber && new_caliber != C.caliber) // If we still don't have a caliber, or if our caliber doesn't match the thing we're scanning, give up + return + else + new_ammo_type = C.type + + var/change = FALSE // If we've changed caliber or ammo_type, display the built message. + var/msg = "You scan \the [target] with \the [src], copying \the [target]'s " + if(new_caliber != caliber) // This should never happen without the ammo_type switching too + change = TRUE + msg += "caliber and " + if(new_ammo_type != ammo_type) + change = TRUE + msg += "ammunition type." + + if(change) + to_chat(user, "[msg]") + caliber = new_caliber + ammo_type = new_ammo_type + set_production_cost(ammo_type) // Update our cost + + return + +// Actually makes the bullets +/obj/item/ammo_magazine/smart/proc/produce() + if(chargereduction()) + var/obj/item/ammo_casing/W = new ammo_type(src) + stored_ammo.Insert(1, W) //add to the head of the list + return 1 + return 0 + + +// This verb clears out the smart mag's copied data, but only if it's empty +/obj/item/ammo_magazine/smart/verb/clear_ammo_data() + set name = "Clear Ammo Data" + set category = "Object" + set src in usr + + if(!istype(src.loc, /mob/living)) // Needs to be in your hands to reset + return + + var/mob/living/carbon/human/H = usr + if(!istype(H)) + return + if(H.stat) + return + + if(LAZYLEN(stored_ammo)) + to_chat(usr, "You can't reset \the [src] unless it's empty!") + return + + to_chat(usr, "You clear \the [src]'s data buffers.") + + caliber = null + ammo_type = null + production_cost = null + + return \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm index 1c375553252..f96d53aaac3 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -98,20 +98,21 @@ strength_mod *= 2 // VOREStation Edit - M.adjustToxLoss(removed) M.add_chemical_effect(CE_ALCOHOL, 1) + var/effective_dose = dose * strength_mod * (1 + volume/60) //drinking a LOT will make you go down faster - if(dose * strength_mod >= strength) // Early warning + if(effective_dose >= strength) // Early warning M.make_dizzy(18) // It is decreased at the speed of 3 per tick - if(dose * strength_mod >= strength * 2) // Slurring + if(effective_dose >= strength * 2) // Slurring M.slurring = max(M.slurring, 90) - if(dose * strength_mod >= strength * 3) // Confusion - walking in random directions + if(effective_dose >= strength * 3) // Confusion - walking in random directions M.Confuse(60) - if(dose * strength_mod >= strength * 4) // Blurry vision + if(effective_dose >= strength * 4) // Blurry vision M.eye_blurry = max(M.eye_blurry, 30) - if(dose * strength_mod >= strength * 5) // Drowsyness - periodically falling asleep + if(effective_dose >= strength * 5) // Drowsyness - periodically falling asleep M.drowsyness = max(M.drowsyness, 60) - if(dose * strength_mod >= strength * 6) // Toxic dose + if(effective_dose >= strength * 6) // Toxic dose M.add_chemical_effect(CE_ALCOHOL_TOXIC, toxicity*3) - if(dose * strength_mod >= strength * 7) // Pass out + if(effective_dose >= strength * 7) // Pass out M.paralysis = max(M.paralysis, 60) M.sleeping = max(M.sleeping, 90) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm index 7a3e00eab8c..a7bcd87892c 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -431,7 +431,7 @@ if(alien != IS_SLIME) return else if(eyes_covered) - to_chat(M, "Your [safe_thing] protect you from most of the pepperspray!") + to_chat(M, "Your [safe_thing] protects you from most of the pepperspray!") M.eye_blurry = max(M.eye_blurry, effective_strength * 3) M.Blind(effective_strength) M.Stun(5) @@ -510,10 +510,11 @@ var/adj_drowsy = 0 var/adj_sleepy = 0 var/adj_temp = 0 + var/water_based = TRUE /datum/reagent/drink/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/strength_mod = 1 - if(alien == IS_SLIME) + if(alien == IS_SLIME && water_based) strength_mod = 3 M.adjustToxLoss(removed * strength_mod) // Probably not a good idea; not very deadly though return @@ -528,7 +529,7 @@ if(adj_temp < 0 && M.bodytemperature > 310) M.bodytemperature = min(310, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) /* VOREStation Removal - if(alien == IS_SLIME) + if(alien == IS_SLIME && water_based) M.adjustToxLoss(removed * 2) */ //VOREStation Removal End @@ -1495,6 +1496,73 @@ glass_name = "Love Potion" glass_desc = "Love me tender, love me sweet." +/datum/reagent/drink/oilslick + name = "Oil Slick" + id = "oilslick" + description = "A viscous, but sweet, ooze." + taste_description = "honey" + color = "#FDF5E6" // rgb(253,245,230) + water_based = FALSE + + glass_name = "Oil Slick" + glass_desc = "A concoction that should probably be in an engine, rather than your stomach." + glass_icon = DRINK_ICON_NOISY + +/datum/reagent/drink/nuclearwaste + name = "Nuclear Waste" + id = "nuclearwaste" + description = "A viscous, glowing slurry." + taste_description = "sour honey drops" + color = "#7FFF00" // rgb(127,255,0) + water_based = FALSE + + glass_name = "Nuclear Waste" + glass_desc = "Sadly, no super powers." + glass_icon = DRINK_ICON_NOISY + glass_special = list(DRINK_FIZZ) + +/datum/reagent/drink/nuclearwaste/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + ..() + if(alien == IS_DIONA) + return + M.bloodstr.add_reagent("radium", 0.3) + +/datum/reagent/drink/nuclearwaste/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) + ..() + if(alien == IS_DIONA) + return + M.ingested.add_reagent("radium", 0.25) + +/datum/reagent/drink/sodaoil //Mixed with normal drinks to make a 'potable' version for Prometheans if mixed 1-1. Dilution is key. + name = "Soda Oil" + id = "sodaoil" + description = "A thick, bubbling soda." + taste_description = "chewy water" + color = "#F0FFF0" // rgb(245,255,250) + water_based = FALSE + + glass_name = "Soda Oil" + glass_desc = "A pitiful sludge that looks vaguely like a soda.. if you look at it a certain way." + glass_icon = DRINK_ICON_NOISY + glass_special = list(DRINK_FIZZ) + +/datum/reagent/drink/sodaoil/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + ..() + if(M.bloodstr) // If, for some reason, they are injected, dilute them as well. + for(var/datum/reagent/R in M.ingested.reagent_list) + if(istype(R, /datum/reagent/drink)) + var/datum/reagent/drink/D = R + if(D.water_based) + M.adjustToxLoss(removed * -3) + +/datum/reagent/drink/sodaoil/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) + ..() + if(M.ingested) // Find how many drinks are causing tox, and negate them. + for(var/datum/reagent/R in M.ingested.reagent_list) + if(istype(R, /datum/reagent/drink)) + var/datum/reagent/drink/D = R + if(D.water_based) + M.adjustToxLoss(removed * -2) /* Alcohol */ @@ -2155,7 +2223,7 @@ color = "#FFD300" strength = 50 adj_temp = -20 - targ_temp = 270 + targ_temp = 280 glass_name = "iced beer" glass_desc = "A beer so frosty, the air around it freezes." @@ -2987,3 +3055,101 @@ glass_name = "Mint Julep" glass_desc = "Minty and refreshing, perfect for a hot day." + +/datum/reagent/ethanol/godsake + name = "Gods Sake" + id = "godsake" + description = "Anime's favorite drink." + taste_description = "the power of god and anime" + color = "#DDDDDD" + strength = 25 + + glass_name = "God's Sake" + glass_desc = "A glass of sake." + +/datum/reagent/ethanol/godka + name = "Godka" + id = "godka" + description = "Number one drink AND fueling choice for Russians multiverse-wide." + taste_description = "russian steel and a hint of grain" + color = "#0064C8" + strength = 50 + + glass_name = "Godka" + glass_desc = "The glass is barely able to contain the wodka. Xynta." + glass_special = list(DRINK_FIZZ) + +/datum/reagent/ethanol/godka/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) + ..() + M.apply_effect(max(M.radiation - 5 * removed, 0), IRRADIATE, check_protection = 0) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species.has_organ[O_LIVER]) + var/obj/item/organ/L = H.internal_organs_by_name[O_LIVER] + if(!L) + return + var/adjust_liver = rand(-3, 2) + if(prob(L.damage)) + to_chat(M, "You feel woozy...") + L.damage = max(L.damage + (adjust_liver * removed), 0) + var/adjust_tox = rand(-4, 2) + M.adjustToxLoss(adjust_tox * removed) + +/datum/reagent/ethanol/holywine + name = "Angel Ichor" + id = "holywine" + description = "A premium alchoholic beverage made from distilled angel blood." + taste_description = "wings in a glass, and a hint of grape" + color = "#C4921E" + strength = 20 + + glass_name = "Angel Ichor" + glass_desc = "A very pious looking drink." + glass_icon = DRINK_ICON_NOISY + +/datum/reagent/ethanol/holy_mary + name = "Holy Mary" + id = "holymary" + description = "A strange yet pleasurable mixture made of vodka, angel's ichor and lime juice. Or at least you THINK the yellow stuff is angel's ichor." + taste_description = "grapes with a hint of lime" + color = "#DCAE12" + strength = 20 + + glass_name = "Holy Mary" + glass_desc = "Angel's Ichor, mixed with Vodka and a lil' bit of lime. Tastes like liquid ascension." + +/datum/reagent/ethanol/angelswrath + name = "Angels Wrath" + id = "angelswrath" + description = "This thing makes the hair on the back of your neck stand up." + taste_description = "sweet victory and sour iron" + taste_mult = 1.5 + color = "#F3C906" + strength = 30 + + glass_name = "Angels' Wrath" + glass_desc = "Just looking at this thing makes you sweat." + glass_icon = DRINK_ICON_NOISY + glass_special = list(DRINK_FIZZ) + +/datum/reagent/ethanol/angelskiss + name = "Angels Kiss" + id = "angelskiss" + description = "Miracle time!" + taste_description = "sweet forgiveness and bitter iron" + color = "#AD772B" + strength = 25 + + glass_name = "Angel's Kiss" + glass_desc = "Miracle time!" + +/datum/reagent/ethanol/ichor_mead + name = "Ichor Mead" + id = "ichor_mead" + description = "A trip to Valhalla." + taste_description = "valhalla" + color = "#955B37" + strength = 30 + + glass_name = "Ichor Mead" + glass_desc = "A trip to Valhalla." diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index c992d0eae2f..6b705f4f548 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -316,10 +316,9 @@ if(alien == IS_SLIME) chem_effective = 0.75 M.stuttering = min(50, max(0, M.stuttering + 5)) //If you can't feel yourself, and your main mode of speech is resonation, there's a problem. - M.add_chemical_effect(CE_SLOWDOWN, 1) M.add_chemical_effect(CE_PAINKILLER, 200 * chem_effective) + M.add_chemical_effect(CE_SLOWDOWN, 1) M.eye_blurry = min(M.eye_blurry + 10, 250 * chem_effective) - M.Confuse(5) /datum/reagent/oxycodone/overdose(var/mob/living/carbon/M, var/alien) ..() @@ -816,6 +815,7 @@ reagent_state = LIQUID color = "#BF80BF" metabolism = 0.01 + ingest_met = 0.25 mrate_static = TRUE data = 0 @@ -838,6 +838,7 @@ reagent_state = LIQUID color = "#FF80FF" metabolism = 0.01 + ingest_met = 0.25 mrate_static = TRUE data = 0 @@ -860,6 +861,7 @@ reagent_state = LIQUID color = "#FF80BF" metabolism = 0.01 + ingest_met = 0.25 mrate_static = TRUE data = 0 @@ -886,6 +888,7 @@ reagent_state = LIQUID color = "#e6efe3" metabolism = 0.01 + ingest_met = 0.25 mrate_static = TRUE data = 0 diff --git a/code/modules/reagents/dispenser/supply.dm b/code/modules/reagents/dispenser/supply.dm index abf3f6b48d9..d4c90b08727 100644 --- a/code/modules/reagents/dispenser/supply.dm +++ b/code/modules/reagents/dispenser/supply.dm @@ -1,4 +1,4 @@ -/datum/supply_packs/chemistry_dispenser +/datum/supply_pack/chemistry_dispenser name = "Reagent dispenser" contains = list( /obj/machinery/chemical_dispenser{anchored = 0} @@ -8,7 +8,7 @@ containername = "reagent dispenser crate" group = "Reagents" -/datum/supply_packs/beer_dispenser +/datum/supply_pack/beer_dispenser name = "Booze dispenser" contains = list( /obj/machinery/chemical_dispenser/bar_alc{anchored = 0} @@ -18,7 +18,7 @@ containername = "booze dispenser crate" group = "Reagents" -/datum/supply_packs/soda_dispenser +/datum/supply_pack/soda_dispenser name = "Soda dispenser" contains = list( /obj/machinery/chemical_dispenser/bar_soft{anchored = 0} @@ -28,7 +28,7 @@ containername = "soda dispenser crate" group = "Reagents" -/datum/supply_packs/reagents +/datum/supply_pack/reagents name = "Chemistry dispenser refill" contains = list( /obj/item/weapon/reagent_containers/chem_disp_cartridge/hydrogen, @@ -60,7 +60,7 @@ access = list(access_chemistry) group = "Reagents" -/datum/supply_packs/alcohol_reagents +/datum/supply_pack/alcohol_reagents name = "Bar alcoholic dispenser refill" contains = list( /obj/item/weapon/reagent_containers/chem_disp_cartridge/beer, @@ -83,7 +83,7 @@ access = list(access_bar) group = "Reagents" -/datum/supply_packs/softdrink_reagents +/datum/supply_pack/softdrink_reagents name = "Bar soft drink dispenser refill" contains = list( /obj/item/weapon/reagent_containers/chem_disp_cartridge/water, @@ -110,7 +110,7 @@ containername = "soft drinks crate" group = "Reagents" -/datum/supply_packs/coffee_reagents +/datum/supply_pack/coffee_reagents name = "Coffee machine dispenser refill" contains = list( /obj/item/weapon/reagent_containers/chem_disp_cartridge/coffee, @@ -127,7 +127,7 @@ containername = "coffee drinks crate" group = "Reagents" -/datum/supply_packs/dispenser_cartridges +/datum/supply_pack/dispenser_cartridges name = "Empty dispenser cartridges" contains = list( /obj/item/weapon/reagent_containers/chem_disp_cartridge, @@ -147,7 +147,7 @@ group = "Reagents" #define SEC_PACK(_tname, _type, _name, _cname, _cost, _access)\ - datum/supply_packs/dispenser_cartridges{\ + datum/supply_pack/dispenser_cartridges{\ _tname {\ name = _name ;\ containername = _cname ;\ @@ -159,7 +159,7 @@ }\ } #define PACK(_tname, _type, _name, _cname, _cost)\ - datum/supply_packs/dispenser_cartridges{\ + datum/supply_pack/dispenser_cartridges{\ _tname {\ name = _name ;\ containername = _cname ;\ diff --git a/code/modules/shuttles/shuttle_emergency.dm b/code/modules/shuttles/shuttle_emergency.dm index 53d2570ca99..7db9ae2b629 100644 --- a/code/modules/shuttles/shuttle_emergency.dm +++ b/code/modules/shuttles/shuttle_emergency.dm @@ -233,7 +233,7 @@ "user" = debug? user : null, ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "escape_shuttle_control_console.tmpl", "Shuttle Control", 470, 420) diff --git a/code/modules/surgery/bones.dm b/code/modules/surgery/bones.dm index 5465e7d03ef..2f832fdb9f8 100644 --- a/code/modules/surgery/bones.dm +++ b/code/modules/surgery/bones.dm @@ -9,9 +9,11 @@ /datum/surgery_step/glue_bone allowed_tools = list( - /obj/item/weapon/surgical/bonegel = 100, \ - /obj/item/weapon/screwdriver = 75 + /obj/item/weapon/surgical/bonegel = 100 ) + + allowed_procs = list(IS_SCREWDRIVER = 75) + can_infect = 1 blood_level = 1 @@ -49,10 +51,11 @@ /datum/surgery_step/set_bone allowed_tools = list( - /obj/item/weapon/surgical/bonesetter = 100, \ - /obj/item/weapon/wrench = 75 \ + /obj/item/weapon/surgical/bonesetter = 100 ) + allowed_procs = list(IS_WRENCH = 75) + min_duration = 60 max_duration = 70 @@ -92,10 +95,11 @@ /datum/surgery_step/mend_skull allowed_tools = list( - /obj/item/weapon/surgical/bonesetter = 100, \ - /obj/item/weapon/wrench = 75 \ + /obj/item/weapon/surgical/bonesetter = 100 ) + allowed_procs = list(IS_WRENCH = 75) + min_duration = 60 max_duration = 70 @@ -130,9 +134,11 @@ /datum/surgery_step/finish_bone allowed_tools = list( - /obj/item/weapon/surgical/bonegel = 100, \ - /obj/item/weapon/screwdriver = 75 + /obj/item/weapon/surgical/bonegel = 100 ) + + allowed_procs = list(IS_SCREWDRIVER = 75) + can_infect = 1 blood_level = 1 @@ -169,8 +175,9 @@ /datum/surgery_step/clamp_bone allowed_tools = list( - /obj/item/weapon/surgical/bone_clamp = 100 - ) + /obj/item/weapon/surgical/bone_clamp = 100 + ) + can_infect = 1 blood_level = 1 diff --git a/code/modules/surgery/encased.dm b/code/modules/surgery/encased.dm index 7bc33d75000..35136917064 100644 --- a/code/modules/surgery/encased.dm +++ b/code/modules/surgery/encased.dm @@ -20,8 +20,8 @@ /datum/surgery_step/open_encased/saw allowed_tools = list( - /obj/item/weapon/surgical/circular_saw = 100, \ - /obj/item/weapon/material/knife/machete/hatchet = 75 + /obj/item/weapon/surgical/circular_saw = 100, \ + /obj/item/weapon/material/knife/machete/hatchet = 75 ) min_duration = 50 @@ -69,10 +69,11 @@ /datum/surgery_step/open_encased/retract allowed_tools = list( - /obj/item/weapon/surgical/retractor = 100, \ - /obj/item/weapon/crowbar = 75 + /obj/item/weapon/surgical/retractor = 100 ) + allowed_procs = list(IS_CROWBAR = 75) + min_duration = 30 max_duration = 40 @@ -121,10 +122,11 @@ /datum/surgery_step/open_encased/close allowed_tools = list( - /obj/item/weapon/surgical/retractor = 100, \ - /obj/item/weapon/crowbar = 75 + /obj/item/weapon/surgical/retractor = 100, ) + allowed_procs = list(IS_CROWBAR = 75) + min_duration = 20 max_duration = 40 @@ -178,10 +180,11 @@ /datum/surgery_step/open_encased/mend allowed_tools = list( - /obj/item/weapon/surgical/bonegel = 100, \ - /obj/item/weapon/screwdriver = 75 + /obj/item/weapon/surgical/bonegel = 100 ) + allowed_procs = list(IS_SCREWDRIVER = 75) + min_duration = 20 max_duration = 40 diff --git a/code/modules/surgery/face.dm b/code/modules/surgery/face.dm index b3fae927bbd..30f50b14ecc 100644 --- a/code/modules/surgery/face.dm +++ b/code/modules/surgery/face.dm @@ -88,9 +88,11 @@ /datum/surgery_step/face/fix_face allowed_tools = list( - /obj/item/weapon/surgical/retractor = 100, \ - /obj/item/weapon/crowbar = 55, \ - /obj/item/weapon/material/kitchen/utensil/fork = 75) + /obj/item/weapon/surgical/retractor = 100, \ + /obj/item/weapon/material/kitchen/utensil/fork = 75 + ) + + allowed_procs = list(IS_CROWBAR = 55) min_duration = 80 max_duration = 100 diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index f74c7dda641..64de0aeef4f 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -28,9 +28,9 @@ /datum/surgery_step/generic/cut_open allowed_tools = list( - /obj/item/weapon/surgical/scalpel = 100, \ - /obj/item/weapon/material/knife = 75, \ - /obj/item/weapon/material/shard = 50, \ + /obj/item/weapon/surgical/scalpel = 100, \ + /obj/item/weapon/material/knife = 75, \ + /obj/item/weapon/material/shard = 50, \ ) req_open = 0 @@ -72,10 +72,10 @@ /datum/surgery_step/generic/cut_with_laser allowed_tools = list( - /obj/item/weapon/surgical/scalpel/laser3 = 95, \ - /obj/item/weapon/surgical/scalpel/laser2 = 85, \ - /obj/item/weapon/surgical/scalpel/laser1 = 75, \ - /obj/item/weapon/melee/energy/sword = 5 + /obj/item/weapon/surgical/scalpel/laser3 = 95, \ + /obj/item/weapon/surgical/scalpel/laser2 = 85, \ + /obj/item/weapon/surgical/scalpel/laser1 = 75, \ + /obj/item/weapon/melee/energy/sword = 5 ) priority = 2 req_open = 0 @@ -118,8 +118,9 @@ /datum/surgery_step/generic/incision_manager allowed_tools = list( - /obj/item/weapon/surgical/scalpel/manager = 100 + /obj/item/weapon/surgical/scalpel/manager = 100 ) + priority = 2 req_open = 0 min_duration = 80 @@ -163,9 +164,9 @@ /datum/surgery_step/generic/clamp_bleeders allowed_tools = list( - /obj/item/weapon/surgical/hemostat = 100, \ - /obj/item/stack/cable_coil = 75, \ - /obj/item/device/assembly/mousetrap = 20 + /obj/item/weapon/surgical/hemostat = 100, \ + /obj/item/stack/cable_coil = 75, \ + /obj/item/device/assembly/mousetrap = 20 ) min_duration = 40 @@ -202,11 +203,12 @@ /datum/surgery_step/generic/retract_skin allowed_tools = list( - /obj/item/weapon/surgical/retractor = 100, \ - /obj/item/weapon/crowbar = 75, \ - /obj/item/weapon/material/kitchen/utensil/fork = 50 + /obj/item/weapon/surgical/retractor = 100, \ + /obj/item/weapon/material/kitchen/utensil/fork = 50 ) + allowed_procs = list(IS_CROWBAR = 75) + min_duration = 30 max_duration = 40 @@ -261,10 +263,10 @@ /datum/surgery_step/generic/cauterize allowed_tools = list( - /obj/item/weapon/surgical/cautery = 100, \ - /obj/item/clothing/mask/smokable/cigarette = 75, \ - /obj/item/weapon/flame/lighter = 50, \ - /obj/item/weapon/weldingtool = 25 + /obj/item/weapon/surgical/cautery = 100, \ + /obj/item/clothing/mask/smokable/cigarette = 75, \ + /obj/item/weapon/flame/lighter = 50, \ + /obj/item/weapon/weldingtool = 25 ) min_duration = 70 @@ -302,8 +304,8 @@ /datum/surgery_step/generic/amputate allowed_tools = list( - /obj/item/weapon/surgical/circular_saw = 100, \ - /obj/item/weapon/material/knife/machete/hatchet = 75 + /obj/item/weapon/surgical/circular_saw = 100, \ + /obj/item/weapon/material/knife/machete/hatchet = 75 ) req_open = 0 diff --git a/code/modules/surgery/implant.dm b/code/modules/surgery/implant.dm index 3bbb5f10897..ae0e7610a73 100644 --- a/code/modules/surgery/implant.dm +++ b/code/modules/surgery/implant.dm @@ -44,9 +44,9 @@ /datum/surgery_step/cavity/make_space allowed_tools = list( - /obj/item/weapon/surgical/surgicaldrill = 100, \ - /obj/item/weapon/pen = 75, \ - /obj/item/stack/rods = 50 + /obj/item/weapon/surgical/surgicaldrill = 100, \ + /obj/item/weapon/pen = 75, \ + /obj/item/stack/rods = 50 ) min_duration = 60 @@ -77,10 +77,10 @@ /datum/surgery_step/cavity/close_space priority = 2 allowed_tools = list( - /obj/item/weapon/surgical/cautery = 100, \ - /obj/item/clothing/mask/smokable/cigarette = 75, \ - /obj/item/weapon/flame/lighter = 50, \ - /obj/item/weapon/weldingtool = 25 + /obj/item/weapon/surgical/cautery = 100, \ + /obj/item/clothing/mask/smokable/cigarette = 75, \ + /obj/item/weapon/flame/lighter = 50, \ + /obj/item/weapon/weldingtool = 25 ) min_duration = 60 @@ -157,11 +157,12 @@ /datum/surgery_step/cavity/implant_removal allowed_tools = list( - /obj/item/weapon/surgical/hemostat = 100, \ - /obj/item/weapon/wirecutters = 75, \ - /obj/item/weapon/material/kitchen/utensil/fork = 20 + /obj/item/weapon/surgical/hemostat = 100, \ + /obj/item/weapon/material/kitchen/utensil/fork = 20 ) + allowed_procs = list(IS_WIRECUTTER = 75) + min_duration = 80 max_duration = 100 diff --git a/code/modules/surgery/~defines.dm b/code/modules/surgery/~defines.dm index 6b27ac56f5b..61f9b143f28 100644 --- a/code/modules/surgery/~defines.dm +++ b/code/modules/surgery/~defines.dm @@ -1 +1 @@ -#undef SURGERY_FAILURE +#undef SURGERY_FAILURE \ No newline at end of file diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index 2e136316e94..7f68e0be3f1 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -91,15 +91,15 @@ var/list/table_icon_cache = list() if(health < maxhealth) switch(health / maxhealth) if(0.0 to 0.5) - user << "It looks severely damaged!" + to_chat(user, "It looks severely damaged!") if(0.25 to 0.5) - user << "It looks damaged!" + to_chat(user, "It looks damaged!") if(0.5 to 1.0) - user << "It has a few scrapes and dents." + to_chat(user, "It has a few scrapes and dents.") /obj/structure/table/attackby(obj/item/weapon/W, mob/user) - if(reinforced && istype(W, /obj/item/weapon/screwdriver)) + if(reinforced && W.is_screwdriver()) remove_reinforced(W, user) if(!reinforced) update_desc() @@ -107,7 +107,7 @@ var/list/table_icon_cache = list() update_material() return 1 - if(carpeted && istype(W, /obj/item/weapon/crowbar)) + if(carpeted && W.is_crowbar()) user.visible_message("\The [user] removes the carpet from \the [src].", "You remove the carpet from \the [src].") new /obj/item/stack/tile/carpet(loc) @@ -124,9 +124,9 @@ var/list/table_icon_cache = list() update_icon() return 1 else - user << "You don't have enough carpet!" + to_chat(user, "You don't have enough carpet!") - if(!reinforced && !carpeted && material && istype(W, /obj/item/weapon/wrench)) + if(!reinforced && !carpeted && material && W.is_wrench()) remove_material(W, user) if(!material) update_connections(1) @@ -137,14 +137,14 @@ var/list/table_icon_cache = list() update_material() return 1 - if(!carpeted && !reinforced && !material && istype(W, /obj/item/weapon/wrench)) + if(!carpeted && !reinforced && !material && W.is_wrench()) dismantle(W, user) return 1 if(health < maxhealth && istype(W, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/F = W if(F.welding) - user << "You begin reparing damage to \the [src]." + to_chat(user, "You begin reparing damage to \the [src].") playsound(src, F.usesound, 50, 1) if(!do_after(user, 20 * F.toolspeed) || !F.remove_fuel(1, user)) return @@ -199,19 +199,19 @@ var/list/table_icon_cache = list() /obj/structure/table/proc/reinforce_table(obj/item/stack/material/S, mob/user) if(reinforced) - user << "\The [src] is already reinforced!" + to_chat(user, "\The [src] is already reinforced!") return if(!can_reinforce) - user << "\The [src] cannot be reinforced!" + to_chat(user, "\The [src] cannot be reinforced!") return if(!material) - user << "Plate \the [src] before reinforcing it!" + to_chat(user, "Plate \the [src] before reinforcing it!") return if(flipped) - user << "Put \the [src] back in place before reinforcing it!" + to_chat(user, "Put \the [src] back in place before reinforcing it!") return reinforced = common_material_add(S, user, "reinforc") @@ -236,12 +236,12 @@ var/list/table_icon_cache = list() /obj/structure/table/proc/common_material_add(obj/item/stack/material/S, mob/user, verb) // Verb is actually verb without 'e' or 'ing', which is added. Works for 'plate'/'plating' and 'reinforce'/'reinforcing'. var/material/M = S.get_material() if(!istype(M)) - user << "You cannot [verb]e \the [src] with \the [S]." + to_chat(user, "You cannot [verb]e \the [src] with \the [S].") return null if(manipulating) return M manipulating = 1 - user << "You begin [verb]ing \the [src] with [M.display_name]." + to_chat(user, "You begin [verb]ing \the [src] with [M.display_name].") if(!do_after(user, 20) || !S.use(1)) manipulating = 0 return null @@ -252,7 +252,7 @@ var/list/table_icon_cache = list() // Returns the material to set the table to. /obj/structure/table/proc/common_material_remove(mob/user, material/M, delay, what, type_holding, sound) if(!M.stack_type) - user << "You are unable to remove the [what] from this [src]!" + to_chat(user, "You are unable to remove the [what] from this [src]!") return M if(manipulating) return M @@ -270,13 +270,13 @@ var/list/table_icon_cache = list() manipulating = 0 return null -/obj/structure/table/proc/remove_reinforced(obj/item/weapon/screwdriver/S, mob/user) +/obj/structure/table/proc/remove_reinforced(obj/item/weapon/S, mob/user) reinforced = common_material_remove(user, reinforced, 40 * S.toolspeed, "reinforcements", "screws", S.usesound) -/obj/structure/table/proc/remove_material(obj/item/weapon/wrench/W, mob/user) +/obj/structure/table/proc/remove_material(obj/item/weapon/W, mob/user) material = common_material_remove(user, material, 20 * W.toolspeed, "plating", "bolts", W.usesound) -/obj/structure/table/proc/dismantle(obj/item/weapon/wrench/W, mob/user) +/obj/structure/table/proc/dismantle(obj/item/W, mob/user) if(manipulating) return manipulating = 1 user.visible_message("\The [user] begins dismantling \the [src].", @@ -468,7 +468,8 @@ var/list/table_icon_cache = list() */ /proc/dirs_to_corner_states(list/dirs) - if(!istype(dirs)) return + if(!istype(dirs)) + return var/list/ret = list(NORTHWEST, SOUTHEAST, NORTHEAST, SOUTHWEST) diff --git a/code/modules/vore/fluffstuff/custom_items_vr.dm b/code/modules/vore/fluffstuff/custom_items_vr.dm index 05e62897166..e527479b2d1 100644 --- a/code/modules/vore/fluffstuff/custom_items_vr.dm +++ b/code/modules/vore/fluffstuff/custom_items_vr.dm @@ -1225,8 +1225,8 @@ for(var/obj/item/device/perfect_tele_beacon/B in beacons) B.tele_hand = null beacons.Cut() - qdel_null(power_source) - qdel_null(spk) + QDEL_NULL(power_source) + QDEL_NULL(spk) return ..() /obj/item/device/perfect_tele/update_icon() diff --git a/code/modules/vore/weight/fitness_machines_vr.dm b/code/modules/vore/weight/fitness_machines_vr.dm index d43d76976f2..0785c778b52 100644 --- a/code/modules/vore/weight/fitness_machines_vr.dm +++ b/code/modules/vore/weight/fitness_machines_vr.dm @@ -55,7 +55,7 @@ "A honk emits from the punching bag as you hit it") /obj/machinery/fitness/heavy/attackby(obj/item/W, var/mob/living/user) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) src.add_fingerprint(user) user.visible_message("[user] has [anchored ? "un" : ""]secured \the [src].", "You [anchored ? "un" : ""]secure \the [src].") anchored = !anchored diff --git a/code/modules/xenoarcheaology/artifacts/replicator.dm b/code/modules/xenoarcheaology/artifacts/replicator.dm index b6999a4a67f..f5575721e59 100644 --- a/code/modules/xenoarcheaology/artifacts/replicator.dm +++ b/code/modules/xenoarcheaology/artifacts/replicator.dm @@ -45,7 +45,7 @@ /obj/item/weapon/material/knife/butch, /obj/item/weapon/caution, /obj/item/weapon/caution/cone, - /obj/item/weapon/crowbar, + /obj/item/weapon/tool/crowbar, /obj/item/weapon/clipboard, /obj/item/weapon/cell, /obj/item/weapon/surgical/circular_saw, @@ -59,9 +59,9 @@ /obj/item/weapon/pickaxe, /obj/item/weapon/shovel, /obj/item/weapon/weldingtool, - /obj/item/weapon/wirecutters, - /obj/item/weapon/wrench, - /obj/item/weapon/screwdriver, + /obj/item/weapon/tool/wirecutters, + /obj/item/weapon/tool/wrench, + /obj/item/weapon/tool/screwdriver, /obj/item/weapon/grenade/chem_grenade/cleaner, /obj/item/weapon/grenade/chem_grenade/metalfoam)