June update fixes (#4905)

-fixes the catbeast plants missing from botany
-fixes a runtime on the minigun
-fixes #4870
This commit is contained in:
Alberyk
2018-06-18 15:53:11 -03:00
committed by Erki
parent 198f2d7fcf
commit 0654f921d9
4 changed files with 27 additions and 13 deletions

View File

@@ -15,7 +15,7 @@
var/obj/item/ammo_magazine/ammo_magazine
var/magazine_type = /obj/item/ammo_magazine/minigun
/obj/item/minigunpack/update_icon(var/mob/user)
/obj/item/minigunpack/update_icon()
..()
if(armed)
icon_state = "notholstered"
@@ -23,7 +23,6 @@
else
icon_state = "holstered"
item_state = "holstered"
user.update_inv_back()
/obj/item/minigunpack/Initialize()
. = ..()
@@ -72,12 +71,14 @@
return
armed = TRUE
update_icon(user)
update_icon()
user.update_inv_back()
/obj/item/minigunpack/equipped(mob/user, slot)
..()
if(slot != slot_back)
remove_gun()
user.update_inv_back()
/obj/item/minigunpack/proc/remove_gun()
if(!gun)
@@ -85,7 +86,7 @@
if(ismob(gun.loc))
var/mob/M = gun.loc
if(M.drop_from_inventory(gun, src))
update_icon(M)
update_icon()
else
gun.forceMove(src)
update_icon()
@@ -160,7 +161,8 @@
if(source)
to_chat(user, "<span class='notice'>\The [src] snaps back onto \the [source].</span>")
addtimer(CALLBACK(source, /obj/item/minigunpack/.proc/remove_gun), 0)
source.update_icon(user)
source.update_icon()
user.update_inv_back()
/obj/item/weapon/gun/projectile/automatic/rifle/minigun/Move()
..()