Merge branch 'dev' into ofClicksAndCooldowns

Conflicts:
	code/game/turfs/simulated/walls.dm
	code/modules/mob/living/carbon/resist.dm
	code/modules/mob/mob_grab.dm
This commit is contained in:
Kelenius
2015-05-21 17:00:50 +03:00
581 changed files with 11886 additions and 16041 deletions
+2 -2
View File
@@ -66,7 +66,7 @@
flags = CONDUCT
slot_flags = SLOT_BELT
item_state = "syringe_kit"
matter = list("metal" = 500)
matter = list(DEFAULT_WALL_MATERIAL = 500)
throwforce = 5
w_class = 2
throw_speed = 4
@@ -135,7 +135,7 @@
/obj/item/ammo_magazine/examine(mob/user)
..()
user << "There [(stored_ammo.len > 1)? "are" : "is"] [stored_ammo.len] round\s left!"
user << "There [(stored_ammo.len == 1)? "is" : "are"] [stored_ammo.len] round\s left!"
//magazine icon state caching
/var/global/list/magazine_icondata_keys = list()
+12 -12
View File
@@ -6,7 +6,7 @@
icon_state = "T38"
caliber = "357"
ammo_type = /obj/item/ammo_casing/a357
matter = list("metal" = 1260)
matter = list(DEFAULT_WALL_MATERIAL = 1260)
max_ammo = 7
multiple_sprites = 1
@@ -14,7 +14,7 @@
name = "speed loader (.38)"
icon_state = "38"
caliber = "38"
matter = list("metal" = 360)
matter = list(DEFAULT_WALL_MATERIAL = 360)
ammo_type = /obj/item/ammo_casing/c38
max_ammo = 6
multiple_sprites = 1
@@ -28,7 +28,7 @@
icon_state = "45"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
matter = list("metal" = 525) //metal costs are very roughly based around 1 .45 casing = 75 metal
matter = list(DEFAULT_WALL_MATERIAL = 525) //metal costs are very roughly based around 1 .45 casing = 75 metal
caliber = ".45"
max_ammo = 7
multiple_sprites = 1
@@ -53,7 +53,7 @@
icon_state = "9x19p"
origin_tech = "combat=2"
mag_type = MAGAZINE
matter = list("metal" = 600)
matter = list(DEFAULT_WALL_MATERIAL = 600)
caliber = "9mm"
ammo_type = /obj/item/ammo_casing/c9mm
max_ammo = 10
@@ -69,7 +69,7 @@
name = "ammunition Box (9mm)"
icon_state = "9mm"
origin_tech = "combat=2"
matter = list("metal" = 1800)
matter = list(DEFAULT_WALL_MATERIAL = 1800)
caliber = "9mm"
ammo_type = /obj/item/ammo_casing/c9mm
max_ammo = 30
@@ -82,7 +82,7 @@
icon_state = "9mmt"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c9mm
matter = list("metal" = 1200)
matter = list(DEFAULT_WALL_MATERIAL = 1200)
caliber = "9mm"
max_ammo = 20
multiple_sprites = 1
@@ -103,7 +103,7 @@
icon_state = "9mm"
origin_tech = "combat=2"
caliber = ".45"
matter = list("metal" = 2250)
matter = list(DEFAULT_WALL_MATERIAL = 2250)
ammo_type = /obj/item/ammo_casing/c45
max_ammo = 30
@@ -116,7 +116,7 @@
origin_tech = "combat=2"
mag_type = MAGAZINE
caliber = "12mm"
matter = list("metal" = 1500)
matter = list(DEFAULT_WALL_MATERIAL = 1500)
ammo_type = "/obj/item/ammo_casing/a12mm"
max_ammo = 20
multiple_sprites = 1
@@ -130,7 +130,7 @@
origin_tech = "combat=2"
mag_type = MAGAZINE
caliber = "a556"
matter = list("metal" = 1800)
matter = list(DEFAULT_WALL_MATERIAL = 1800)
ammo_type = /obj/item/ammo_casing/a556
max_ammo = 10
multiple_sprites = 1
@@ -148,7 +148,7 @@
origin_tech = "combat=2"
mag_type = MAGAZINE
caliber = ".50"
matter = list("metal" = 1260)
matter = list(DEFAULT_WALL_MATERIAL = 1260)
ammo_type = /obj/item/ammo_casing/a50
max_ammo = 7
multiple_sprites = 1
@@ -174,7 +174,7 @@
origin_tech = "combat=2"
mag_type = MAGAZINE
caliber = "a762"
matter = list("metal" = 4500)
matter = list(DEFAULT_WALL_MATERIAL = 4500)
ammo_type = /obj/item/ammo_casing/a762
max_ammo = 50
multiple_sprites = 1
@@ -187,7 +187,7 @@
icon_state = "c762"
mag_type = MAGAZINE
caliber = "a762"
matter = list("metal" = 1800)
matter = list(DEFAULT_WALL_MATERIAL = 1800)
ammo_type = /obj/item/ammo_casing/a762
max_ammo = 20
multiple_sprites = 1
@@ -76,21 +76,21 @@
icon_state = "slshell"
caliber = "shotgun"
projectile_type = /obj/item/projectile/bullet/shotgun
matter = list("metal" = 360)
matter = list(DEFAULT_WALL_MATERIAL = 360)
/obj/item/ammo_casing/shotgun/pellet
name = "shotgun shell"
desc = "A 12 gauge shell."
icon_state = "gshell"
projectile_type = /obj/item/projectile/bullet/pellet/shotgun
matter = list("metal" = 360)
matter = list(DEFAULT_WALL_MATERIAL = 360)
/obj/item/ammo_casing/shotgun/blank
name = "shotgun shell"
desc = "A blank shell."
icon_state = "blshell"
projectile_type = /obj/item/projectile/bullet/blank
matter = list("metal" = 90)
matter = list(DEFAULT_WALL_MATERIAL = 90)
/obj/item/ammo_casing/shotgun/practice
name = "shotgun shell"
@@ -104,7 +104,7 @@
desc = "A beanbag shell."
icon_state = "bshell"
projectile_type = /obj/item/projectile/bullet/shotgun/beanbag
matter = list("metal" = 180)
matter = list(DEFAULT_WALL_MATERIAL = 180)
//Can stun in one hit if aimed at the head, but
//is blocked by clothing that stops tasers and is vulnerable to EMP
@@ -114,7 +114,7 @@
icon_state = "stunshell"
spent_icon = "stunshell-spent"
projectile_type = /obj/item/projectile/energy/electrode/stunshot
matter = list("metal" = 360, "glass" = 720)
matter = list(DEFAULT_WALL_MATERIAL = 360, "glass" = 720)
/obj/item/ammo_casing/shotgun/stunshell/emp_act(severity)
if(prob(100/severity)) BB = null
@@ -126,7 +126,7 @@
desc = "A chemical shell used to signal distress or provide illumination."
icon_state = "fshell"
projectile_type = /obj/item/projectile/energy/flash/flare
matter = list("metal" = 90, "glass" = 90)
matter = list(DEFAULT_WALL_MATERIAL = 90, "glass" = 90)
/obj/item/ammo_casing/a762
desc = "A 7.62mm bullet casing."
@@ -140,7 +140,7 @@
spent_icon = "lcasing-spent"
caliber = "14.5mm"
projectile_type = /obj/item/projectile/bullet/rifle/a145
matter = list("metal" = 1250)
matter = list(DEFAULT_WALL_MATERIAL = 1250)
/obj/item/ammo_casing/a556
desc = "A 5.56mm bullet casing."
+1 -1
View File
@@ -41,7 +41,7 @@
item_state = "gun"
flags = CONDUCT
slot_flags = SLOT_BELT|SLOT_HOLSTER
matter = list("metal" = 2000)
matter = list(DEFAULT_WALL_MATERIAL = 2000)
w_class = 3
throwforce = 5
throw_speed = 4
+5 -3
View File
@@ -13,8 +13,9 @@
firemode_type = /datum/firemode/energy
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/charge_cost = 200 //How much energy is needed to fire.
var/max_shots = 10 //Determines the capacity of the weapon's power cell. Specifying a cell_type overrides this value.
var/cell_type = null
var/projectile_type = /obj/item/projectile/beam/practice
var/modifystate
var/charge_meter = 1 //if set, the icon state will be chosen based on the current charge
@@ -45,7 +46,8 @@
..()
if(cell_type)
power_supply = new cell_type(src)
power_supply.give(power_supply.maxcharge)
else
power_supply = new /obj/item/weapon/cell/device/variable(src, max_shots*charge_cost)
if(self_recharge)
processing_objects.Add(src)
update_icon()
@@ -7,7 +7,7 @@
slot_flags = SLOT_BELT|SLOT_BACK
w_class = 3
force = 10
matter = list("metal" = 2000)
matter = list(DEFAULT_WALL_MATERIAL = 2000)
origin_tech = "combat=3;magnets=2"
projectile_type = /obj/item/projectile/beam
fire_delay = 1 //rapid fire
@@ -43,7 +43,7 @@ obj/item/weapon/gun/energy/retro
w_class = 3
projectile_type = /obj/item/projectile/beam
origin_tech = null
charge_cost = 200 //to compensate a bit for self-recharging
max_shots = 5 //to compensate a bit for self-recharging
self_recharge = 1
/obj/item/weapon/gun/energy/lasercannon
@@ -55,7 +55,8 @@ obj/item/weapon/gun/energy/retro
origin_tech = "combat=4;materials=3;powerstorage=3"
slot_flags = SLOT_BELT|SLOT_BACK
projectile_type = /obj/item/projectile/beam/heavylaser
charge_cost = 250
charge_cost = 400
max_shots = 5
fire_delay = 20
/obj/item/weapon/gun/energy/lasercannon/mounted
@@ -72,7 +73,8 @@ obj/item/weapon/gun/energy/retro
fire_sound = 'sound/weapons/laser3.ogg'
origin_tech = "combat=5;materials=3;magnets=2;syndicate=2"
projectile_type = /obj/item/projectile/beam/xray
charge_cost = 50
charge_cost = 100
max_shots = 20
fire_delay = 1
/obj/item/weapon/gun/energy/sniperrifle
@@ -84,7 +86,8 @@ obj/item/weapon/gun/energy/retro
origin_tech = "combat=6;materials=5;powerstorage=4"
projectile_type = /obj/item/projectile/beam/sniper
slot_flags = SLOT_BACK
charge_cost = 250
charge_cost = 400
max_shots = 4
fire_delay = 35
force = 10
w_class = 4
@@ -106,7 +109,7 @@ obj/item/weapon/gun/energy/retro
desc = "Standard issue weapon of the Imperial Guard"
origin_tech = "combat=1;magnets=2"
self_recharge = 1
matter = list("metal" = 2000)
matter = list(DEFAULT_WALL_MATERIAL = 2000)
fire_sound = 'sound/weapons/Laser.ogg'
projectile_type = /obj/item/projectile/beam/lastertag/blue
var/required_vest
@@ -4,8 +4,8 @@
icon_state = "energystun100"
item_state = null //so the human update icon uses the icon_state instead.
fire_sound = 'sound/weapons/Taser.ogg'
max_shots = 10
charge_cost = 100 //How much energy is needed to fire.
projectile_type = /obj/item/projectile/beam/stun
origin_tech = "combat=3;magnets=2"
modifystate = "energystun"
@@ -6,14 +6,14 @@
slot_flags = SLOT_BELT|SLOT_BACK
force = 10
fire_sound='sound/weapons/Laser.ogg'
charge_cost = 50
projectile_type = /obj/item/projectile/beam
sel_mode = 2
max_shots = 10
firemodes = list(
list(name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg'),
list(name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg'),
list(name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/pulse.ogg', fire_delay=25, charge_cost=100),
list(name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/pulse.ogg', fire_delay=25, charge_cost=400),
)
/obj/item/weapon/gun/energy/pulse_rifle/mounted
@@ -27,6 +27,7 @@
fire_delay = 25
fire_sound='sound/weapons/pulse.ogg'
projectile_type=/obj/item/projectile/beam/pulse
charge_cost=400
/obj/item/weapon/gun/energy/pulse_rifle/destroyer/attack_self(mob/living/user as mob)
user << "<span class='warning'>[src.name] has three settings, and they are all DESTROY.</span>"
@@ -37,4 +38,4 @@
desc = "It's not the size of the gun, it's the size of the hole it puts through people."
slot_flags = SLOT_BELT|SLOT_HOLSTER
icon_state = "m1911-p"
cell_type = /obj/item/weapon/cell/crap
max_shots = 5
@@ -9,7 +9,8 @@
force = 10
flags = CONDUCT
slot_flags = SLOT_BACK
charge_cost = 100
charge_cost = 300
max_shots = 10
projectile_type = /obj/item/projectile/ion
/obj/item/weapon/gun/energy/ionrifle/emp_act(severity)
@@ -29,7 +30,7 @@
item_state = "decloner"
fire_sound = 'sound/weapons/pulse3.ogg'
origin_tech = "combat=5;materials=4;powerstorage=3"
charge_cost = 100
max_shots = 10
projectile_type = /obj/item/projectile/energy/declone
/obj/item/weapon/gun/energy/floragun
@@ -39,6 +40,7 @@
item_state = "floramut"
fire_sound = 'sound/effects/stealthoff.ogg'
charge_cost = 100
max_shots = 10
projectile_type = /obj/item/projectile/energy/floramut
origin_tech = "materials=2;biotech=3;powerstorage=3"
modifystate = "floramut"
@@ -65,7 +67,6 @@
slot_flags = SLOT_BELT|SLOT_BACK
w_class = 4
projectile_type = /obj/item/projectile/meteor
charge_cost = 100
cell_type = /obj/item/weapon/cell/potato
self_recharge = 1
recharge_time = 5 //Time it takes for shots to recharge (in ticks)
@@ -110,7 +111,7 @@
flags = CONDUCT
slot_flags = SLOT_BACK
w_class = 4.0
charge_cost = 200
max_shots = 5
projectile_type = /obj/item/projectile/change
origin_tech = null
self_recharge = 1
@@ -127,7 +128,7 @@
name = "staff of animation"
desc = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines."
projectile_type = /obj/item/projectile/animate
charge_cost = 100
max_shots = 10
obj/item/weapon/gun/energy/staff/focus
name = "mental focus"
@@ -140,11 +141,11 @@ obj/item/weapon/gun/energy/staff/focus
/*
attack_self(mob/living/user as mob)
if(projectile_type == "/obj/item/projectile/forcebolt")
charge_cost = 200
charge_cost = 400
user << "<span class='warning'>The [src.name] will now strike a small area.</span>"
projectile_type = "/obj/item/projectile/forcebolt/strong"
else
charge_cost = 100
charge_cost = 200
user << "<span class='warning'>The [src.name] will now strike only a single person.</span>"
projectile_type = "/obj/item/projectile/forcebolt"
*/
+6 -8
View File
@@ -4,9 +4,8 @@
icon_state = "taser"
item_state = null //so the human update icon uses the icon_state instead.
fire_sound = 'sound/weapons/Taser.ogg'
charge_cost = 100
max_shots = 5
projectile_type = /obj/item/projectile/beam/stun
cell_type = /obj/item/weapon/cell/crap
/obj/item/weapon/gun/energy/taser/mounted
name = "mounted taser gun"
@@ -15,7 +14,7 @@
/obj/item/weapon/gun/energy/taser/mounted/cyborg
name = "taser gun"
cell_type = /obj/item/weapon/cell/secborg
max_shots = 6
recharge_time = 10 //Time it takes for shots to recharge (in ticks)
@@ -26,9 +25,8 @@
item_state = "stunrevolver"
fire_sound = 'sound/weapons/Gunshot.ogg'
origin_tech = "combat=3;materials=3;powerstorage=2"
charge_cost = 125
projectile_type = /obj/item/projectile/energy/electrode/stunshot
cell_type = /obj/item/weapon/cell
max_shots = 8
/obj/item/weapon/gun/energy/crossbow
@@ -37,13 +35,13 @@
icon_state = "crossbow"
w_class = 2.0
item_state = "crossbow"
matter = list("metal" = 2000)
matter = list(DEFAULT_WALL_MATERIAL = 2000)
origin_tech = "combat=2;magnets=2;syndicate=5"
slot_flags = SLOT_BELT
silenced = 1
fire_sound = 'sound/weapons/Genhit.ogg'
projectile_type = /obj/item/projectile/energy/bolt
cell_type = /obj/item/weapon/cell/crap
max_shots = 5
self_recharge = 1
charge_meter = 0
@@ -56,5 +54,5 @@
desc = "A weapon favored by mercenary infiltration teams."
w_class = 4
force = 10
matter = list("metal" = 200000)
matter = list(DEFAULT_WALL_MATERIAL = 200000)
projectile_type = /obj/item/projectile/energy/bolt/large
@@ -68,14 +68,14 @@
/obj/item/weapon/gun/launcher/crossbow/consume_next_projectile(mob/user=null)
if(tension <= 0)
user << "\red \The [src] is not drawn back!"
user << "<span class='warning'>\The [src] is not drawn back!</span>"
return null
return bolt
/obj/item/weapon/gun/launcher/crossbow/handle_post_fire(mob/user, atom/target)
bolt = null
icon_state = "crossbow"
tension = 0
update_icon()
..()
/obj/item/weapon/gun/launcher/crossbow/attack_self(mob/living/user as mob)
@@ -89,7 +89,7 @@
else
user.visible_message("[user] relaxes the tension on [src]'s string.","You relax the tension on [src]'s string.")
tension = 0
icon_state = "crossbow"
update_icon()
else
draw(user)
@@ -106,15 +106,19 @@
user.visible_message("[user] begins to draw back the string of [src].","<span class='notice'>You begin to draw back the string of [src].</span>")
tension = 1
while(bolt && tension && current_user == user)
while(bolt && tension && loc == current_user)
if(!do_after(user, 25)) //crossbow strings don't just magically pull back on their own.
user.visible_message("[usr] stops drawing and relaxes the string of [src].","<span class='warning'>You stop drawing back and relax the string of [src].</span>")
tension = 0
icon_state = "crossbow"
update_icon()
return
//double check that the user hasn't removed the bolt in the meantime
if(!(bolt && tension && loc == current_user))
return
tension++
icon_state = "crossbow-drawn"
update_icon()
if(tension >= max_tension)
tension = max_tension
@@ -132,11 +136,10 @@
/obj/item/weapon/gun/launcher/crossbow/attackby(obj/item/W as obj, mob/user as mob)
if(!bolt)
if (istype(W,/obj/item/weapon/arrow))
user.drop_item()
user.drop_from_inventory(W, src)
bolt = W
bolt.loc = src
user.visible_message("[user] slides [bolt] into [src].","You slide [bolt] into [src].")
icon_state = "crossbow-nocked"
update_icon()
return
else if(istype(W,/obj/item/stack/rods))
var/obj/item/stack/rods/R = W
@@ -144,7 +147,7 @@
bolt = new /obj/item/weapon/arrow/rod(src)
bolt.fingerprintslast = src.fingerprintslast
bolt.loc = src
icon_state = "crossbow-nocked"
update_icon()
user.visible_message("[user] jams [bolt] into [src].","You jam [bolt] into [src].")
superheat_rod(user)
return
@@ -182,6 +185,14 @@
bolt.icon_state = "metal-rod-superheated"
cell.use(500)
/obj/item/weapon/gun/launcher/crossbow/update_icon()
if(tension > 1)
icon_state = "crossbow-drawn"
else if(bolt)
icon_state = "crossbow-nocked"
else
icon_state = "crossbow"
// Crossbow construction.
/obj/item/weapon/crossbowframe
@@ -209,11 +220,11 @@
if(buildstate == 0)
var/obj/item/stack/rods/R = W
if(R.use(3))
user << "\blue You assemble a backbone of rods around the wooden stock."
user << "<span class='notice'>You assemble a backbone of rods around the wooden stock.</span>"
buildstate++
update_icon()
else
user << "\blue You need at least three rods to complete this task."
user << "<span class='notice'>You need at least three rods to complete this task.</span>"
return
else if(istype(W,/obj/item/weapon/weldingtool))
if(buildstate == 1)
@@ -221,7 +232,7 @@
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "\blue You weld the rods into place."
user << "<span class='notice'>You weld the rods into place.</span>"
buildstate++
update_icon()
return
@@ -229,33 +240,33 @@
var/obj/item/stack/cable_coil/C = W
if(buildstate == 2)
if(C.use(5))
user << "\blue You wire a crude cell mount into the top of the crossbow."
user << "<span class='notice'>You wire a crude cell mount into the top of the crossbow.</span>"
buildstate++
update_icon()
else
user << "\blue You need at least five segments of cable coil to complete this task."
user << "<span class='notice'>You need at least five segments of cable coil to complete this task.</span>"
return
else if(buildstate == 4)
if(C.use(5))
user << "\blue You string a steel cable across the crossbow's lath."
user << "<span class='notice'>You string a steel cable across the crossbow's lath.</span>"
buildstate++
update_icon()
else
user << "\blue You need at least five segments of cable coil to complete this task."
user << "<span class='notice'>You need at least five segments of cable coil to complete this task.</span>"
return
else if(istype(W,/obj/item/stack/sheet/mineral/plastic))
if(buildstate == 3)
var/obj/item/stack/sheet/mineral/plastic/P = W
if(P.use(3))
user << "\blue You assemble and install a heavy plastic lath onto the crossbow."
user << "<span class='notice'>You assemble and install a heavy plastic lath onto the crossbow.</span>"
buildstate++
update_icon()
else
user << "\blue You need at least three plastic sheets to complete this task."
user << "<span class='notice'>You need at least three plastic sheets to complete this task.</span>"
return
else if(istype(W,/obj/item/weapon/screwdriver))
if(buildstate == 5)
user << "\blue You secure the crossbow's various parts."
user << "<span class='notice'>You secure the crossbow's various parts.</span>"
new /obj/item/weapon/gun/launcher/crossbow(get_turf(src))
qdel(src)
return
@@ -15,7 +15,7 @@
var/obj/item/weapon/grenade/chambered
var/list/grenades = new/list()
var/max_grenades = 5 //holds this + one in the chamber
matter = list("metal" = 2000)
matter = list(DEFAULT_WALL_MATERIAL = 2000)
//revolves the magazine, allowing players to choose between multiple grenade types
/obj/item/weapon/gun/launcher/grenade/proc/pump(mob/M as mob)
@@ -80,7 +80,7 @@
chambered.det_time = 10
chambered.activate(null)
return chambered
/obj/item/weapon/gun/launcher/grenade/handle_post_fire(mob/user)
message_admins("[key_name_admin(user)] fired a grenade ([chambered.name]) from a grenade launcher ([src.name]).")
log_game("[key_name_admin(user)] used a grenade ([chambered.name]).")
@@ -14,17 +14,20 @@
var/max_w_class = 3 // Hopper intake size.
var/max_storage_space = 20 // Total internal storage size.
var/obj/item/weapon/tank/tank = null // Tank of gas for use in firing the cannon.
var/obj/item/weapon/storage/tank_container // Something to hold the tank item so we don't accidentally fire it.
var/obj/item/weapon/storage/item_storage
var/pressure_setting = 10 // Percentage of the gas in the tank used to fire the projectile.
var/possible_pressure_amounts = list(5,10,20,25,50) // Possible pressure settings.
var/minimum_tank_pressure = 10 // Minimum pressure to fire the gun.
var/force_divisor = 400 // Force equates to speed. Speed/5 equates to a damage multiplier for whoever you hit.
// For reference, a fully pressurized oxy tank at 50% gas release firing a health
// analyzer with a force_divisor of 10 hit with a damage multiplier of 3000+.
/obj/item/weapon/gun/launcher/pneumatic/New()
..()
tank_container = new(src)
tank_container.tag = "gas_tank_holder"
item_storage = new(src)
item_storage.name = "hopper"
item_storage.max_w_class = max_w_class
item_storage.max_storage_space = max_storage_space
item_storage.use_sound = null
/obj/item/weapon/gun/launcher/pneumatic/verb/set_pressure() //set amount of tank pressure.
set name = "Set Valve Pressure"
@@ -35,69 +38,65 @@
pressure_setting = N
usr << "You dial the pressure valve to [pressure_setting]%."
/obj/item/weapon/gun/launcher/pneumatic/verb/eject_tank() //Remove the tank.
set name = "Eject Tank"
set category = "Object"
set src in range(0)
if(tank)
usr << "You twist the valve and pop the tank out of [src]."
tank.loc = usr.loc
tank = null
icon_state = "pneumatic"
item_state = "pneumatic"
if (ismob(src.loc))
var/mob/M = src.loc
M.update_icons()
else
usr << "There's no tank in [src]."
/obj/item/weapon/gun/launcher/pneumatic/attackby(obj/item/W as obj, mob/user as mob)
if(!tank && istype(W,/obj/item/weapon/tank))
user.drop_item()
tank = W
tank.loc = src.tank_container
user.visible_message("[user] jams [W] into [src]'s valve and twists it closed.","You jam [W] into [src]'s valve and twist it closed.")
icon_state = "pneumatic-tank"
item_state = "pneumatic-tank"
user.update_icons()
else if(istype(W) && W.w_class <= max_w_class)
var/total_stored = 0
for(var/obj/item/O in src.contents)
total_stored += O.get_storage_cost()
if(total_stored + W.get_storage_cost() <= max_storage_space)
user.remove_from_mob(W)
W.loc = src
user << "You shove [W] into the hopper."
else
user << "That won't fit into the hopper - it's too full."
/obj/item/weapon/gun/launcher/pneumatic/proc/eject_tank(mob/user) //Remove the tank.
if(!tank)
user << "There's no tank in [src]."
return
else
user << "That won't fit into the hopper."
/obj/item/weapon/gun/launcher/pneumatic/attack_self(mob/user as mob)
if(contents.len > 0)
var/obj/item/removing = contents[contents.len]
removing.loc = get_turf(src)
user << "You twist the valve and pop the tank out of [src]."
user.put_in_hands(tank)
tank = null
update_icon()
/obj/item/weapon/gun/launcher/pneumatic/proc/unload_hopper(mob/user)
if(item_storage.contents.len > 0)
var/obj/item/removing = item_storage.contents[item_storage.contents.len]
item_storage.remove_from_storage(removing, src.loc)
user.put_in_hands(removing)
user << "You remove [removing] from the hopper."
else
user << "There is nothing to remove in \the [src]."
return
/obj/item/weapon/gun/launcher/pneumatic/attack_hand(mob/user as mob)
if(user.get_inactive_hand() == src)
unload_hopper(user)
else
return ..()
/obj/item/weapon/gun/launcher/pneumatic/attackby(obj/item/W as obj, mob/user as mob)
if(!tank && istype(W,/obj/item/weapon/tank))
user.drop_from_inventory(W, src)
tank = W
user.visible_message("[user] jams [W] into [src]'s valve and twists it closed.","You jam [W] into [src]'s valve and twist it closed.")
update_icon()
else if(istype(W) && item_storage.can_be_inserted(W))
item_storage.handle_item_insertion(W)
/obj/item/weapon/gun/launcher/pneumatic/attack_self(mob/user as mob)
eject_tank(user)
/obj/item/weapon/gun/launcher/pneumatic/consume_next_projectile(mob/user=null)
if(!contents.len)
if(!item_storage.contents.len)
return null
if (!tank)
user << "There is no gas tank in [src]!"
return null
var/fire_pressure = (tank.air_contents.return_pressure()/100)*pressure_setting
if(fire_pressure < minimum_tank_pressure)
var/environment_pressure = 10
var/turf/T = get_turf(src)
if(T)
var/datum/gas_mixture/environment = T.return_air()
if(environment)
environment_pressure = environment.return_pressure()
fire_pressure = (tank.air_contents.return_pressure() - environment_pressure)*pressure_setting/100
if(fire_pressure < 10)
user << "There isn't enough gas in the tank to fire [src]."
return null
return contents[1]
var/obj/item/launched = item_storage.contents[1]
item_storage.remove_from_storage(launched, src)
return launched
/obj/item/weapon/gun/launcher/pneumatic/examine(mob/user)
if(!..(user, 2))
@@ -119,11 +118,24 @@
if(tank)
var/lost_gas_amount = tank.air_contents.total_moles*(pressure_setting/100)
var/datum/gas_mixture/removed = tank.air_contents.remove(lost_gas_amount)
var/turf/T = get_turf(src.loc)
if(T) T.assume_air(removed)
..()
/obj/item/weapon/gun/launcher/pneumatic/update_icon()
if(tank)
icon_state = "pneumatic-tank"
item_state = "pneumatic-tank"
else
icon_state = "pneumatic"
item_state = "pneumatic"
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_r_hand()
M.update_inv_l_hand()
//Constructable pneumatic cannon.
/obj/item/weapon/cannonframe
@@ -149,9 +161,9 @@
/obj/item/weapon/cannonframe/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/pipe))
if(buildstate == 0)
user.drop_item()
user.drop_from_inventory(W)
qdel(W)
user << "\blue You secure the piping inside the frame."
user << "<span class='notice'>You secure the piping inside the frame.</span>"
buildstate++
update_icon()
return
@@ -159,17 +171,17 @@
if(buildstate == 2)
var/obj/item/stack/sheet/metal/M = W
if(M.use(5))
user << "\blue You assemble a chassis around the cannon frame."
user << "<span class='notice'>You assemble a chassis around the cannon frame.</span>"
buildstate++
update_icon()
else
user << "\blue You need at least five metal sheets to complete this task."
user << "<span class='notice'>You need at least five metal sheets to complete this task.</span>"
return
else if(istype(W,/obj/item/device/transfer_valve))
if(buildstate == 4)
user.drop_item()
user.drop_from_inventory(W)
qdel(W)
user << "\blue You install the transfer valve and connect it to the piping."
user << "<span class='notice'>You install the transfer valve and connect it to the piping.</span>"
buildstate++
update_icon()
return
@@ -179,7 +191,7 @@
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "\blue You weld the pipe into place."
user << "<span class='notice'>You weld the pipe into place.</span>"
buildstate++
update_icon()
if(buildstate == 3)
@@ -187,7 +199,7 @@
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "\blue You weld the metal chassis together."
user << "<span class='notice'>You weld the metal chassis together.</span>"
buildstate++
update_icon()
if(buildstate == 5)
@@ -195,7 +207,7 @@
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "\blue You weld the valve into place."
user << "<span class='notice'>You weld the valve into place.</span>"
new /obj/item/weapon/gun/launcher/pneumatic(get_turf(src))
qdel(src)
return
@@ -4,7 +4,7 @@
icon = 'icons/obj/ammo.dmi'
icon_state = "syringe-cartridge"
var/icon_flight = "syringe-cartridge-flight" //so it doesn't look so weird when shot
matter = list("metal" = 125, "glass" = 375)
matter = list(DEFAULT_WALL_MATERIAL = 125, "glass" = 375)
flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 3
@@ -52,11 +52,10 @@
//unfortuately we don't know where the dart will actually hit, since that's done by the parent.
if(L.can_inject())
if(syringe.reagents)
syringe.reagents.trans_to(L, 15)
syringe.reagents.trans_to_mob(L, 15, CHEM_BLOOD)
syringe.break_syringe(iscarbon(hit_atom)? hit_atom : null)
syringe.update_icon()
icon_state = initial(icon_state) //reset icon state
update_icon()
@@ -67,15 +66,15 @@
item_state = "syringegun"
w_class = 3
force = 7
matter = list("metal" = 2000)
matter = list(DEFAULT_WALL_MATERIAL = 2000)
slot_flags = SLOT_BELT
fire_sound = 'sound/weapons/empty.ogg'
fire_sound_text = "a metallic thunk"
recoil = 0
release_force = 10
throw_distance = 10
var/list/darts = list()
var/max_darts = 1
var/obj/item/weapon/syringe_cartridge/next
+8 -8
View File
@@ -8,9 +8,9 @@
icon_state = "revolver"
origin_tech = "combat=2;materials=2"
w_class = 3
matter = list("metal" = 1000)
matter = list(DEFAULT_WALL_MATERIAL = 1000)
recoil = 1
var/caliber = "357" //determines which casings will fit
var/handle_casings = EJECT_CASINGS //determines how spent casings should be handled
var/load_method = SINGLE_CASING|SPEEDLOADER //1 = Single shells, 2 = box or quick loader, 3 = magazine
@@ -18,7 +18,7 @@
//For SINGLE_CASING or SPEEDLOADER guns
var/max_shells = 0 //the number of casings that will fit inside
var/ammo_type = null //the type of ammo that the gun comes preloaded with
var/ammo_type = null //the type of ammo that the gun comes preloaded with
var/list/loaded = list() //stored ammo
//For MAGAZINE guns
@@ -50,7 +50,7 @@
chambered = ammo_magazine.stored_ammo[1]
if(handle_casings != HOLD_CASINGS)
ammo_magazine.stored_ammo -= chambered
if (chambered)
return chambered.BB
return null
@@ -186,7 +186,7 @@
)
if(auto_eject_sound)
playsound(user, auto_eject_sound, 40, 1)
ammo_magazine.update_icon()
ammo_magazine.update_icon()
ammo_magazine = null
update_icon() //make sure to do this after unsetting ammo_magazine
@@ -213,8 +213,8 @@
set name = "Unload Ammo"
set category = "Object"
set src in usr
if(usr.stat || usr.restrained()) return
unload_ammo(usr)
*/
*/
@@ -17,7 +17,7 @@
if(blocked < 2 && isliving(target))
var/mob/living/L = target
if(L.can_inject(target_zone=def_zone))
reagents.trans_to(L, reagent_amount)
reagents.trans_to_mob(L, reagent_amount, CHEM_BLOOD)
/obj/item/ammo_casing/chemdart
name = "chemical dart"
@@ -125,7 +125,7 @@
if(mixing.len)
var/mix_amount = dart.reagent_amount/mixing.len
for(var/obj/item/weapon/reagent_containers/glass/beaker/B in mixing)
B.reagents.trans_to(dart, mix_amount)
B.reagents.trans_to_obj(dart, mix_amount)
/obj/item/weapon/gun/projectile/dartgun/attack_self(mob/user)
user.set_machine(src)
@@ -41,3 +41,24 @@
name = input
M << "You name the gun [input]. Say hello to your new friend."
return 1
// Blade Runner pistol.
/obj/item/weapon/gun/projectile/revolver/deckard
name = "Deckard .44"
desc = "A custom-built revolver, based off the semi-popular Detective Special model."
icon_state = "deckard-empty"
ammo_type = /obj/item/ammo_magazine/c38/rubber
/obj/item/weapon/gun/projectile/revolver/deckard/update_icon()
..()
if(loaded.len)
icon_state = "deckard-loaded"
else
icon_state = "deckard-empty"
/obj/item/weapon/gun/projectile/revolver/deckard/load_ammo(var/obj/item/A, mob/user)
if(istype(A, /obj/item/ammo_magazine))
flick("deckard-reload",src)
..()
+11 -10
View File
@@ -180,16 +180,17 @@
visible_message("<span class='danger'>\The [target_mob] is hit by \the [src] in the [parse_zone(def_zone)]!</span>")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
//admin logs
if(istype(firer, /mob))
target_mob.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src.type]</b>"
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src.type]</b>"
msg_admin_attack("[firer] ([firer.ckey]) shot [target_mob] ([target_mob.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
else if(firer)
target_mob.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src]</b>"
msg_admin_attack("UNKNOWN shot [target_mob] ([target_mob.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
else
target_mob.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src]</b>"
msg_admin_attack("UNKNOWN shot [target_mob] ([target_mob.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target_mob.x];Y=[target_mob.y];Z=[target_mob.z]'>JMP</a>)") //BS12 EDIT ALG
if(!no_attack_log)
if(istype(firer, /mob))
var/attacker_message = "shot with \a [src.type]"
var/victim_message = "shot with \a [src.type]"
var/admin_message = "shot (\a [src.type])"
admin_attack_log(firer, target_mob, attacker_message, victim_message, admin_message)
else
target_mob.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[target_mob]/[target_mob.ckey]</b> with <b>\a [src]</b>"
msg_admin_attack("UNKNOWN shot [target_mob] ([target_mob.ckey]) with \a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target_mob.x];Y=[target_mob.y];Z=[target_mob.z]'>JMP</a>)")
//sometimes bullet_act() will want the projectile to continue flying
if (target_mob.bullet_act(src, def_zone) == -1)
@@ -68,6 +68,7 @@
icon_state = "bluelaser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
no_attack_log = 1
damage_type = BURN
check_armour = "laser"
@@ -87,6 +88,7 @@
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
no_attack_log = 1
damage_type = BURN
check_armour = "laser"
@@ -45,12 +45,12 @@
var/chance = 0
if(istype(A, /turf/simulated/wall))
var/turf/simulated/wall/W = A
chance = round(damage/W.damage_cap*180)
chance = round(damage/W.material.integrity*180)
else if(istype(A, /obj/machinery/door))
var/obj/machinery/door/D = A
chance = round(damage/D.maxhealth*180)
if(D.glass) chance *= 2
else if(istype(A, /obj/structure/girder) || istype(A, /obj/structure/cultgirder))
else if(istype(A, /obj/structure/girder))
chance = 100
else if(istype(A, /obj/machinery) || istype(A, /obj/structure))
chance = 25
@@ -196,4 +196,4 @@
/obj/item/projectile/bullet/shotgun/practice
name = "practice"
damage = 5
damage = 5