Files
Aurora.3/code/modules/projectiles/guns/launcher/rocket.dm
Alberyk c0425a867c More bugfixes for the january update (#4200)
-fixes #4172
-fixes #4193
-fixes #4192
-fixes #4189
-fixes #4179
-fixes #4170
-fixes #4197
-fixes #4201
-changes the access of the security checkpoint, so all heads of staff can use it
-fixes the hop being unable to access the account's computer
-fixes being able to feed holodeck penguins
-fixes modular laser weapons not interacting with firing pins
-fixes more guns not interacting with pins and remove the need for pins from certain guns, like crossbow, alien weapons and etc
-fixes unstable matter's portals and the elixir of life
-nerfs liquid fire a bit
2018-01-29 22:54:01 +02:00

50 lines
1.5 KiB
Plaintext

/obj/item/weapon/gun/launcher/rocket
name = "rocket launcher"
desc = "MAGGOT."
icon_state = "rocket"
item_state = "rocket"
w_class = 4.0
throw_speed = 2
throw_range = 10
force = 5.0
flags = CONDUCT
slot_flags = 0
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 5)
fire_sound = 'sound/weapons/rocketlaunch.ogg'
needspin = FALSE
release_force = 15
throw_distance = 30
var/max_rockets = 1
var/list/rockets = new/list()
/obj/item/weapon/gun/launcher/rocket/examine(mob/user)
if(!..(user, 2))
return
user << "<span class='notice'>[rockets.len] / [max_rockets] rockets.</span>"
/obj/item/weapon/gun/launcher/rocket/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/ammo_casing/rocket))
if(rockets.len < max_rockets)
user.drop_item()
I.loc = src
rockets += I
user << "<span class='notice'>You put the rocket in [src].</span>"
user << "<span class='notice'>[rockets.len] / [max_rockets] rockets.</span>"
else
usr << "<span class='warning'>[src] cannot hold more rockets.</span>"
/obj/item/weapon/gun/launcher/rocket/consume_next_projectile()
if(rockets.len)
var/obj/item/ammo_casing/rocket/I = rockets[1]
var/obj/item/missile/M = new (src)
M.primed = 1
rockets -= I
return M
return null
/obj/item/weapon/gun/launcher/rocket/handle_post_fire(mob/user, atom/target)
message_admins("[key_name_admin(user)] fired a rocket from a rocket launcher ([src.name]) at [target].")
log_game("[key_name(user)] used a rocket launcher ([src.name]) at [target].",ckey=key_name(src))
..()