[MIRROR] Pipeguns: Elitism Edition (#3054)
* Pipeguns: Elitism Edition * fixes Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com> Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
@@ -58,7 +58,7 @@
|
||||
/turf/open/floor/wood,
|
||||
/area/ruin/powered/shuttle)
|
||||
"sC" = (
|
||||
/obj/item/gun/ballistic/rifle/boltaction,
|
||||
/obj/item/gun/ballistic/rifle/boltaction/pipegun/prime,
|
||||
/obj/structure/table/wood,
|
||||
/obj/item/flashlight/lantern,
|
||||
/turf/open/floor/wood,
|
||||
|
||||
@@ -51579,7 +51579,7 @@
|
||||
pixel_y = -2
|
||||
},
|
||||
/obj/item/storage/belt/bandolier,
|
||||
/obj/item/gun/ballistic/shotgun/doublebarrel/improvised,
|
||||
/obj/item/gun/ballistic/rifle/boltaction/pipegun,
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/turf/open/floor/plasteel/dark,
|
||||
/area/maintenance/port)
|
||||
|
||||
@@ -246,6 +246,7 @@ GLOBAL_LIST_INIT(oddity_loot, list(//oddity: strange or crazy items
|
||||
/obj/item/clothing/head/helmet/abductor = 1,
|
||||
/obj/item/clothing/head/helmet/justice =1,
|
||||
/obj/item/clothing/suit/space/hardsuit/carp = 1,
|
||||
/obj/item/book/granter/crafting_recipe/pipegun_prime =1,
|
||||
/obj/item/dice/d20/fate/stealth/one_use = 1, //Looks like a d20, keep the d20 in the uncommon pool.
|
||||
/obj/item/dice/d20/fate/stealth/cursed = 1, //Only rolls 1
|
||||
/obj/item/clothing/shoes/jackboots/fast = 1,
|
||||
|
||||
@@ -142,6 +142,28 @@
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_WEAPON
|
||||
|
||||
/datum/crafting_recipe/reciever
|
||||
name = "Modular Rifle Reciever"
|
||||
tools = list(TOOL_WRENCH, TOOL_WELDER, TOOL_SAW)
|
||||
result = /obj/item/weaponcrafting/receiver
|
||||
reqs = list(/obj/item/stack/sheet/metal = 5,
|
||||
/obj/item/stack/sticky_tape = 1,
|
||||
/obj/item/screwdriver = 1,
|
||||
/obj/item/assembly/mousetrap = 1)
|
||||
time = 100
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_WEAPON
|
||||
|
||||
/datum/crafting_recipe/riflestock
|
||||
name = "Wooden Rifle Stock"
|
||||
tools = list(/obj/item/hatchet)
|
||||
result = /obj/item/weaponcrafting/stock
|
||||
reqs = list(/obj/item/stack/sheet/mineral/wood = 8,
|
||||
/obj/item/stack/sticky_tape = 1)
|
||||
time = 50
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_WEAPON
|
||||
|
||||
/datum/crafting_recipe/advancedegun
|
||||
name = "Advanced Energy Gun"
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
@@ -475,15 +497,29 @@
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_AMMO
|
||||
|
||||
/datum/crafting_recipe/ishotgun
|
||||
name = "Improvised Shotgun"
|
||||
result = /obj/item/gun/ballistic/shotgun/doublebarrel/improvised
|
||||
/datum/crafting_recipe/pipegun
|
||||
name = "Pipegun"
|
||||
result = /obj/item/gun/ballistic/rifle/boltaction/pipegun
|
||||
reqs = list(/obj/item/weaponcrafting/receiver = 1,
|
||||
/obj/item/pipe = 1,
|
||||
/obj/item/weaponcrafting/stock = 1,
|
||||
/obj/item/stack/package_wrap = 5)
|
||||
/obj/item/stack/sticky_tape = 1)
|
||||
tools = list(TOOL_SCREWDRIVER)
|
||||
time = 100
|
||||
time = 50
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_WEAPON
|
||||
|
||||
/datum/crafting_recipe/pipegun_prime
|
||||
name = "Regal Pipegun"
|
||||
always_available = FALSE
|
||||
result = /obj/item/gun/ballistic/rifle/boltaction/pipegun/prime
|
||||
reqs = list(/obj/item/gun/ballistic/rifle/boltaction/pipegun = 1,
|
||||
/obj/item/food/deadmouse = 1,
|
||||
/datum/reagent/consumable/grey_bull = 20,
|
||||
/obj/item/spear = 1,
|
||||
/obj/item/storage/toolbox= 1)
|
||||
tools = list(TOOL_SCREWDRIVER, /obj/item/clothing/gloves/color/yellow, /obj/item/clothing/mask/gas, /obj/item/melee/baton/cattleprod)
|
||||
time = 300 //contemplate for a bit
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_WEAPON
|
||||
|
||||
|
||||
@@ -430,3 +430,17 @@
|
||||
icon_state = "cooking_learing_sweets"
|
||||
oneuse = FALSE
|
||||
remarks = list("So that is how icing is made!", "Placing fruit on top? How simple...", "Huh layering cake seems harder then this...", "This book smells like candy", "A clown must have made this page, or they forgot to spell check it before printing...", "Wait, a way to cook slime to be safe?")
|
||||
|
||||
/obj/item/book/granter/crafting_recipe/pipegun_prime
|
||||
name = "diary of a dead assistant"
|
||||
desc = "A battered journal. Looks like he had a pretty rough life."
|
||||
crafting_recipe_types = list(
|
||||
/datum/crafting_recipe/pipegun_prime
|
||||
)
|
||||
icon_state = "book1"
|
||||
oneuse = TRUE
|
||||
remarks = list("He apparently mastered some lost guncrafting technique.", "Why do I have to go through so many hoops to get this shitty gun?", "That much Grey Bull cannot be healthy...", "Did he drop this into a moisture trap? Yuck.", "Toolboxing techniques, huh? I kinda just want to know how to make the gun.", "What the hell does he mean by 'ancient warrior tradition'?")
|
||||
|
||||
/obj/item/book/granter/crafting_recipe/pipegun_prime/recoil(mob/living/carbon/user)
|
||||
to_chat(user, "<span class='warning'>The book turns to dust in your hands.</span>")
|
||||
qdel(src)
|
||||
|
||||
@@ -214,7 +214,6 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
|
||||
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
|
||||
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
|
||||
new/datum/stack_recipe("wood table frame", /obj/structure/table_frame/wood, 2, time = 10), \
|
||||
new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \
|
||||
new/datum/stack_recipe("rolling pin", /obj/item/kitchen/rollingpin, 2, time = 30), \
|
||||
new/datum/stack_recipe("wooden chair", /obj/structure/chair/wood/, 3, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("winged wooden chair", /obj/structure/chair/wood/wings, 3, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
|
||||
@@ -580,7 +580,7 @@
|
||||
|
||||
/obj/item/storage/belt/bandolier
|
||||
name = "bandolier"
|
||||
desc = "A bandolier for holding shotgun ammunition."
|
||||
desc = "A bandolier for holding rifle and shotgun ammunition."
|
||||
icon_state = "bandolier"
|
||||
inhand_icon_state = "bandolier"
|
||||
worn_icon_state = "bandolier"
|
||||
@@ -592,7 +592,8 @@
|
||||
STR.max_combined_w_class = 18
|
||||
STR.display_numerical_stacking = TRUE
|
||||
STR.set_holdable(list(
|
||||
/obj/item/ammo_casing/shotgun
|
||||
/obj/item/ammo_casing/shotgun,
|
||||
/obj/item/ammo_casing/a762
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/fannypack
|
||||
|
||||
@@ -829,7 +829,7 @@
|
||||
if(uses < BLOOD_BARRAGE_COST)
|
||||
to_chat(user, "<span class='cultitalic'>You need [BLOOD_BARRAGE_COST] charges to perform this rite.</span>")
|
||||
else
|
||||
var/obj/rite = new /obj/item/gun/ballistic/rifle/boltaction/enchanted/arcane_barrage/blood()
|
||||
var/obj/rite = new /obj/item/gun/ballistic/rifle/enchanted/arcane_barrage/blood()
|
||||
uses -= BLOOD_BARRAGE_COST
|
||||
qdel(src)
|
||||
if(user.put_in_hands(rite))
|
||||
|
||||
@@ -752,15 +752,15 @@
|
||||
spear.throw_at(owner, 10, 2, owner)
|
||||
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/enchanted/arcane_barrage/blood
|
||||
/obj/item/gun/ballistic/rifle/enchanted/arcane_barrage/blood
|
||||
name = "blood bolt barrage"
|
||||
desc = "Blood for blood."
|
||||
color = "#ff0000"
|
||||
guns_left = 24
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage/blood
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/blood
|
||||
fire_sound = 'sound/magic/wand_teleport.ogg'
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/enchanted/arcane_barrage/blood/can_trigger_gun(mob/living/user)
|
||||
/obj/item/gun/ballistic/rifle/enchanted/arcane_barrage/blood/can_trigger_gun(mob/living/user)
|
||||
. = ..()
|
||||
if(!iscultist(user))
|
||||
to_chat(user, "<span class='cultlarge'>\"Did you truly think that you could channel MY blood without my approval? Amusing, but futile.\"</span>")
|
||||
@@ -773,7 +773,8 @@
|
||||
qdel(src)
|
||||
return FALSE
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage/blood
|
||||
/obj/item/ammo_box/magazine/internal/blood
|
||||
caliber = CALIBER_A762
|
||||
ammo_type = /obj/item/ammo_casing/magic/arcane_barrage/blood
|
||||
|
||||
/obj/item/ammo_casing/magic/arcane_barrage/blood
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
|
||||
/datum/spellbook_entry/infinite_guns/Refund(mob/living/carbon/human/user, obj/item/spellbook/book)
|
||||
for (var/obj/item/currentItem in user.get_all_gear())
|
||||
if (currentItem.type == /obj/item/gun/ballistic/rifle/boltaction/enchanted)
|
||||
if (currentItem.type == /obj/item/gun/ballistic/rifle/enchanted)
|
||||
qdel(currentItem)
|
||||
return ..()
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
|
||||
/datum/spellbook_entry/arcane_barrage/Refund(mob/living/carbon/human/user, obj/item/spellbook/book)
|
||||
for (var/obj/item/currentItem in user.get_all_gear())
|
||||
if (currentItem.type == /obj/item/gun/ballistic/rifle/boltaction/enchanted/arcane_barrage)
|
||||
if (currentItem.type == /obj/item/gun/ballistic/rifle/enchanted/arcane_barrage)
|
||||
qdel(currentItem)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -39,6 +39,10 @@
|
||||
BB.def_zone = user.zone_selected
|
||||
BB.suppressed = quiet
|
||||
|
||||
if(isgun(fired_from))
|
||||
var/obj/item/gun/G = fired_from
|
||||
BB.damage *= G.projectile_damage_multiplier
|
||||
|
||||
if(reagents && BB.reagents)
|
||||
reagents.trans_to(BB, reagents.total_volume, transfered_by = user) //For chemical darts/bullets
|
||||
qdel(reagents)
|
||||
|
||||
@@ -6,11 +6,23 @@
|
||||
max_ammo = 5
|
||||
multiload = TRUE
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/boltaction/enchanted
|
||||
/obj/item/ammo_box/magazine/internal/boltaction/pipegun
|
||||
name = "pipegun internal magazine"
|
||||
caliber = CALIBER_SHOTGUN
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/improvised
|
||||
max_ammo = 1
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/boltaction/pipegun/prime
|
||||
name = "regal pipegun internal magazine"
|
||||
max_ammo = 3
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/enchanted
|
||||
max_ammo = 1
|
||||
caliber = CALIBER_A762
|
||||
ammo_type = /obj/item/ammo_casing/a762/enchanted
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage
|
||||
/obj/item/ammo_box/magazine/internal/arcane_barrage
|
||||
caliber = CALIBER_A762
|
||||
ammo_type = /obj/item/ammo_casing/magic/arcane_barrage
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/boltaction/harpoon
|
||||
|
||||
@@ -22,11 +22,6 @@
|
||||
name = "double-barrel shotgun internal magazine"
|
||||
max_ammo = 2
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/shot/improvised
|
||||
name = "improvised shotgun internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/improvised
|
||||
max_ammo = 1
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/shot/riot
|
||||
name = "riot shotgun internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot
|
||||
|
||||
@@ -42,6 +42,10 @@
|
||||
var/semicd = 0 //cooldown handler
|
||||
var/weapon_weight = WEAPON_LIGHT
|
||||
var/dual_wield_spread = 24 //additional spread when dual wielding
|
||||
|
||||
/// Just 'slightly' snowflakey way to modify projectile damage for projectiles fired from this gun.
|
||||
var/projectile_damage_multiplier = 1
|
||||
|
||||
var/spread = 0 //Spread induced by the gun itself.
|
||||
var/randomspread = 1 //Set to 0 for shotguns. This is used for weapons that don't fire all their bullets at once.
|
||||
|
||||
@@ -138,7 +142,7 @@
|
||||
. += "It has \a [bayonet] [can_bayonet ? "" : "permanently "]affixed to it."
|
||||
if(can_bayonet) //if it has a bayonet and this is false, the bayonet is permanent.
|
||||
. += "<span class='info'>[bayonet] looks like it can be <b>unscrewed</b> from [src].</span>"
|
||||
else if(can_bayonet)
|
||||
if(can_bayonet)
|
||||
. += "It has a <b>bayonet</b> lug on it."
|
||||
|
||||
/obj/item/gun/equipped(mob/living/user, slot)
|
||||
@@ -370,6 +374,7 @@
|
||||
if(user)
|
||||
user.update_inv_hands()
|
||||
SSblackbox.record_feedback("tally", "gun_fired", 1, type)
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/proc/reset_semicd()
|
||||
@@ -450,7 +455,6 @@
|
||||
QDEL_NULL(pin)
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/gun/welder_act(mob/living/user, obj/item/I)
|
||||
. = ..()
|
||||
if(.)
|
||||
|
||||
@@ -90,6 +90,27 @@
|
||||
var/suppressor_x_offset ///pixel offset for the suppressor overlay on the x axis.
|
||||
var/suppressor_y_offset ///pixel offset for the suppressor overlay on the y axis.
|
||||
|
||||
///Gun internal magazine modification and misfiring
|
||||
|
||||
///Can we modify our ammo type in this gun's internal magazine?
|
||||
var/can_modify_ammo = FALSE
|
||||
///our initial ammo type. Should match initial caliber, but a bit of redundency doesn't hurt.
|
||||
var/initial_caliber
|
||||
///our alternative ammo type.
|
||||
var/alternative_caliber
|
||||
///our initial fire sound. same reasons for initial caliber
|
||||
var/initial_fire_sound
|
||||
///our alternative fire sound, in case we want our gun to be louder or quieter or whatever
|
||||
var/alternative_fire_sound
|
||||
///If only our alternative ammuntion misfires and not our main ammunition, we set this to TRUE
|
||||
var/alternative_ammo_misfires = FALSE
|
||||
/// Whether our ammo misfires now or when it's set by the wrench_act. TRUE means it misfires.
|
||||
var/can_misfire = FALSE
|
||||
///How likely is our gun to misfire?
|
||||
var/misfire_probability = 0
|
||||
///How much does shooting the gun increment the misfire probability?
|
||||
var/misfire_percentage_increment = 0
|
||||
|
||||
/obj/item/gun/ballistic/Initialize()
|
||||
. = ..()
|
||||
if (!spawnwithmagazine)
|
||||
@@ -302,13 +323,30 @@
|
||||
if (can_be_sawn_off)
|
||||
if (sawoff(user, A))
|
||||
return
|
||||
|
||||
if(can_misfire && istype(A, /obj/item/stack/sheet/cloth))
|
||||
if(guncleaning(user, A))
|
||||
return
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/ballistic/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
|
||||
if(magazine && chambered.BB && can_misfire && misfire_probability > 0)
|
||||
if(prob(misfire_probability))
|
||||
if(blow_up(user))
|
||||
to_chat(user, "<span class='userdanger'>[src] misfires!</span>")
|
||||
|
||||
if (sawn_off)
|
||||
bonus_spread += SAWN_OFF_ACC_PENALTY
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/ballistic/shoot_live_shot(mob/living/user, pointblank = 0, atom/pbtarget = null, message = 1)
|
||||
if(can_misfire)
|
||||
misfire_probability += misfire_percentage_increment
|
||||
|
||||
. = ..()
|
||||
|
||||
///Installs a new suppressor, assumes that the suppressor is already in the contents of src
|
||||
/obj/item/gun/ballistic/proc/install_suppressor(obj/item/suppressor/S)
|
||||
suppressed = S
|
||||
@@ -413,12 +451,17 @@
|
||||
. = ..()
|
||||
var/count_chambered = !(bolt_type == BOLT_TYPE_NO_BOLT || bolt_type == BOLT_TYPE_OPEN)
|
||||
. += "It has [get_ammo(count_chambered)] round\s remaining."
|
||||
|
||||
if (!chambered)
|
||||
. += "It does not seem to have a round chambered."
|
||||
if (bolt_locked)
|
||||
. += "The [bolt_wording] is locked back and needs to be released before firing."
|
||||
. += "The [bolt_wording] is locked back and needs to be released before firing or de-fouling."
|
||||
if (suppressed)
|
||||
. += "It has a suppressor attached that can be removed with <b>alt+click</b>."
|
||||
if(can_misfire)
|
||||
. += "<span class='danger'>You get the feeling this might explode if you fire it....</span>"
|
||||
if(misfire_probability > 0)
|
||||
. += "<span class='danger'>Given the state of the gun, there is a [misfire_probability]% chance it'll misfire.</span>"
|
||||
|
||||
///Gets the number of bullets in the gun
|
||||
/obj/item/gun/ballistic/proc/get_ammo(countchambered = TRUE)
|
||||
@@ -507,6 +550,61 @@ GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list(
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/ballistic/proc/guncleaning(mob/user, /obj/item/A)
|
||||
if(misfire_probability == 0)
|
||||
to_chat(user, "<span class='notice'>\The [src] seems to be already clean of fouling.</span>")
|
||||
return
|
||||
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='notice'>[user] begins to cleaning \the [src].</span>", "<span class='notice'>You begin to clean the internals of \the [src].</span>")
|
||||
|
||||
if(do_after(user, 100, target = src))
|
||||
var/original_misfire_value = initial(misfire_probability)
|
||||
if(misfire_probability > original_misfire_value)
|
||||
misfire_probability = original_misfire_value
|
||||
user.visible_message("<span class='notice'>[user] cleans \the [src] of any fouling.</span>", "<span class='notice'>You clean \the [src], removing any fouling, preventing misfire.</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/ballistic/wrench_act(mob/living/user, obj/item/I)
|
||||
if(!user.is_holding(src))
|
||||
to_chat(user, "<span class='notice'>You need to hold [src] to modify it.</span>")
|
||||
return TRUE
|
||||
|
||||
if(!can_modify_ammo)
|
||||
return
|
||||
|
||||
if(bolt_type == BOLT_TYPE_STANDARD)
|
||||
if(get_ammo())
|
||||
to_chat(user, "<span class='notice'>You can't get at the internals while the gun has a bullet in it!</span>")
|
||||
return
|
||||
|
||||
else if(!bolt_locked)
|
||||
to_chat(user, "<span class='notice'>You can't get at the internals while the bolt is down!</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin to tinker with [src]...</span>")
|
||||
I.play_tool_sound(src)
|
||||
if(!I.use_tool(src, user, 3 SECONDS))
|
||||
return TRUE
|
||||
|
||||
if(blow_up(user))
|
||||
user.visible_message("<span class='danger'>\The [src] goes off!</span>", "<span class='danger'>\The [src] goes off in your face!</span>")
|
||||
return
|
||||
|
||||
if(magazine.caliber == initial_caliber)
|
||||
magazine.caliber = alternative_caliber
|
||||
if(alternative_ammo_misfires)
|
||||
can_misfire = TRUE
|
||||
fire_sound = alternative_fire_sound
|
||||
to_chat(user, "<span class='notice'>You modify [src]. Now it will fire [alternative_caliber] rounds.</span>")
|
||||
else
|
||||
magazine.caliber = initial_caliber
|
||||
if(alternative_ammo_misfires)
|
||||
can_misfire = FALSE
|
||||
fire_sound = initial_fire_sound
|
||||
to_chat(user, "<span class='notice'>You reset [src]. Now it will fire [initial_caliber] rounds.</span>")
|
||||
|
||||
|
||||
///used for sawing guns, causes the gun to fire without the input of the user
|
||||
/obj/item/gun/ballistic/proc/blow_up(mob/user)
|
||||
. = FALSE
|
||||
|
||||
@@ -80,6 +80,15 @@
|
||||
fire_sound = 'sound/weapons/gun/revolver/shot.ogg'
|
||||
icon_state = "detective"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rev38
|
||||
initial_caliber = CALIBER_38
|
||||
alternative_caliber = CALIBER_357
|
||||
initial_fire_sound = 'sound/weapons/gun/revolver/shot.ogg'
|
||||
alternative_fire_sound = 'sound/weapons/gun/revolver/shot_alt.ogg'
|
||||
can_modify_ammo = TRUE
|
||||
alternative_ammo_misfires = TRUE
|
||||
can_misfire = FALSE
|
||||
misfire_probability = 0
|
||||
misfire_percentage_increment = 25 //about 1 in 4 rounds, which increases rapidly every shot
|
||||
obj_flags = UNIQUE_RENAME
|
||||
unique_reskin = list("Default" = "detective",
|
||||
"Fitz Special" = "detective_fitz",
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/ballistic/rifle/attackby(obj/item/A, mob/user, params)
|
||||
if (!bolt_locked)
|
||||
if (!bolt_locked && !istype(A, /obj/item/stack/sheet/cloth))
|
||||
to_chat(user, "<span class='notice'>The bolt is closed!</span>")
|
||||
return
|
||||
return ..()
|
||||
@@ -73,10 +73,10 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/blow_up(mob/user)
|
||||
. = 0
|
||||
. = FALSE
|
||||
if(chambered?.BB)
|
||||
process_fire(user, user, FALSE)
|
||||
. = 1
|
||||
. = TRUE
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/harpoon
|
||||
name = "ballistic harpoon gun"
|
||||
@@ -94,15 +94,57 @@
|
||||
can_be_sawn_off = FALSE
|
||||
realistic = FALSE
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/enchanted
|
||||
/obj/item/gun/ballistic/rifle/boltaction/pipegun
|
||||
name = "pipegun"
|
||||
desc = "An excellent weapon for flushing out tunnel rats and enemy assistants, but its rifling leaves much to be desired."
|
||||
icon_state = "musket"
|
||||
inhand_icon_state = "musket"
|
||||
worn_icon_state = "musket"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/64x_guns_left.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/64x_guns_right.dmi'
|
||||
inhand_x_dimension = 64
|
||||
inhand_y_dimension = 64
|
||||
fire_sound = 'sound/weapons/gun/sniper/shot.ogg'
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/pipegun
|
||||
initial_caliber = CALIBER_SHOTGUN
|
||||
alternative_caliber = CALIBER_A762
|
||||
initial_fire_sound = 'sound/weapons/gun/sniper/shot.ogg'
|
||||
alternative_fire_sound = 'sound/weapons/gun/shotgun/shot.ogg'
|
||||
can_modify_ammo = TRUE
|
||||
can_misfire = TRUE
|
||||
misfire_probability = 0
|
||||
misfire_percentage_increment = 5 //Slowly increases every shot
|
||||
can_bayonet = FALSE
|
||||
can_be_sawn_off = FALSE
|
||||
projectile_damage_multiplier = 0.75
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/pipegun/process_chamber(empty_chamber, from_firing, chamber_next_round)
|
||||
. = ..()
|
||||
do_sparks(1, TRUE, src)
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/pipegun/prime
|
||||
name = "regal pipegun"
|
||||
desc = "Older, territorial assistants typically possess more valuable loot."
|
||||
icon_state = "musket_prime"
|
||||
inhand_icon_state = "musket_prime"
|
||||
worn_icon_state = "musket_prime"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/pipegun/prime
|
||||
can_misfire = FALSE
|
||||
misfire_probability = 0
|
||||
misfire_percentage_increment = 0
|
||||
projectile_damage_multiplier = 1
|
||||
|
||||
/// MAGICAL BOLT ACTIONS + ARCANE BARRAGE? ///
|
||||
|
||||
/obj/item/gun/ballistic/rifle/enchanted
|
||||
name = "enchanted bolt action rifle"
|
||||
desc = "Careful not to lose your head."
|
||||
var/guns_left = 30
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/enchanted
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/enchanted
|
||||
can_be_sawn_off = FALSE
|
||||
realistic = FALSE
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/enchanted/arcane_barrage
|
||||
/obj/item/gun/ballistic/rifle/enchanted/arcane_barrage
|
||||
name = "arcane barrage"
|
||||
desc = "Pew Pew Pew."
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
@@ -116,29 +158,29 @@
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
|
||||
realistic = FALSE
|
||||
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/arcane_barrage
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/enchanted/dropped()
|
||||
/obj/item/gun/ballistic/rifle/enchanted/dropped()
|
||||
. = ..()
|
||||
guns_left = 0
|
||||
magazine = null
|
||||
chambered = null
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/enchanted/proc/discard_gun(mob/living/user)
|
||||
/obj/item/gun/ballistic/rifle/enchanted/proc/discard_gun(mob/living/user)
|
||||
user.throw_item(pick(oview(7,get_turf(user))))
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/enchanted/arcane_barrage/discard_gun(mob/living/user)
|
||||
/obj/item/gun/ballistic/rifle/enchanted/arcane_barrage/discard_gun(mob/living/user)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/enchanted/attack_self()
|
||||
/obj/item/gun/ballistic/rifle/enchanted/attack_self()
|
||||
return
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/enchanted/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
/obj/item/gun/ballistic/rifle/enchanted/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(guns_left)
|
||||
var/obj/item/gun/ballistic/rifle/boltaction/enchanted/gun = new type
|
||||
var/obj/item/gun/ballistic/rifle/enchanted/gun = new type
|
||||
gun.guns_left = guns_left - 1
|
||||
discard_gun(user)
|
||||
user.swap_hand()
|
||||
|
||||
@@ -181,67 +181,6 @@
|
||||
if(.)
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
|
||||
// IMPROVISED SHOTGUN //
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/doublebarrel/improvised
|
||||
name = "improvised shotgun"
|
||||
desc = "Essentially a tube that aims shotgun shells."
|
||||
icon_state = "ishotgun"
|
||||
inhand_icon_state = "ishotgun"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 10
|
||||
slot_flags = null
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/improvised
|
||||
sawn_desc = "I'm just here for the gasoline."
|
||||
unique_reskin = null
|
||||
var/slung = FALSE
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/stack/cable_coil) && !sawn_off)
|
||||
var/obj/item/stack/cable_coil/C = A
|
||||
if(C.use(10))
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
to_chat(user, "<span class='notice'>You tie the lengths of cable to the shotgun, making a sling.</span>")
|
||||
slung = TRUE
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need at least ten lengths of cable if you want to make a sling!</span>")
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/update_icon_state()
|
||||
. = ..()
|
||||
if(slung)
|
||||
inhand_icon_state = "ishotgunsling"
|
||||
if(sawn_off)
|
||||
inhand_icon_state = "ishotgun_sawn"
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/update_overlays()
|
||||
. = ..()
|
||||
if(slung)
|
||||
. += "ishotgunsling"
|
||||
if(sawn_off)
|
||||
. += "ishotgun_sawn"
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/sawoff(mob/user)
|
||||
. = ..()
|
||||
if(. && slung) //sawing off the gun removes the sling
|
||||
new /obj/item/stack/cable_coil(get_turf(src), 10)
|
||||
slung = FALSE
|
||||
update_icon()
|
||||
lefthand_file = 'icons/mob/inhands/weapons/64x_guns_left.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/64x_guns_right.dmi'
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/sawn
|
||||
name = "sawn-off improvised shotgun"
|
||||
desc = "A single-shot shotgun. Better not miss."
|
||||
icon_state = "ishotgun_sawn"
|
||||
inhand_icon_state = "ishotgun_sawn"
|
||||
worn_icon_state = "gun"
|
||||
worn_icon = null
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
sawn_off = TRUE
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/doublebarrel/hook
|
||||
name = "hook modified sawn-off shotgun"
|
||||
desc = "Range isn't an issue when you can bring your victim to you."
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
clothes_req = TRUE
|
||||
cooldown_min = 10 //Gun wizard
|
||||
action_icon_state = "bolt_action"
|
||||
var/summon_path = /obj/item/gun/ballistic/rifle/boltaction/enchanted
|
||||
var/summon_path = /obj/item/gun/ballistic/rifle/enchanted
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/infinite_guns/cast(list/targets, mob/user = usr)
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
@@ -24,4 +24,4 @@
|
||||
name = "Arcane Barrage"
|
||||
desc = "Fire a torrent of arcane energy at your foes with this (powerful) spell. Deals much more damage than Lesser Summon Guns, but won't knock targets down. Requires both hands free to use. Learning this spell makes you unable to learn Lesser Summon Gun."
|
||||
action_icon_state = "arcane_barrage"
|
||||
summon_path = /obj/item/gun/ballistic/rifle/boltaction/enchanted/arcane_barrage
|
||||
summon_path = /obj/item/gun/ballistic/rifle/enchanted/arcane_barrage
|
||||
|
||||
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 31 KiB |
@@ -277,7 +277,6 @@ GLOBAL_LIST_INIT(uncommon_loot, list(//uncommon: useful items
|
||||
) = 100,
|
||||
list( //Improvised weapons and tools that are weapons.
|
||||
/obj/item/gun/ballistic/revolver/rifle/improvised = 100,
|
||||
/obj/item/gun/ballistic/shotgun/doublebarrel/improvised = 100,
|
||||
/obj/item/scythe = 25,
|
||||
/obj/item/throwing_star = 5,
|
||||
/obj/item/throwing_star/stamina = 5
|
||||
|
||||
@@ -58,6 +58,11 @@
|
||||
can_be_sawn_off = TRUE
|
||||
bolt_wording = "barrel"
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/shot/improvised
|
||||
name = "improvised shotgun internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/improvised
|
||||
max_ammo = 1
|
||||
|
||||
/obj/item/gun/ballistic/rifle/ishotgun/examine(mob/user)
|
||||
. = ..()
|
||||
. += "The barrel is [bolt_locked ? "broke open" : "closed"]."
|
||||
|
||||