mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
- Removed support for the ONBACK and ONBELT flags.
- Replaced them with a whole range of inventory slot flags. These now govern whether an item can or can't be placed in a certain inventory slot. See setup.dm for information on the flags. These flags only affect humans tho, as humans are the only beings with an inventory to talk of. - Standardized some gun code and some other pieces of code as I came accross them. I hate indented variable definitions! This commit should not bring any change whatsoever to the game from a player's perspective. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3659 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
desc = "A bullet casing."
|
||||
icon = 'ammo.dmi'
|
||||
icon_state = "s-casing"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 1
|
||||
w_class = 1.0
|
||||
var
|
||||
caliber = "" //Which kind of guns it can be loaded into
|
||||
projectile_type = ""//The bullet type to create when New() is called
|
||||
obj/item/projectile/BB = null //The loaded bullet
|
||||
var/caliber = "" //Which kind of guns it can be loaded into
|
||||
var/projectile_type = ""//The bullet type to create when New() is called
|
||||
var/obj/item/projectile/BB = null //The loaded bullet
|
||||
|
||||
|
||||
New()
|
||||
@@ -28,18 +28,18 @@
|
||||
desc = "A box of ammo"
|
||||
icon_state = "357"
|
||||
icon = 'ammo.dmi'
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
item_state = "syringe_kit"
|
||||
m_amt = 50000
|
||||
throwforce = 2
|
||||
w_class = 1.0
|
||||
throw_speed = 4
|
||||
throw_range = 10
|
||||
var
|
||||
list/stored_ammo = list()
|
||||
ammo_type = "/obj/item/ammo_casing"
|
||||
max_ammo = 7
|
||||
multiple_sprites = 0
|
||||
var/list/stored_ammo = list()
|
||||
var/ammo_type = "/obj/item/ammo_casing"
|
||||
var/max_ammo = 7
|
||||
var/multiple_sprites = 0
|
||||
|
||||
|
||||
New()
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
icon = 'gun.dmi'
|
||||
icon_state = "detective"
|
||||
item_state = "gun"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT | USEDELAY
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
slot_flags = SLOT_BELT
|
||||
m_amt = 2000
|
||||
w_class = 3.0
|
||||
throwforce = 5
|
||||
@@ -13,17 +14,19 @@
|
||||
force = 5.0
|
||||
origin_tech = "combat=1"
|
||||
|
||||
var
|
||||
fire_sound = 'Gunshot.ogg'
|
||||
obj/item/projectile/in_chamber = null
|
||||
caliber = ""
|
||||
silenced = 0
|
||||
recoil = 0
|
||||
ejectshell = 1
|
||||
var/fire_sound = 'Gunshot.ogg'
|
||||
var/obj/item/projectile/in_chamber = null
|
||||
var/caliber = ""
|
||||
var/silenced = 0
|
||||
var/recoil = 0
|
||||
var/ejectshell = 1
|
||||
|
||||
proc
|
||||
load_into_chamber()
|
||||
special_check(var/mob/M)
|
||||
|
||||
proc/load_into_chamber()
|
||||
return
|
||||
|
||||
proc/special_check(var/mob/M)
|
||||
return
|
||||
|
||||
|
||||
load_into_chamber()
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
desc = "A basic energy-based gun."
|
||||
fire_sound = 'Taser.ogg'
|
||||
|
||||
var
|
||||
obj/item/weapon/cell/power_supply //What type of power cell this uses
|
||||
charge_cost = 100 //How much energy is needed to fire.
|
||||
cell_type = "/obj/item/weapon/cell"
|
||||
projectile_type = "/obj/item/projectile/energy"
|
||||
modifystate
|
||||
var/obj/item/weapon/cell/power_supply //What type of power cell this uses
|
||||
var/charge_cost = 100 //How much energy is needed to fire.
|
||||
var/cell_type = "/obj/item/weapon/cell"
|
||||
var/projectile_type = "/obj/item/projectile/energy"
|
||||
var/modifystate
|
||||
|
||||
emp_act(severity)
|
||||
power_supply.use(round(power_supply.maxcharge / severity))
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
origin_tech = "combat=3;magnets=2"
|
||||
modifystate = "energystun"
|
||||
|
||||
var
|
||||
mode = 0 //0 = stun, 1 = kill
|
||||
var/mode = 0 //0 = stun, 1 = kill
|
||||
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
fire_sound = 'Laser.ogg'
|
||||
origin_tech = "combat=2;magnets=4"
|
||||
w_class = 4.0
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
slot_flags = SLOT_BACK
|
||||
charge_cost = 100
|
||||
projectile_type = "/obj/item/projectile/ion"
|
||||
|
||||
@@ -27,7 +28,8 @@ obj/item/weapon/gun/energy/staff
|
||||
icon_state = "staffofchange"
|
||||
item_state = "staffofchange"
|
||||
fire_sound = 'emitter.ogg'
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = 4.0
|
||||
charge_cost = 200
|
||||
projectile_type = "/obj/item/projectile/change"
|
||||
|
||||
@@ -7,12 +7,11 @@
|
||||
w_class = 3.0
|
||||
m_amt = 1000
|
||||
|
||||
var
|
||||
ammo_type = "/obj/item/ammo_casing/a357"
|
||||
list/loaded = list()
|
||||
max_shells = 7
|
||||
load_method = 0 //0 = Single shells or quick loader, 1 = box, 2 = magazine
|
||||
obj/item/ammo_magazine/empty_mag = null
|
||||
var/ammo_type = "/obj/item/ammo_casing/a357"
|
||||
var/list/loaded = list()
|
||||
var/max_shells = 7
|
||||
var/load_method = 0 //0 = Single shells or quick loader, 1 = box, 2 = magazine
|
||||
var/obj/item/ammo_magazine/empty_mag = null
|
||||
|
||||
|
||||
New()
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
max_shells = 4
|
||||
w_class = 4.0
|
||||
force = 10
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
slot_flags = SLOT_BACK
|
||||
caliber = "shotgun"
|
||||
origin_tech = "combat=4;materials=2"
|
||||
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
|
||||
var
|
||||
recentpump = 0 // to prevent spammage
|
||||
pumped = 0
|
||||
obj/item/ammo_casing/current_shell = null
|
||||
var/recentpump = 0 // to prevent spammage
|
||||
var/pumped = 0
|
||||
var/obj/item/ammo_casing/current_shell = null
|
||||
|
||||
|
||||
load_into_chamber()
|
||||
@@ -64,7 +64,8 @@
|
||||
max_shells = 2
|
||||
w_class = 4.0
|
||||
force = 10
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
slot_flags = SLOT_BACK
|
||||
caliber = "shotgun"
|
||||
origin_tech = "combat=3;materials=1"
|
||||
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
|
||||
@@ -119,8 +120,8 @@
|
||||
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)
|
||||
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)
|
||||
name = "sawn-off shotgun"
|
||||
desc = "Omar's coming!"
|
||||
user << "<span class='warning'>You shorten the barrel of \the [src]!</span>"
|
||||
@@ -19,33 +19,32 @@
|
||||
flags = FPRINT | TABLEPASS
|
||||
pass_flags = PASSTABLE
|
||||
mouse_opacity = 0
|
||||
var
|
||||
bumped = 0 //Prevents it from hitting more than one guy at once
|
||||
def_zone = "" //Aiming at
|
||||
mob/firer = null//Who shot it
|
||||
silenced = 0 //Attack message
|
||||
yo = null
|
||||
xo = null
|
||||
current = null
|
||||
turf/original = null // the original turf clicked
|
||||
turf/starting = null // the projectile's starting turf
|
||||
var/bumped = 0 //Prevents it from hitting more than one guy at once
|
||||
var/def_zone = "" //Aiming at
|
||||
var/mob/firer = null//Who shot it
|
||||
var/silenced = 0 //Attack message
|
||||
var/yo = null
|
||||
var/xo = null
|
||||
var/current = null
|
||||
var/turf/original = null // the original turf clicked
|
||||
var/turf/starting = null // the projectile's starting turf
|
||||
|
||||
p_x = 16
|
||||
p_y = 16 // the pixel location of the tile that the player clicked. Default is the center
|
||||
var/p_x = 16
|
||||
var/p_y = 16 // the pixel location of the tile that the player clicked. Default is the center
|
||||
|
||||
damage = 10
|
||||
damage_type = BRUTE //BRUTE, BURN, TOX, OXY, CLONE are the only things that should be in here
|
||||
nodamage = 0 //Determines if the projectile will skip any damage inflictions
|
||||
flag = "bullet" //Defines what armor to use when it hits things. Must be set to bullet, laser, energy,or bomb
|
||||
projectile_type = "/obj/item/projectile"
|
||||
var/damage = 10
|
||||
var/damage_type = BRUTE //BRUTE, BURN, TOX, OXY, CLONE are the only things that should be in here
|
||||
var/nodamage = 0 //Determines if the projectile will skip any damage inflictions
|
||||
var/flag = "bullet" //Defines what armor to use when it hits things. Must be set to bullet, laser, energy,or bomb
|
||||
var/projectile_type = "/obj/item/projectile"
|
||||
//Effects
|
||||
stun = 0
|
||||
weaken = 0
|
||||
paralyze = 0
|
||||
irradiate = 0
|
||||
stutter = 0
|
||||
eyeblur = 0
|
||||
drowsy = 0
|
||||
var/stun = 0
|
||||
var/weaken = 0
|
||||
var/paralyze = 0
|
||||
var/irradiate = 0
|
||||
var/stutter = 0
|
||||
var/eyeblur = 0
|
||||
var/drowsy = 0
|
||||
|
||||
|
||||
proc/on_hit(var/atom/target, var/blocked = 0)
|
||||
|
||||
Reference in New Issue
Block a user