Fixes the RPG, renames it and adds some fluff text (#42853)

* fixes rocket launcher, but not some other issues with it

* oh god oh fuck I broke everything

* ok nevermind we rollin

* remove a dumb testing runtime

* less weird gramma on new description

* change the typepath of the rocket to make it easier to know what it is

* I don't remember if I even changed anything here but here it is anyways

* grammar error fix

* better qdel

* casing to fix the article system

* grammar fixes + hack to clear the mag

* small hack for single round mags and makes sure icons update after being loaded

* whoops

* minimize diffs

* capitalization with improper flag
This commit is contained in:
Rob Bailey
2019-02-25 02:48:11 -08:00
committed by Jordie
parent c8254feed5
commit 86cb5c2576
9 changed files with 32 additions and 77 deletions

View File

@@ -18,7 +18,7 @@
user.changeNext_move(CLICK_CD_RANGE)
user.newtonian_move(get_dir(target, user))
update_icon()
return 1
return TRUE
/obj/item/ammo_casing/proc/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
if (!BB)
@@ -38,7 +38,7 @@
/obj/item/ammo_casing/proc/throw_proj(atom/target, turf/targloc, mob/living/user, params, spread)
var/turf/curloc = get_turf(user)
if (!istype(targloc) || !istype(curloc) || !BB)
return 0
return FALSE
var/firing_dir
if(BB.firer)
@@ -54,7 +54,7 @@
BB.preparePixelProjectile(target, user, params, spread)
BB.fire(null, direct_target)
BB = null
return 1
return TRUE
/obj/item/ammo_casing/proc/spread(turf/target, turf/current, distro)
var/dx = abs(target.x - current.x)

View File

@@ -6,9 +6,10 @@
/obj/item/ammo_casing/caseless/fire_casing(atom/target, mob/living/user, params, distro, quiet, zone_override, spread)
if (..()) //successfully firing
moveToNullspace()
return 1
QDEL_NULL(src)
return TRUE
else
return 0
return FALSE
/obj/item/ammo_casing/caseless/update_icon()
..()

View File

@@ -1,16 +1,17 @@
/obj/item/ammo_casing/caseless/a84mm
desc = "A 84mm HE rocket."
caliber = "84mm"
icon_state = "84mm-hedp"
projectile_type = /obj/item/projectile/bullet/a84mm
/obj/item/ammo_casing/caseless/srm8
desc = "A 84mm HE rocket."
/obj/item/ammo_casing/caseless/rocket
name = "\improper PM-9HE"
desc = "An 84mm High Explosive rocket. Fire at people and pray."
caliber = "84mm"
icon_state = "srm-8"
projectile_type = /obj/item/projectile/bullet/a84mm_he
/obj/item/ammo_casing/caseless/rocket/hedp
name = "\improper PM-9HEDP"
desc = "An 84mm High Explosive Dual Purpose rocket. Pointy end toward mechs."
caliber = "84mm"
icon_state = "84mm-hedp"
projectile_type = /obj/item/projectile/bullet/a84mm
/obj/item/ammo_casing/caseless/a75
desc = "A .75 bullet casing."
caliber = "75"

View File

@@ -10,21 +10,8 @@
caliber = "40mm"
max_ammo = 1
/obj/item/ammo_box/magazine/rocket
name = "84mm HE rocket"
desc = "A 84mm rocket."
icon_state = "srm-8"
ammo_type = /obj/item/ammo_casing/caseless/srm8
/obj/item/ammo_box/magazine/internal/rocketlauncher
name = "rocket launcher internal magazine"
ammo_type = /obj/item/ammo_casing/caseless/rocket
caliber = "84mm"
max_ammo = 1
w_class = WEIGHT_CLASS_NORMAL
/obj/item/ammo_box/magazine/rocket/update_icon()
..()
desc = initial(desc)
/obj/item/ammo_box/magazine/rocket/hedp
name = "84mm HEDP rocket"
icon_state = "84mm-hedp"
ammo_type = /obj/item/ammo_casing/caseless/a84mm

View File

@@ -206,7 +206,7 @@
return
if(weapon_weight == WEAPON_HEAVY && user.get_inactive_held_item())
to_chat(user, "<span class='userdanger'>You need both hands free to fire [src]!</span>")
to_chat(user, "<span class='userdanger'>You need both hands free to fire \the [src]!</span>")
return
//DUAL (or more!) WIELDING

View File

@@ -117,7 +117,7 @@
chambered = null
else if(empty_chamber)
chambered = null
if (chamber_next_round)
if (chamber_next_round && (magazine.max_ammo > 1))
chamber_round()
/obj/item/gun/ballistic/proc/chamber_round()
@@ -308,6 +308,7 @@
if (num_unloaded)
to_chat(user, "<span class='notice'>You unload [num_unloaded] [cartridge_wording]\s from [src].</span>")
playsound(user, eject_sound, eject_sound_volume, eject_sound_vary)
update_icon()
else
to_chat(user, "<span class='warning'>[src] is empty!</span>")
return

View File

@@ -43,11 +43,11 @@
casing_ejector = FALSE
/obj/item/gun/ballistic/rocketlauncher
name = "rocket propelled grenade launcher"
desc = "A reusable rocket propelled grenade launcher."
name = "\improper PML-9"
desc = "A reusable rocket propelled grenade launcher. The words \"NT this way\" and an arrow have been written near the barrel."
icon_state = "rocketlauncher"
item_state = "rocketlauncher"
mag_type = /obj/item/ammo_box/magazine/rocket
mag_type = /obj/item/ammo_box/magazine/internal/rocketlauncher
fire_sound = 'sound/weapons/rocketlaunch.ogg'
w_class = WEIGHT_CLASS_BULKY
can_suppress = FALSE
@@ -57,55 +57,20 @@
casing_ejector = FALSE
weapon_weight = WEAPON_HEAVY
bolt_type = BOLT_TYPE_NO_BOLT
magazine_wording = "rocket"
internal_magazine = TRUE
cartridge_wording = "rocket"
empty_indicator = TRUE
/obj/item/gun/ballistic/rocketlauncher/handle_atom_del(atom/A)
if(A == chambered)
chambered = null
if(!QDELETED(magazine))
QDEL_NULL(magazine)
if(A == magazine)
magazine = null
if(!QDELETED(chambered))
QDEL_NULL(chambered)
update_icon()
return ..()
/obj/item/gun/ballistic/rocketlauncher/can_shoot()
return chambered?.BB
/obj/item/gun/ballistic/rocketlauncher/unrestricted
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/rocketlauncher/process_chamber()
if(chambered)
chambered = null
if(magazine)
QDEL_NULL(magazine)
update_icon()
/obj/item/gun/ballistic/rocketlauncher/afterattack()
. = ..()
magazine.get_round(FALSE) //Hack to clear the mag after it's fired
/obj/item/gun/ballistic/rocketlauncher/attack_self_tk(mob/user)
return //too difficult to remove the rocket with TK
/obj/item/gun/ballistic/rocketlauncher/attack_self(mob/living/user)
if(magazine)
if(chambered)
chambered.forceMove(magazine)
magazine.stored_ammo.Insert(1, chambered)
chambered = null
else
stack_trace("Removed [magazine] from [src] without a chambered round")
magazine.forceMove(drop_location())
if(user.is_holding(src))
user.put_in_hands(magazine)
playsound(src, 'sound/weapons/gun_magazine_remove_full.ogg', 70, TRUE)
to_chat(user, "<span class='notice'>You work the [magazine] out from [src].</span>")
magazine = null
else
to_chat(user, "<span class='notice'>There's no rocket in [src].</span>")
update_icon()
/obj/item/gun/ballistic/rocketlauncher/suicide_act(mob/living/user)
user.visible_message("<span class='warning'>[user] aims [src] at the ground! It looks like [user.p_theyre()] performing a sick rocket jump!<span>", \
"<span class='userdanger'>You aim [src] at the ground to perform a bisnasty rocket jump...</span>")