diff --git a/code/__defines/accessories.dm b/code/__defines/accessories.dm index 90de1a5df9b..5e6eccd03bf 100644 --- a/code/__defines/accessories.dm +++ b/code/__defines/accessories.dm @@ -2,6 +2,7 @@ #define ACCESSORY_SLOT_UTILITY "utility" #define ACCESSORY_SLOT_CAPE "cape" #define ACCESSORY_SLOT_ARMBAND "armband" +#define ACCESSORY_SLOT_BADGE "badge" #define ACCESSORY_SLOT_ARMOR_PLATE "armor plate" #define ACCESSORY_SLOT_LEG_GUARDS "leg guards" #define ACCESSORY_SLOT_ARM_GUARDS "arm guards" diff --git a/code/datums/trading/misc.dm b/code/datums/trading/misc.dm index 91ea5b81569..4585b3ea155 100644 --- a/code/datums/trading/misc.dm +++ b/code/datums/trading/misc.dm @@ -140,7 +140,7 @@ /obj/item/clothing/head/plaguedoctorhat = TRADER_THIS_TYPE, /obj/item/clothing/head/helmet/unathi = TRADER_THIS_TYPE, /obj/item/clothing/head/helmet/tank = TRADER_ALL, - /obj/item/clothing/head/helmet/tajara = TRADER_THIS_TYPE, + /obj/item/clothing/head/helmet/amohda = TRADER_THIS_TYPE, /obj/item/clothing/glasses/monocle = TRADER_THIS_TYPE, /obj/item/clothing/mask/smokable/pipe = TRADER_THIS_TYPE, /obj/item/clothing/mask/gas/plaguedoctor = TRADER_THIS_TYPE, @@ -149,7 +149,7 @@ /obj/item/clothing/suit/wizrobe/magusred = TRADER_THIS_TYPE, /obj/item/clothing/suit/wizrobe/magusblue = TRADER_THIS_TYPE, /obj/item/clothing/suit/armor/unathi = TRADER_THIS_TYPE, - /obj/item/clothing/suit/armor/tajara = TRADER_THIS_TYPE, + /obj/item/clothing/suit/armor/amohda = TRADER_THIS_TYPE, /obj/item/clothing/under/gladiator = TRADER_THIS_TYPE, /obj/item/clothing/under/kilt = TRADER_THIS_TYPE, /obj/item/material/harpoon = TRADER_THIS_TYPE, diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index f63951e3ffe..e56fda1ff8c 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -94,9 +94,9 @@ qdel(src) else if(istype(P, /obj/item/gun/energy/plasmacutter)) var/obj/item/gun/energy/plasmacutter/PC = P - if(!PC.power_supply) - to_chat(user, SPAN_WARNING("\The [src] doesn't have a power supply installed!")) + if(PC.check_power_and_message(user)) return + PC.use_resource(1) playsound(get_turf(src), PC.fire_sound, 75, TRUE) to_chat(user, SPAN_NOTICE("You dismantle the blueprint.")) new /obj/item/stack/material/steel(get_turf(src), 2) diff --git a/code/game/machinery/mecha_fabricator.dm b/code/game/machinery/mecha_fabricator.dm index 69b2709396d..1fefe2b12ba 100644 --- a/code/game/machinery/mecha_fabricator.dm +++ b/code/game/machinery/mecha_fabricator.dm @@ -1,10 +1,10 @@ /obj/machinery/mecha_part_fabricator + name = "mechatronic fabricator" + desc = "A general purpose fabricator that can be used to fabricate robotic equipment." icon = 'icons/obj/robotics.dmi' icon_state = "fab-idle" - name = "Mechatronic Fabricator" - desc = "A general purpose fabricator that can be used to fabricate robotic equipment." - density = 1 - anchored = 1 + density = TRUE + anchored = TRUE use_power = 1 idle_power_usage = 20 active_power_usage = 5000 @@ -150,7 +150,7 @@ /obj/machinery/mecha_part_fabricator/attackby(var/obj/item/I, var/mob/user) if(busy) - to_chat(user, "\The [src] is busy. Please wait for completion of previous operation.") + to_chat(user, SPAN_NOTICE("\The [src] is busy. Please wait for completion of previous operation.")) return 1 if(default_deconstruction_screwdriver(user, I)) return @@ -159,44 +159,32 @@ if(default_part_replacement(user, I)) return - var/material - switch(I.type) - if(/obj/item/stack/material/gold) - material = MATERIAL_GOLD - if(/obj/item/stack/material/silver) - material = MATERIAL_SILVER - if(/obj/item/stack/material/diamond) - material = MATERIAL_DIAMOND - if(/obj/item/stack/material/phoron) - material = MATERIAL_PHORON - if(/obj/item/stack/material/steel) - material = DEFAULT_WALL_MATERIAL - if(/obj/item/stack/material/glass) - material = MATERIAL_GLASS - if(/obj/item/stack/material/uranium) - material = MATERIAL_URANIUM - else - return ..() + if(!istype(I, /obj/item/stack/material)) + return ..() - var/obj/item/stack/material/stack = I - var/sname = "[stack.name]" - var/amnt = stack.perunit + var/obj/item/stack/material/M = I + if(!M.material) + return ..() + if(!(M.material.name in list(MATERIAL_STEEL, MATERIAL_GLASS, MATERIAL_GOLD, MATERIAL_SILVER, MATERIAL_DIAMOND, MATERIAL_PHORON, MATERIAL_URANIUM))) + to_chat(user, SPAN_WARNING("\The [src] cannot hold [M.material.name].")) + return - if(materials[material] + amnt <= res_max_amount) - if(stack && stack.amount >= 1) + var/sname = "[M.name]" + if(materials[M.material.name] + M.perunit <= res_max_amount) + if(M.amount >= 1) var/count = 0 - add_overlay("fab-load-[material]") - CUT_OVERLAY_IN("fab-load-[material]", 6) + add_overlay("fab-load-[M.material.name]") + CUT_OVERLAY_IN("fab-load-[M.material.name]", 6) - while(materials[material] + amnt <= res_max_amount && stack.amount >= 1) - materials[material] += amnt - stack.use(1) + while(materials[M.material.name] + M.perunit <= res_max_amount && M.amount >= 1) + materials[M.material.name] += M.perunit + M.use(1) count++ - to_chat(user, "You insert [count] [sname] into the fabricator.") + to_chat(user, SPAN_NOTICE("You insert [count] [sname] into \the [src].")) update_busy() else - to_chat(user, "The fabricator cannot hold more [sname].") + to_chat(user, SPAN_NOTICE("\The [src] cannot hold more [sname].")) /obj/machinery/mecha_part_fabricator/MouseDrop_T(mob/living/carbon/human/target as mob, mob/user as mob) if (!istype(target) || target.buckled_to || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai)) @@ -218,7 +206,7 @@ if(hair_style.length < 4) return - user.visible_message("[user] starts feeding [target]'s hair into \the [src]!", "You start feeding [target]'s hair into \the [src]!") + user.visible_message(SPAN_WARNING("[user] starts feeding [target]'s hair into \the [src]!"), SPAN_WARNING("You start feeding [target]'s hair into \the [src]!")) if(!do_after(usr, 50)) return if(target_loc != target.loc) @@ -353,19 +341,19 @@ material = lowertext(material) var/mattype switch(material) - if(DEFAULT_WALL_MATERIAL) + if(MATERIAL_STEEL) mattype = /obj/item/stack/material/steel - if("glass") + if(MATERIAL_GLASS) mattype = /obj/item/stack/material/glass - if("gold") + if(MATERIAL_GOLD) mattype = /obj/item/stack/material/gold - if("silver") + if(MATERIAL_SILVER) mattype = /obj/item/stack/material/silver - if("diamond") + if(MATERIAL_DIAMOND) mattype = /obj/item/stack/material/diamond - if("phoron") + if(MATERIAL_PHORON) mattype = /obj/item/stack/material/phoron - if("uranium") + if(MATERIAL_URANIUM) mattype = /obj/item/stack/material/uranium else return diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 1e22261e75a..46704e8d9c7 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -875,3 +875,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. . += "Dismemberment: [edge ? "likely to dismember" : "unlikely to dismember"]
" . += "Penetration: [armor_penetration]
" . += "Throw Force: [throwforce]
" + +/obj/item/proc/use_resource(var/mob/user, var/use_amount) + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/RFD.dm b/code/game/objects/items/weapons/RFD.dm index 6445b5e260f..325aaa09b17 100644 --- a/code/game/objects/items/weapons/RFD.dm +++ b/code/game/objects/items/weapons/RFD.dm @@ -81,7 +81,7 @@ if(W.isscrewdriver()) // Turning it into a crossbow crafting = !crafting if(!crafting) - to_chat(user, SPAN_NOTICE("You reassemble the RFD")) + to_chat(user, SPAN_NOTICE("You reassemble the RFD.")) else to_chat(user, SPAN_NOTICE("The RFD can now be modified.")) src.add_fingerprint(user) @@ -110,9 +110,9 @@ var/obj/item/gun/launcher/crossbow/RFD/CB = new(get_turf(user)) // can be found in crossbow.dm forceMove(CB) CB.stored_matter = src.stored_matter + user.drop_from_inventory(src) qdel(src) user.put_in_hands(CB) - add_fingerprint(user) return ..() diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 255529192e6..5dd1f8c3791 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -465,6 +465,10 @@ to_chat(M, SPAN_NOTICE("You need more welding fuel to complete this task.")) return 0 +/obj/item/weldingtool/use_resource(mob/user, var/use_amount) + if(get_fuel() >= use_amount) + reagents.remove_reagent(/decl/reagent/fuel, use_amount) + //Returns whether or not the welding tool is currently on. /obj/item/weldingtool/proc/isOn() return src.welding diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 94a80e4afbd..3bfb2ba1d97 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -87,10 +87,14 @@ reset_girder() else if(istype(W, /obj/item/gun/energy/plasmacutter)) - to_chat(user, "Now slicing apart the girder...") - if(do_after(user,30/W.toolspeed)) - if(!src) return - to_chat(user, "You slice apart the girder!") + var/obj/item/gun/energy/plasmacutter/PC = W + to_chat(user, SPAN_NOTICE("You start lining up \the [PC] to the joints of \the [src]...")) + if(do_after(user, 2 SECONDS)) + if(!src) + return + playsound(loc, PC.fire_sound, 100, 1) + to_chat(user, SPAN_NOTICE("You blast apart the girder!")) + W.use_resource(user, 1) dismantle() else if(istype(W, /obj/item/melee/energy)) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 9f437346e4a..13091df3b39 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -102,10 +102,10 @@ qdel(src) else if(istype(W, /obj/item/gun/energy/plasmacutter)) var/obj/item/gun/energy/plasmacutter/PC = W - if(!PC.power_supply) - to_chat(user, SPAN_WARNING("\The [src] doesn't have a power supply installed!")) + if(PC.check_power_and_message(user)) return - playsound(get_turf(src), PC.fire_sound, 100, TRUE) + PC.use_resource(user, 1) + playsound(loc, PC.fire_sound, 100, TRUE) new /obj/item/stack/rods(get_turf(src), destroyed ? 1 : 2) qdel(src) else if((W.isscrewdriver()) && (istype(loc, /turf/simulated) || anchored)) diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index dddcf20ddcb..c4e4478f9e0 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -204,10 +204,9 @@ cut_delay *= 0.7 else if(istype(W, /obj/item/gun/energy/plasmacutter)) var/obj/item/gun/energy/plasmacutter/PC = W - if(!PC.power_supply) - to_chat(user, SPAN_WARNING("\The [src] doesn't have a power supply installed!")) + if(PC.check_power_and_message(user)) return - dismantle_sound = "zapping and melting" + dismantle_sound = PC.fire_sound dismantle_verb = "slicing" cut_delay *= 0.8 else if(istype(W,/obj/item/melee/energy)) @@ -243,10 +242,7 @@ cut_delay *= 1.5 if(dismantle_verb) - to_chat(user, SPAN_NOTICE("You begin [dismantle_verb] through the outer plating.")) - if(dismantle_sound) - playsound(src, dismantle_sound, 100, 1) if(cut_delay<0) cut_delay = 1 @@ -254,14 +250,15 @@ if(!do_after(user,cut_delay/W.toolspeed)) return - //This prevents runtime errors if someone clicks the same wall more than once if (!istype(src, /turf/simulated/wall)) return - to_chat(user, SPAN_NOTICE("You remove the outer plating.")) + if(dismantle_sound) + playsound(src, dismantle_sound, 100, 1) + W.use_resource(user, 1) dismantle_wall() - user.visible_message(SPAN_WARNING("The wall was torn open by [user]!")) + user.visible_message(SPAN_WARNING("The wall was torn open by \the [user]!"), SPAN_NOTICE("You remove the outer plating.")) return //Reinforced dismantling. diff --git a/code/modules/clothing/head/xenos/tajara.dm b/code/modules/clothing/head/xenos/tajara.dm index b052d12cf45..8cf0eedeaff 100644 --- a/code/modules/clothing/head/xenos/tajara.dm +++ b/code/modules/clothing/head/xenos/tajara.dm @@ -83,8 +83,8 @@ icon_state = "nka_consularhat" item_state = "nka_consularhat" -/obj/item/clothing/head/helmet/tajara - name = "amohdan swordsmen helmet" +/obj/item/clothing/head/helmet/amohda + name = "amohdan swordsman helmet" desc = "A helmet used by the traditional warriors of Amohda." icon = 'icons/obj/tajara_items.dmi' icon_state = "amohdan_helmet" @@ -97,13 +97,15 @@ melee = ARMOR_MELEE_MAJOR, bullet = ARMOR_BALLISTIC_PISTOL, laser = ARMOR_LASER_SMALL, - energy = ARMOR_ENERGY_MINOR + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_MINOR ) allow_hair_covering = FALSE desc_fluff = "The Feudal Era of Amohda is famous for the steel swords which became common. Many renowned swordsmen and famous warriors would travel the land fighting duels of \ - single combat in their quests to become the greatest swordsman. Modern Amohda is a mix between loyalists to the NKA and to the DPRA, with almost universal praise for a return to \ - traditional culture, yet often violent disagreement about the course of the island's political future. A sizable third party of monarchists which advocate the reestablishment of the \ - Imperial Amohdan dynasty also exists, fragmenting the monarchist factions on the island and further complicating political violence in the area." + single combat in their quests to become the greatest swordsman. Modern Amohda is under the control of the DPRA's Adhomai Liberation Army, further solidified after the defeat \ + of a Nationalist revolt vying for a truly independent Amohda. The region is still beset by trouble within and without as a deeply divided Amohdan people continue to struggle in the \ + bloody conflict to stamp out Nationalistic and to a lesser extent, divided Monarchistic sentiments while their rivals from the New Kingdom of Adhomai watch from the seas they rule \ + and the People's Republic of Adhomai looms over the southern end of the island..." siemens_coefficient = 0.35 /obj/item/clothing/head/helmet/kettle @@ -117,5 +119,6 @@ melee = ARMOR_MELEE_MAJOR, bullet = ARMOR_BALLISTIC_PISTOL, laser = ARMOR_LASER_SMALL, - energy = ARMOR_ENERGY_MINOR + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_MINOR ) diff --git a/code/modules/clothing/spacesuits/rig/modules/combat.dm b/code/modules/clothing/spacesuits/rig/modules/combat.dm index f2bec7cd931..29f9c3de727 100644 --- a/code/modules/clothing/spacesuits/rig/modules/combat.dm +++ b/code/modules/clothing/spacesuits/rig/modules/combat.dm @@ -141,7 +141,7 @@ var/list/extra_mobs = list() if(holder.wearer != user) extra_mobs += holder.wearer - gun.attack_self(user, extra_mobs) + gun.toggle_firing_mode(user) return TRUE gun.Fire(target, user) diff --git a/code/modules/clothing/suits/modular_armor.dm b/code/modules/clothing/suits/modular_armor.dm index 246cd9470d5..d6d7e8bd42c 100644 --- a/code/modules/clothing/suits/modular_armor.dm +++ b/code/modules/clothing/suits/modular_armor.dm @@ -7,8 +7,8 @@ item_state = "plate_carrier" blood_overlay_type = "armor" w_class = ITEMSIZE_NORMAL - restricted_accessory_slots = list(ACCESSORY_SLOT_ARMOR_PLATE, ACCESSORY_SLOT_ARM_GUARDS, ACCESSORY_SLOT_LEG_GUARDS, ACCESSORY_SLOT_ARMOR_POCKETS, ACCESSORY_SLOT_ARMOR_PIN, ACCESSORY_SLOT_CAPE) - valid_accessory_slots = list(ACCESSORY_SLOT_ARMOR_PLATE, ACCESSORY_SLOT_ARM_GUARDS, ACCESSORY_SLOT_LEG_GUARDS, ACCESSORY_SLOT_ARMOR_POCKETS, ACCESSORY_SLOT_ARMOR_PIN, ACCESSORY_SLOT_CAPE) + restricted_accessory_slots = list(ACCESSORY_SLOT_ARMOR_PLATE, ACCESSORY_SLOT_ARM_GUARDS, ACCESSORY_SLOT_LEG_GUARDS, ACCESSORY_SLOT_ARMOR_POCKETS, ACCESSORY_SLOT_ARMOR_PIN, ACCESSORY_SLOT_CAPE, ACCESSORY_SLOT_BADGE) + valid_accessory_slots = list(ACCESSORY_SLOT_ARMOR_PLATE, ACCESSORY_SLOT_ARM_GUARDS, ACCESSORY_SLOT_LEG_GUARDS, ACCESSORY_SLOT_ARMOR_POCKETS, ACCESSORY_SLOT_ARMOR_PIN, ACCESSORY_SLOT_CAPE, ACCESSORY_SLOT_BADGE) /obj/item/clothing/suit/armor/carrier/officer starting_accessories = list( diff --git a/code/modules/clothing/suits/xeno/tajara.dm b/code/modules/clothing/suits/xeno/tajara.dm index 4b32956a4be..11ab675f9d8 100644 --- a/code/modules/clothing/suits/xeno/tajara.dm +++ b/code/modules/clothing/suits/xeno/tajara.dm @@ -137,8 +137,8 @@ contained_sprite = TRUE species_restricted = list(BODYTYPE_TAJARA) -/obj/item/clothing/suit/armor/tajara - name = "amohdan swordsmen armor" +/obj/item/clothing/suit/armor/amohda + name = "amohdan swordsman armor" desc = "A suit of armor used by the traditional warriors of Amohda." icon = 'icons/obj/tajara_items.dmi' icon_state = "amohdan_armor" @@ -152,13 +152,15 @@ melee = ARMOR_MELEE_MAJOR, bullet = ARMOR_BALLISTIC_PISTOL, laser = ARMOR_LASER_SMALL, - energy = ARMOR_ENERGY_MINOR + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_MINOR ) siemens_coefficient = 0.35 desc_fluff = "The Feudal Era of Amohda is famous for the steel swords which became common. Many renowned swordsmen and famous warriors would travel the land fighting duels of \ - single combat in their quests to become the greatest swordsman. Modern Amohda is a mix between loyalists to the NKA and to the DPRA, with almost universal praise for a return to \ - traditional culture, yet often violent disagreement about the course of the island's political future. A sizable third party of monarchists which advocate the reestablishment of the \ - Imperial Amohdan dynasty also exists, fragmenting the monarchist factions on the island and further complicating political violence in the area." + single combat in their quests to become the greatest swordsman. Modern Amohda is under the control of the DPRA's Adhomai Liberation Army, further solidified after the defeat \ + of a Nationalist revolt vying for a truly independent Amohda. The region is still beset by trouble within and without as a deeply divided Amohdan people continue to struggle in the \ + bloody conflict to stamp out Nationalistic and to a lesser extent, divided Monarchistic sentiments while their rivals from the New Kingdom of Adhomai watch from the seas they rule \ + and the People's Republic of Adhomai looms over the southern end of the island..." /obj/item/clothing/suit/armor/cuirass name = "cuirass" @@ -171,7 +173,8 @@ melee = ARMOR_MELEE_MAJOR, bullet = ARMOR_BALLISTIC_PISTOL, laser = ARMOR_LASER_SMALL, - energy = ARMOR_ENERGY_MINOR + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_MINOR ) /obj/item/clothing/suit/storage/tajaran/pra_jacket @@ -184,6 +187,7 @@ melee = ARMOR_MELEE_KNIVES, bullet = ARMOR_BALLISTIC_MINOR, laser = ARMOR_LASER_MINOR, - energy = ARMOR_ENERGY_MINOR + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_MINOR ) - siemens_coefficient = 0.50 \ No newline at end of file + siemens_coefficient = 0.50 diff --git a/code/modules/clothing/under/accessories/badges.dm b/code/modules/clothing/under/accessories/badges.dm index b43b6227190..191c182dc74 100644 --- a/code/modules/clothing/under/accessories/badges.dm +++ b/code/modules/clothing/under/accessories/badges.dm @@ -11,6 +11,7 @@ item_state = "marshalbadge" overlay_state = "marshalbadge" slot_flags = SLOT_BELT | SLOT_TIE + slot = ACCESSORY_SLOT_BADGE var/stored_name var/badge_string = "Corporate Security" diff --git a/code/modules/heavy_vehicle/components/_components.dm b/code/modules/heavy_vehicle/components/_components.dm index a807298384d..4923c10dad6 100644 --- a/code/modules/heavy_vehicle/components/_components.dm +++ b/code/modules/heavy_vehicle/components/_components.dm @@ -34,7 +34,7 @@ /obj/item/mech_component/examine(mob/user) . = ..() if(ready_to_install()) - to_chat(user, "It is ready for installation.") + to_chat(user, SPAN_NOTICE("It is ready for installation.")) else show_missing_parts(user) @@ -54,7 +54,7 @@ /obj/item/mech_component/proc/install_component(var/obj/item/thing, var/mob/user) user.drop_from_inventory(thing) thing.forceMove(src) - user.visible_message("\The [user] installs \the [thing] in \the [src].") + user.visible_message(SPAN_NOTICE("\The [user] installs \the [thing] in \the [src].")) return 1 /obj/item/mech_component/proc/update_health() @@ -97,12 +97,12 @@ if(thing.isscrewdriver()) if(contents.len) var/obj/item/removed = pick(contents) - user.visible_message("\The [user] removes \the [removed] from \the [src].") + user.visible_message(SPAN_NOTICE("\The [user] removes \the [removed] from \the [src].")) removed.forceMove(user.loc) playsound(user.loc, 'sound/effects/pop.ogg', 50, 0) update_components() else - to_chat(user, "There is nothing to remove.") + to_chat(user, SPAN_WARNING("There is nothing to remove.")) return if(thing.iswelder()) repair_brute_generic(thing, user) @@ -119,28 +119,28 @@ if(!istype(WT)) return if(!brute_damage) - to_chat(user, "You inspect \the [src] but find nothing to weld.") + to_chat(user, SPAN_NOTICE("You inspect \the [src] but find nothing to weld.")) return if(!WT.isOn()) - to_chat(user, "Turn \the [WT] on, first.") + to_chat(user, SPAN_WARNING("Turn \the [WT] on, first.")) return if(WT.remove_fuel(0, user)) var/repair_value = 15 if(brute_damage) repair_brute_damage(repair_value) - to_chat(user, "You mend the damage to \the [src].") + to_chat(user, SPAN_NOTICE("You mend the damage to \the [src].")) playsound(user.loc, 'sound/items/welder.ogg', 25, 1) /obj/item/mech_component/proc/repair_burn_generic(var/obj/item/stack/cable_coil/CC, var/mob/user) if(!istype(CC)) return if(!burn_damage) - to_chat(user, "\The [src]'s wiring doesn't need replacing.") + to_chat(user, SPAN_NOTICE("\The [src]'s wiring doesn't need replacing.")) return var/needed_amount = 3 if(CC.get_amount() < needed_amount) - to_chat(user, "You need at least [needed_amount] unit\s of cable to repair this section.") + to_chat(user, SPAN_WARNING("You need at least [needed_amount] unit\s of cable to repair this section.")) return user.visible_message("\The [user] begins replacing the wiring of \the [src]...") @@ -150,6 +150,6 @@ return repair_burn_damage(25) - to_chat(user, "You mend the damage to \the [src]'s wiring.") + to_chat(user, SPAN_NOTICE("You mend the damage to \the [src]'s wiring.")) playsound(user.loc, 'sound/items/Deconstruct.ogg', 25, 1) return diff --git a/code/modules/heavy_vehicle/components/armor.dm b/code/modules/heavy_vehicle/components/armor.dm index 07c3009b486..0ad058d1b83 100644 --- a/code/modules/heavy_vehicle/components/armor.dm +++ b/code/modules/heavy_vehicle/components/armor.dm @@ -1,10 +1,10 @@ /obj/item/robot_parts/robot_component/armor/mech name = "exosuit armor plating" armor = list( - melee = ARMOR_MELEE_MAJOR, - bullet = ARMOR_BALLISTIC_PISTOL, - laser = ARMOR_LASER_HANDGUNS, - energy = ARMOR_ENERGY_MINOR, + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, bomb = ARMOR_BOMB_PADDED, bio = ARMOR_BIO_SHIELDED, rad = ARMOR_RAD_MINOR @@ -19,12 +19,12 @@ name = "radiation-proof armor plating" desc = "A fully enclosed radiation hardened shell designed to protect the pilot from radiation." armor = list( - melee = ARMOR_MELEE_RESISTANT, - bullet = ARMOR_BALLISTIC_PISTOL, - laser = ARMOR_LASER_HANDGUNS, - energy = ARMOR_ENERGY_MINOR, + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, bomb = ARMOR_BOMB_PADDED, - bio = ARMOR_BIO_SHIELDED, + bio = ARMOR_BIO_SHIELDED, rad = ARMOR_RAD_SHIELDED ) origin_tech = list(TECH_MATERIAL = 3) @@ -33,12 +33,12 @@ name = "EM-shielded armor plating" desc = "A shielded plating that sorrounds the eletronics and protects them from electromagnetic radiation." armor = list( - melee = ARMOR_MELEE_RESISTANT , - bullet = ARMOR_BALLISTIC_SMALL, - laser = ARMOR_LASER_SMALL, - energy = ARMOR_ENERGY_SHIELDED, - bomb = ARMOR_BOMB_MINOR, - bio = ARMOR_BIO_SHIELDED, + melee = ARMOR_MELEE_RESISTANT , + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SHIELDED, + bomb = ARMOR_BOMB_MINOR, + bio = ARMOR_BIO_SHIELDED, rad = ARMOR_RAD_SMALL ) origin_tech = list(TECH_MATERIAL = 3) @@ -47,11 +47,11 @@ name = "heavy combat plating" desc = "Plating designed to deflect incoming attacks and explosions." armor = list( - melee = ARMOR_MELEE_MAJOR, - bullet = ARMOR_BALLISTIC_RESISTANT, - laser = ARMOR_LASER_HANDGUNS, - energy = ARMOR_ENERGY_MINOR, - bomb = ARMOR_BOMB_RESISTANT, + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_RESISTANT, bio = ARMOR_BIO_SHIELDED ) origin_tech = list(TECH_MATERIAL = 5) \ No newline at end of file diff --git a/code/modules/heavy_vehicle/components/arms.dm b/code/modules/heavy_vehicle/components/arms.dm index a8eac4e9756..b7d1dfabc51 100644 --- a/code/modules/heavy_vehicle/components/arms.dm +++ b/code/modules/heavy_vehicle/components/arms.dm @@ -18,7 +18,15 @@ /obj/item/mech_component/manipulators/show_missing_parts(var/mob/user) if(!motivator) - to_chat(user, "It is missing an actuator.") + to_chat(user, SPAN_WARNING("It is missing an actuator.")) + +/obj/item/mech_component/manipulators/Topic(href, href_list) + . = ..() + if(.) + return + switch(href_list["info"]) + if("actuator") + to_chat(usr, SPAN_NOTICE("An actuator can be created at a mechatronic fabricator.")) /obj/item/mech_component/manipulators/return_diagnostics(mob/user) ..() @@ -36,7 +44,7 @@ /obj/item/mech_component/manipulators/attackby(var/obj/item/thing, var/mob/user) if(istype(thing,/obj/item/robot_parts/robot_component/actuator)) if(motivator) - to_chat(user, "\The [src] already has an actuator installed.") + to_chat(user, SPAN_WARNING("\The [src] already has an actuator installed.")) return if(install_component(thing, user)) motivator = thing else diff --git a/code/modules/heavy_vehicle/components/body.dm b/code/modules/heavy_vehicle/components/body.dm index 229b8e130ae..bfef6f2e344 100644 --- a/code/modules/heavy_vehicle/components/body.dm +++ b/code/modules/heavy_vehicle/components/body.dm @@ -48,11 +48,23 @@ /obj/item/mech_component/chassis/show_missing_parts(var/mob/user) if(!cell) - to_chat(user, "It is missing a power cell.") + to_chat(user, SPAN_WARNING("It is missing a power cell.")) if(!diagnostics) - to_chat(user, "It is missing a diagnostics unit.") + to_chat(user, SPAN_WARNING("It is missing a diagnostics unit.")) if(!mech_armor) - to_chat(user, "It is missing armor plating.") + to_chat(user, SPAN_WARNING("It is missing armor plating.")) + +/obj/item/mech_component/chassis/Topic(href, href_list) + . = ..() + if(.) + return + switch(href_list["info"]) + if("cell") + to_chat(usr, SPAN_NOTICE("A power cell can be created at a mechatronic fabricator.")) + if("diagnostics") + to_chat(usr, SPAN_NOTICE("A diagnostics unit can be created at a mechatronic fabricator.")) + if("armor") + to_chat(usr, SPAN_NOTICE("Armor plating can be created at a mechatronic fabricator.")) /obj/item/mech_component/chassis/return_diagnostics(mob/user) ..() @@ -103,17 +115,17 @@ /obj/item/mech_component/chassis/attackby(var/obj/item/thing, var/mob/user) if(istype(thing,/obj/item/robot_parts/robot_component/diagnosis_unit)) if(diagnostics) - to_chat(user, "\The [src] already has a diagnostic system installed.") + to_chat(user, SPAN_WARNING("\The [src] already has a diagnostic system installed.")) return if(install_component(thing, user)) diagnostics = thing else if(istype(thing, /obj/item/cell)) if(cell) - to_chat(user, "\The [src] already has a cell installed.") + to_chat(user, SPAN_WARNING("\The [src] already has a cell installed.")) return if(install_component(thing,user)) cell = thing else if(istype(thing, /obj/item/robot_parts/robot_component/armor/mech)) if(mech_armor) - to_chat(user, "\The [src] already has mech_armor installed.") + to_chat(user, SPAN_WARNING("\The [src] already has mech_armor installed.")) return if(install_component(thing, user)) mech_armor = thing @@ -123,7 +135,7 @@ /obj/item/mech_component/chassis/MouseDrop_T(atom/dropping, mob/user) var/obj/machinery/portable_atmospherics/canister/C = dropping if(istype(C) && do_after(user, 5, src)) - to_chat(user, "You install the canister in the [src].") + to_chat(user, SPAN_NOTICE("You install the canister into \the [src].")) if(air_supply) air_supply.forceMove(get_turf(src)) air_supply = null diff --git a/code/modules/heavy_vehicle/components/frame.dm b/code/modules/heavy_vehicle/components/frame.dm index 63c333f09f9..edb807801cc 100644 --- a/code/modules/heavy_vehicle/components/frame.dm +++ b/code/modules/heavy_vehicle/components/frame.dm @@ -42,24 +42,49 @@ /obj/structure/heavy_vehicle_frame/examine(mob/user) . = ..() if(!arms) - to_chat(user, "It is missing some manipulators.") + to_chat(user, SPAN_WARNING("It is missing some manipulators.")) if(!legs) - to_chat(user, "It is missing a means of propulsion.") + to_chat(user, SPAN_WARNING("It is missing a means of propulsion.")) if(!head) - to_chat(user, "It is missing some sensors.") + to_chat(user, SPAN_WARNING("It is missing some sensors.")) if(!body) - to_chat(user, "It is missing a chassis.") + to_chat(user, SPAN_WARNING("It is missing a chassis.")) if(is_wired == FRAME_WIRED) - to_chat(user, "Its wiring is unadjusted.") + to_chat(user, SPAN_WARNING("Its wiring is unadjusted.")) else if(!is_wired) - to_chat(user, "It has not yet been wired.") + to_chat(user, SPAN_WARNING("It has not yet been wired.")) if(is_reinforced == FRAME_REINFORCED) - to_chat(user, "It has not had its internal reinforcement secured.") + to_chat(user, SPAN_WARNING("It has not had its internal reinforcement secured.")) else if(is_reinforced == FRAME_REINFORCED_SECURE) - to_chat(user, "It has not had its internal reinforcement welded in.") + to_chat(user, SPAN_WARNING("It has not had its internal reinforcement welded in.")) else if(!is_reinforced) - to_chat(user, "It does not have any internal reinforcement.") + to_chat(user, SPAN_WARNING("It does not have any internal reinforcement.")) +/obj/structure/heavy_vehicle_frame/Topic(href, href_list) + . = ..() + if(.) + return + switch(href_list["info"]) + if("manipulators") + to_chat(usr, SPAN_NOTICE("Manipulators, the arms of the exosuit, can be created at a mechatronic fabricator.")) + if("propulsion") + to_chat(usr, SPAN_NOTICE("Propulsion, the legs of the exosuit, can be created at a mechatronic fabricator.")) + if("sensors") + to_chat(usr, SPAN_NOTICE("Sensors, the head of the exosuit, can be created at a mechatronic fabricator.")) + if("chassis") + to_chat(usr, SPAN_NOTICE("A chassis, the body of the exosuit, can be created at a mechatronic fabricator.")) + if("wire") + if(!is_wired) + to_chat(usr, SPAN_NOTICE("The frame requires wiring between its components. This can be added with cable coil.")) + else if(is_wired == FRAME_WIRED) + to_chat(usr, SPAN_NOTICE("The wiring of the frame is messy, and requires a wirecutter to trim it for use.")) + if("reinforcement") + if(!is_reinforced) + to_chat(usr, SPAN_NOTICE("The frame requires reinforcement, this can be added with steel sheets.")) + else if(is_reinforced == FRAME_REINFORCED) + to_chat(usr, SPAN_NOTICE("The frame's reinforcement has been installed, now it must be wrenched into place.")) + else if(is_reinforced == FRAME_REINFORCED_SECURE) + to_chat(usr, SPAN_NOTICE("The frame's reinforcement has been installed and secured, now it must be welded into place.")) /obj/structure/heavy_vehicle_frame/update_icon() //As mech icons uses a caching system, any changes here, particularly to layers, must be reflected in /mob/living/heavy_vehicle/update_icon(). @@ -88,14 +113,14 @@ // Removing components. if(thing.iscrowbar()) if(is_reinforced == FRAME_REINFORCED) - user.visible_message("\The [user] crowbars \the reinforcement off \the [src].") + user.visible_message(SPAN_NOTICE("\The [user] crowbars the reinforcement off \the [src].")) is_reinforced = 0 return var/to_remove = input("Which component would you like to remove") as null|anything in list(arms, body, legs, head) if(!to_remove) - to_chat(user, "There are no components to remove..") + to_chat(user, SPAN_WARNING("There are no components to remove..")) return if(uninstall_component(to_remove, user)) @@ -116,25 +141,25 @@ // Check for basic components. if(!(arms && legs && head && body)) - to_chat(user, "There are still parts missing from \the [src].") + to_chat(user, SPAN_WARNING("There are still parts missing from \the [src].")) return // Check for wiring. if(is_wired < FRAME_WIRED_ADJUSTED) if(is_wired == FRAME_WIRED) - to_chat(user, "\The [src]'s wiring has not been adjusted!") + to_chat(user, SPAN_WARNING("\The [src]'s wiring has not been adjusted!")) else - to_chat(user, "\The [src] is not wired!") + to_chat(user, SPAN_WARNING("\The [src] is not wired!")) return // Check for basing metal internal plating. if(is_reinforced < FRAME_REINFORCED_WELDED) if(is_reinforced == FRAME_REINFORCED) - to_chat(user, "\The [src]'s internal reinforcement has not been secured!") + to_chat(user, SPAN_WARNING("\The [src]'s internal reinforcement has not been secured!")) else if(is_reinforced == FRAME_REINFORCED_SECURE) - to_chat(user, "\The [src]'s internal reinforcement has not been welded down!") + to_chat(user, SPAN_WARNING("\The [src]'s internal reinforcement has not been welded down!")) else - to_chat(user, "\The [src] has no internal reinforcement!") + to_chat(user, SPAN_WARNING("\The [src] has no internal reinforcement!")) return if(is_reinforced < FRAME_REINFORCED_WELDED || is_wired < FRAME_WIRED_ADJUSTED || !(arms && legs && head && body) || QDELETED(src) || QDELETED(user)) @@ -157,12 +182,12 @@ else if(thing.iscoil()) if(is_wired) - to_chat(user, "\The [src] has already been wired.") + to_chat(user, SPAN_WARNING("\The [src] has already been wired.")) return var/obj/item/stack/cable_coil/CC = thing if(CC.amount < 10) - to_chat(user, "You need at least ten units of cable to complete the exosuit.") + to_chat(user, SPAN_WARNING("You need at least ten units of cable to complete the exosuit.")) return user.visible_message("\The [user] begins wiring \the [src]...") @@ -189,12 +214,12 @@ // Installing metal. else if(istype(thing, /obj/item/stack/material)) var/obj/item/stack/material/M = thing - if(M.material && M.material.name == "steel") + if(M.material?.name == MATERIAL_STEEL) if(is_reinforced) - to_chat(user, "There is already metal reinforcement installed in \the [src].") + to_chat(user, SPAN_WARNING("There is already metal reinforcement installed in \the [src].")) return if(M.amount < 15) - to_chat(user, "You need at least fifteen sheets of steel to reinforce \the [src].") + to_chat(user, SPAN_WARNING("You need at least fifteen sheets of steel to reinforce \the [src].")) return visible_message("\The [user] reinforces \the [src] with \the [M].") playsound(user.loc, 'sound/items/Deconstruct.ogg', 50, 1) @@ -205,10 +230,10 @@ // Securing metal. else if(thing.iswrench()) if(!is_reinforced) - to_chat(user, "There is no metal to secure inside \the [src].") + to_chat(user, SPAN_WARNING("There is no metal to secure inside \the [src].")) return if(is_reinforced == FRAME_REINFORCED_WELDED) - to_chat(user, "\The [src]'s internal reinforcement has been welded in.") + to_chat(user, SPAN_WARNING("\The [src]'s internal reinforcement has been welded in.")) return visible_message("\The [user] [(is_reinforced == 2) ? "unsecures" : "secures"] the metal reinforcement in \the [src].") playsound(user.loc, thing.usesound, 100, 1) @@ -217,25 +242,25 @@ else if(thing.iswelder()) var/obj/item/weldingtool/WT = thing if(!is_reinforced) - to_chat(user, "There is no metal to secure inside \the [src].") + to_chat(user, SPAN_WARNING("There is no metal to secure inside \the [src].")) return if(is_reinforced == FRAME_REINFORCED) - to_chat(user, "The reinforcement inside \the [src] has not been secured.") + to_chat(user, SPAN_WARNING("The reinforcement inside \the [src] has not been secured.")) return if(!WT.isOn()) - to_chat(user, "Turn \the [WT] on, first.") + to_chat(user, SPAN_WARNING("Turn \the [WT] on, first.")) return if(WT.remove_fuel(1, user)) visible_message("\The [user] [(is_reinforced == 3) ? "unwelds the reinforcement from" : "welds the reinforcement into"] \the [src].") is_reinforced = (is_reinforced == FRAME_REINFORCED_WELDED) ? FRAME_REINFORCED_SECURE : FRAME_REINFORCED_WELDED playsound(user.loc, thing.usesound, 50, 1) else - to_chat(user, "Not enough fuel!") + to_chat(user, SPAN_WARNING("Not enough fuel!")) return // Installing basic components. else if(istype(thing,/obj/item/mech_component/manipulators)) if(arms) - to_chat(user, "\The [src] already has manipulators installed.") + to_chat(user, SPAN_WARNING("\The [src] already has manipulators installed.")) return if(install_component(thing, user)) if(arms) @@ -244,7 +269,7 @@ arms = thing else if(istype(thing,/obj/item/mech_component/propulsion)) if(legs) - to_chat(user, "\The [src] already has a propulsion system installed.") + to_chat(user, SPAN_WARNING("\The [src] already has a propulsion system installed.")) return if(install_component(thing, user)) if(legs) @@ -253,7 +278,7 @@ legs = thing else if(istype(thing,/obj/item/mech_component/sensors)) if(head) - to_chat(user, "\The [src] already has a sensor array installed.") + to_chat(user, SPAN_WARNING("\The [src] already has a sensor array installed.")) return if(install_component(thing, user)) if(head) @@ -262,7 +287,7 @@ head = thing else if(istype(thing,/obj/item/mech_component/chassis)) if(body) - to_chat(user, "\The [src] already has an outer chassis installed.") + to_chat(user, SPAN_WARNING("\The [src] already has an outer chassis installed.")) return if(install_component(thing, user)) if(body) @@ -276,7 +301,7 @@ /obj/structure/heavy_vehicle_frame/proc/install_component(var/obj/item/thing, var/mob/user) var/obj/item/mech_component/MC = thing if(istype(MC) && !MC.ready_to_install()) - if(user) to_chat(user, "\The [MC] is not ready to install.") + if(user) to_chat(user, SPAN_WARNING("\The [MC] is not ready to install.")) return 0 user.unEquip(thing) thing.forceMove(src) diff --git a/code/modules/heavy_vehicle/components/head.dm b/code/modules/heavy_vehicle/components/head.dm index 6cdcb81e42c..2148b199758 100644 --- a/code/modules/heavy_vehicle/components/head.dm +++ b/code/modules/heavy_vehicle/components/head.dm @@ -22,11 +22,23 @@ /obj/item/mech_component/sensors/show_missing_parts(var/mob/user) if(!radio) - to_chat(user, "It is missing a radio.") + to_chat(user, SPAN_WARNING("It is missing a radio.")) if(!camera) - to_chat(user, "It is missing a camera.") + to_chat(user, SPAN_WARNING("It is missing a camera.")) if(!software) - to_chat(user, "It is missing a software control module.") + to_chat(user, SPAN_WARNING("It is missing an exosuit control module.")) + +/obj/item/mech_component/sensors/Topic(href, href_list) + . = ..() + if(.) + return + switch(href_list["info"]) + if("radio") + to_chat(usr, SPAN_NOTICE("A radio can be created at a mechatronic fabricator.")) + if("camera") + to_chat(usr, SPAN_NOTICE("A camera can be created at a mechatronic fabricator.")) + if("module") + to_chat(usr, SPAN_NOTICE("An exosuit control module can be created at a mechatronic fabricator, while the software chips it uses can be printed at the circuit imprinter.")) /obj/item/mech_component/sensors/return_diagnostics(mob/user) ..() @@ -71,17 +83,17 @@ /obj/item/mech_component/sensors/attackby(var/obj/item/thing, var/mob/user) if(istype(thing, /obj/item/mech_component/control_module)) if(software) - to_chat(user, "\The [src] already has a control modules installed.") + to_chat(user, SPAN_WARNING("\The [src] already has a control modules installed.")) return if(install_component(thing, user)) software = thing else if(istype(thing,/obj/item/robot_parts/robot_component/radio)) if(radio) - to_chat(user, "\The [src] already has a radio installed.") + to_chat(user, SPAN_WARNING("\The [src] already has a radio installed.")) return if(install_component(thing, user)) radio = thing else if(istype(thing,/obj/item/robot_parts/robot_component/camera)) if(camera) - to_chat(user, "\The [src] already has a camera installed.") + to_chat(user, SPAN_WARNING("\The [src] already has a camera installed.")) return if(install_component(thing, user)) camera = thing else @@ -98,7 +110,15 @@ /obj/item/mech_component/control_module/examine(mob/user) . = ..() - to_chat(user, "It has [max_installed_software - LAZYLEN(installed_software)] empty slot\s remaining out of [max_installed_software].") + to_chat(user, SPAN_NOTICE("It has [max_installed_software - LAZYLEN(installed_software)] empty slot\s remaining out of [max_installed_software].")) + +/obj/item/mech_component/control_module/Topic(href, href_list) + . = ..() + if(.) + return + switch(href_list["info"]) + if("software") + to_chat(usr, SPAN_NOTICE("Software for \the [src] can be created at the circuit imprinter.")) /obj/item/mech_component/control_module/attackby(var/obj/item/thing, var/mob/user) if(istype(thing, /obj/item/circuitboard/exosystem)) @@ -114,10 +134,10 @@ /obj/item/mech_component/control_module/proc/install_software(var/obj/item/circuitboard/exosystem/software, var/mob/user) if(installed_software.len >= max_installed_software) if(user) - to_chat(user, "\The [src] can only hold [max_installed_software] software modules.") + to_chat(user, SPAN_WARNING("\The [src] can only hold [max_installed_software] software modules.")) return if(user) - to_chat(user, "You load \the [software] into \the [src]'s memory.") + to_chat(user, SPAN_NOTICE("You load \the [software] into \the [src]'s memory.")) user.unEquip(software) software.forceMove(src) update_software() diff --git a/code/modules/heavy_vehicle/components/legs.dm b/code/modules/heavy_vehicle/components/legs.dm index 7c1eb57071a..3245b615ae4 100644 --- a/code/modules/heavy_vehicle/components/legs.dm +++ b/code/modules/heavy_vehicle/components/legs.dm @@ -17,7 +17,15 @@ /obj/item/mech_component/propulsion/show_missing_parts(var/mob/user) if(!motivator) - to_chat(user, "It is missing a motivator.") + to_chat(user, SPAN_WARNING("It is missing an actuator.")) + +/obj/item/mech_component/propulsion/Topic(href, href_list) + . = ..() + if(.) + return + switch(href_list["info"]) + if("actuator") + to_chat(usr, SPAN_NOTICE("An actuator can be created at a mechatronic fabricator.")) /obj/item/mech_component/propulsion/return_diagnostics(mob/user) ..() @@ -35,7 +43,7 @@ /obj/item/mech_component/propulsion/attackby(var/obj/item/thing, var/mob/user) if(istype(thing,/obj/item/robot_parts/robot_component/actuator)) if(motivator) - to_chat(user, "\The [src] already has an actuator installed.") + to_chat(user, SPAN_WARNING("\The [src] already has an actuator installed.")) return motivator = thing install_component(thing, user) diff --git a/code/modules/heavy_vehicle/equipment/_equipment.dm b/code/modules/heavy_vehicle/equipment/_equipment.dm index 332554369d4..632804a5640 100644 --- a/code/modules/heavy_vehicle/equipment/_equipment.dm +++ b/code/modules/heavy_vehicle/equipment/_equipment.dm @@ -16,6 +16,15 @@ var/active_power_use = 1 KILOWATTS var/require_adjacent = TRUE +/obj/item/mecha_equipment/examine(mob/user, distance) + . = ..() + if(length(restricted_hardpoints)) + var/hardpoints = english_list(restricted_hardpoints, and_text = ", ") + to_chat(user, SPAN_NOTICE("Exosuit Mounts: [hardpoints]")) + if(length(restricted_software)) + var/software = english_list(restricted_software, and_text = ", ") + to_chat(user, SPAN_NOTICE("Exosuit Software Requirement: [software]")) + /obj/item/mecha_equipment/attack() //Generally it's not desired to be able to attack with items return 0 diff --git a/code/modules/heavy_vehicle/equipment/combat.dm b/code/modules/heavy_vehicle/equipment/combat.dm index 94e5d8e0abc..3d53326f98c 100644 --- a/code/modules/heavy_vehicle/equipment/combat.dm +++ b/code/modules/heavy_vehicle/equipment/combat.dm @@ -106,7 +106,7 @@ name = "flashbang launcher" desc = "The SGL-6FL grenade launcher is designated to launch primed flashbangs." icon_state = "mech_gl" - holding_type = /obj/item/gun/launcher/mech/mountedfl + holding_type = /obj/item/gun/launcher/mech/mountedgl/fl restricted_hardpoints = list(HARDPOINT_LEFT_SHOULDER, HARDPOINT_RIGHT_SHOULDER) restricted_software = list(MECH_SOFTWARE_WEAPONS) @@ -114,7 +114,7 @@ name = "teargas launcher" desc = "The SGL-6TGL grenade launcher is designated to launch primed teargas grenades." icon_state = "mech_gl" - holding_type = /obj/item/gun/launcher/mech/mountedtgl + holding_type = /obj/item/gun/launcher/mech/mountedgl/tg restricted_hardpoints = list(HARDPOINT_LEFT_SHOULDER, HARDPOINT_RIGHT_SHOULDER) restricted_software = list(MECH_SOFTWARE_WEAPONS) @@ -122,7 +122,7 @@ name = "smoke grenade launcher" desc = "The SGL-6SGL grenade launcher is designated to launch primed smoke grenades." icon_state = "mech_gl" - holding_type = /obj/item/gun/launcher/mech/mountedsgl + holding_type = /obj/item/gun/launcher/mech/mountedgl/sm restricted_hardpoints = list(HARDPOINT_LEFT_SHOULDER, HARDPOINT_RIGHT_SHOULDER) restricted_software = list(MECH_SOFTWARE_WEAPONS) @@ -189,6 +189,8 @@ item_state = "smg" fire_sound = 'sound/weapons/grenadelaunch.ogg' + var/grenade_type = /obj/item/grenade/frag + release_force = 5 throw_distance = 7 proj = 5 @@ -197,83 +199,37 @@ /obj/item/gun/launcher/mech/mountedgl/consume_next_projectile() - if(proj < 1) return null - var/obj/item/grenade/frag/g = new (src) + if(proj < 1) + return null + var/obj/item/grenade/g = new grenade_type(src) g.det_time = 10 g.activate(null) proj-- addtimer(CALLBACK(src, .proc/regen_proj), proj_gen_time, TIMER_UNIQUE) return g -/obj/item/gun/launcher/mech/mountedfl - name = "mounted grenade launcher" +/obj/item/gun/launcher/mech/mountedgl/fl desc = "The SGL-6FL grenade launcher is designated to launch primed flashbangs." - icon = 'icons/obj/robot_items.dmi' - icon_state = "smg" - item_state = "smg" - fire_sound = 'sound/weapons/grenadelaunch.ogg' - - release_force = 5 - throw_distance = 7 - proj = 5 - max_proj = 5 + grenade_type = /obj/item/grenade/flashbang proj_gen_time = 200 - -/obj/item/gun/launcher/mech/mountedfl/consume_next_projectile() - if(proj < 1) return null - var/obj/item/grenade/flashbang/g = new (src) - g.det_time = 10 - g.activate(null) - proj-- - addtimer(CALLBACK(src, .proc/regen_proj), proj_gen_time, TIMER_UNIQUE) - return g - -/obj/item/gun/launcher/mech/mountedtgl +/obj/item/gun/launcher/mech/mountedgl/tg name = "mounted teargas launcher" desc = "The SGL-6TGL grenade launcher is designated to launch primed teargas grenades." - icon = 'icons/obj/robot_items.dmi' - icon_state = "smg" - item_state = "smg" - fire_sound = 'sound/weapons/grenadelaunch.ogg' - - release_force = 5 - throw_distance = 7 - proj = 3 - max_proj = 3 + grenade_type = /obj/item/grenade/chem_grenade/teargas proj_gen_time = 200 -/obj/item/gun/launcher/mech/mountedtgl/consume_next_projectile() - if(proj < 1) return null - var/obj/item/grenade/chem_grenade/teargas/tg = new (src) - tg.det_time = 10 - tg.activate(null) - proj-- - addtimer(CALLBACK(src, .proc/regen_proj), proj_gen_time, TIMER_UNIQUE) - return tg - -/obj/item/gun/launcher/mech/mountedsgl +/obj/item/gun/launcher/mech/mountedgl/sm name = "mounted smoke launcher" desc = "The SGL-6SGL grenade launcher is designated to launch primed smoke grenades." - icon = 'icons/obj/robot_items.dmi' - icon_state = "smg" - item_state = "smg" - fire_sound = 'sound/weapons/grenadelaunch.ogg' - - release_force = 5 - throw_distance = 7 - proj = 3 - max_proj = 3 + grenade_type = /obj/item/grenade/smokebomb proj_gen_time = 200 -/obj/item/gun/launcher/mech/mountedsgl/consume_next_projectile() - if(proj < 1) return null - var/obj/item/grenade/smokebomb/sg = new (src) - sg.det_time = 10 - sg.activate(null) - proj-- - addtimer(CALLBACK(src, .proc/regen_proj), proj_gen_time, TIMER_UNIQUE) - return sg +/obj/item/gun/launcher/mech/mountedgl/cl + name = "mounted cleaner launcher" + desc = "The SGL-6CL grenade launcher is designed to launch primed cleaner grenades." + grenade_type = /obj/item/grenade/chem_grenade/cleaner + proj_gen_time = 200 /obj/item/gun/launcher/mech/get_hardpoint_maptext() return "[proj]/[max_proj]" diff --git a/code/modules/heavy_vehicle/equipment/utility.dm b/code/modules/heavy_vehicle/equipment/utility.dm index 5a923c4e6b0..051a2764cd0 100644 --- a/code/modules/heavy_vehicle/equipment/utility.dm +++ b/code/modules/heavy_vehicle/equipment/utility.dm @@ -645,4 +645,13 @@ return /obj/item/mecha_equipment/quick_enter/attack_self() - return \ No newline at end of file + return + + +/obj/item/mecha_equipment/mounted_system/grenadecleaner + name = "cleaner grenade launcher" + desc = "The SGL-6CL grenade launcher is designed to launch primed cleaner grenades." + icon_state = "mech_gl" + holding_type = /obj/item/gun/launcher/mech/mountedgl/cl + restricted_hardpoints = list(HARDPOINT_LEFT_SHOULDER, HARDPOINT_RIGHT_SHOULDER) + restricted_software = list(MECH_SOFTWARE_UTILITY) \ No newline at end of file diff --git a/code/modules/heavy_vehicle/mech_interaction.dm b/code/modules/heavy_vehicle/mech_interaction.dm index 7a81c3824b1..8ddd6fc7045 100644 --- a/code/modules/heavy_vehicle/mech_interaction.dm +++ b/code/modules/heavy_vehicle/mech_interaction.dm @@ -554,7 +554,7 @@ // heavily commented so it doesn't look like one fat chunk of code, which it still does - Geeves /mob/living/heavy_vehicle/proc/handle_hear_say(var/mob/speaker, var/text) var/found_text = findtext(text, name) - if(!found_text) + if(!found_text && nickname) found_text = findtext(text, nickname) if(found_text) text = copytext(text, found_text) // I'm trimming the text each time so only information stated after eachother is valid diff --git a/code/modules/heavy_vehicle/premade/powerloader.dm b/code/modules/heavy_vehicle/premade/powerloader.dm index 02038c0e824..248bca4279f 100644 --- a/code/modules/heavy_vehicle/premade/powerloader.dm +++ b/code/modules/heavy_vehicle/premade/powerloader.dm @@ -18,6 +18,16 @@ /mob/living/heavy_vehicle/premade/ripley/cargo h_back = /obj/item/mecha_equipment/autolathe +/mob/living/heavy_vehicle/premade/ripley/janitorial + name = "janitorial power loader" + desc = "A standard cargo-handling power loader converted into a cleaning machine." + + e_color = COLOR_PURPLE + h_l_hand = /obj/item/mecha_equipment/clamp + h_l_shoulder = /obj/item/mecha_equipment/mounted_system/grenadecleaner + h_r_shoulder = /obj/item/mecha_equipment/mounted_system/grenadecleaner + h_back = /obj/item/mecha_equipment/quick_enter + /obj/item/mech_component/manipulators/ripley name = "exosuit arms" exosuit_desc_string = "heavy-duty industrial lifters" diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 26052d55879..b37a4586b1e 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -129,11 +129,15 @@ var/list/mineral_can_smooth_with = list( GetDrilled() /turf/simulated/mineral/bullet_act(var/obj/item/projectile/Proj) + if(istype(Proj, /obj/item/projectile/beam/plasmacutter)) + var/obj/item/projectile/beam/plasmacutter/PC_beam = Proj + . = PC_beam.pass_check(src) + // Emitter blasts if(istype(Proj, /obj/item/projectile/beam/emitter)) emitter_blasts_taken++ - if(emitter_blasts_taken > 2) // 3 blasts per tile + if(emitter_blasts_taken >= 3) GetDrilled() /turf/simulated/mineral/CollidedWith(AM) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 59faf268fec..3c5ef6efe23 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -573,4 +573,4 @@ emp_act /mob/living/carbon/human/extinguish_fire() ..() for(var/obj/item/I in contents) - I.extinguish_fire() \ No newline at end of file + I.extinguish_fire() diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 82a6723d734..2b65499185c 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -119,7 +119,7 @@ to_chat(src, SPAN_WARNING("Warning: Electromagnetic pulse detected.")) ..() -/mob/living/silicon/stun_effect_act() +/mob/living/silicon/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone, var/used_weapon, var/damage_flags) return //immune /mob/living/silicon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1.0, tesla_shock = FALSE, ground_zero) diff --git a/code/modules/projectiles/guns/energy/mining.dm b/code/modules/projectiles/guns/energy/mining.dm index 8d04e38e907..b07e6a64e21 100644 --- a/code/modules/projectiles/guns/energy/mining.dm +++ b/code/modules/projectiles/guns/energy/mining.dm @@ -7,6 +7,7 @@ icon = 'icons/obj/mining_contained.dmi' icon_state = "plasma" item_state = "plasma" + usesound = 'sound/weapons/plasma_cutter.ogg' fire_sound = 'sound/weapons/plasma_cutter.ogg' slot_flags = SLOT_BELT|SLOT_BACK accuracy = 1 @@ -49,6 +50,15 @@ else ..() +/obj/item/gun/energy/plasmacutter/proc/check_power_and_message(var/mob/user, var/use_amount = 1) + if(!power_supply) + to_chat(user, SPAN_WARNING("\The [src] doesn't have a power supply installed!")) + return TRUE + if(!power_supply.check_charge(charge_cost * use_amount)) + to_chat(user, SPAN_WARNING("\The [src] doesn't have enough power to do this!")) + return TRUE + return FALSE + /obj/item/gun/energy/plasmacutter/mounted name = "mounted plasma cutter" self_recharge = TRUE @@ -65,12 +75,21 @@ range = 5 pass_flags = PASSTABLE + var/mineral_passes = 2 // amount of mineral turfs it passes through before ending + muzzle_type = /obj/effect/projectile/muzzle/plasma_cutter tracer_type = /obj/effect/projectile/tracer/plasma_cutter impact_type = /obj/effect/projectile/impact/plasma_cutter maiming = TRUE maim_rate = 1 +/obj/item/projectile/beam/plasmacutter/proc/pass_check(var/turf/simulated/mineral/mine_turf) + if(mineral_passes <= 0) + return null // the projectile stops + mineral_passes-- + on_impact(mine_turf) + return PROJECTILE_CONTINUE // the projectile tunnels deeper + /obj/item/projectile/beam/plasmacutter/on_impact(var/atom/A) if(istype(A, /turf/simulated/mineral)) var/turf/simulated/mineral/M = A @@ -81,3 +100,12 @@ M.emitter_blasts_taken += 2 M.emitter_blasts_taken += 1 . = ..() + +/obj/item/gun/energy/plasmacutter/use_resource(mob/user, var/use_amount) + if(use_external_power) + var/obj/item/cell/external = get_external_power_supply() + if(external) + external.use(use_amount * charge_cost) + return + if(power_supply) + power_supply.use(use_amount * charge_cost) \ No newline at end of file diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index 53c776717bd..d493f69f25d 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -6,8 +6,8 @@ in your hand. To recharge this weapon, use a weapon recharger." desc_fluff = "The NT EC-4 is an energy carbine developed and produced by Nanotrasen. Compact, light and durable, used by security forces and law enforcement for its ability to fire stun or lethal beams, depending on selection. It is widely sold and distributed across the galaxy." icon = 'icons/obj/guns/ecarbine.dmi' - icon_state = "energystun100" - item_state = "energystun100" + icon_state = "energystun" + item_state = "energystun" fire_sound = 'sound/weapons/Taser.ogg' slot_flags = SLOT_BELT accuracy = 1 @@ -27,6 +27,8 @@ list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="energykill", fire_sound='sound/weapons/laser1.ogg') ) + has_item_ratio = FALSE + var/crit_fail = 0 //Added crit_fail as a local variable /obj/item/gun/energy/gun/mounted diff --git a/code/modules/projectiles/guns/energy/rifle.dm b/code/modules/projectiles/guns/energy/rifle.dm index 63d280c30eb..d44f4d8e1d6 100644 --- a/code/modules/projectiles/guns/energy/rifle.dm +++ b/code/modules/projectiles/guns/energy/rifle.dm @@ -165,3 +165,35 @@ toggle_scope(2.0, usr) else to_chat(usr, "You can't look through the scope without stabilizing the rifle!") + +/obj/item/gun/energy/rifle/ionrifle + name = "ion rifle" + desc = "The NT Mk70 EW Halicon is a man portable anti-armor weapon designed to disable mechanical threats, produced by Nanotrasen." + icon = 'icons/obj/guns/ionrifle.dmi' + icon_state = "ionrifle" + item_state = "ionrifle" + has_item_ratio = FALSE + modifystate = null + projectile_type = /obj/item/projectile/ion/stun + fire_sound = 'sound/weapons/laser1.ogg' + origin_tech = list(TECH_COMBAT = 2, TECH_MAGNET = 4) + w_class = ITEMSIZE_LARGE + accuracy = 1 + force = 10 + flags = CONDUCT + slot_flags = SLOT_BACK + charge_cost = 300 + max_shots = 4 + can_turret = 1 + turret_sprite_set = "ion" + firemodes = list() + +/obj/item/gun/energy/rifle/ionrifle/emp_act(severity) + ..(max(severity, 2)) //so it doesn't EMP itself, I guess + +/obj/item/gun/energy/rifle/ionrifle/mounted + name = "mounted ion rifle" + self_recharge = 1 + use_external_power = 1 + recharge_time = 10 + can_turret = 0 \ No newline at end of file diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index a0cc5085d76..4006365405c 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -1,48 +1,3 @@ -/obj/item/gun/energy/rifle/ionrifle - name = "ion rifle" - desc = "The NT Mk70 EW Halicon is a man portable anti-armor weapon designed to disable mechanical threats, produced by Nanotrasen." - icon = 'icons/obj/guns/ionrifle.dmi' - icon_state = "ionriflestun100" - item_state = "ionriflestun100" // so the human update icon uses the icon_state instead. - modifystate = "ionriflestun" - projectile_type = /obj/item/projectile/ion/stun - fire_sound = 'sound/weapons/laser1.ogg' - origin_tech = list(TECH_COMBAT = 2, TECH_MAGNET = 4) - w_class = ITEMSIZE_LARGE - accuracy = 1 - force = 10 - flags = CONDUCT - slot_flags = SLOT_BACK - charge_cost = 300 - max_shots = 4 - can_turret = 1 - turret_sprite_set = "ion" - firemodes = list() - -/obj/item/gun/energy/rifle/ionrifle/emp_act(severity) - ..(max(severity, 2)) //so it doesn't EMP itself, I guess - -/obj/item/gun/energy/rifle/ionrifle/update_icon() - if(charge_meter && power_supply && power_supply.maxcharge) - var/ratio = power_supply.charge / power_supply.maxcharge - - //make sure that rounding down will not give us the empty state even if we have charge for a shot left. - if(power_supply.charge < charge_cost) - ratio = 0 - else - ratio = max(round(ratio, 0.25) * 100, 25) - - icon_state = "[modifystate][ratio]" - item_state = "[modifystate][ratio]" - update_held_icon() - -/obj/item/gun/energy/rifle/ionrifle/mounted - name = "mounted ion rifle" - self_recharge = 1 - use_external_power = 1 - recharge_time = 10 - can_turret = 0 - /obj/item/gun/energy/decloner name = "biological demolecularisor" desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements." diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 3081bf2c4ac..fa41aef57af 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -124,7 +124,7 @@ damage = 25 /obj/item/projectile/bullet/pistol/medium - damage = 35 + damage = 30 /obj/item/projectile/bullet/pistol/strong damage = 45 diff --git a/code/modules/research/designs/mechfab/mechs/designs_exosuit_equipment.dm b/code/modules/research/designs/mechfab/mechs/designs_exosuit_equipment.dm index 46a0445a71b..9fc71f6f0b4 100644 --- a/code/modules/research/designs/mechfab/mechs/designs_exosuit_equipment.dm +++ b/code/modules/research/designs/mechfab/mechs/designs_exosuit_equipment.dm @@ -78,6 +78,12 @@ build_path = /obj/item/mecha_equipment/mounted_system/grenadeflash materials = list(DEFAULT_WALL_MATERIAL = 20000, MATERIAL_GOLD = 6000, MATERIAL_PHORON = 6000) +/datum/design/item/mechfab/exosuit_equipment/cleaner + name = "Mounted Cleaner Grenade Launcher" + req_tech = list(TECH_MATERIAL = 2) + build_path = /obj/item/mecha_equipment/mounted_system/grenadecleaner + materials = list(DEFAULT_WALL_MATERIAL = 20000, MATERIAL_GLASS = 10000) + /datum/design/item/mechfab/exosuit_equipment/crisisdrone name = "Mounted Crisis Drone" build_path = /obj/item/mecha_equipment/crisis_drone diff --git a/code/modules/research/designs/mechfab/mechs/designs_exosuits.dm b/code/modules/research/designs/mechfab/mechs/designs_exosuits.dm index 8eb85d4cb5d..65d483d2aff 100644 --- a/code/modules/research/designs/mechfab/mechs/designs_exosuits.dm +++ b/code/modules/research/designs/mechfab/mechs/designs_exosuits.dm @@ -39,7 +39,7 @@ materials = list(DEFAULT_WALL_MATERIAL = 5000) /datum/design/item/mechfab/exosuit/diagnosis_unit - name = "Diagnosis unit" + name = "Diagnostics Unit" build_path = /obj/item/robot_parts/robot_component/diagnosis_unit time = 10 materials = list(DEFAULT_WALL_MATERIAL = 5000) diff --git a/html/changelog.html b/html/changelog.html index 4a5b199ed46..71ad0008758 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -35,7 +35,38 @@ -->
+

24 February 2021

+

Geeves updated:

+ +

MattAtlas updated:

+ +

WickedCybs updated:

+ +

23 February 2021

+

Alberyk updated:

+ +

Alberyk, Kyres1 updated:

+

Geeves updated:

MattAtlas updated: