-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more upp nades #597
more upp nades #597
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2839,6 +2839,7 @@ Defined in conflicts.dm of the #defines folder. | |||||
var/cocked = TRUE // has the UGL been cocked via opening and closing the breech? | ||||||
var/open_sound = 'sound/weapons/handling/ugl_open.ogg' | ||||||
var/close_sound = 'sound/weapons/handling/ugl_close.ogg' | ||||||
var/has_breech = TRUE | ||||||
|
||||||
/obj/item/attachable/attached_gun/grenade/Initialize() | ||||||
. = ..() | ||||||
|
@@ -2855,6 +2856,8 @@ Defined in conflicts.dm of the #defines folder. | |||||
else . += "It's empty." | ||||||
|
||||||
/obj/item/attachable/attached_gun/grenade/unique_action(mob/user) | ||||||
if(!has_breech) | ||||||
return | ||||||
if(!ishuman(usr)) | ||||||
return | ||||||
if(user.is_mob_incapacitated() || !isturf(usr.loc)) | ||||||
|
@@ -2897,7 +2900,7 @@ Defined in conflicts.dm of the #defines folder. | |||||
update_icon() | ||||||
|
||||||
/obj/item/attachable/attached_gun/grenade/reload_attachment(obj/item/explosive/grenade/G, mob/user) | ||||||
if(!breech_open) | ||||||
if(!breech_open && has_breech) | ||||||
to_chat(user, SPAN_WARNING("\The [src]'s breech must be open to load grenades! (use unique-action)")) | ||||||
return | ||||||
if(!istype(G) || istype(G, /obj/item/explosive/grenade/spawnergrenade/)) | ||||||
|
@@ -2918,7 +2921,7 @@ Defined in conflicts.dm of the #defines folder. | |||||
|
||||||
/obj/item/attachable/attached_gun/grenade/unload_attachment(mob/user, reload_override = FALSE, drop_override = FALSE, loc_override = FALSE) | ||||||
. = TRUE //Always uses special unloading. | ||||||
if(!breech_open) | ||||||
if(!breech_open && has_breech) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
to_chat(user, SPAN_WARNING("\The [src] is closed! You must open it to take out grenades!")) | ||||||
return | ||||||
if(!current_rounds) | ||||||
|
@@ -2943,12 +2946,12 @@ Defined in conflicts.dm of the #defines folder. | |||||
if(user) | ||||||
to_chat(user, SPAN_WARNING("You must hold [gun] with two hands to use \the [src].")) | ||||||
return | ||||||
if(breech_open) | ||||||
if(breech_open && has_breech) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
if(user) | ||||||
to_chat(user, SPAN_WARNING("You must close the breech to fire \the [src]!")) | ||||||
playsound(user, 'sound/weapons/gun_empty.ogg', 50, TRUE, 5) | ||||||
return | ||||||
if(!cocked) | ||||||
if(!cocked && has_breech) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Same as with |
||||||
if(user) | ||||||
to_chat(user, SPAN_WARNING("You must cock \the [src] to fire it! (open and close the breech)")) | ||||||
playsound(user, 'sound/weapons/gun_empty.ogg', 50, TRUE, 5) | ||||||
|
@@ -3033,6 +3036,20 @@ Defined in conflicts.dm of the #defines folder. | |||||
. = ..() | ||||||
grenade_pass_flags = NO_FLAGS | ||||||
|
||||||
/obj/item/attachable/attached_gun/grenade/upp | ||||||
name = "\improper Type 83 overslung grenade launcher" | ||||||
desc = "Unorthodox design, this single-round grenade launchers was made specifically for use with Type 71 pulse rifles. It can be quickly connected to electronic firing mechanism of the rifle, albeit wiring is prone to failures." | ||||||
icon_state = "type83" | ||||||
attach_icon = "type83_a" | ||||||
current_rounds = 0 | ||||||
max_rounds = 1 | ||||||
max_range = 14 | ||||||
attachment_firing_delay = 5 | ||||||
slot = "special" | ||||||
pixel_shift_x = 0 | ||||||
pixel_shift_y = 0 | ||||||
has_breech = FALSE | ||||||
|
||||||
//"ammo/flamethrower" is a bullet, but the actual process is handled through fire_attachment, linked through Fire(). | ||||||
/obj/item/attachable/attached_gun/flamer | ||||||
name = "mini flamethrower" | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Real minor nitpick, but reads better if
has_breech
is checked beforebreech_open
.breech_open
depends onhas_breech
to mean something, so flows better to checkhas_breech
first.