Skip to content
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

Fixed the Riot foam icon #5676

Merged
merged 7 commits into from
Sep 15, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions code/modules/projectiles/ammunition/ammo_casings.dm
Original file line number Diff line number Diff line change
Expand Up @@ -306,19 +306,30 @@
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foamdart"
var/modified = 0
var/riot = 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused var.


/obj/item/ammo_casing/caseless/foam_dart/update_icon()
..()
if(modified)
if((modified)&&(riot))
icon_state = "foamdart_empty"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't change the description or order unless there's an explicit reason to. In this case, there isn't.

desc = "Whose smart idea was it to use toys as crowd control? ... Although, this one doesn't look too safe."
if(BB)
BB.icon_state = "foamdart_empty"
else if(modified)
icon_state = "foamdart_empty"
desc = "Its nerf or nothing! ... Although, this one doesn't look too safe."
if(BB)
BB.icon_state = "foamdart_empty"
else if(riot)
icon_state = "foamdart_riot"
desc = "Whose smart idea was it to use toys as crowd control? Ages 18 and up."
if(BB)
BB.icon_state = "foamdart_riot"
else
icon_state = "foamdart"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

icon_state = initial(icon_state)

desc = "Its nerf or nothing! Ages 8 and up."
if(BB)
BB.icon_state = "foamdart_empty"
BB.icon_state = "foamdart"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BB.icon_state = initial(BB.icon_state)


/obj/item/ammo_casing/caseless/foam_dart/attackby(obj/item/A, mob/user, params)
..()
Expand Down Expand Up @@ -351,6 +362,7 @@
desc = "Whose smart idea was it to use toys as crowd control? Ages 18 and up."
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart/riot
icon_state = "foamdart_riot"
riot = 1

/obj/item/ammo_casing/shotgun/dart/assassination
desc = "A specialist shotgun dart designed to inncapacitate and kill the target over time, so you can get very far away from your target"
Expand Down