More fixes and sprites

This commit is contained in:
TheDZD
2016-05-31 22:39:21 -04:00
parent f7d4cbe108
commit 4facfcb5a4
34 changed files with 359 additions and 284 deletions
@@ -123,8 +123,8 @@ Doesn't work on other aliens/AI.*/
A.firer = src
A.yo = U.y - T.y
A.xo = U.x - T.x
spawn(1)
A.process()
A.fire()
A.newtonian_move(get_dir(U, T))
return
/mob/living/carbon/alien/humanoid/proc/resin() // -- TLE
@@ -185,4 +185,4 @@ Doesn't work on other aliens/AI.*/
adjustPlasma(-amount)
return 1
return 0
return 0
@@ -438,8 +438,7 @@ Auto Patrol[]"},
A.current = U
A.yo = U.y - T.y
A.xo = U.x - T.x
spawn(0)
A.process()
A.fire()
/mob/living/simple_animal/bot/ed209/attack_alien(mob/living/carbon/alien/user)
..()
@@ -632,8 +632,7 @@
A.current = T
A.yo = U.y - T.y
A.xo = U.x - T.x
spawn( 0 )
A.process()
A.fire()
return
/mob/living/simple_animal/pet/corgi/Ian/borgi/Life()
@@ -657,4 +656,4 @@
s.start()
respawnable_list += src
qdel(src)
return
return
+14 -3
View File
@@ -65,15 +65,26 @@
if ((O.client && !( O.blinded )))
to_chat(O, "\red [src] launches a razor-sharp quill at [target]!")
//var/obj/item/weapon/arrow/quill/Q = new(loc)
//Q.fingerprintslast = src.ckey
//Q.throw_at(target,10,30)
var/obj/item/weapon/quill/Q = new(loc)
Q.fingerprintslast = src.ckey
Q.throw_at(target,10,30)
quills--
spawn(100)
to_chat(src, "\red You feel a fresh quill slide into place.")
quills++
/obj/item/weapon/quill
name = "vox quill"
desc = "A wickedly barbed quill from some bizarre animal."
icon_state = "quill"
item_state = "quill"
throwforce = 5
w_class = 3.0
sharp = 1
edge = 0
/mob/living/simple_animal/vox/armalis/verb/message_mob()
set category = "Alien"
set name = "Commune with creature"
+1 -1
View File
@@ -213,7 +213,7 @@
else // Any other
A.yo = -20
A.xo = 0
A.process() //TODO: Carn: check this out
A.fire() //TODO: Carn: check this out
/obj/machinery/power/emitter/attackby(obj/item/W, mob/user, params)
+2
View File
@@ -168,6 +168,8 @@
A.update_icon()
update_icon()
return num_loaded
/obj/item/ammo_box/attack_self(mob/user as mob)
var/obj/item/ammo_casing/A = get_round()
if(A)
@@ -82,6 +82,15 @@
caliber = "n762"
projectile_type = /obj/item/projectile/bullet
/obj/item/ammo_casing/caseless/magspear
name = "magnetic spear"
desc = "A reusable spear that is typically loaded into kinetic spearguns."
projectile_type = /obj/item/projectile/bullet/reusable/magspear
caliber = "speargun"
icon_state = "magspear"
throwforce = 15 //still deadly when thrown
throw_speed = 3
/obj/item/ammo_casing/shotgun
name = "shotgun slug"
desc = "A 12 gauge lead slug."
@@ -278,15 +287,6 @@
icon_state = "40mmHE"
projectile_type = /obj/item/projectile/bullet/a40mm
/obj/item/ammo_casing/caseless/magspear
name = "magnetic spear"
desc = "A reusable spear that is typically loaded into kinetic spearguns."
projectile_type = /obj/item/projectile/bullet/reusable/magspear
caliber = "speargun"
icon_state = "magspear"
throwforce = 15 //still deadly when thrown
throw_speed = 3
/obj/item/ammo_casing/caseless/foam_dart
name = "foam dart"
desc = "It's nerf or nothing! Ages 8 and up."
@@ -226,5 +226,6 @@
var/teleport_target
/obj/item/ammo_casing/energy/teleport/newshot()
..()
var/obj/item/projectile/energy/teleport/T = BB
T.teleport_target = teleport_target
@@ -82,9 +82,6 @@
max_ammo = 4
multiload = 0
/obj/item/ammo_box/magazine/internal/shot/lethal
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
/obj/item/ammo_box/magazine/internal/shot/ammo_count(countempties = 1)
if (!countempties)
var/boolets = 0
@@ -95,6 +92,14 @@
else
return ..()
/obj/item/ammo_box/magazine/internal/shot/tube
name = "dual feed shotgun internal tube"
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot
max_ammo = 4
/obj/item/ammo_box/magazine/internal/shot/lethal
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
/obj/item/ammo_box/magazine/internal/shot/com
name = "combat shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
@@ -148,6 +153,10 @@
max_ammo = 5
multiload = 1
/obj/item/ammo_box/magazine/internal/boltaction/enchanted
max_ammo =1
ammo_type = /obj/item/ammo_casing/a762/enchanted
/obj/item/ammo_box/magazine/internal/shot/toy
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
caliber = "foam_force"
+10 -11
View File
@@ -32,14 +32,14 @@
var/firing_burst = 0 //Prevent the weapon from firing again while already firing
var/semicd = 0 //cooldown handler
var/weapon_weight = WEAPON_LIGHT
var/list/restricted_species
var/spread = 0
var/randomspread = 1
var/unique_rename = 0 //allows renaming with a pen
var/unique_reskin = 0 //allows one-time reskinning
var/reskinned = 0 //whether or not the gun has been reskinned
var/current_skin = null
var/current_skin = null //the skin choice if we had a reskin
var/list/options = list()
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
@@ -69,7 +69,7 @@
/obj/item/weapon/gun/examine(mob/user)
..()
if(unique_reskin && !reskinned)
if(unique_reskin && !current_skin)
to_chat(user, "<span class='notice'>Alt-click it to reskin it.</span>")
if(unique_rename)
to_chat(user, "<span class='notice'>Use a pen on it to rename it.</span>")
@@ -156,6 +156,9 @@
/obj/item/weapon/gun/proc/can_trigger_gun(var/mob/living/user)
if(!user.can_use_guns(src))
return 0
if(restricted_species && restricted_species.len && !(user.get_species() in restricted_species))
to_chat(user, "<span class='danger'>[src] is incompatible with your biology!</span>")
return 0
return 1
obj/item/weapon/gun/proc/newshot()
@@ -309,22 +312,18 @@ obj/item/weapon/gun/proc/newshot()
if(user.incapacitated())
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(unique_reskin && !reskinned && loc == user)
if(unique_reskin && !current_skin && loc == user)
reskin_gun(user)
/obj/item/weapon/gun/proc/reskin_gun(mob/M)
var/choice = input(M,"Warning, you can only reskin your weapon once!","Reskin Gun") in options
if(src && choice && !M.stat && in_range(M,src) && !M.restrained() && M.canmove)
if(src && choice && !current_skin && !M.incapacitated() && in_range(M,src))
if(options[choice] == null)
return
if(sawn_state == SAWN_OFF)
icon_state = options[choice] + "-sawn"
else
icon_state = options[choice]
current_skin = icon_state
current_skin = options[choice]
to_chat(M, "Your gun is now skinned as [choice]. Say hello to your new friend.")
reskinned = 1
update_icon()
/obj/item/weapon/gun/proc/rename_gun(mob/M)
var/input = stripped_input(M,"What do you want to name the gun?", ,"", MAX_NAME_LEN)
+76 -6
View File
@@ -1,14 +1,89 @@
/obj/item/weapon/gun/projectile/automatic/spikethrower
name = "\improper Vox spike thrower"
desc = "A vicious alien projectile weapon. Parts of it quiver gelatinously, as though the thing is insectile and alive."
icon_state = "spikethrower"
item_state = "spikethrower"
w_class = 2
fire_sound_text = "a strange noise"
mag_type = /obj/item/ammo_box/magazine/internal/spikethrower
burst_size = 2
fire_delay = 3
can_suppress = 0
var/charge_tick = 0
var/charge_delay = 15
restricted_species = list("Vox", "Vox Armalis")
/obj/item/weapon/gun/projectile/automatic/spikethrower/New()
..()
processing_objects.Add(src)
/obj/item/weapon/gun/projectile/automatic/spikethrower/Destroy()
processing_objects.Remove(src)
return ..()
/obj/item/weapon/gun/projectile/automatic/spikethrower/update_icon()
..()
overlays.Cut()
icon_state = "spikethrower-[Ceiling(get_ammo(0)/5)]"
/obj/item/weapon/gun/projectile/automatic/spikethrower/process()
charge_tick++
if(charge_tick < charge_delay || !magazine)
return
charge_tick = 0
var/obj/item/ammo_casing/caseless/spike/S = new(get_turf(src))
magazine.give_round(S)
return 1
/obj/item/weapon/gun/projectile/automatic/spikethrower/attack_self()
return
/obj/item/weapon/gun/projectile/automatic/spikethrower/process_chamber(eject_casing = 0, empty_chamber = 1)
..()
/obj/item/ammo_box/magazine/internal/spikethrower
name = "\improper Vox spikethrower internal magazine"
ammo_type = /obj/item/ammo_casing/caseless/spike
caliber = "spike"
max_ammo = 10
/obj/item/ammo_casing/caseless/spike
name = "alloy spike"
desc = "A broadhead spike made out of a weird silvery metal."
projectile_type = /obj/item/projectile/bullet/spike
sharp = 1
edge = 0
throwforce = 5
w_class = 3
caliber = "spike"
icon_state = "bolt"
fire_sound = 'sound/weapons/bladeslice.ogg'
/obj/item/projectile/bullet/spike
name = "alloy spike"
desc = "It's about a foot of weird silvery metal with a wicked point."
damage = 25
stun = 1
armour_penetration = 30
icon_state = "magspear"
/obj/item/projectile/bullet/spike/on_hit(atom/target, blocked = 0)
if((blocked != 100) && istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/H = target
H.drip(500)
..()
//This gun only functions for armalis. The on-sprite is too huge to render properly on other sprites.
/obj/item/weapon/gun/energy/noisecannon
name = "alien heavy cannon"
desc = "It's some kind of enormous alien weapon, as long as a man is tall."
icon_state = "noisecannon"
item_state = "noisecannon"
recoil = 1
force = 10
ammo_type = list(/obj/item/ammo_casing/energy/sonic)
cell_type = "/obj/item/weapon/stock_parts/cell/super"
restricted_species = list("Vox Armalis")
/obj/item/weapon/gun/energy/noisecannon/attack_hand(mob/user as mob)
if(loc != user)
@@ -32,7 +107,6 @@
//Projectile.
/obj/item/projectile/energy/sonic
name = "distortion"
icon = 'icons/obj/machines/particle_accelerator.dmi'
icon_state = "particle"
damage = 60
damage_type = BRUTE
@@ -42,7 +116,3 @@
embed = 0
weaken = 5
stun = 5
/obj/item/projectile/energy/sonic/proc/split()
//TODO: create two more projectiles to either side of this one, fire at targets to the side of target turf.
return
+6 -3
View File
@@ -122,9 +122,12 @@
else
if(!shaded_charge)
for(var/i = ratio, i >= 1, i--)
overlays += image(icon = icon, icon_state = iconState, pixel_x = ammo_x_offset * (i -1))
else
overlays += image(icon = icon, icon_state = "[icon_state]_charge[ratio]")
overlays += image(icon = icon, icon_state = icon_state, pixel_x = ammo_x_offset * (i -1))
else
if(modifystate)
overlays += image(icon = icon, icon_state = "[icon_state]_[shot.select_name]_charge[ratio]")
else
overlays += image(icon = icon, icon_state = "[icon_state]_charge[ratio]")
if(F && can_flashlight)
var/iconF = "flight"
if(F.on)
@@ -119,6 +119,7 @@
item_state = "laser"
ammo_type = list(/obj/item/ammo_casing/energy/immolator)
origin_tech = "combat=4;materials=4;magnets=3;plasmatech=2"
shaded_charge = 1
////////Laser Tag////////////////////
@@ -61,7 +61,8 @@
icon_state = "bsgun"
force = 7
ammo_type = list(/obj/item/ammo_casing/energy/electrode/hos, /obj/item/ammo_casing/energy/laser/hos)
ammo_x_offset = 4
ammo_x_offset = 1
shaded_charge = 1
/obj/item/weapon/gun/energy/gun/turret
name = "hybrid turret gun"
@@ -64,7 +64,7 @@
/obj/item/weapon/gun/energy/pulse/pistol/m1911
name = "\improper M1911-P"
desc = "A compact pulse core in a classic handgun frame for Nanotrasen officers. It's not the size of the gun, it's the size of the hole it puts through people."
icon_state = "m1911-p"
icon_state = "m1911"
item_state = "gun"
cell_type = "/obj/item/weapon/stock_parts/cell/infinite"
@@ -375,6 +375,7 @@
w_class = 3
origin_tech = "combat=4;plasmatech=3"
ammo_type = list(/obj/item/ammo_casing/energy/toxplasma)
shaded_charge = 1
/obj/item/weapon/gun/energy/sniperrifle
name = "L.W.A.P. Sniper Rifle"
@@ -386,6 +387,7 @@
w_class = 4
zoomable = TRUE
zoom_amt = 7 //Long range, enough to see in front of you, but no tiles behind you.
shaded_charge = 1
/obj/item/weapon/gun/energy/temperature
name = "temperature gun"
@@ -423,8 +425,9 @@
/obj/item/weapon/gun/energy/temperature/newshot()
..()
var/obj/item/ammo_casing/energy/temp/T = chambered
T.temperature = temperature
T.e_cost = e_cost
if(T)
T.temperature = temperature
T.e_cost = e_cost
/obj/item/weapon/gun/energy/temperature/attack_self(mob/living/user as mob)
user.set_machine(src)
@@ -544,8 +547,16 @@
/obj/item/weapon/gun/energy/temperature/update_icon()
overlays = 0
update_temperature()
update_user()
update_charge()
/obj/item/weapon/gun/energy/temperature/proc/update_user()
if (istype(loc,/mob/living/carbon))
var/mob/living/carbon/M = loc
M.update_inv_back()
M.update_inv_l_hand()
M.update_inv_r_hand()
/obj/item/weapon/gun/energy/temperature/proc/update_charge()
var/charge = power_supply.charge
switch(charge)
@@ -8,6 +8,7 @@
origin_tech = "combat=6;materials=7;powerstorage=5;bluespace=5;syndicate=4"
cell_type = "/obj/item/weapon/stock_parts/cell/crap"
ammo_type = list(/obj/item/ammo_casing/energy/teleport)
shaded_charge = 1
var/teleport_target = null
/obj/item/weapon/gun/energy/telegun/Destroy()
@@ -37,5 +38,6 @@
teleport_target = L[desc]
/obj/item/weapon/gun/energy/telegun/newshot()
..()
var/obj/item/ammo_casing/energy/teleport/T = chambered
T.teleport_target = teleport_target
+37 -3
View File
@@ -19,10 +19,10 @@
/obj/item/weapon/gun/projectile/update_icon()
..()
if(reskinned && current_skin)
icon_state = "[current_skin][suppressed ? "-suppressed" : ""]"
if(current_skin)
icon_state = "[current_skin][suppressed ? "-suppressed" : ""][sawn_state ? "-sawn" : ""]"
else
icon_state = "[initial(icon_state)][suppressed ? "-suppressed" : ""]"
icon_state = "[initial(icon_state)][suppressed ? "-suppressed" : ""][sawn_state ? "-sawn" : ""]"
/obj/item/weapon/gun/projectile/process_chamber(eject_casing = 1, empty_chamber = 1)
var/obj/item/ammo_casing/AC = chambered //Find chambered round
@@ -151,6 +151,40 @@
playsound(loc, 'sound/weapons/empty.ogg', 50, 1, -1)
return (OXYLOSS)
/obj/item/weapon/gun/projectile/proc/sawoff(mob/user)
if(sawn_state == SAWN_OFF)
to_chat(user, "<span class='warning'>\The [src] is already shortened!</span>")
return
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("[user] begins to shorten \the [src].", "<span class='notice'>You begin to shorten \the [src]...</span>")
//if there's any live ammo inside the gun, makes it go off
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(do_after(user, 30, target = src))
if(sawn_state == SAWN_OFF)
return
user.visible_message("[user] shortens \the [src]!", "<span class='notice'>You shorten \the [src].</span>")
name = "sawn-off [src.name]"
desc = sawn_desc
w_class = 3
item_state = "gun"//phil235 is it different with different skin?
slot_flags &= ~SLOT_BACK //you can't sling it on your back
slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
sawn_state = SAWN_OFF
update_icon()
return 1
// Sawing guns related proc
/obj/item/weapon/gun/projectile/proc/blow_up(mob/user)
. = 0
for(var/obj/item/ammo_casing/AC in magazine.stored_ammo)
if(AC.BB)
process_fire(user, user,0)
. = 1
/obj/item/weapon/suppressor
name = "suppressor"
desc = "A universal syndicate small-arms suppressor for maximum espionage."
@@ -10,13 +10,6 @@
/obj/item/weapon/gun/projectile/automatic/isHandgun()
return 0
/obj/item/weapon/gun/projectile/automatic/proto
name = "\improper Nanotrasen Saber SMG"
desc = "A prototype three-round burst 9mm submachine gun, designated 'SABR'. Has a threaded barrel for suppressors."
icon_state = "saber"
mag_type = /obj/item/ammo_box/magazine/smgm9mm
origin_tech = "combat=4;materials=2"
/obj/item/weapon/gun/projectile/automatic/update_icon()
..()
overlays.Cut()
@@ -25,7 +18,6 @@
if(select == 1)
overlays += "[initial(icon_state)]burst"
icon_state = "[initial(icon_state)][magazine ? "-[magazine.max_ammo]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
return
/obj/item/weapon/gun/projectile/automatic/attackby(var/obj/item/A as obj, mob/user as mob, params)
. = ..()
@@ -66,7 +58,6 @@
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
update_icon()
return
/obj/item/weapon/gun/projectile/automatic/can_shoot()
return get_ammo()
@@ -76,7 +67,13 @@
playsound(loc, 'sound/weapons/smg_empty_alarm.ogg', 40, 1)
update_icon()
alarmed = 1
return
/obj/item/weapon/gun/projectile/automatic/proto
name = "\improper Nanotrasen Saber SMG"
desc = "A prototype three-round burst 9mm submachine gun, designated 'SABR'. Has a threaded barrel for suppressors."
icon_state = "saber"
mag_type = /obj/item/ammo_box/magazine/smgm9mm
origin_tech = "combat=4;materials=2"
/obj/item/weapon/gun/projectile/automatic/c20r
name = "\improper C-20r SMG"
@@ -92,17 +89,14 @@
/obj/item/weapon/gun/projectile/automatic/c20r/New()
..()
update_icon()
return
/obj/item/weapon/gun/projectile/automatic/c20r/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
..()
empty_alarm()
return
/obj/item/weapon/gun/projectile/automatic/c20r/update_icon()
..()
icon_state = "c20r[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
return
/obj/item/weapon/gun/projectile/automatic/wt550
name = "security auto rifle"
@@ -118,7 +112,6 @@
/obj/item/weapon/gun/projectile/automatic/wt550/update_icon()
..()
icon_state = "wt550[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""]"
return
/obj/item/weapon/gun/projectile/automatic/mini_uzi
name = "\improper 'Type U3' Uzi"
@@ -146,7 +139,6 @@
..()
underbarrel = new /obj/item/weapon/gun/projectile/revolver/grenadelauncher(src)
update_icon()
return
/obj/item/weapon/gun/projectile/automatic/m90/afterattack(var/atom/target, var/mob/living/user, flag, params)
if(select == 2)
@@ -194,7 +186,6 @@
to_chat(user, "<span class='notice'>You switch to semi-auto.</span>")
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
update_icon()
return
/obj/item/weapon/gun/projectile/automatic/tommygun
name = "\improper Thompson SMG"
@@ -241,7 +232,6 @@
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/New()
..()
update_icon()
return
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/proc/update_magazine()
if(magazine)
@@ -253,9 +243,7 @@
overlays.Cut()
update_magazine()
icon_state = "bulldog[chambered ? "" : "-e"]"
return
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
..()
empty_alarm()
return
@@ -263,3 +263,144 @@
desc = "Looks almost like the real thing! Ages 8 and up."
origin_tech = "combat=1;materials=1"
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/cap
/////////////////////////////
// DOUBLE BARRELED SHOTGUN //
/////////////////////////////
/obj/item/weapon/gun/projectile/revolver/doublebarrel
name = "double-barreled shotgun"
desc = "A true classic."
icon_state = "dshotgun"
item_state = "shotgun"
w_class = 4
force = 10
flags = CONDUCT
slot_flags = SLOT_BACK
origin_tech = "combat=3;materials=1"
mag_type = /obj/item/ammo_box/magazine/internal/shot/dual
sawn_desc = "Omar's coming!"
unique_rename = 1
unique_reskin = 1
/obj/item/weapon/gun/projectile/revolver/doublebarrel/New()
..()
options["Default"] = "dshotgun"
options["Dark Red Finish"] = "dshotgun-d"
options["Ash"] = "dshotgun-f"
options["Faded Grey"] = "dshotgun-g"
options["Maple"] = "dshotgun-l"
options["Rosewood"] = "dshotgun-p"
options["Cancel"] = null
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attackby(obj/item/A, mob/user, params)
..()
if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing))
chamber_round()
if(istype(A, /obj/item/weapon/melee/energy))
var/obj/item/weapon/melee/energy/W = A
if(W.active)
sawoff(user)
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/gun/energy/plasmacutter))
sawoff(user)
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attack_self(mob/living/user)
var/num_unloaded = 0
while (get_ammo() > 0)
var/obj/item/ammo_casing/CB
CB = magazine.get_round(0)
chambered = null
CB.loc = get_turf(loc)
CB.update_icon()
num_unloaded++
if (num_unloaded)
to_chat(user, "<span class = 'notice'>You break open \the [src] and unload [num_unloaded] shell\s.</span>")
else
to_chat(user, "<span class='notice'>[src] is empty.</span>")
/obj/item/weapon/gun/projectile/revolver/doublebarrel/isHandgun() //contrary to popular opinion, double barrels are not, shockingly, handguns
return 0
// IMPROVISED SHOTGUN //
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised
name = "improvised shotgun"
desc = "Essentially a tube that aims shotgun shells."
icon_state = "ishotgun"
item_state = "shotgun"
w_class = 4
force = 10
slot_flags = null
origin_tech = "combat=2;materials=2"
mag_type = /obj/item/ammo_box/magazine/internal/shot/improvised
sawn_desc = "I'm just here for the gasoline."
unique_rename = 0
unique_reskin = 0
var/slung = 0
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/attackby(obj/item/A, mob/user, params)
..()
if(istype(A, /obj/item/stack/cable_coil) && !sawn_state)
var/obj/item/stack/cable_coil/C = A
if(C.use(10))
slot_flags = SLOT_BACK
icon_state = "ishotgunsling"
to_chat(user, "<span class='notice'>You tie the lengths of cable to the shotgun, making a sling.</span>")
slung = 1
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>")
return
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/update_icon()
..()
if (slung && (slot_flags & SLOT_BELT) )
slung = 0
icon_state = "ishotgun-sawn"
/obj/item/weapon/gun/projectile/revolver/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 = 0
update_icon()
//caneshotgun
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane
name = "cane"
desc = "A cane used by a true gentleman. Or a clown."
icon = 'icons/obj/weapons.dmi'
icon_state = "cane"
item_state = "stick"
sawn_state = SAWN_OFF
w_class = 2
force = 10
can_unsuppress = 0
slot_flags = null
origin_tech = "" // NO GIVAWAYS
mag_type = /obj/item/ammo_box/magazine/internal/shot/improvised
sawn_desc = "I'm sorry, but why did you saw your cane in the first place?"
attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed")
fire_sound = 'sound/weapons/Gunshot_silenced.ogg'
suppressed = 1
needs_permit = 0 //its just a cane beepsky.....
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane/attackby(obj/item/A, mob/user, params)
..()
if(istype(A, /obj/item/stack/cable_coil))
return
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane/examine(mob/user) // HAD TO REPEAT EXAMINE CODE BECAUSE GUN CODE DOESNT STEALTH
var/f_name = "\a [src]."
if(blood_DNA && !istype(src, /obj/effect/decal))
if(gender == PLURAL)
f_name = "some "
else
f_name = "a "
f_name += "<span class='danger'>blood-stained</span> [name]!"
to_chat(user, "\icon[src] That's [f_name]")
if(desc)
to_chat(user, desc)
@@ -15,10 +15,9 @@
var/max_rockets = 1
var/list/rockets = new/list()
/obj/item/weapon/gun/rocketlauncher/examine(mob/user)
if(..(user, 2))
to_chat(user, "<span class='notice'>[rockets.len] / [max_rockets] rockets.</span>")
..()
to_chat(user, "<span class='notice'>[rockets.len] / [max_rockets] rockets.</span>")
/obj/item/weapon/gun/rocketlauncher/Destroy()
for(var/datum/D in rockets)
@@ -48,7 +47,7 @@
var/obj/item/missile/M = new /obj/item/missile(user.loc)
playsound(user.loc, 'sound/effects/bang.ogg', 50, 1)
M.primed = 1
M.throw_at(target, missile_range, missile_speed,user)
M.throw_at(target, missile_range, missile_speed, user, 1)
message_admins("[key_name_admin(user)] fired a rocket from a rocket launcher ([name]).")
log_game("[key_name_admin(user)] used a rocket launcher ([name]).")
rockets -= I
@@ -114,6 +114,12 @@
update_icon() //I.E. fix the desc
return 1
/obj/item/weapon/gun/projectile/shotgun/blow_up(mob/user)
. = 0
if(chambered && chambered.BB)
process_fire(user, user,0)
. = 1
/obj/item/weapon/gun/projectile/shotgun/boltaction/attackby(obj/item/A, mob/user, params)
if(!bolt_open)
to_chat(user, "<span class='notice'>The bolt is closed!</span>")
@@ -153,154 +159,10 @@
throw_at(pick(oview(7,get_turf(user))),1,1)
user.visible_message("<span class='warning'>[user] tosses aside the spent rifle!</span>")
/obj/item/ammo_box/magazine/internal/boltaction/enchanted
max_ammo =1
ammo_type = /obj/item/ammo_casing/a762/enchanted
/////////////////////////////
// DOUBLE BARRELED SHOTGUN //
/////////////////////////////
/obj/item/weapon/gun/projectile/revolver/doublebarrel
name = "double-barreled shotgun"
desc = "A true classic."
icon_state = "dshotgun"
item_state = "shotgun"
w_class = 4
force = 10
flags = CONDUCT
slot_flags = SLOT_BACK
origin_tech = "combat=3;materials=1"
mag_type = /obj/item/ammo_box/magazine/internal/shot/dual
sawn_desc = "Omar's coming!"
unique_rename = 1
unique_reskin = 1
/obj/item/weapon/gun/projectile/revolver/doublebarrel/New()
..()
options["Default"] = "dshotgun"
options["Dark Red Finish"] = "dshotgun-d"
options["Ash"] = "dshotgun-f"
options["Faded Grey"] = "dshotgun-g"
options["Maple"] = "dshotgun-l"
options["Rosewood"] = "dshotgun-p"
options["Cancel"] = null
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attackby(obj/item/A, mob/user, params)
..()
if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing))
chamber_round()
if(istype(A, /obj/item/weapon/melee/energy))
var/obj/item/weapon/melee/energy/W = A
if(W.active)
sawoff(user)
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/gun/energy/plasmacutter))
sawoff(user)
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attack_self(mob/living/user)
var/num_unloaded = 0
while (get_ammo() > 0)
var/obj/item/ammo_casing/CB
CB = magazine.get_round(0)
chambered = null
CB.loc = get_turf(loc)
CB.update_icon()
num_unloaded++
if (num_unloaded)
to_chat(user, "<span class = 'notice'>You break open \the [src] and unload [num_unloaded] shell\s.</span>")
else
to_chat(user, "<span class='notice'>[src] is empty.</span>")
/obj/item/weapon/gun/projectile/revolver/doublebarrel/isHandgun() //contrary to popular opinion, double barrels are not, shockingly, handguns
return 0
// IMPROVISED SHOTGUN //
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised
name = "improvised shotgun"
desc = "Essentially a tube that aims shotgun shells."
icon_state = "ishotgun"
item_state = "shotgun"
w_class = 4
force = 10
slot_flags = null
origin_tech = "combat=2;materials=2"
mag_type = /obj/item/ammo_box/magazine/internal/shot/improvised
sawn_desc = "I'm just here for the gasoline."
unique_rename = 0
unique_reskin = 0
var/slung = 0
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/attackby(obj/item/A, mob/user, params)
..()
if(istype(A, /obj/item/stack/cable_coil) && !sawn_state)
var/obj/item/stack/cable_coil/C = A
if(C.use(10))
slot_flags = SLOT_BACK
icon_state = "ishotgunsling"
to_chat(user, "<span class='notice'>You tie the lengths of cable to the shotgun, making a sling.</span>")
slung = 1
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>")
return
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/update_icon()
..()
if (slung && (slot_flags & SLOT_BELT) )
slung = 0
icon_state = "ishotgun-sawn"
// Sawing guns related procs //
/obj/item/weapon/gun/projectile/proc/blow_up(mob/user)
. = 0
for(var/obj/item/ammo_casing/AC in magazine.stored_ammo)
if(AC.BB)
process_fire(user, user,0)
. = 1
/obj/item/weapon/gun/projectile/shotgun/blow_up(mob/user)
. = 0
if(chambered && chambered.BB)
process_fire(user, user,0)
. = 1
/obj/item/weapon/gun/projectile/proc/sawoff(mob/user)
if(sawn_state == SAWN_OFF)
to_chat(user, "<span class='notice'>\The [src] is already shortened.</span>")
return
if(sawn_state == SAWN_SAWING)
return
user.visible_message("<span class='notice'>[user] begins to shorten \the [src].</span>", "<span class='notice'>You begin to shorten \the [src].</span>")
//if there's any live ammo inside the gun, makes it go off
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
sawn_state = SAWN_SAWING
if(do_after(user, 30, target = src))
user.visible_message("<span class='warning'>[user] shortens \the [src]!</span>", "<span class='warning'>You shorten \the [src]!</span>")
name = "sawn-off [name]"
desc = sawn_desc
icon_state = "[icon_state]-sawn"
w_class = 3
item_state = "gun"
slot_flags &= ~SLOT_BACK //you can't sling it on your back
slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
sawn_state = SAWN_OFF
update_icon()
return
else
sawn_state = SAWN_INTACT
// Automatic Shotguns//
/obj/item/weapon/gun/projectile/shotgun/automatic
/obj/item/weapon/gun/projectile/shotgun/automatic/shoot_live_shot(mob/living/user as mob|obj)
..()
pump(user)
@@ -352,47 +214,4 @@
return
pump()
/obj/item/ammo_box/magazine/internal/shot/tube
name = "dual feed shotgun internal tube"
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot
max_ammo = 4
//caneshotgun
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane
name = "cane"
desc = "A cane used by a true gentlemen. Or a clown."
icon = 'icons/obj/weapons.dmi'
icon_state = "cane"
item_state = "stick"
sawn_state = SAWN_OFF
w_class = 2
force = 10
can_unsuppress = 0
slot_flags = null
origin_tech = "" // NO GIVAWAYS
mag_type = /obj/item/ammo_box/magazine/internal/shot/improvised
sawn_desc = "I'm sorry, but why did you saw your cane in the first place?"
attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed")
fire_sound = 'sound/weapons/Gunshot_silenced.ogg'
suppressed = 1
needs_permit = 0 //its just a cane beepsky.....
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane/attackby(obj/item/A, mob/user, params)
..()
if(istype(A, /obj/item/stack/cable_coil))
return
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane/examine(mob/user) // HAD TO REPEAT EXAMINE CODE BECAUSE GUN CODE DOESNT STEALTH
var/f_name = "\a [src]."
if(blood_DNA && !istype(src, /obj/effect/decal))
if(gender == PLURAL)
f_name = "some "
else
f_name = "a "
f_name += "<span class='danger'>blood-stained</span> [name]!"
to_chat(user, "\icon[src] That's [f_name]")
if(desc)
to_chat(user, desc)
// DOUBLE BARRELED SHOTGUN, IMPROVISED SHOTGUN, and CANE SHOTGUN are in revolver.dm
+1 -2
View File
@@ -373,8 +373,7 @@
FB.current = start
FB.yo = MT.y - start.y
FB.xo = MT.x - start.x
spawn(1)
FB.process()
FB.fire()
if(prob(EFFECT_PROB_LOW-badThingCoeff))
visible_message("<span class='danger'>[src] malfunctions, melting [exp_on] and releasing a burst of flame!</span>")
explosion(src.loc, -1, 0, 0, 0, 0, flame_range = 2)