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

DS doorgun no longer drops the gun when destroyed #5211

Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 5 additions & 1 deletion code/modules/cm_marines/dropship_equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@
deployed_mg = new(src)
deployed_mg.deployment_system = src

/obj/structure/dropship_equipment/mg_holder/Destroy()
QDEL_NULL(deployed_mg)
. = ..()

/obj/structure/dropship_equipment/mg_holder/get_examine_text(mob/user)
. = ..()
if(!deployed_mg)
Expand Down Expand Up @@ -360,7 +364,7 @@
deployed_mg.forceMove(src)
deployed_mg.setDir(dir)
else
icon_state = "mg_system_destroyed"
icon_state = "sentry_system_destroyed"

/obj/structure/dropship_equipment/mg_holder/proc/deploy_mg(mob/user)
if(deployed_mg)
Expand Down
12 changes: 12 additions & 0 deletions code/modules/cm_marines/smartgun_mount.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,18 @@
zoom = 1
ammo = /datum/ammo/bullet/machinegun/doorgun

/obj/structure/machinery/m56d_hmg/mg_turret/update_health(amount) //Negative values restores health.
health -= amount
if(health <= 0)
playsound(src.loc, 'sound/items/Welder2.ogg', 25, 1)
qdel(src)
return

if(health > health_max)
health = health_max
update_damage_state()
update_icon()

/obj/structure/machinery/m56d_hmg/mg_turret/dropship
name = "\improper scoped M56D heavy machine gun"
desc = "A scoped M56D heavy machine gun mounted behind a metal shield. Drag its sprite onto yourself to man it. Ctrl-click it to toggle burst fire."
Expand Down