Pneumatic cannon sprites, gas loss code.
@@ -1,8 +1,9 @@
|
|||||||
/obj/item/weapon/storage/pneumatic
|
/obj/item/weapon/storage/pneumatic
|
||||||
name = "pneumatic cannon"
|
name = "pneumatic cannon"
|
||||||
desc = "A large gas-powered cannon."
|
desc = "A large gas-powered cannon."
|
||||||
icon_state = "backpack"
|
icon = 'icons/obj/gun.dmi'
|
||||||
item_state = "backpack"
|
icon_state = "pneumatic"
|
||||||
|
item_state = "pneumatic"
|
||||||
w_class = 4.0
|
w_class = 4.0
|
||||||
flags = FPRINT|TABLEPASS
|
flags = FPRINT|TABLEPASS
|
||||||
max_w_class = 3
|
max_w_class = 3
|
||||||
@@ -39,6 +40,9 @@
|
|||||||
usr << "You twist the valve and pop the tank out of [src]."
|
usr << "You twist the valve and pop the tank out of [src]."
|
||||||
tank.loc = usr.loc
|
tank.loc = usr.loc
|
||||||
tank = null
|
tank = null
|
||||||
|
icon_state = "pneumatic"
|
||||||
|
item_state = "pneumatic"
|
||||||
|
usr.update_icons()
|
||||||
else
|
else
|
||||||
usr << "There's no tank in [src]."
|
usr << "There's no tank in [src]."
|
||||||
|
|
||||||
@@ -48,6 +52,9 @@
|
|||||||
tank = W
|
tank = W
|
||||||
tank.loc = src.tank_container
|
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.")
|
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
|
else
|
||||||
..()
|
..()
|
||||||
|
|
||||||
@@ -86,6 +93,10 @@
|
|||||||
user << "There is no gas tank in [src]!"
|
user << "There is no gas tank in [src]!"
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
if (cooldown)
|
||||||
|
user << "The chamber hasn't built up enough pressure yet!"
|
||||||
|
return 0
|
||||||
|
|
||||||
var/fire_pressure = (tank.air_contents.return_pressure()/100)*pressure_setting
|
var/fire_pressure = (tank.air_contents.return_pressure()/100)*pressure_setting
|
||||||
|
|
||||||
if (fire_pressure < minimum_tank_pressure)
|
if (fire_pressure < minimum_tank_pressure)
|
||||||
@@ -101,6 +112,10 @@
|
|||||||
src.remove_from_storage(object,user.loc)
|
src.remove_from_storage(object,user.loc)
|
||||||
object.throw_at(target,10,speed)
|
object.throw_at(target,10,speed)
|
||||||
|
|
||||||
|
var/lost_gas_amount = tank.air_contents.total_moles*(pressure_setting/100)
|
||||||
|
var/datum/gas_mixture/removed = tank.air_contents.remove(lost_gas_amount)
|
||||||
|
user.loc.assume_air(removed)
|
||||||
|
|
||||||
cooldown = 1
|
cooldown = 1
|
||||||
spawn(cooldown_time)
|
spawn(cooldown_time)
|
||||||
cooldown = 0
|
cooldown = 0
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 141 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 36 KiB |