Files
CHOMPStation2/code/modules/projectiles/guns/launcher/rocket.dm
Cameron653 e158fcd3cc Macro Replacements. (#3574)
* A preface to my madness

Travis failed one of my PR's because I copied old code
that used /red /blue /green.

Because of this, I am going to find and replace every
instance of it that I find.

Also this is a test commit to make sure I'm comitting
to the correct branch.

* /blue /green /red replacements

Dear god.

A slow and painful death from acid is more fun than this.

I wouldn't wish this torture on my worst enemy.
And this is only the beginning

* Replace part 2.

Time to fix the human error.

* Fixes mismatches

* Sets macro count to 220

One above the current number of macros in the code.

* Fixes last of the mismatches.

* Removes spaces, replaces \black

Removes spaces
Replaces \black in a few areas where seen
Replaces \bold with <B> </B> where seen

* Updating macro count again

* More fixes!

* Issues fixed! For real this time!

I swear!

* Fixing all the merge conflict files.
2017-07-19 12:47:23 -05:00

49 lines
1.5 KiB
Plaintext

/obj/item/weapon/gun/launcher/rocket
name = "rocket launcher"
desc = "MAGGOT."
icon_state = "rocket"
item_state = "rocket"
w_class = ITEMSIZE_LARGE
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/rpg.ogg'
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 << "<font color='blue'>[rockets.len] / [max_rockets] rockets.</font>"
/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 << "<font color='blue'>You put the rocket in [src].</font>"
user << "<font color='blue'>[rockets.len] / [max_rockets] rockets.</font>"
else
usr << "<font color='red'>[src] cannot hold more rockets.</font>"
/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_admin(user)] used a rocket launcher ([src.name]) at [target].")
..()