Files
Paradise/code/modules/projectiles/guns/rocket.dm
T
Qwertytoforty f105159acb Ports the scope component from TG and new scope eyes (#24288)
* Ports the scope component from TG.

* scope eyes

* now in scope

* fixes lwap canceling other scopes

* Update code/datums/components/scope.dm

Co-authored-by: Charlie Nolan <funnyman3595@gmail.com>

* c-c-c-changes

* Apply suggestions from code review

Co-authored-by: Farie82 <farie82@users.noreply.github.com>

* Update scope.dm

* moves it off the gun

* Update code/datums/components/scope.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>

* fixes stealth conflict

* do_after_once

---------

Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Co-authored-by: Charlie Nolan <funnyman3595@gmail.com>
Co-authored-by: Farie82 <farie82@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
2024-05-14 09:26:04 +00:00

45 lines
1.2 KiB
Plaintext

/obj/item/gun/rocketlauncher
var/projectile
name = "rocket launcher"
desc = "A rocket propelled grenade launcher. Holds one shell at a time."
icon_state = "rocket"
item_state = "rocket"
w_class = WEIGHT_CLASS_BULKY
throw_speed = 2
throw_range = 3
force = 15
flags = CONDUCT
origin_tech = "combat=6;syndicate=7"
fire_sound = 'sound/weapons/blastcannon.ogg'
fire_delay = 40
recoil = 2
var/missile_speed = 2
var/missile_range = 30
/obj/item/gun/rocketlauncher/Initialize(mapload)
. = ..()
AddComponent(/datum/component/scope, range_modifier = 2)
/obj/item/gun/rocketlauncher/examine(mob/user)
. = ..()
. += "<span class='notice'>It is currently [chambered ? "" : "un"]loaded.</span>"
/obj/item/gun/rocketlauncher/attackby(obj/item/I, mob/user, params)
if(!istype(I, /obj/item/ammo_casing/rocket))
return ..()
if(!chambered)
user.unEquip(I)
I.forceMove(src)
chambered = I
to_chat(user, "<span class='notice'>You put the rocket in [src].</span>")
else
to_chat(user, "<span class='notice'>[src] cannot hold another rocket.</span>")
/obj/item/gun/rocketlauncher/process_chamber()
QDEL_NULL(chambered)
/obj/item/gun/rocketlauncher/can_shoot()
return chambered