Gun Code Overhaul Phase 1: (Now with 50% less wasted code!)

- Gun code condensed to make future modifications easier. Functionality should (mostly) remain the same.
- Taser guns shoot ONE WHOLE SHOT more then they do now. Yippy!
- Energy Crossbow has a slightly higher shot capacity (still automatically recharges).
- Guns that shoot projectiles (such as revolvers) now eject the ammo casings when they fire (this will be adjusted somewhat in phase 2).
- Revolvers can either be loaded one shell at a time or all at once with an ammo box.
- All guns now have a badmin var. Have fun (think shotguns).
- A few admin-only guns have been removed (for now). They'll get re-added in a future update.
- Shotguns no longer need to be pumped before firing (will change back in phase 2).
- All gunshots fired by players are now logged in both the firer's and the target's attack_log. So if someone gets shot and it doesn't show up, it's because a turret or something shot them.

Hopefully I didn't miss anything.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1659 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
morikou@gmail.com
2011-06-04 03:39:20 +00:00
parent 02c951575d
commit 8188eb5e17
41 changed files with 817 additions and 2034 deletions
-46
View File
@@ -72,18 +72,6 @@
unacidable = 1//Just to be sure.
var/def_zone
/obj/beam/a_laser
name = "a laser"
icon = 'projectiles.dmi'
icon_state = "laser"
density = 1
var/yo = null
var/xo = null
var/current = null
var/life = 50.0
anchored = 1.0
flags = TABLEPASS
/obj/beam/i_beam
name = "i beam"
icon = 'projectiles.dmi'
@@ -112,40 +100,6 @@
anchored = 1.0
unacidable = 1
/obj/bullet
name = "bullet"
icon = 'projectiles.dmi'
icon_state = "bullet"
density = 1
throwforce = 0.1 //an attempt to make it possible to shoot your way through space
unacidable = 1//Just to be sure.
var/yo = null
var/xo = null
var/current = null
anchored = 1.0
flags = TABLEPASS
var/def_zone
/obj/bullet/weakbullet
/obj/bullet/electrode
name = "electrode"
icon_state = "spark"
/obj/bullet/teleshot
name = "teleshot"
icon_state = "spark"
var/failchance = 5
var/obj/item/target = null
/obj/bullet/cbbolt
name = "crossbow bolt"
icon_state = "cbbolt"
/obj/bullet/neurodart
name = "acid"
icon_state = "toxin"
/obj/datacore
name = "datacore"
var/medical[] = list()
+6 -6
View File
@@ -71,7 +71,7 @@
icon_state = "detective"
item_state = "det_suit"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/gun/detectiverevolver,/obj/item/weapon/gun/revolver,/obj/item/weapon/ammo/a38,/obj/item/weapon/cigpacket,/obj/item/weapon/zippo,/obj/item/device/detective_scanner,/obj/item/device/taperecorder)
allowed = list(/obj/item/weapon/gun/projectile/detective,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/cigpacket,/obj/item/weapon/zippo,/obj/item/device/detective_scanner,/obj/item/device/taperecorder)
armor = list(melee = 50, bullet = 40, laser = 30, taser = 10, bomb = 20, bio = 0, rad = 0)
/obj/item/clothing/suit/judgerobe
@@ -191,7 +191,7 @@
// ARMOR
/obj/item/clothing/suit/armor
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/gun/revolver,/obj/item/weapon/baton,/obj/item/weapon/handcuffs)
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/weapon/baton,/obj/item/weapon/handcuffs)
/obj/item/clothing/suit/armor/vest
name = "armor"
@@ -283,7 +283,7 @@
icon_state = "deathsquad"
item_state = "swat_suit"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/weapon/gun,/obj/item/weapon/ammo,/obj/item/weapon/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 1
armor = list(melee = 80, bullet = 60, laser = 50, taser = 25, bomb = 50, bio = 10, rad = 0)
@@ -367,7 +367,7 @@
item_state = "space_suit_syndicate"
desc = "Has a tag on it: Totally not property of of a hostile corporation, honest!"
w_class = 3
allowed = list(/obj/item/weapon/gun,/obj/item/weapon/ammo,/obj/item/weapon/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 1
armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 30, bio = 30, rad = 30)
@@ -393,7 +393,7 @@
desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins."
icon_state = "s-ninja"
item_state = "s-ninja_suit"
allowed = list(/obj/item/weapon/gun,/obj/item/weapon/ammo,/obj/item/weapon/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
radiation_protection = 0.75
slowdown = 1
armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 30, bio = 30, rad = 30)
@@ -445,7 +445,7 @@
icon_state = "pirate"
item_state = "pirate"
w_class = 3
allowed = list(/obj/item/weapon/gun,/obj/item/weapon/ammo,/obj/item/weapon/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 0
armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 30, bio = 30, rad = 30)
+11 -3
View File
@@ -124,6 +124,7 @@
/obj/item/weapon/spacecash/c1000
icon_state = "spacecash1000"
/*
/obj/item/weapon/ammo
name = "ammo"
icon = 'ammo.dmi'
@@ -207,7 +208,7 @@
icon_state = "38-7"
amount_left = 7.0
m_amt = 10000
*/
/obj/item/device/mass_spectrometer
desc = "A hand-held mass spectrometer which identifies trace chemicals in a blood sample."
name = "mass-spectrometer"
@@ -644,7 +645,7 @@
abstract = 1.0
item_state = "nothing"
w_class = 5.0
/*
/obj/item/weapon/gun
name = "gun"
icon = 'gun.dmi'
@@ -850,7 +851,7 @@
force = 14.0
m_amt = 1000
origin_tech = "combat=2;materials=2"
*/
/obj/item/weapon/hand_tele
name = "hand tele"
icon = 'device.dmi'
@@ -1455,6 +1456,13 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
var/rigged = 0 // true if rigged to explode
var/minor_fault = 0 //If not 100% reliable, it will build up faults.
/obj/item/weapon/cell/crap
name = "Nanotrassen Brand Rechargable AA Battery"
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
origin_tech = "powerstorage=0"
maxcharge = 500
g_amt = 40
/obj/item/weapon/cell/high
name = "high-capacity power cell"
origin_tech = "powerstorage=2"