Merge branch 'master' into punishesarchie

This commit is contained in:
CygnusB
2021-01-19 06:30:10 -03:00
committed by GitHub
1465 changed files with 377136 additions and 202652 deletions
@@ -277,12 +277,12 @@
..()
if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing))
chamber_round()
if(A.tool_behaviour == TOOL_SAW || istype(A, /obj/item/gun/energy/plasmacutter))
sawoff(user)
if(istype(A, /obj/item/melee/transforming/energy))
var/obj/item/melee/transforming/energy/W = A
if(W.active)
sawoff(user)
if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter))
sawoff(user)
/obj/item/gun/ballistic/revolver/doublebarrel/attack_self(mob/living/user)
var/num_unloaded = 0
@@ -91,7 +91,7 @@
/obj/item/gun/ballistic/shotgun/riot/attackby(obj/item/A, mob/user, params)
..()
if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter))
if(A.tool_behaviour == TOOL_SAW || istype(A, /obj/item/gun/energy/plasmacutter))
sawoff(user)
if(istype(A, /obj/item/melee/transforming/energy))
var/obj/item/melee/transforming/energy/W = A
@@ -222,10 +222,11 @@
spread = 2
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/AltClick(mob/living/user)
. = ..()
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
toggle_stock(user)
. = ..()
return TRUE
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/examine(mob/user)
. = ..()
@@ -286,8 +287,10 @@
to_chat(user, "You switch to tube A.")
/obj/item/gun/ballistic/shotgun/automatic/dual_tube/AltClick(mob/living/user)
. = ..()
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
pump()
return TRUE
// DOUBLE BARRELED SHOTGUN and IMPROVISED SHOTGUN are in revolver.dm
+15 -11
View File
@@ -2,7 +2,7 @@
//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."
desc = "A Kinaris syringe gun, modified to automatically synthesise chemical darts, and instead hold reagents."
icon_state = "chemgun"
item_state = "chemgun"
w_class = WEIGHT_CLASS_NORMAL
@@ -71,25 +71,29 @@
STOP_PROCESSING(SSobj, src)
/obj/item/gun/chem/debug/attack_self(mob/user)
var/list/reagent_ids = sortList(GLOB.chemical_reagents_list)
var/choose_operation = input(user, "Select an option", "Reagent fabricator", "cancel") in list("Select reagent", "Enable production", "Cancel")
if (choose_operation == "Select reagent")
reagents.clear_reagents()
var/chosen_reagent
switch(alert(usr, "Choose a method.", "Add Reagents", "Enter ID", "Choose ID"))
if("Enter ID")
switch(alert(usr, "Choose a method.", "Add Reagents", "Search", "Choose from a list", "I'm feeling lucky"))
if("Search")
var/valid_id
while(!valid_id)
chosen_reagent = stripped_input(usr, "Enter the ID of the reagent you want to add to your syringes.")
if(!chosen_reagent) //Get me out of here!
chosen_reagent = input(usr, "Enter the ID of the reagent you want to add.", "Search reagents") as null|text
if(isnull(chosen_reagent)) //Get me out of here!
break
for(var/ID in reagent_ids)
if(ID == chosen_reagent)
valid_id = 1
if(!ispath(text2path(chosen_reagent)))
chosen_reagent = pick_closest_path(chosen_reagent, make_types_fancy(subtypesof(/datum/reagent)))
if(ispath(chosen_reagent))
valid_id = TRUE
else
valid_id = TRUE
if(!valid_id)
to_chat(usr, "<span class='warning'>A reagent with that ID doesn't exist!</span>")
if("Choose ID")
chosen_reagent = input(usr, "Choose a reagent to add to your syringes.", "Choose a reagent.") as null|anything in reagent_ids
if("Choose from a list")
chosen_reagent = input(usr, "Choose a reagent to add.", "Choose a reagent.") as null|anything in subtypesof(/datum/reagent)
if("I'm feeling lucky")
chosen_reagent = pick(subtypesof(/datum/reagent))
if(chosen_reagent)
reagents.add_reagent(chosen_reagent, 100, null)