diff --git a/code/modules/projectiles/ammunition/special/syringe.dm b/code/modules/projectiles/ammunition/special/syringe.dm index caf5da3562..4eb7dc5475 100644 --- a/code/modules/projectiles/ammunition/special/syringe.dm +++ b/code/modules/projectiles/ammunition/special/syringe.dm @@ -24,9 +24,10 @@ /obj/item/ammo_casing/chemgun name = "dart synthesiser" - desc = "A high-power spring, linked to an energy-based dart synthesiser." + desc = "A high-power spring, linked to an energy-based piercing dart synthesiser." projectile_type = /obj/item/projectile/bullet/dart/piercing firing_effect_type = null + var/dartvolume = 10 /obj/item/ammo_casing/chemgun/ready_proj(atom/target, mob/living/user, quiet, zone_override = "") if(!BB) @@ -35,11 +36,23 @@ var/obj/item/gun/chem/CG = loc if(CG.syringes_left <= 0) return - CG.reagents.trans_to(BB, 10) + if (!CG.vial) + CG.syringes_left-- + return + CG.vial.reagents.trans_to(BB, dartvolume) BB.name = "chemical dart" CG.syringes_left-- ..() +//Smart dart version of reagent launcher. +/obj/item/ammo_casing/chemgun/smart + name = "smartdart synthesiser" + desc = "A high-power spring, linked to an energy-based smartdart synthesiser." + projectile_type = /obj/item/projectile/bullet/dart/syringe/dart + firing_effect_type = null + harmful = FALSE + dartvolume = 20 + /obj/item/ammo_casing/dnainjector name = "rigged syringe gun spring" desc = "A high-power spring that throws DNA injectors." diff --git a/code/modules/projectiles/guns/misc/chem_gun.dm b/code/modules/projectiles/guns/misc/chem_gun.dm index 779ab64bc2..ccc4c5bd15 100644 --- a/code/modules/projectiles/guns/misc/chem_gun.dm +++ b/code/modules/projectiles/guns/misc/chem_gun.dm @@ -1,8 +1,8 @@ //his isn't a subtype of the syringe gun because the syringegun subtype is made to hold syringes //this is meant to hold reagents/obj/item/gun/syringe /obj/item/gun/chem - name = "reagent gun" - desc = "A Nanotrasen syringe gun, modified to automatically synthesise chemical darts, and instead hold reagents." + name = "Reagent Repeater" + desc = "A Nanotrasen smartdart repeater rifle, modified to automatically synthesize piercing darts." icon_state = "chemgun" item_state = "chemgun" w_class = WEIGHT_CLASS_NORMAL @@ -13,21 +13,79 @@ custom_materials = list(/datum/material/iron=2000) clumsy_check = FALSE fire_sound = 'sound/items/syringeproj.ogg' - var/time_per_syringe = 300 - var/syringes_left = 5 - var/max_syringes = 5 + var/time_per_syringe = 200 + var/syringes_left = 3 + var/max_syringes = 6 var/last_synth = 0 + var/obj/item/reagent_containers/glass/bottle/vial/vial + var/list/allowed_containers = list(/obj/item/reagent_containers/glass/bottle/vial/small, /obj/item/reagent_containers/glass/bottle/vial/large) + var/quickload = TRUE /obj/item/gun/chem/Initialize() . = ..() chambered = new /obj/item/ammo_casing/chemgun(src) START_PROCESSING(SSobj, src) - create_reagents(100, OPENCONTAINER) /obj/item/gun/chem/Destroy() . = ..() STOP_PROCESSING(SSobj, src) +//bunch of hypospray copy paste +/obj/item/gun/chem/examine(mob/user) + . = ..() + if(vial) + . += "[vial] has [vial.reagents.total_volume]u remaining." + else + . += "It has no vial loaded in." + +/obj/item/gun/chem/proc/unload_hypo(obj/item/I, mob/user) + if((istype(I, /obj/item/reagent_containers/glass/bottle/vial))) + var/obj/item/reagent_containers/glass/bottle/vial/V = I + V.forceMove(user.loc) + user.put_in_hands(V) + to_chat(user, "You remove [vial] from [src].") + vial = null + update_icon() + playsound(loc, 'sound/weapons/empty.ogg', 50, 1) + else + to_chat(user, "The weapon isn't loaded!") + return + +/obj/item/gun/chem/attackby(obj/item/I, mob/living/user) + if((istype(I, /obj/item/reagent_containers/glass/bottle/vial))) + if(vial) + if(!quickload) + to_chat(user, "[src] can not hold more than one vial!") + return FALSE + unload_hypo(vial, user) + var/obj/item/reagent_containers/glass/bottle/vial/V = I + if(!is_type_in_list(V, allowed_containers)) + to_chat(user, "[src] doesn't accept this type of vial.") + return FALSE + if(!user.transferItemToLoc(V,src)) + return FALSE + vial = V + user.visible_message("[user] has loaded a vial into [src].","You have loaded [vial] into [src].") + update_icon() + playsound(loc, 'sound/weapons/autoguninsert.ogg', 35, 1) + return TRUE + else + to_chat(user, "This doesn't fit in [src].") + return FALSE + +/obj/item/gun/chem/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) + . = ..() //Don't bother changing this or removing it from containers will break. + +/obj/item/gun/chem/attack_self(mob/living/user) + if(user && !user.incapacitated()) + if(!vial) + to_chat(user, "This Hypo needs to be loaded first!") + else + unload_hypo(vial,user) + +/obj/item/gun/chem/attack(obj/item/I, mob/user, params) + return + /obj/item/gun/chem/can_shoot() return syringes_left @@ -45,3 +103,15 @@ if(chambered && !chambered.BB) chambered.newshot() last_synth = world.time + +//Smart dart version of the reagent launcher +/obj/item/gun/chem/smart + name = "Smartdart repeater rifle" + desc = "An experimental improved version of the smartdart rifle. It synthesizes medicinal smart darts which it fills using an inserted hypovial. It can accommodate both large and small hypovials." + icon_state = "chemgunrepeater" + item_state = "syringegun" + +obj/item/gun/chem/smart/Initialize() + . = ..() + chambered = new /obj/item/ammo_casing/chemgun/smart(src) + diff --git a/code/modules/projectiles/guns/misc/syringe_gun.dm b/code/modules/projectiles/guns/misc/syringe_gun.dm index 39b7cbf540..91275e197a 100644 --- a/code/modules/projectiles/guns/misc/syringe_gun.dm +++ b/code/modules/projectiles/guns/misc/syringe_gun.dm @@ -127,7 +127,7 @@ /obj/item/gun/syringe/dart/rapiddart name = "Repeating dart gun" icon_state = "rapiddartgun" - item_state = "rapiddartgun" + item_state = "syringegun" /obj/item/gun/syringe/dart/rapiddart/CheckParts(list/parts_list) var/obj/item/reagent_containers/glass/beaker/B = locate(/obj/item/reagent_containers/glass/beaker) in parts_list @@ -157,7 +157,7 @@ name = "blowgun" desc = "Fire syringes at a short distance." icon_state = "blowgun" - item_state = "blowgun" + item_state = "syringegun" fire_sound = 'sound/items/syringeproj.ogg' /obj/item/gun/syringe/blowgun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0, stam_cost = 0) diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 88c37ce2a2..663cf1fdd7 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -122,6 +122,17 @@ category = list("Medical Designs") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL +/datum/design/smartdartrepeater + name = "Smartdart Repeater" + desc = "An experimental smartdart rifle. It can make its own smart darts and is loaded with a hypovial." + id = "smartdartrepeater" + build_type = PROTOLATHE + materials = list(/datum/material/glass = 2000, /datum/material/plastic = 1000, /datum/material/iron = 2000,/datum/material/titanium = 1000 ) + build_path = /obj/item/gun/chem/smart + category = list("Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + + /datum/design/plasmarefiller name = "Plasma-Man Jumpsuit Refill" desc = "A refill pack for the auto-extinguisher on Plasma-man suits." @@ -201,7 +212,7 @@ build_path = /obj/item/storage/hypospraykit // let's not summon new hyposprays thanks category = list("Medical Designs") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE - + /datum/design/hypospray/mkii name = "Hypospray Mk. II" id = "hypospray_mkii" diff --git a/code/modules/research/techweb/nodes/weaponry_nodes.dm b/code/modules/research/techweb/nodes/weaponry_nodes.dm index e17d7e1e7b..999000c57b 100644 --- a/code/modules/research/techweb/nodes/weaponry_nodes.dm +++ b/code/modules/research/techweb/nodes/weaponry_nodes.dm @@ -45,7 +45,7 @@ display_name = "Medical Weaponry" description = "Weapons using medical technology." prereq_ids = list("adv_biotech", "adv_weaponry") - design_ids = list("rapidsyringe", "shotgundartcryostatis") + design_ids = list("rapidsyringe", "shotgundartcryostatis","smartdartrepeater") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2000) /datum/techweb_node/beam_weapons diff --git a/icons/obj/guns/projectile.dmi b/icons/obj/guns/projectile.dmi index 1504b9f0c7..5bbcca9791 100644 Binary files a/icons/obj/guns/projectile.dmi and b/icons/obj/guns/projectile.dmi differ