TG: Updated the barman's shotgun, it acts like a double-barrel now, and he can saw

it off.
Added Khodoque's new shotgun sprites.

Added my new gasmask sprites. Removed emergency gasmasks, as the distinction is
non-existent.

Very slightly reshuffled some mask stuff around, but it's still godawful.
Medical masks are now /obj/item/clothing/mask/breath/medical

Removed the define for HALFMASK, as it was completely unused.
Revision: r3493
Author: 	 petethegoat
This commit is contained in:
Erthilo
2012-05-05 23:20:19 +01:00
parent 8f5fd4321a
commit 84cb9b65ef
10 changed files with 106 additions and 31 deletions

View File

@@ -50,5 +50,5 @@
update_icon()
if(multiple_sprites)
icon_state = text("[initial(icon_state)]-[]", stored_ammo.len)
desc = text("There are [] shell\s left!", stored_ammo.len)
icon_state = "[initial(icon_state)]-[stored_ammo.len]"
desc = "There are [stored_ammo.len] shell\s left!"

View File

@@ -19,6 +19,7 @@
caliber = ""
silenced = 0
recoil = 0
ejectshell = 1
tmp/list/mob/living/target //List of who yer targeting.
tmp/lock_time = -100
tmp/mouthshoot = 0 ///To stop people from suiciding twice... >.>

View File

@@ -25,12 +25,16 @@
load_into_chamber()
if(in_chamber) return 1
if(!loaded.len) return 0
if(in_chamber)
return 1
if(!loaded.len)
return 0
var/obj/item/ammo_casing/AC = loaded[1] //load next casing.
loaded -= AC //Remove casing from loaded list.
AC.loc = get_turf(src) //Eject casing onto ground.
AC.desc += " This one is spent." //descriptions are magic
if(AC.BB)
in_chamber = AC.BB //Load projectile into chamber.
@@ -40,6 +44,7 @@
attackby(var/obj/item/A as obj, mob/user as mob)
var/num_loaded = 0
if(istype(A, /obj/item/ammo_magazine))
if((load_method == 2) && loaded.len) return
@@ -64,13 +69,18 @@
loaded += AC
num_loaded++
if(num_loaded)
user << text("\blue You load [] shell\s into the gun!", num_loaded)
user << "\blue You load [num_loaded] shell\s into the gun!"
A.update_icon()
update_icon()
return
update_icon()
desc = initial(desc) + text(" Has [] rounds remaining.", loaded.len)
examine()
..()
usr << "Has [loaded.len] round\s remaining."
if(in_chamber && !loaded.len)
usr << "However, it has a chambered round."
if(in_chamber && loaded.len)
usr << "It also has a chambered round."
return

View File

@@ -1,13 +1,14 @@
/obj/item/weapon/gun/projectile/shotgun
name = "\improper Shotgun"
/obj/item/weapon/gun/projectile/shotgun/pump
name = "shotgun"
desc = "Useful for sweeping alleys."
icon_state = "shotgun"
max_shells = 2
item_state = "shotgun"
max_shells = 4
w_class = 4.0
force = 10
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
caliber = "shotgun"
origin_tech = "combat=3;materials=1"
origin_tech = "combat=4;materials=2"
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
var
recentpump = 0 // to prevent spammage
@@ -16,7 +17,8 @@
load_into_chamber()
if(in_chamber) return 1
if(in_chamber)
return 1
return 0
@@ -30,7 +32,7 @@
return
proc/pump(mob/M)
proc/pump(mob/M as mob)
playsound(M, 'shotgunpump.ogg', 60, 1)
pumped = 0
if(current_shell)//We have a shell in the chamber
@@ -44,20 +46,82 @@
current_shell = AC
if(AC.BB)
in_chamber = AC.BB //Load projectile into chamber.
update_icon() //I.E. fix the desc
return 1
/obj/item/weapon/gun/projectile/shotgun/combat
name = "\improper Combat Shotgun"
/obj/item/weapon/gun/projectile/shotgun/pump/combat
name = "combat shotgun"
icon_state = "cshotgun"
max_shells = 8
origin_tech = "combat=5;materials=2"
ammo_type = "/obj/item/ammo_casing/shotgun"
//this is largely hacky and bad :( -Pete
/obj/item/weapon/gun/projectile/shotgun/doublebarrel
name = "double-barreled shotgun"
desc = "A true classic."
icon_state = "dshotgun"
item_state = "shotgun"
max_shells = 2
w_class = 4.0
force = 10
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
caliber = "shotgun"
origin_tech = "combat=3;materials=1"
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
load_into_chamber()
if(in_chamber)
return 1
if(!loaded.len)
return 0
/obj/item/weapon/gun/projectile/shotgun/combat2
name = "\improper Security Combat Shotgun"
icon_state = "cshotgun"
max_shells = 4
var/obj/item/ammo_casing/AC = loaded[1] //load next casing.
loaded -= AC //Remove casing from loaded list.
AC.desc += " This one is spent."
if(AC.BB)
in_chamber = AC.BB //Load projectile into chamber.
AC.BB.loc = src //Set projectile loc to gun.
return 1
return 0
attack_self(mob/living/user as mob)
if(!(locate(/obj/item/ammo_casing/shotgun) in src) && !loaded.len)
user << "<span class='notice'>\The [src] is empty.</span>"
return
for(var/obj/item/ammo_casing/shotgun/shell in src) //This feels like a hack. //don't code at 3:30am kids!!
if(shell in loaded)
loaded -= shell
shell.loc = get_turf(src.loc)
user << "<span class='notice'>You break \the [src].</span>"
update_icon()
attackby(var/obj/item/A as obj, mob/user as mob)
if(istype(A, /obj/item/ammo_casing) && !load_method)
var/obj/item/ammo_casing/AC = A
if(AC.caliber == caliber && (loaded.len < max_shells) && (contents.len < max_shells)) //forgive me father, for i have sinned
user.drop_item()
AC.loc = src
loaded += AC
user << "<span class='notice'>You load a shell into \the [src]!</span>"
A.update_icon()
update_icon()
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter))
user << "<span class='notice'>You begin to shorten the barrel of \the [src].</span>"
if(loaded.len)
afterattack(user, user) //will this work?
playsound(user, fire_sound, 50, 1)
user.visible_message("<span class='danger'>The shotgun goes off!</span>", "<span class='danger'>The shotgun goes off in your face!</span>")
return
if(do_after(user, 30)) //SHIT IS STEALTHY EYYYYY
icon_state = "sawnshotgun"
w_class = 3.0
item_state = "gun"
flags &= ~ONBACK //you can't sling it on your back
flags |= ONBELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
name = "sawn-off shotgun"
desc = "Omar's coming!"
user << "<span class='warning'>You shorten the barrel of \the [src]!</span>"

View File

@@ -10,7 +10,7 @@
*/
/obj/item/projectile
name = "\improper Projectile"
name = "projectile"
icon = 'projectiles.dmi'
icon_state = "bullet"
density = 1
@@ -84,18 +84,18 @@
return // nope.avi
if(!silenced)
visible_message("\red [A] is hit by the [src]!")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
visible_message("\red [A.name] is hit by the [src.name] in the [def_zone]!")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
else
M << "\red You've been shot!"
M << "\red You've been shot in the [def_zone] by the [src.name]!"
if(istype(firer, /mob))
M.attack_log += text("\[[]\] <b>[]/[]</b> shot <b>[]/[]</b> with a <b>[]</b>", time_stamp(), firer, firer.ckey, M, M.ckey, src)
firer.attack_log += text("\[[]\] <b>[]/[]</b> shot <b>[]/[]</b> with a <b>[]</b>", time_stamp(), firer, firer.ckey, M, M.ckey, src)
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
log_admin("ATTACK: [firer] ([firer.ckey]) shot [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [firer] ([firer.ckey]) shot [M] ([M.ckey]) with [src].")
log_attack("<font color='red'>[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src]</font>")
else
M.attack_log += text("\[[]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[]/[]</b> with a <b>[]</b>", time_stamp(), M, M.ckey, src)
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
log_admin("ATTACK: UNKNOWN (no longer exists) shot [M] ([M.ckey]) with [src].")
message_admins("ATTACK: UNKNOWN (no longer exists) shot [M] ([M.ckey]) with [src].")
log_attack("<font color='red'>UNKNOWN shot [M] ([M.ckey]) with a [src]</font>")